views:

687

answers:

2

Hi all. 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?

+3  A: 

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.

BJ Homer
I would have asked in the Apple developer forum, but let's face it, SO is the best developer forum.
Tarfa
I still recommend looking in the release notes...
BJ Homer
I have. Mentions nothing about this issue.
Tarfa
It does, indeed, mention this issue. Search for "NSURL" in the "iPhone SDK 4 beta 3 Release Notes" document
BJ Homer
Ah, so it does! I had looked in the PDF document that came with the SDK, thinking that to be the release notes. Now a different issue, when I follow the instructions and post the snippet of code at the top of the source file I get "Expected declaration specifiers or '...' before string constant".
Tarfa
+1  A: 

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.

Tarfa
awesome! i had this issue too, and that fixed it. thanks for sharing! +1 re: SO vs the ADC forums. <3 the SO.
taber