This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRFready iOS Demo App won't run in Xcode 5.0.2

I opened both the NordicSemiDemo.xcodeproj and nRFDemo.xcodeproj in Xcode 5.0.2. When I try to run them (Product->Run), I get the splash screen in the simulator, but when the main menu appears, I get a "EXC_BAD_ACCESS" error.

My experience with Xcode and objective-C is quite low, so it's entirely possible I simply don't have something configured properly, and this is a really dumb question. Like I put the files into the wrong directory or missed an obvious configuration change or something.

Here's what comes up in Xcode when the simulator stops running:


NordicSemiDemo`-[WFHardwareControllerBTLE setCentralManager:] at WFHardwareControllerBTLE.m:21:
0xddfa4:  pushl  %ebp
0xddfa5:  movl   %esp, %ebp
0xddfa7:  subl   $24, %esp
0xddfaa:  calll  0xddfaf                   ; -[WFHardwareControllerBTLE setCentralManager:] + 11 at WFHardwareControllerBTLE.m:21
0xddfaf:  popl   %eax
0xddfb0:  movl   854401(%eax), %eax
0xddfb6:  movl   16(%ebp), %ecx
0xddfb9:  movl   %ecx, 12(%esp)
0xddfbd:  movl   %eax, 8(%esp)
0xddfc1:  movl   12(%ebp), %eax
0xddfc4:  movl   %eax, 4(%esp)
0xddfc8:  movl   8(%ebp), %eax
0xddfcb:  movl   %eax, (%esp)
0xddfce:  movl   $0, 20(%esp)
0xddfd6:  movl   $0, 16(%esp)
0xddfde:  calll  0x115640                  ; symbol stub for: objc_setProperty
0xddfe3:  addl   $24, %esp
0xddfe6:  popl   %ebp
0xddfe7:  ret    

The third-to-last line is highlighted and gives the error "Thread 1:EXC_BAD_ACCESS (code=2, address=0x8)".

Parents
  • Hi

    The BLE functionality of the simulator was removed in XCode 5. The code is developed in XCode 4.6.3. It should run with that version, both in simulator and on a IOS device. My observation is that you need both XCode 5 and XCode 4.6.3 in order to run the nRFUtility code on an IOS 7.0.X device. So, don't uninstall XCode 5.0.2, just install XCode 4.6.3 as well and run the nRFUtility code in XCode 4.6.3.

    Let me know how it turns out.

  • Thanks - this worked, as you said, on the simulator in Xcode 4.6.3. It ran on my iOS device in both Xcode 4.6.3 and Xcode 5.0.2.

    One catch (for people reading this later) - since I opened the project in Xcode 5, the .xib files would no longer compile (or even open) in Xcode 4.6.3. So I had to go in Xcode 5, select each .xib file one-by-one, go to the file inspector for each, and under "Interface Builder Document" change the "opens in" to Xcode 4.6, instead of Xcode 5.0. Once I did that, it compiled fine in Xcode 4.6.

Reply
  • Thanks - this worked, as you said, on the simulator in Xcode 4.6.3. It ran on my iOS device in both Xcode 4.6.3 and Xcode 5.0.2.

    One catch (for people reading this later) - since I opened the project in Xcode 5, the .xib files would no longer compile (or even open) in Xcode 4.6.3. So I had to go in Xcode 5, select each .xib file one-by-one, go to the file inspector for each, and under "Interface Builder Document" change the "opens in" to Xcode 4.6, instead of Xcode 5.0. Once I did that, it compiled fine in Xcode 4.6.

Children
No Data
Related