Build error when building app for xcode simulator

@rmbosft, which build are you getting that error on?

Have  you tried building the HelloWorld sample app?

Have you tried using a recent daily build (e.g., 2445) to see if that makes a difference?

@spacewolf, we have a fix for the simulator that will be available in a daily build soon. Apple changed things in Xcode 6 so the Public Release build will not be compatible with the Xcode Simulator until we do a new Corona SDK release. We don’t currently have schedule for that release.

I had build 2401 with no problems, then updated to 2445 and public build 2393a, same problem.

I just found out that if I use the Google.play.services plugin, I get the error:

 [“plugin.google.play.services”] = { publisherId = “com.coronalabs”, },

When I remove this plugin, it builds without problems.

My build.settings:

settings = { plugins = { ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle", }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", }, ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true }, }, }, orientation = { default = "portrait", supported = { "portrait" } }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", }, }, iphone = { plist = { UIAppFonts = { "walibi-holland.ttf", }, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png", "Icon@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.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, UIApplicationExitsOnSuspend = false, -- must be false for single sign-on to work CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXX", -- replace XXXXXXXXX with your facebook appId, make sure that you leave fb in front of it } } } } } }

I used your plugin settings and I don’t get any build errors from build 2393 or 2445. Maybe you made some other changes that is causing problems.

Hi Tom,

I am a member of corona sdk basic and i cant access to daily build. But i think it is a major issue.

My game does not work on ios 8 and i cant see the error beacause simulator doesnt work :frowning:

what can i do please a suggestion…

xCode 6 simulator build is still not working for me with build 2445. Normal build works.

Seems to be related to openssl plugin. I tried a corona sample app and that worked.

26/09/14 17:39:00,730 Corona Simulator[51116]: Runtime error

