I had trouble with code signing errors in Xcode when tried to build a Unity 5 generated iOS project for ad hoc deployment. I used the steps described QCARWrapper.bundle codesign failed XCode and could build my ipa.
The problem:
Now the app crashes immediately after launching. The very first time I saw the camera permission popup and checked Yes, then it creashed. The permission to use the camera is registerd correctly in system settings. Now whenever I start the app it stops immediately.
Strange enough there is no problem at all when I run the app directly from Xcode - everything works as designed.
The crash log:
Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Subtype: EXC_ARM_DA_ALIGN at 0x0752af66 Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 tesla 0x001a5afa QCARManagerImpl_Update_m5746 (Bulk_Qualcomm.Vuforia.UnityExtensions_0.cpp:19073) 1 tesla 0x001d4af0 QCARAbstractBehaviour_Update_m6891 (Bulk_Qualcomm.Vuforia.UnityExtensions_1.cpp:35693) 2 tesla 0x003b7960 RuntimeInvoker_Void_t8(MethodInfo const*, void*, void**) (GeneratedInvokers.cpp:12) 3 tesla 0x00d1e11e il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppObject**) (Runtime.cpp:295) 4 tesla 0x00661f38 ScriptingInvocationNoArgs::Invoke(ScriptingException**) (ScriptingInvocationNoArgs.cpp:99) 5 tesla 0x00661ef8 ScriptingInvocationNoArgs::Invoke() (ScriptingInvocationNoArgs.cpp:83) 6 tesla 0x0065c3d0 MonoBehaviour::CallUpdateMethod(int) (MonoBehaviour.cpp:607) 7 tesla 0x005902b2 void BaseBehaviourManager::CommonUpdate<BehaviourManager>() (Behaviour.cpp:163) 8 tesla 0x0061c2f4 PlayerLoop(bool, bool, IHookEvent*) (Player.cpp:1887) 9 tesla 0x0046c7ea UnityPlayerLoopImpl(bool) (LibEntryPoint.mm:216) 10 tesla 0x0001f448 UnityRepaint (UnityAppController+Rendering.mm:218) 11 tesla 0x0001f324 __51-[UnityAppController(Rendering) repaintDisplayLink]_block_invoke (UnityAppController+Rendering.mm:52) 12 libdispatch.dylib 0x371b12e0 _dispatch_call_block_and_release + 8 13 libdispatch.dylib 0x371b12cc _dispatch_client_callout + 20 14 libdispatch.dylib 0x371b4d2a _dispatch_main_queue_callback_4CF + 1326 15 CoreFoundation 0x28d76614 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 4 16 CoreFoundation 0x28d74d14 __CFRunLoopRun + 1508 17 CoreFoundation 0x28cc23ac CFRunLoopRunSpecific + 472 18 CoreFoundation 0x28cc21be CFRunLoopRunInMode + 102 19 GraphicsServices 0x302ef1fc GSEventRunModal + 132 20 UIKit 0x2c32c438 UIApplicationMain + 1436 21 tesla 0x0001850a main (main.mm:40) 22 libdyld.dylib 0x371d2aac start + 0
My environment:
- Unity 5.0.3 with Vuforia 4.3.2, QCARWrapper.bundle set to Editor and Standalone
- Xcode 6.3.2
- iPhone 5 with iOS 8.2
I had to enable Background Modes / Remote Notifications in my Xcode project in order to provide push notifications. But I removed all other native code and used Replace when building the project in Unity.
Is there anyone out there having the same problem (and a solution :-) ? Thanks!
Kay