Build error when building app for xcode simulator

Hi,

I get the following build error when I build for Xcode simulator:

Using additional build settings from: /Users/Rebekah/Alan/spacewolf/code/mobile/apps/PhotoDeco/Original/corona/v1.0/project/PhotoDeco/build.settings

WARNING: Your SDK may be out of date b/c the following SDK directory could not be found: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk

WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk

WARNING: Your SDK may be out of date b/c the following SDK directory could not be found: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk

WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk

2014-09-18 21:04:08.336 Corona Simulator[38493:507] Runtime error

/Users/Rebekah/Alan/spacewolf/code/mobile/apps/PhotoDeco/Original/corona/v1.0/release/iOS/Snapbook.app/.build/libtemplate/Builder.lua:310: <error>{“status”:256,“message”:“ld: warning: ObjC object file (/Users/Rebekah/Alan/spacewolf/code/mobile/apps/PhotoDeco/Original/corona/v1.0/release/iOS/Snapbook.app/.build/libtemplate/libtemplate.a(main.o)) was compiled for iOS Simulator, but linking for MacOSX\nUndefined symbols for architecture i386:\n  “start”, referenced from:\n     implicit entry/start for main executable\n     (maybe you meant: _OBJC_IVAR_$_GADAdFetcher._startOncePredicate, __ZN3Rtt7Display7RestartEv , __ZN3Rtt7Runtime15RestartRendererENS_17DeviceOrientation4TypeE , __ZN3Rtt7Runtime15RestartRendererEv , __ZN3Rtt27LuaEmitterObjectProxyVTable5startEP9lua_State , _timeout_getstart , _timeout_markstart , __ZN3Rtt7Display7RestartENS_17DeviceOrientation4TypeE , __ZN3Rtt7Display7RestartEii , _OBJC_IVAR_$_GADTiming._startTimestamp )\nld: symbol(s) not found for architecture i386\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>

stack traceback:

C: in function ‘assert’

/Users/Rebekah/Alan/spacewolf/code/mobile/apps/PhotoDeco/Original/corona/v1.0/release/iOS/Snapbook.app/.build/libtemplate/Builder.lua:310: in function ‘checkError’

/Users/Rebekah/Alan/spacewolf/code/mobile/apps/PhotoDeco/Original/corona/v1.0/release/iOS/Snapbook.app/.build/libtemplate/Builder.lua:333: in function ‘build’

?: in function ‘buildExe’

?: in function <?:624>

How can I build for the Xcode simulator?

Corona SDK: 2014.2393

Xcode 6.0.1

Thanks

I get this error building for xCode6 simulator   EtaQj3U.png

If I do a normal build I do not get this error.

The same problem has occurred also in my environment.

It became impossible for me to use a simulator now. 

I updated environment.

  MacOSX 10.9.5 (Japanese)

  CoronaSDK: 2014.2393

  Xcode 6.0.1

Then, CoronaSDK will not start.

When it was going to start, the crash report was only outputted.

I uninstalled CoronaSDK and installed again.

Starting became possible now. 

However, Simulator of Xcode cannot be connected. 

Other problems are not found yet.

I would like to use a simulator. 

Can anything do at me? 

I was about to post this. My xcode simulator never opens after build process.

I can see some errors on console, like this one: 

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: '-[_NSArrayM localizedDescription]: unrecognized selector sent to instance…

OS X 10.9.5

Xcode 6.0.1

Corona latest daily build or 2393

I’m also getting this error in daily build 2439 when trying to build to the Xcode Simulator.

We are aware of the problem causing the exception error when trying to build for the Xcode Simulator with Xcode 6:

2014-09-19 17:24:02.735 ios-sim[42522:303] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7f9771c00db0

2014-09-19 17:24:02.874 ios-sim[42522:303] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7f9771c00db0’

 

If you are getting a different error when building for Xcode Simulator (e.g., build error 5), please post your entire Corona Terminal output here. (Please don’t post any Android or Windows errors.)

I am getting the same problem! this is the entire response from the Corona SDK terminal:

2014-09-20 12:21:42.920 Corona Simulator[417:507] iOS build succeeded

2014-09-20 12:21:44.363 ios-sim[5512:303] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7ff82a40bdb0

2014-09-20 12:21:44.432 ios-sim[5512:303] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7ff82a40bdb0’

*** First throw call stack:

(

0   CoreFoundation                      0x00007fff8b6bf25c __exceptionPreprocess + 172

1   libobjc.A.dylib                     0x00007fff89ed9e75 objc_exception_throw + 43

2   CoreFoundation                      0x00007fff8b6c212d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205

3   CoreFoundation                      0x00007fff8b61d272 ___forwarding___ + 1010

4   CoreFoundation                      0x00007fff8b61cdf8 _CF_forwarding_prep_0 + 120

5   ios-sim                             0x0000000108c86e41 -[iPhoneSimulator LoadSimulatorFramework:] + 245

6   ios-sim                             0x0000000108c888f8 -[iPhoneSimulator runWithArgc:argv:] + 2271

7   ios-sim                             0x0000000108c88cca main + 101

8   ios-sim                             0x0000000108c86cfc start + 52

9   ???                                 0x0000000000000005 0x0 + 5

)

libc++abi.dylib: terminating with uncaught exception of type NSException

#mattew5, we are aware of the issue you posted and working to fix it.

I was hoping someone else with iOS Build Error 5 (on Mac Simulator) would post their console log along with the simulator build number and list any plugins they are using.

@spacewolf, are you using any plugins when you get your error? Can you list your build.settings file. Do you get the same error when building the HelloWorld sample (you should get the NSInvalidArgumentException error instead.)

Hello there,

my console error with the sample “Hello Word”:

2014-09-22 10:37:31.373 Corona Simulator[13943:507] iOS build succeeded

2014-09-22 10:37:32.397 ios-sim[14129:303] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fd3b2d02c60

2014-09-22 10:37:32.402 ios-sim[14129:303] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fd3b2d02c60’

*** First throw call stack:

(

0   CoreFoundation                      0x00007fff8ff1a25c __exceptionPreprocess + 172

1   libobjc.A.dylib                     0x00007fff926a0e75 objc_exception_throw + 43

2   CoreFoundation                      0x00007fff8ff1d12d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205

3   CoreFoundation                      0x00007fff8fe78272 ___forwarding___ + 1010

4   CoreFoundation                      0x00007fff8fe77df8 _CF_forwarding_prep_0 + 120

5   ios-sim                             0x0000000108f87e41 -[iPhoneSimulator LoadSimulatorFramework:] + 245

6   ios-sim                             0x0000000108f898f8 -[iPhoneSimulator runWithArgc:argv:] + 2271

7   ios-sim                             0x0000000108f89cca main + 101

8   ios-sim                             0x0000000108f87cfc start + 52

)

libc++abi.dylib: terminating with uncaught exception of type NSException


On the device with iOS 7.1 all OK.

When compiling choosing ios 8 and install on the device with iOS 7.1 all ok.

OSX 10.9.5

XCODE 6.0.1

CORONA 2439

Regards

@Tom

I am using the admob-v2 plugin.

Here is my build.settings:
 

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown", }, }, iphone = { plist = { CFBundleShortVersionString = "1.0", UIInterfaceOrientation = "UIInterfaceOrientationPortrait", UISupportedInterfaceOrientations = { --"UIInterfaceOrientationLandscapeLeft", --"UIInterfaceOrientationLandscapeRight", "UIInterfaceOrientationPortrait", "UIInterfaceOrientationPortraitUpsideDown", }, UIStatusBarHidden = false, UIPrerenderedIcon = false, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend UIAppFonts = { "FuturaLight.ttf", }, CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png" }, } }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.CAMERA", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, }, plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, }, } local appStoreIds = require("appStoreIds") local selectedAppStoreId = require("settings\_appStore") -- Enable expansion file if we are building for google play store if selectedAppStoreId == appStoreIds.google then settings.android.usesExpansionFile = true table.insert(settings.android.usesPermissions, "com.android.vending.CHECK\_LICENSE") end

