App won't launch after build in Corona Simulator!

Hi All,

I have what might sound like a silly problem, but my app won’t launch after build in the Corona Simulator! Instead of my app launching, I go to a screen (please find attached file “screenshot.png”), and then nothing happens. When I click on my app (titled “My App”), the screen goes black for a spit second, and then goes immediately back to the original screen).

I am using a Mac, and am building for iOS.

I’ve tried all “iPhone only”, “iPad only”, and “iPhone + iPad” as target devices.
My iOS SDK is 10.0

My xCode was 6.2 and wasn’t working. I then upgrading it to 8.0, but still isn’t working.

I do not get any errors when building (which is odd since there clearly is some problem). The only thing that is noteworthy is the fact that

Class VCWeakObjectHolder is implemented in both (PATH-NAME) and (ANOTHER-PATH-NAME). One of the two will be used. Which one is undefined.

is printed in the simulator console. Now I am not even sure if this is supposed to be a bad thing, but I can’t think of anything else that might be causing the problem…

I am stuck and out of ideas…Please help!
Thanks in advance :slight_smile:

KC

I have what might sound like a silly problem, but my app won’t launch after build in the Corona Simulator! Instead of my app launching, I go to a screen (please find attached file “screenshot.png”), and then nothing happens. When I click on my app (titled “My App”), the screen goes black for a spit second, and then goes immediately back to the original screen).

Have you tried launching your app on an iOS device?

If you’re running a later version of Corona SDK when you build for a device (including the Xcode simulator) Corona will install the app on that device for you and as long as you don’t close the dialog box that says something like “<Your App Name> has been launched in the Xcode iOS Simulator.  The Xcode iOS Simulator’s syslog will appear in the Corona Console until this message is closed” and you get a Continue button. As long as you do not click on that continue button, the Xcode simulator’s output including error messages will appear in the Corona Console log window.  You can see there why it’s crashing.  You can also from the Xcode simulator do “Debug->Open System Log…” to see what’s going on with the Xcode simulator.

@bgmadclown

Have you tried launching your app on an iOS device?

Unfortunately I don’t have a provisioning license so I can’t do this, but when I do, I definitely will try this.

@Rob Miracle
So when I build my app, I do get the window which you described http://prnt.sc/ct1s46
 

Corona will install the app on that device for you and as long as you don’t close the dialog box

I’m confused by this. I haven’t closed the dialog box, but Corona hasn’t installed my app on my device (a Mac).

 

The Xcode iOS Simulator’s syslog will appear in the Corona Console until this message is closed" and you get a Continue button. 

Yes, and the syslog prints

“Class VCWeakObjectHolder is implemented in both (PATH-NAME) and (ANOTHER-PATH-NAME). One of the two will be used. Which one is undefined.”

but I never get any error messages…

“You can see there why it’s crashing.”

I doesn’t “crash”.  It’s just that nothing ever happens…

There should be a boat-load of other messages there.

Hello,

I have the same problem.

I am building the "Hello World"sample code.

If I check After build “open in Xcode iOS Simulator” then I have the same problem than kc.thomas304. If I try launch this .app generated on my iPhone the following message is displayed “The application does not have a valid signature” error 

If I check After build “do nothing” then I can launch the .app on my iPhone.

OS X 10.11.6

Corona SDK 2016.2949

Xcode 8.0

In the Xcode system.log crash report

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)

Thanks.

We just released a new public build  yesterday (2016.2992). I would highly recommend you update to that. It will require updating Xcode to Xcode 8.1. Make sure you run Xcode at  least once so it will finish downloading and installing everything it needs before you try to build with Corona SDK.

If you’re still having issues after that, ping the thread with the latest logs built with 2992 and we can go from there.

Rob

Hi Rob,

With Xcode 8.1 and Corona 2016.2992 the Hello World sample works! but I have an issue trying to run in the Xcode iOS simulator an app with AdMob plugin.

Is there a solution for this problem?

 [iOS Simulator] ERROR: Runtime error

nov. 19 09:13:16.482 [iOS Simulator] ERROR: Could not load provider (admob) due to the following reason: module ‘CoronaProvider.ads.admob’ not found:resource (CoronaProvider.ads.admob.lu) does not exist in archive
[iOS Simulator] no field package.preload[‘CoronaProvider.ads.admob’]
[iOS Simulator] 

no file ‘/Users/xxxxxxx/Library/Developer/CoreSimulator/Devices/xxxxx/xxxxx.app/CoronaProvider/ads/admob.lua’

Thanks!

Can you post your build.settings?

Rob

Yes, of course:

settings = { orientation = { default = "portrait", -- Initial launch orientation supported = { portrait } -- Table of allowed options for auto-orientation }, plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, }, }

If I check After build “do nothing” then I can launch the app on iPhone 6s device successfully.

In the Xcode Simulator Runtime Error happens.

Thanks.

You either need to add:  [“iphone-sim”]=true, to your supportedPlatforms line, or remove it completely if you’re only targeting iPhones, iPads and Android. If you decide to do desktop builds or tvOS where AdMob is not supported then you would need the supportedPlatforms line.

Rob

It works!!

Thank you Rob!!

I have a similar problem, when I try to use the xcode simulator it stays loading in this screen: a1.png

I user Corona 2016.2992 and Xcode 10.1

Are there any errors in the console log?  

Can you post your build.settings?

There are not errors in the console log. This is my build.settings:

