What is quickest way to convert old iOS Application written in ObjC to arm64.
When I updated valid architectures to arm64, I get tones of errors, framework missing, clangs.
Do xCode 6.3.2 Provide any help in conversion?
Related
I'm suddenly getting errors and warnings in a build that was working fine a few weeks ago - I went on holiday, came back, no workie. The only one of concern is this error:
ld: warning: ignoring file /Users/maury/Develop/MARL/ThirdParty/Flurry/libFlurry_4.2.3.a, missing required architecture x86_64 in file /Users/maury/Develop/MARL/ThirdParty/Flurry/libFlurry_4.2.3.a (4 slices)
Either the error string is wrong and it's actually looking for some other architecture, or I'm very confused as to what it's trying to do. Why would an iOS app be looking for a x86_64 arch? Is this something to do with the simulator? If so, why didn't I get this error two weeks ago?
I'm building for iOS7 on XCode5/MacOS10.9.x
If you upgraded Xcode to 5.1, you are getting that because the default architectures for your build now include 64-bit, but your library doesn't support it, so it can't link.
You can override the default by setting Architectures (ARCHS) in your build settings to something else, probably $(ARCHS_STANDARD_32_BIT)
Something like this:
I'm trying to compile sources with Xcode 4.6, for 32bit architecture, but getting this error:
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
What's wrong?
You're mixing ARC (automatic reference counting) with the older Objective-C 1.0 runtime, which does not support ARC.
32-bit apps on OSX, automatically use the 1.0 Runtime, so you'll have to disable ARC for your project, and use Manual Reference Counting.
This problem recently resurfaced because Xcode 5 removes the ARCHS parameter - if you let it. But if you have a build server with Xcode 4 this defaults there to building 32 and 64 bit, which fails if you have ARC enabled.
See my writeup for a more detailed explanation.
I have a C++11 codebase I compile with gcc 4.6 from MacPorts on OS X Lion. I also need to compile and link some OS-specific Objective C/C++ files to make the final executable. I would like to use the same compiler version to compile the whole project, but I cannot get the MacPorts version 4.6 of gcc to recognize Objective-C files; it always attempts to interpret them as C++ code and ignores the .mm file extension. (Compiling these files does work with the Xcode version of gcc, just not the MacPorts one. However that gcc is version 4.2 and I want to compile everything with gcc 4.6 or later.)
Forget IDE's or build tools: I get the same result from a commandline invocation of the compiler. That is, I record a commandline that works for compiling .mm files with the Apple gcc, verify yes it does work from the commandline, then run the identical command with nothing changed but the compiler used and it doesn't work. What am I missing?
It appears maybe the specific problem I'm having might be due to an Apple specific language extension, as the specific error I get is the same as this quote from a blog post:
After adding this, I was good for about 30 seconds until I get to the
portion of my project where some COCOA Objective-C UI stuff was being
compiled.
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24:
error: expected unqualified-id before '^' token
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24:
error: expected ')' before '^' token
Uh oh. I know what this is. This is the Apple "blocks" language
extension. It appears that blocks are used in a bunch of the system
header files. I don't think there is going to be a way to get around
this using MacPorts gcc. The FSF gcc just doesn’t know about blocks.
Fortunately for me, I didn't have anything in the Objective C/C++ code
that needed to be compiled with gcc 4.6 so I just had this target
compile using clang.
I'm trying to compile sources with Xcode 4.6, for 32bit architecture, but getting this error:
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
What's wrong?
You're mixing ARC (automatic reference counting) with the older Objective-C 1.0 runtime, which does not support ARC.
32-bit apps on OSX, automatically use the 1.0 Runtime, so you'll have to disable ARC for your project, and use Manual Reference Counting.
This problem recently resurfaced because Xcode 5 removes the ARCHS parameter - if you let it. But if you have a build server with Xcode 4 this defaults there to building 32 and 64 bit, which fails if you have ARC enabled.
See my writeup for a more detailed explanation.
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.