2013-10-25

Build Error: -fobjc-arc is not supported On Mac OS10.8 Mavericks and XCode 5.0

If you upgrade your Mac OSX project from XCode 4.6.3 to XCode 5.0.1
you may meet the following build problem.

error: -fobjc-arc is not supported on platforms using the legacy runtime

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

trun off the ARC in the project settings, and rebuild with XCode 5.0.1

2013-10-23

What's New in iOS 7.0.3?

When you upgrade from iOS 7.0.2 to 7.0.3
you may need to know which error is fixed or improved?

here are the information from Apple.

This update contains improvements and bug fixes, including:
  • Adds iCloud Keychain to keep track of your account names, passwords, and credit card numbers across all your approved devices
  • Adds Password Generator so Safari can suggest unique, hard-to-guess passwords for your online accounts
  • Updates lock screen to delay display of "slide to unlock" when Touch ID is in use
  • Adds back the ability to search the web and Wikipedia from Spotlight search
  • Fixes an issue where iMessage failed to send for some users
  • Fixes a bug that could prevent iMessage from activating
  • Improves system stability when using iWork apps
  • Fixes an accelerometer calibration issue
  • Addresses an issue that could cause Siri and VoiceOver to use a lower quality voice
  • Fixes a bug that could allow someone to bypass the Lock screen passcode
  • Enhances the Reduce Motion setting to minimize both motion and animation
  • Fixes an issue that could cause VoiceOver input to be too sensitive
  • Updates the Bold Text setting to also change dial pad text
  • Fixes an issue that could cause supervised devices to become un-supervised when updating software
For information on the security content of this update, please visit this website:

2013-10-22

std::string trim space error, compile error!



I just want to remove all the "space" in the strings like "Hello World!  ".
Code Like this:
std::string str("Hello World! ");
str.erase(remove_if(str.begin(), str.end(), isspace), str.end());

But I got the following compile error:
No matching function for call to 'remove_if(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, <unresolved overloaded function type>)'

Finally, I got the solution , it should add one "::" before isspace.
    str.erase(remove_if(str.begin(), str.end(), ::isspace), str.end());
isspace are overloaded functions, so the compiler doesn't know which implementation should be used

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)

2013-10-07

ShareKit build problem on xCode5: "Undefined symbols for architecture arm7"

You may meet the problem when you use iOS 7 + xCode 5 to build your project with ShareKit.

The iPhone simulation build can work, but when you switch to iPhone target, the xCode 5 will report "linking error, Undefined symbols for architecture arm7 ......".

The Problem mainly is unsuccessful build of "libGTLTouchStaticLib.a".

the solution:   quite xcode 5,  open the GTL.xcodeproj, make a build for simulation and iOS target.

and check the "libGTLTouchStaticLib.a" generated, then go back to your project, click "Product"->"Clean",  and "Build" it again.



this should be a XCode 5 problem.

About AppCoFe Blog

AppCoFe BlogAbout AppCoFe

AppCoFe focus on IT(mobile and internet) news and App Review.
AppCoFe is a personal blog which was created by a 33-year-old man.

About Me:
This guy has been a software engineer in 4 companies within 8 years.
Now he is a self-employed.

mailto: app.cofe#gmail.com