Xcode 7 Beta 6, dyld ___NSArray0__ crash
Asked Answered
B

7

8

For the first time I was able to compile my app in Xcode 7 (failed in beta 4 and 5). So, thats good progress I guess.

However, when i load my app on my iPhone 6, iOS 8.4.1, it crashed in the debugger with the following message:

dyld: Symbol not found: _NSArray0 Referenced from: /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq Expected in: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq

Is this something to do with the order of the libraries being linked? Look forward to some advise.

Thanks!

Biased answered 25/8, 2015 at 18:55 Comment(1)
"when i load my app on my iPhone 6, iOS 8.4.1" You can't run on an iOS 8 device from Xcode 7 beta.Madelaine
W
1

I experienced the same exact crash running Xcode 7.0 beta 6 on a device with the first iOS 9 beta installed, the crash however was not occurring while using the simulator.

After updating my iPhone to iOS 9 beta 5, the crash stopped.

Witte answered 26/8, 2015 at 3:35 Comment(4)
Thanks Johnny and Matt. How would you suggest to do a backward compatibility test. For a time being I assume new users on iOS8 will search for the app and will install our app which would crash. Thoughts?Biased
I know this might now be possible for you, but I keep two devices, one with iOS 8 and one with iOS 9 on it. I also have both Xcode 6.4 and Xcode 7.0 beta installed so I am able to continue to develop for both versions.Witte
Also, apple will not let an iOS 8 user download an app targeted for iOS 9, so you should only every worry about version at or higher than your target deployment. I am almost positive that apple will let them download an iOS 8 version even after you release an iOS 9 version as long as you already have one available in the app store.Witte
I still see this as a problem on my current iOS8 build with the new XCODE release from yesterday. This can be serious issue as people who don't immediately upgrade to iOS9 and install the app won't be able to load the app. :(Biased
R
22

I fixed it by putting this in the podfile. platform :ios, '8.4' No need to update your device to iOS 9 and lose out on 8.4 testing.

Refluent answered 22/9, 2015 at 4:32 Comment(2)
This worked for me. Better than the accepted answer since I didn't want to update my device yet.Sunburn
This fix works. The root of a problem as you mentioned is deploy target setting. If you're using pods you should also update deploy target in integrated pods project. To make it run pod update to reintegrate pods to workspace. Clean all. Run.Excavate
C
19

I had the same error and I fixed. I removed CoreFoundation.framework and Add again with Status "Optional" and works.

Conservancy answered 18/11, 2015 at 19:6 Comment(1)
set Optional is enough, no need to remove & add againScheelite
D
6

If anybody else got this while running unit tests do the following:

  1. Select unit tests target
  2. Go to Build Settings
  3. Search for 'Deployment Target'
  4. Change Deployment Target version to your project's deployment target

That's it!

enter image description here

Durman answered 30/10, 2015 at 9:30 Comment(3)
This was my problem.Servitude
hey, glad it helped :)Durman
Note that you have to set this for main project and all sub projects - on the main project, this appears under General, but in sub projects (libraries) this appears under Deployment as shown in the illustration. Easiest is to use the search box under Build Settings for each subproject. I'm not adding anything here, just trying to make it even clearer. Thanks Serghei!!Lip
C
4

I also had this problem and I fixed it by adding framework CoreFoundation.framework to Build Settings.

Corded answered 6/11, 2015 at 4:21 Comment(1)
Project General ==> Linked Frameworks and Libraries ==> Add CoreFoundation (set status to Optional)Diorite
J
4

This as a problem on iOS8 build with the new XCODE release, Please remove CoreFoundation.framework and Add it again with Status of "Optional".

Junko answered 23/3, 2016 at 16:53 Comment(0)
M
2

I used to have the same error during compilation of a mac os project after updating the Xcode for 7.0 GM version (7A218). Xcode 7 has the 10.11 sdk in it only (you could check that in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, where it's a MacOSX10.11.sdk).

At compilation time the xcode will link the frameworks from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks, but at runtime from /System/Library/Frameworks/ as I guess.

I have OS X 10.10.5 (14F27) on mac. Either I have my static library that I've built by xcode 7 (MacOSX10.11.sdk as you remember from earlier), which I've linked to my project after. After running I got the runtime error as

dyld: Symbol not found: _NSArray0

I think it's because the library has been compiled with CoreFoundation.framework from mac os sdk 10.11, but at runtime was linked to CoreFoundation.framework from /System/Library/Frameworks/ where version of which is 10.10 (as OS version).

How I fixed this. Friend of mine has xcode 6 yet, I took mac os sdk 10.10 from there (as you remember in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, name is MacOSX10.10.sdk) and added it to Xcode of mine. Then I rebuilt my static library with 10.10 sdk (you could compile from cli with '-sdk macosx10.10' parameter or set build sdk in Build Settings => Base SDK). After the problem has been solved.

I assume that for the iOS you could apply the same strategy.

Mcguinness answered 16/9, 2015 at 6:43 Comment(0)
W
1

I experienced the same exact crash running Xcode 7.0 beta 6 on a device with the first iOS 9 beta installed, the crash however was not occurring while using the simulator.

After updating my iPhone to iOS 9 beta 5, the crash stopped.

Witte answered 26/8, 2015 at 3:35 Comment(4)
Thanks Johnny and Matt. How would you suggest to do a backward compatibility test. For a time being I assume new users on iOS8 will search for the app and will install our app which would crash. Thoughts?Biased
I know this might now be possible for you, but I keep two devices, one with iOS 8 and one with iOS 9 on it. I also have both Xcode 6.4 and Xcode 7.0 beta installed so I am able to continue to develop for both versions.Witte
Also, apple will not let an iOS 8 user download an app targeted for iOS 9, so you should only every worry about version at or higher than your target deployment. I am almost positive that apple will let them download an iOS 8 version even after you release an iOS 9 version as long as you already have one available in the app store.Witte
I still see this as a problem on my current iOS8 build with the new XCODE release from yesterday. This can be serious issue as people who don't immediately upgrade to iOS9 and install the app won't be able to load the app. :(Biased

© 2022 - 2024 — McMap. All rights reserved.