/Users/jonjonsson/Dropbox/temp/Poker¬†God.app/.build/libtemplate/Builder.lua:310: <error>{“status”:256,“message”:“ld: warning: ObjC object file (/Users/jonjonsson/Dropbox/temp/Poker¬†God.app/.build/libtemplate/libtemplate.a(main.o)) was compiled for iOS Simulator, but linking for MacOSX\nUndefined symbols for architecture i386:\n  “_fwrite$UNIX2003”, referenced from:\n      _int_rsa_verify in libplugin.openssl.a(rsa_sign.o)\n      _test_rc4_init_key in libplugin.openssl.a(eng_openssl.o)\n      _TXT_DB_read in libplugin.openssl.a(txt_db.o)\n      _read_string in libplugin.openssl.a(ui_openssl.o)\n      _read_string_inner in libplugin.openssl.a(ui_openssl.o)\n      _ENGINE_load_gost in libplugin.openssl.a(gost_eng.o)\n      _dtls1_retransmit_buffered_messages in libplugin.openssl.a(d1_both.o)\n      …\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/jonjonsson/Dropbox/temp/Poker¬†God.app/.build/libtemplate/Builder.lua:310: in function ‘checkError’

/Users/jonjonsson/Dropbox/temp/Poker¬†God.app/.build/libtemplate/Builder.lua:333: in function ‘build’

?: in function ‘buildExe’

?: in function <?:643>

26/09/14 17:39:00,742 Corona Simulator[51116]: iOS build failed (5)

Just tried 2446 as well and its the same error as above when building for simulator.

Good news is I tried on device and device push ID seems to return correctly.

@Tom

The error 5 code I’m getting is related to the google.play.services plugin for sure.

I tried to compile older (untouched) projects using the same plugin, and I can;t build them either.

As soon as I remove the google.play.services plugin, the error disappears and I can build.

The errors in the terminal also mentions  lot of libgoogle-play-services errors.

Running the latest build now 2014.2446. 

Can’t compile any project with google.play.services anymore on Mac. On Windows, I can build for Android without problems.

Using additional build settings from: /Users/rdb/Desktop/Corona/Slingo/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/iPhoneSimulator8.0.sdk WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.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/iPhoneOS8.0.sdk WARNING: Using the following SDK instead: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk 2014-09-26 09:56:18.768 Corona Simulator[12062:e03] Runtime error /Users/rdb/Desktop/Slingo.app/.build/libtemplate/Builder.lua:310: \<error\>{"status":256,"message":"Undefined symbols for architecture armv7:\n \"\_OBJC\_CLASS\_$\_UIPercentDrivenInteractiveTransition\", referenced from:\n \_OBJC\_CLASS\_$\_GADPercentDrivenUserInteractionAnimationController in libgoogle-play-services.a(GADPercentDrivenUserInteractionAnimationController.o)\n \"\_OBJC\_METACLASS\_$\_UIPercentDrivenInteractiveTransition\", referenced from:\n \_OBJC\_METACLASS\_$\_GADPercentDrivenUserInteractionAnimationController in libgoogle-play-services.a(GADPercentDrivenUserInteractionAnimationController.o)\n \"\_UITransitionContextFromViewControllerKey\", referenced from:\n -[GADViewControllerFullScreenSwipeAnimation animateTransition:] in libgoogle-play-services.a(GADViewControllerFullScreenSwipeAnimation.o)\n -[GADViewControllerFullScreenSwipeAnimation animationContextForRestoringAnimationToSavedState:] in libgoogle-play-services.a(GADViewControllerFullScreenSwipeAnimation.o)\n \"\_UITransitionContextToViewControllerKey\", referenced from:\n -[GADViewControllerFullScreenSwipeAnimation animateTransition:] in libgoogle-play-services.a(GADViewControllerFullScreenSwipeAnimation.o)\n -[GADViewControllerFullScreenSwipeAnimation animationContextForTopToBottomAnimationPresentationWithTransitionContext:] in libgoogle-play-services.a(GADViewControllerFullScreenSwipeAnimation.o)\n -[GADViewControllerFullScreenSwipeAnimation animationContextForBottomToTopAnimationPresentationWithTransitionContext:] in libgoogle-play-services.a(GADViewControllerFullScreenSwipeAnimation.o)\nld: symbol(s) not found for architecture armv7\nclang: error: linker command failed with exit code 1 (use -v to see invocation)"}\</error\> stack traceback: [C]: ? [C]: in function 'assert' /Users/rdb/Desktop/Slingo.app/.build/libtemplate/Builder.lua:310: in function 'checkError' /Users/rdb/Desktop/Slingo.app/.build/libtemplate/Builder.lua:333: in function 'build' ?: in function 'buildExe' ?: in function \<?:643\> 2014-09-26 09:56:18.776 Corona Simulator[12062:e03] iOS build failed (5)

The forum threads are used to exchange information and can’t be used to solve problems especially when users fill a thread with issues that are unrelated to the original posting.

If you have a problem, the correct thing to do is file a bug report with a full test project along with detailed steps on how to reproduce the error. That is the only way we can track the issues and assign a priority to the problem. Posting reports in the forums is good to get other’s input but not the same as a filing a bug report. Bugs reported here may be helpful to others, but we cannot resolve them in the forums because of the time involved and the lack of information to be able to duplicate the problem.

@jonjonsson, it looks like we still have a problem with build 2446 when building for the Xcode Simulator and requiring the openSSL plugin. I was able to duplicate the error here.

[Update: We fixed the OpenSSL plugin and it’s now working with the Xcode Simulator in build 2446]

I have the same exact problem as spacewolf posted where I cannot build for xcode 6 simulator but my app runs fine on the iphone.  I’m really new to corona (but not new to xcode/objc) and I figured I was just doing something wrong, so I’m really glad to see someone else have this issue  :)   Its actually the exact same error he posted.

I’m using corona starter version 3.0.0  Build 2014.2393, Xcode 6.0/OSX 10.9.4, and it runs fine in Corona Simulator and runs fine on device (I’m running iOS 7 on iphone 5S).  It gives me the “Unexpected build error (check the Simulator console for messages)” which gives me that same terminal dump spacewolf got

How does everyone here get their launch images and screenshots when you cant even run it in the simulator?  I like corona in the brief time I’ve used it, but of course thats only if it actually works because this error stops you dead in the water.

@x55. the problem spacewolf was having occurred because of an issue we had with plugin builds. This was fixed in public build 2393 and recent daily builds and is no longer a problem as far as we know. I assume your projects includes plugins, so which plugins are you using? As a test you could comment out each of plugins in the build.settings file until the build error goes away. Please us know the results if you find it’s related to a specific plugin.

Unfortunately once the build error is resolved you still won’t be able to use the Xcode Simulator because of Apple’s changes to Xcode 6. Apple changed the way Xcode Simulator is launched and it’s not compatible with public build 2393. You need daily build 2446 or higher for the Xcode Simulator start fix. We are looking at doing a new public build but we are waiting until we get all the existing iOS 8 problems resolved first. We don’t have a schedule for when it will be released.

Hi all,

my console as well shows this (same) error using public release 2393 on a Mac 10.9.5, with Xcode 6, building the Hello World for the iOS simulator:

2014-10-02 18:41:03.409 ios-sim[29860:303] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fa043600620

2014-10-02 18:41:03.410 ios-sim[29860:303] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fa043600620’

*** First throw call stack:

