0

although running iOS 5.1 simulator is ok.

My system is OSX 10.7 Lions.

My Cordova app does not use anything remotely related to NSURLIsExcludedFromBackupKey. It is only defined in one of the header file from Foundation.framework/NSURL.h file.

My research found those two related posts but no solutions: Use NSURLIsExcludedFromBackupKey without crashing on iOS 5.0

and

http://www.openradar.me/radar?id=1597401

The output from running iOS 5.0 simulator:

dyld: Symbol not found: _NSURLIsExcludedFromBackupKey
  Referenced from: /Users/wug/Library/Application Support/iPhone Simulator/5.0/Applications/96C31219-6305-460D-A45E-CFA94BA64EFD/Sample.app/Sample
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation
 in /Users/wug/Library/Application Support/iPhone Simulator/5.0/Applications/96C31219-6305-460D-A45E-CFA94BA64EFD/Sample.app/Sample

Running on older simulators had same error. Can any expert shine some light on this issue?

Community
  • 1
  • 1
GeorgeW
  • 566
  • 5
  • 17

3 Answers3

6

The issue was filed at https://issues.apache.org/jira/browse/CB-989

A temp fix from PetyrVeliki at https://groups.google.com/forum/?fromgroups#!topic/phonegap/1KePUPYywEk

add on top of the AppDelegat.m file this code:

NSString * const NSURLIsExcludedFromBackupKey = @"NSURLIsExcludedFromBackupKey";

There are better 'real' fixes at the issue tracker, which requires a compilation of Cordova Core.

l4u
  • 126
  • 1
  • 4
  • > Thanks, that quick fix worked for me even though there were comments that it might not be perfect fix. – GeorgeW Jul 09 '12 at 11:45
0

NSURLIsExcludedFromBackupKey is only available on iOS 5.1, thus it is crashing when you are trying to run your app on the 5.0 simulator. [Source]

Using the solutions in the other questions, combined with weak linking should solve it

coneybeare
  • 33,113
  • 21
  • 131
  • 183
  • Thanks for quick response. I am a newbie to xcode and Apple development. Can you give some specificS? Thanks in advance! – GeorgeW Jul 07 '12 at 13:46
0

Just weak link Foundation.Framework.

You can do this by going to your projet target (usually the top item in the Project Navigator on the left), clicking on Summary, and then scroll down to the list of Linked Frameworks and Libraries.

Set Foundation.Framework to Optional.

greencustard
  • 249
  • 1
  • 3