settings = { orientation = { default = "portrait", --initial launch orientation content = "", --locked orientation of the Corona stage, independent of Native UI elements (iOS only) supported = { "portrait", "portraitUpsideDown" }, --table of allowed options for auto-orientation }, plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android = true, iphone=true, ["iphone-sim"]=true } }, }, iphone = { plist = { UIApplicationExitsOnSuspend = true, NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, }, }, android = { versionCode = "2", permissions = { { name = ".permission.C2D\_MESSAGE", protectionLevel = "signature" }, }, usesPermissions = { "android.permission.READ\_EXTERNAL\_STORAGE", "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.GET\_ACCOUNTS", "android.permission.RECEIVE\_BOOT\_COMPLETED", "android.permission.READ\_PHONE\_STATE", }, }, }

Also when i close the simulator i get this log:

iOS build succeeded in 83 seconds nov. 30 03:30:55.800 Running '/Users/David/Desktop/Eliminatorias.app' on Xcode iOS Simulator - iPhone SE / iOS 10.1 (B0DDF874-95D9-4E2A-85A1-795607D3CCDA) nov. 30 03:40:03.586 Error running /Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/xcodesim\_sendapp.sh ( "/Users/David/Desktop/Eliminatorias.app", "B0DDF874-95D9-4E2A-85A1-795607D3CCDA" ) nov. 30 03:40:03.586 ++ defaults read com.coronalabs.Corona\_Simulator debugBuildProcess + DEBUG\_BUILD\_PROCESS= + '[' 0 -gt 2 ']' + trap 'kill -TERM 0' EXIT + APP=/Users/David/Desktop/Eliminatorias.app + UDID=B0DDF874-95D9-4E2A-85A1-795607D3CCDA + '[' B0DDF874-95D9-4E2A-85A1-795607D3CCDA == '' ']' + '[' '!' -r /Users/David/Desktop/Eliminatorias.app ']' ++ xcode-select -p + SIMULATOR\_APP=/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app ++ plutil -convert json /Users/David/Desktop/Eliminatorias.app/Info.plist -o - -r ++ grep CFBundleIdentifier ++ sed -e 's/.\* : "\([^"]\*\)",/\1/' + BUNDLE\_ID=com.mobyleinc.prueba ++ xcrun simctl list devices ++ grep -c '(B0DDF874-95D9-4E2A-85A1-795607D3CCDA) (Booted)' + ISRUNNING=0 ++ xcrun simctl list devices ++ grep -c '(Booted)' + NUMBOOTED=0 + '[' 0 '!=' 1 ']' + echo 'Restarting Xcode Simulator ...' + shutdownAll ++ xcrun simctl list devices ++ sed -ne '/Booted/s/.\*(\([^)]\*\).\*(.\*)/\1/p' + BOOTED= + killall Simulator No matching processes belonging to you were found + sleep 2 + open -a /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID B0DDF874-95D9-4E2A-85A1-795607D3CCDA + loopcount=1 ++ xcrun simctl uninstall B0DDF874-95D9-4E2A-85A1-795607D3CCDA fake.app.id ++ grep -c Invalid + count=1 + '[' 1 -gt 0 ']' + [[1 -gt 100]] + [[1 == 0]] + loopcount=2 + sleep 1 ++ xcrun simctl uninstall B0DDF874-95D9-4E2A-85A1-795607D3CCDA fake.app.id ++ grep -c Invalid + count=0 + '[' 0 -gt 0 ']' + xcrun simctl uninstall B0DDF874-95D9-4E2A-85A1-795607D3CCDA com.mobyleinc.prueba An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163): Invalid device state + xcrun simctl install B0DDF874-95D9-4E2A-85A1-795607D3CCDA /Users/David/Desktop/Eliminatorias.app An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163): Invalid device state + echo + sleep 2 + xcrun simctl launch B0DDF874-95D9-4E2A-85A1-795607D3CCDA com.mobyleinc.prueba An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163): Invalid device state + kill -TERM 0 Restarting Xcode Simulator ... nov. 30 03:40:03.880 ---------- Device Log Starts ---------- nov. 30 03:40:09.217 ---------- Device Log Finished ----------

I have what might sound like a silly problem, but my app won’t launch after build in the Corona Simulator! Instead of my app launching, I go to a screen (please find attached file “screenshot.png”), and then nothing happens. When I click on my app (titled “My App”), the screen goes black for a spit second, and then goes immediately back to the original screen).

Have you tried launching your app on an iOS device?

If you’re running a later version of Corona SDK when you build for a device (including the Xcode simulator) Corona will install the app on that device for you and as long as you don’t close the dialog box that says something like “<Your App Name> has been launched in the Xcode iOS Simulator.  The Xcode iOS Simulator’s syslog will appear in the Corona Console until this message is closed” and you get a Continue button. As long as you do not click on that continue button, the Xcode simulator’s output including error messages will appear in the Corona Console log window.  You can see there why it’s crashing.  You can also from the Xcode simulator do “Debug->Open System Log…” to see what’s going on with the Xcode simulator.

@bgmadclown

Have you tried launching your app on an iOS device?

Unfortunately I don’t have a provisioning license so I can’t do this, but when I do, I definitely will try this.

@Rob Miracle
So when I build my app, I do get the window which you described http://prnt.sc/ct1s46
 

Corona will install the app on that device for you and as long as you don’t close the dialog box

I’m confused by this. I haven’t closed the dialog box, but Corona hasn’t installed my app on my device (a Mac).

 

The Xcode iOS Simulator’s syslog will appear in the Corona Console until this message is closed" and you get a Continue button. 

Yes, and the syslog prints

“Class VCWeakObjectHolder is implemented in both (PATH-NAME) and (ANOTHER-PATH-NAME). One of the two will be used. Which one is undefined.”

but I never get any error messages…

“You can see there why it’s crashing.”

I doesn’t “crash”.  It’s just that nothing ever happens…

There should be a boat-load of other messages there.