DISABLE ARC still got Errors - objective-c

i'm trying DISABLE ARC in some Facebook classes and still got Errors.
my steps was like that:
1) Build Settings:
i Activated ARC=YES.
Other linker flags = -ObjC -all_load
2) Build Settings>Compile Sources:
-fno-obj-arc for All clases i want to disable ARC.
after all that, i still gets an error build for all "release" in my project.
why? :/

It's -fno-objc-arc to disable ARC, not -fno-obj-arc. I'm sure you don't need it, but see the Use Compiler Flags to Enable and Disable ARC in the Transitioning to ARC Release Notes.
I'd also encourage you to check out the latest Facebook SDK, if you can, which is ARC compatible.

Related

How to convert old project to use ARC?

I have old project that uses manual memory management. My new projects are using ARC. How can I convert my old project to use ARC as well?
Yes, you are on the right track: Your new project uses ARC (automatic reference counting). There is a lot of information available on Stackoverflow and other sites on how you can migrate to ARC.
However, you can also tell Xcode to not use ARC for individual files. Just add the -fno-objc-arc flag in Build Phases - Compile Sources. (There, you can add a flag to a file by double-clicking the file.)

How do I hide GCDAsyncSocket warnings for 10.9 deprecations

10.9 deprecated a bunch of SSL stuff, how do I hide the warnings or fix the issues?
You can turn deprecation warnings on and off in your target's build settings. To do so, click on your project in the Project Navigator, select the target you're working on and show the Build Settings for that target. You can use the search box to search for "deprecate", and you should find an LLVM warning for "Deprecated Functions" and set it to "No".
Be aware that if you do this, you can compile without (deprecation) warnings, but you're setting yourself up to have broken code in the future. At some point you really should rewrite that code using the new proper method as #CodaFi mentions above.

Does xcodebuild command have some options about C++ compile options?

When I used Xcode 4.6 preview verion or xcodebuild command, I had a such error below.
invalid suffix on literal; C++11 requires a space between literal and identifier
However When I used Xcode4, there were no errors.
I don't have much knowledge about C++ and the compiler, so I couldn't find the answer from Internet.
Would you tell me how can I avoid the error with xcodebuild command?
If you invoke xcodebuild from the cmd-line, it should be essentially the same as building the target from within Xcode's IDE.
The only difference that I can think of is that running from the cmd-line will default to Release configuration, whereas inside the IDE will probably use debug. (These can be overridden in both cases).
Could it be that you have a different C++ flags for Debug and Release, and this is making it not work? Try building your project with Release mode inside the IDE, and see what happens.

Automated detection of deprecated SDK methods in iOS/OS X and XCode 4.5?

Just by accident, I saw that presentModalViewController:animated: is listed as deprecated in iOS 6.0, but it doesn't seem to generate any warnings in XCode 4.5 when I deliberately include code that sends this message. I am building against the "Latest iOS (iOS 6.0)" using the most recent version of XCode, but no warnings are generated when compiling. I've checked the LLVM compiler warnings for all languages and Objective-C in Build Settings, but I don't see a setting for warning on sending deprecated messages, only for overriding them. However I've searched StackOverflow and I've seen mentions of suppressing deprecation warnings for gcc on earlier versions of XCode. Is this a side effect of switching to LLVM, or is there a setting that I'm not understanding?
(And if not, would people like for me to write a tool that automatically scrapes the Apple SDK documentation and searches directories for deprecated message sends by SDK version?)
-Wdeprecated-declarations is the warning you're looking for. Or just build with -Wall.

AFNetworking Older version without arc

I want to download AFNetwoking's older version without arc please guide.
If you do not use ARC in your project you can add the -fobjc-arc flag to all the AFNetworking source files to compile only those under ARC. You can set these flags in the "Compile Sources" part of the Build Phases tab in the project settings.
You can also go to the GitHub tags and download version 0.10.1.