简体   繁体   中英

Universal iPhone/iPad Windows-based app with Core Data crashes on iPhone SDK 4 beta 3

I installed iPhone OS 4.0 Beta 3. When I create a new Windows-based universal app with Core Data (File > New Project > Windows-based Application ---> select Universal in drop down and check the "Use Core Data for storage" check box) the app launches fine into the iPhone simulator but crashes in the iPad simulator.

The console message returned is:

dyld: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /Users/tarfa/Library/Application Support/iPhone Simulator/3.2/Applications/5BB644DC-9370-4894-8884-BAEBA64D9ED0/Universal.app/Universal Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation

I'm stumped. Anyone else experiencing this problem?

Any legitimate answer to your question is under NDA. You might consider, though, looking to see if anything like this is mentioned in the Known Issues section of the beta release notes.

Ok, got it. Place this snippet at the top of source files using NSURL:

#ifndef __GNUC__
#define __asm__ asm
#endif

__asm__(".weak_reference _OBJC_CLASS_$_NSURL");

Now the app launches properly in the iPad simulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM