Problem with linking internal xCode frameworks.

Hi guys, I am a newbie Unity3d for iPhone. I have tried to run any example from http://unity3d.com/support/resources/example-projects/iphone-examples or just empty project from Unity3d-iPhone but it throw always this same errors.

Environment:

Mac OS X: 10.6.4

xCode: 3.2.3 (64 bit)

Unity3d: 1.7.0f1 (38208)

Unity3d player configuration:

  • iPhone Bundle Identifier: com.unity3d.maze
  • iPhone Sdk Version: Simulator 3.2

I do not have a certificate as an iPhone developer, but I have created a iPhone Developer key (this same trick works on my friend's computer - virtual mac).

Errors:

Whole log with errors: http://pastebin.com/ezrHktcf

Undefined symbols:
  ".objc_class_name_UIDevice", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIDevice in libiPhone-lib.a(iPhoneInputImpl.o)
      literal-pointer@__OBJC@__cls_refs@UIDevice in libiPhone-lib.a(iPhoneSettings.o)
  ".objc_class_name_NSAutoreleasePool", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSAutoreleasePool in libiPhone-lib.a(FileUtilities.o)
  ".objc_class_name_UIColor", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIColor in libiPhone-lib.a(iPhoneUtils.o)
      literal-pointer@__OBJC@__cls_refs@UIColor in libiPhone-lib.a(URLUtility.o)
      literal-pointer@__OBJC@__cls_refs@UIColor in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_UITextView", referenced from:
      literal-pointer@__OBJC@__cls_refs@UITextView in libiPhone-lib.a(iPhoneInputImpl.o)
  ".objc_class_name_UIButton", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIButton in libiPhone-lib.a(URLUtility.o)
  ".objc_class_name_UIToolbar", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIToolbar in libiPhone-lib.a(iPhoneInputImpl.o)
  ".objc_class_name_NSBundle", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSBundle in libiPhone-lib.a(iPhoneInputImpl.o)
      literal-pointer@__OBJC@__cls_refs@NSBundle in libiPhone-lib.a(FileUtilities.o)
      literal-pointer@__OBJC@__cls_refs@NSBundle in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_NSString", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSString in libiPhone-lib.a(iPhoneInputImpl.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libiPhone-lib.a(PlayerPrefs.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libiPhone-lib.a(URLUtility.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libiPhone-lib.a(iPhoneWWW.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libiPhone-lib.a(iPhoneVideo.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libiPhone-lib.a(NSStringConvert.o)
  ".objc_class_name_UIFont", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIFont in libiPhone-lib.a(iPhoneInputImpl.o)
  ".objc_class_name_UIWebView", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIWebView in libiPhone-lib.a(URLUtility.o)
  ".objc_class_name_UIApplication", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIApplication in libiPhone-lib.a(iPhoneSettings.o)
      literal-pointer@__OBJC@__cls_refs@UIApplication in libiPhone-lib.a(URLUtility.o)
      literal-pointer@__OBJC@__cls_refs@UIApplication in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_UIView", referenced from:
      .objc_class_name_CancelMovieView in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_NSMutableURLRequest", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSMutableURLRequest in libiPhone-lib.a(iPhoneWWW.o)
  ".objc_class_name_MPMoviePlayerController", referenced from:
      literal-pointer@__OBJC@__cls_refs@MPMoviePlayerController in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_NSArray", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSArray in libiPhone-lib.a(iPhoneInputImpl.o)
  ".objc_class_name_NSURLConnection", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSURLConnection in libiPhone-lib.a(iPhoneWWW.o)
  ".objc_class_name_UIBarButtonItem", referenced from:
      literal-pointer@__OBJC@__cls_refs@UIBarButtonItem in libiPhone-lib.a(iPhoneInputImpl.o)
  ".objc_class_name_CAEAGLLayer", referenced from:
      literal-pointer@__OBJC@__cls_refs@CAEAGLLayer in libiPhone-lib.a(iPhoneUtils.o)
  ".objc_class_name_NSUserDefaults", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSUserDefaults in libiPhone-lib.a(PlayerPrefs.o)
  ".objc_class_name_NSURL", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSURL in libiPhone-lib.a(URLUtility.o)
      literal-pointer@__OBJC@__cls_refs@NSURL in libiPhone-lib.a(iPhoneWWW.o)
      literal-pointer@__OBJC@__cls_refs@NSURL in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_NSNotificationCenter", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSNotificationCenter in libiPhone-lib.a(iPhoneInputImpl.o)
      literal-pointer@__OBJC@__cls_refs@NSNotificationCenter in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_UITextField", referenced from:
      literal-pointer@__OBJC@__cls_refs@UITextField in libiPhone-lib.a(iPhoneInputImpl.o)
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_LocationServiceDelegate in libiPhone-lib.a(iPhoneInputImpl.o)
      .objc_class_name_KeyboardDelegate in libiPhone-lib.a(iPhoneInputImpl.o)
      .objc_class_name_ConnectionDelegate in libiPhone-lib.a(iPhoneWWW.o)
      .objc_class_name_MoviePlayerContext in libiPhone-lib.a(iPhoneVideo.o)
  ".objc_class_name_UIViewController", referenced from:
      .objc_class_name_KeyboardViewController in libiPhone-lib.a(iPhoneInputImpl.o)
      .objc_class_name_WebViewController in libiPhone-lib.a(URLUtility.o)
  ".objc_class_name_NSURLRequest", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSURLRequest in libiPhone-lib.a(URLUtility.o)
  ".objc_class_name_CLLocationManager", referenced from:
      literal-pointer@__OBJC@__cls_refs@CLLocationManager in libiPhone-lib.a(iPhoneInputImpl.o)
  ".objc_class_name_NSData", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSData in libiPhone-lib.a(iPhoneWWW.o)
  ".objc_class_name_NSURLCredential", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSURLCredential in libiPhone-lib.a(iPhoneWWW.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Unity iPhone doesn't support the simulator, you can only run it on device or in the Unity editor. If you need to test it without compiling just use Unity Remote to connect your device to your mac wirelessly for controlling the game.

Why are you even making iPhone apps without a license? What do you intend to do with it after you're done?

Also I wouldn't recommend using a virtual machine for development.

I spent hours on this issue, too. My environments:

  1. Unity 3.4
  2. Xcode 4

I did the following:

  1. Go to Unity
  2. Click Edit menu > Project Settings > Player
  3. Go to Inspector window
  4. Click Other Settings
  5. Change SDK Version to iOS Simulator latest

After Unity finishes building, go to Xcode 4

  1. Click the Scheme to Unity-iPhone-simulator > iPhone 4.3 Simulator
  2. Click Product menu > Build
  3. Run

The above works for me.

If you need to run on the iPhone device, you need to change SDK Version to iOS latest