2013-10-13

Fix the Build Problem of Google Plus SDK in XCode (iOS)

Fix:Google Plus SDK building problem in XCode 
If you meet the following build issues (in red color)

Please add "CoreText.framework" and "CoreMotion.framework" and "ALAssetsLibrary.framework" into "Targets"->"Build Phases"->"Link Binary with Libraries"
And rebuild your xcode project.
Undefined symbols for architecture armv7:  "_CTFramesetterCreateFrame", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView runAtPosition:] in GooglePlus(GPPStyledTextView.o)  "_CTLineGetTypographicBounds", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)  "_CTLineGetGlyphRuns", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView runAtPosition:] in GooglePlus(GPPStyledTextView.o)  "_CTRunGetAttributes", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView hitTest:withEvent:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView handleTouch:] in GooglePlus(GPPStyledTextView.o)  "_OBJC_CLASS_$_CMMotionManager", referenced from:      objc-class-ref in GooglePlus(GPPSpamSignal.o)  "_CTFramesetterCreateWithAttributedString", referenced from:      -[GPPStyledTextView heightForWidth:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView runAtPosition:] in GooglePlus(GPPStyledTextView.o)  "_CTFramesetterSuggestFrameSizeWithConstraints", referenced from:      -[GPPStyledTextView heightForWidth:] in GooglePlus(GPPStyledTextView.o)  "_CTLineCreateWithAttributedString", referenced from:      _gpp_newTruncatedLine in GooglePlus(GPPStyledTextView.o)  "_CTFrameGetLineOrigins", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView runAtPosition:] in GooglePlus(GPPStyledTextView.o)  "_kCTForegroundColorAttributeName", referenced from:      -[GPPHtmlSnippet parser:foundCharacters:] in GooglePlus(GPPHtmlSnippet.o)      _gpp_newTruncatedLine in GooglePlus(GPPStyledTextView.o)  "_CTLineGetStringRange", referenced from:      _gpp_newTruncatedLine in GooglePlus(GPPStyledTextView.o)  "_CTLineCreateTruncatedLine", referenced from:      _gpp_newTruncatedLine in GooglePlus(GPPStyledTextView.o)  "_CTFrameGetLines", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView runAtPosition:] in GooglePlus(GPPStyledTextView.o)  "_kCTFontAttributeName", referenced from:      -[GPPHtmlSnippet parser:foundCharacters:] in GooglePlus(GPPHtmlSnippet.o)      _gpp_newTruncatedLine in GooglePlus(GPPStyledTextView.o)  "_CTFontManagerRegisterGraphicsFont", referenced from:      ___45+[NSBundle(GPP3PAdditions) gpp_registerFonts]_block_invoke in GooglePlus(NSBundle+GPP3PAdditions.o)  "_CTFontCreateWithName", referenced from:      +[UIFont(GPPAdditions) gpp_CTFontForFontSize:attributes:] in GooglePlus(UIFont+GPPAdditions.o)      _gpp_newTruncatedLine in GooglePlus(GPPStyledTextView.o)  "_CTRunGetTypographicBounds", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)      -[GPPStyledTextView runAtPosition:] in GooglePlus(GPPStyledTextView.o)  "_CTLineDraw", referenced from:      -[GPPStyledTextView drawRect:] in GooglePlus(GPPStyledTextView.o)  "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:      objc-class-ref in GooglePlus(NSData+GPPAdditions.o)      objc-class-ref in GooglePlus(UIDevice+GPPAdditions.o)ld: symbol(s) not found for architecture armv7clang: error: linker command failed with exit code 1 (use -v to see invocation)

5 comments: