Xcode 6.x arm64 code build crashing without any compilation or communication error
I just enabled arm64 support for my project. Below are the build settings (only bold / changed since project start):
> Architectures:
Architectures: Standard Architectures (armv7, arm64) - $(ARCHS_STANDARD)
Base SDK: Latest iOS (iOS 8.3)
Build Active Architecture Only: NO
Supported Platforms: iOS
Valid Architectures: armv7 armv7s arm64
> Build Options
Validate Built Product: Yes
> Deployment
Strip Debug Symbols: Druing Copy: No
> Linking
Other Linker Flags: -lxml2 -lz -ObjC
> Packaging
Compress PNG Files: No
Info.plist File: <project_name>/Info.plist
Wrapper Extension: app
> Apple LLVM 6.1 - Code Generation
Generate Position-Dependent Code: No
Optimization Level: None [-O0]
> Apple LLVM 6.1 - Language
Precompile Prefix Header: Yes
Prefix Header: <project_name>/Prefix.pch
> Apple LLVM 6.1 - Preprocessing
Preprocessor Macros:
Debug: DEBUG COCOS2D_DEBUG=1 CC_TARGET_OS_IPHONE USE_FILE32API APP_TARGET=1 CC_ENABLE_CHIPMUNK_INTEGRATION
Distribution: NDEBUG USE_FILE32API CC_TARGET_OS_IPHONE APP_TARGET=1 CC_ENABLE_CHIPMUNK_INTEGRATION
Release: NDEBUG USE_FILE32API CC_TARGET_OS_IPHONE APP_TARGET=1 CC_ENABLE_CHIPMUNK_INTEGRATION
> Interface Builder NIB Postprocessor - Options
Strip NIB Files: No
My project uses cocos2dx 2.2.6, with Chartboost, Apsalar, Flurry, Tapjoy and Fyber (Sponsor-Pay). I also checked static library files (.a) for 64 bit suppport using:
xcrun -sdk iphoneos lipo -info ./<project_path>/libs/cocos2dx/platform/third_party/ios/libraries/libwebp.a
Architectures in the fat file: ./<project_path>/libs/cocos2dx/platform/third_party/ios/libraries/libwebp.a are: i386 armv7 armv7s x86_64 arm64
All my static libs (.a) files show arm64, which means they support building and packaging with 64bit.
Now when I try to build my code (as for simulator / device) xcode shows that the build failed in the end after compiling / building my files. In the errors / warnings section of the left pane, I didn't get an error / compile time message. Although it shows some code warnings, the code warnings were present before arm64 support was enabled.
source to share
Thanks to my friend, I finally managed to see the errors. This is some kind of bug in XCode. I did the following steps:
- Install Embedded Active Architecture Only: Yes
- Connect your device with arm64 architecture and OS (iPhone 6 plus)
- Cleaning and assembly
- Now you will be shown errors
- Fix bugs (although in my observation these bugs were missing in 32-bit build)
- When you fix all bugs, install only embedded active architecture: No
- Cleaning and assembly
- What is it. Done
I hope this helps someone else too.
source to share