(

0   CoreFoundation                      0x00007fff8c0b725c __exceptionPreprocess + 172

1   libobjc.A.dylib                     0x00007fff912d8e75 objc_exception_throw + 43

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

3   CoreFoundation                      0x00007fff8c015272 ___forwarding___ + 1010

4   CoreFoundation                      0x00007fff8c014df8 _CF_forwarding_prep_0 + 120

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

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

7   ios-sim                             0x000000010cd4ccca main + 101

8   ios-sim                             0x000000010cd4acfc start + 52

)

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

Is there any chance to have a public build running for simulator ?

Any schedule for that ?

It is becoming now a major issue to me.

Thanks for any help to this sad starter !

st

Tom, thanks for the response.  You are correct it was a plugin causing it, the iad plugin was the issue and commenting it out got rid of this error.

I have found a work around for this somewhere else when is was looking for the same issue in flash:

  1. Build your app, it will fail with the error but it will generate an .ipa file in the output folder

  2. install ios-sim (brew install ios-sim) see: https://github.com/phonegap/ios-sim

  3. rename the .ipa file to a .zip and unpack it

  4. run the following command: ios-sim launch path/to/.app/file --devicetypeid com.apple.CoreSimulator.SimDeviceType.iPad-2 (you can change the device type to whatever you want!)

  5. enjoy your app running on the simulator :slight_smile:

@rick

I did as per your instructions.

The simulator launches and tries to install the app. The app has been installed but does not launch. I see the icon in the simulator but I log this on terminal:

iMacSt-3:Release stefanotosi$ ./ios-sim launch /Users/stefanotosi/Desktop/popchase   --devicetypeid “com.apple.CoreSimulator.SimDeviceType.iPhone-6, 8.0”

Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 “Simulator session timed out.” UserInfo=0x7fbe12c39a40 {NSLocalizedDescription=Simulator session timed out.}

iMacSt-3:Release stefanotosi$ 

@Tom

The Xcode simulator issue is becoming IMHO one of the most urgent fixes needed. Any news on a next public fix release date ?

Time presses strongly.

Please advise.

Thank you

@st.tosi,

We see the Xcode Simulator time-out issue even with our current Daily Builds. Seems to be an issue with Xcode Simulator. You can generally start the app by swiping the Xcode Simulator screen and clicking on your app.

Any news yet on a pubic build ? Its been a month now.

@Tom I clicked on the app icon as well: same result. Any news on a public release ? Thanks. St

@st.tosi, does your app run on a real iOS device? Failure to run on the Xcode Simulator doesn’t always means it’s an issue with Corona. Bugs in your app can result in the same behavior. You should always test on a real device to verify and review the console output to make sure there are no errors in your code. You should also enable runtime error messages on your device when debugging code (they are off by default). You enable the runtime error mode in the config.lua.

http://docs.coronalabs.com/guide/basics/configSettings/index.html#runtime-errors

If you still think there is a problem running the simulator, try building and running a sample project (e.g., HelloWorld) on the Xcode Simulator. 

We don’t have a release date for the next public release because we are still sorting out issue related to iOS 8.1 and iPhone 6. You can always pay to be a Pro user and get access to all our daily builds. 

@Rick

I am now running Yosemite with (always) corona public build 2393.

I did again as per your suggestion: build Corona for Xcode simulator/converted the .app to a .ipa/renamed .zip/unpacked and in the Payload folder my .app file is created.

I then run 

ios-sim launch /Users/stefanotosi/Desktop/Payload/myAppName.app   --devicetypeid “com.apple.CoreSimulator.SimDeviceType.iPhone-6, 8.1”

The app is loaded in the iPhone6 / iOS8.1(12B411) simulator. The app shows the default image and then crashes.

The console log shows:

Oct 28 16:42:57 iMacSt-2 assertiond[18851]: assertion failed: 14A389 12B411: assertiond + 11523 [3F572A0B-7E12-378D-AFEE-EA491BAF2C36]: 0x1

Oct 28 16:43:00 iMacSt-2 PopChase[18924]: assertion failed: 14A389 12B411: libxpc.dylib + 59417 [464E62EA-4CF2-3FEF-9C17-692AD8D66AA8]: 0x7d

Oct 28 16:43:00 iMacSt-2 com.apple.CoreSimulator.SimDevice.B68C61D9-576C-4D88-8BE7-E34247ADD5E4.launchd_sim[18836] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.

 My app works fine on an iPhone 5/iOS8.1 device.

I need to run in the simulator to check for iPhone6 and 6Plus graphics as well as getting the screenshots for ITC.

Can you help ?

@Tim

any news on an update on public build ?

Thank you all

st