I haven’t tried building the sample hello world app yet but I’ll give that a try

I’m using OS X 10.9.5, Xcode 6.0.1, and daily build 2014.2439. In other words, everything is current and updated last week. Only plugins referenced in build.settings are pasteboard and social.

Building for and installing on an iOS 8 device works. Building for the simulator gives this error:

2014-09-22 12:36:33.469 Corona Simulator[35657:507] Using Custom Build Id 00000

Using additional build settings from: /Users/USERNAME/dev/corona/APPNAME/build.settings

WARNING: Your SDK may be out of date b/c the following SDK directory could not be found: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk

WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk

WARNING: Your SDK may be out of date b/c the following SDK directory could not be found: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk

WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk

2014-09-22 12:36:44.773 Corona Simulator[35657:507] Runtime error

/Users/USERNAME/dev/corona/builds/APPNAME.app/.build/libtemplate/Builder.lua:310: <error>{“status”:256,“message”:“ld: warning: ObjC object file (/Users/USERNAME/dev/corona/builds/APPNAME.app/.build/libtemplate/libtemplate.a(main.o)) was compiled for iOS Simulator, but linking for MacOSX\nUndefined symbols for architecture i386:\n  “start”, referenced from:\n     implicit entry/start for main executable\n     (maybe you meant: __ZN3Rtt7Display7RestartEv, __ZN3Rtt7Runtime15RestartRendererENS_17DeviceOrientation4TypeE , __ZN3Rtt7Runtime15RestartRendererEv , __ZN3Rtt27LuaEmitterObjectProxyVTable5startEP9lua_State , _timeout_getstart , _timeout_markstart , __ZN3Rtt7Display7RestartEii , __ZN3Rtt7Display7RestartENS_17DeviceOrientation4TypeE )\nld: symbol(s) not found for architecture i386\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>

stack traceback:

C: in function ‘assert’

/Users/USERNAME/dev/corona/builds/APPNAME.app/.build/libtemplate/Builder.lua:310: in function ‘checkError’

/Users/USERNAME/dev/corona/builds/APPNAME.app/.build/libtemplate/Builder.lua:333: in function ‘build’

?: in function ‘buildExe’

?: in function <?:643>

2014-09-22 12:36:44.779 Corona Simulator[35657:507] iOS build failed (5)

Tom, feel free to email me if you’d like more info or logs.

Any update on the fix for this issue?

Got the same problem since today. Can’t compile any of my other projects, getting the same error as corona273

Last thing I did was updating one of my iPads to iOS 8, nothing else.

Corona says the latest daily build fixes the Xcode simulator problem. And they’re right. Building for the Xcode simulator now works, albeit with some warnings (I’m using OS X 10.9.5 and Xcode 6.0 and the latest daily build):

2014-09-25 11:02:02.969 Corona Simulator[91360:507] Using Custom Build Id 00000

Using additional build settings from: /Users/USERNAME/dev/corona/APPNAME/build.settings

WARNING: Your SDK may be out of date b/c the following SDK directory could not be found: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk

WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk

WARNING: Your SDK may be out of date b/c the following SDK directory could not be found: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk

WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk

Creating Info.plist…

[snip]

2014-09-25 11:02:17.379 Corona Simulator[91360:507] iOS build succeeded

Using Xcode iOS Simulator from Xcode 6.0.1

  • ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios-sim’ launch /Users/USERNAME/dev/corona/builds/APPNAME.app --devicetypeid ‘com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus, 8.0’

Build 2445 attempts to fix the Simulator Start issue for projects with and without plugins. There is an issue where it fails to work in the iOS Simulator for iPhone 6 and iPhone 6 Plus. Corona SDK tries to start the iOS Simulator using the same skin that was running the Corona. For now, switch the Corona SDK skin to iPhone 5 if you need to run the iOS Simulator.

Tom, i still have code 5 error with all my projects, building for DEVICE.

I can’t build any project, device or simulator.

See http://forums.coronalabs.com/topic/51424-build-error-when-trying-to-build-for-device/#entry266647

Problem started today. Should I use public release build (2393a)?

Update: public release build (2393a) didn’t solve the problem. I’m stuck.

@rmbsoft, what build were you using that gave you the build error 5? Is this on Windows or Mac.

The problem you’re seeing is not what we are talking about in this thread. This thread is about errors when building for the Xcode (iOS) Simulator.

Building using Mac.

Error: Unexpected build error. If you are not connecting to the Internet directly (for example you connect via a proxy server) you might want to try a direct connection to see if that solves the problem.

Is there a fix for the simulator for iPhone 6 and iPhone 6 Plus in the works? The whole reason I wanted to deploy to the XCode simulator in the first place was to get screenshots of my app at those resolutions :slight_smile: