App fails to run on XCode IOS 64-bit simulator

Hi

I am testing my app, before publishing, using the Xcode IOS simulator. It works fine for the 32-bit simulator, i.e. iPhone 5. However it fails to start up on 64-bit simulator, i.e. iPhone 6, iPhone 5s, etc. Simulator version is 9.2 (SimulatorApp-643 CoreSimulator-201.3)

The output from the simulator logs has the following error (full log attached)

“Program specified by service does not contain one of the requested architectures”

During the corona build of my app, it does seem to create the 64-bit slice

Compiling Slices…

    Compiling architecture: i386

        Done.

Compiling architecture: x86_64

    Done.

Creating Universal Binary…

    

And checking the file information, reports the following

[10:26:36] ~/projects/corona/builds$ file mathstiles.app/mathstiles

mathstiles.app/mathstiles: Mach-O universal binary with 2 architectures

mathstiles.app/mathstiles (for architecture armv7): Mach-O executable arm

mathstiles.app/mathstiles (for architecture arm64): Mach-O 64-bit executable

So has anyone else had a problem running a corona app on 64-bit simulators, but works fine on an actual 64-bit device?

The only real device I have tested it on is an iPhone 5, but do not have a later 64-bit iPhone to test against. 

Thx

What version of Corona SDK are you using?

Are you using any plugins?

I am using Corona version 2015.2731.

Built with Xcode 7.2.

The plugins are admob and google in-app purcahse. This is the plugin section from the build.settings file

    plugins =

    {

        [“plugin.google.play.services”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, android=true }

        },

        [“plugin.google.iap.v3”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        },        

    },     

I upgraded to the latest corona public release 2016.2830. It now fails on both 32/64 bit simulators, stating that the 

** Terminating app due to uncaught exception ‘Corona Runtime Error’, reason: '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

        no field package.preload[‘CoronaProvider.ads.admob’]

.

.

.

        ?: in function ‘init’

        /Users/someuser/projects/corona/mathtilesproj/mathstiles/ad_management.lua:85: in function ‘initAds’

        /Users/someuser/projects/corona/mathtilesproj/mathstiles/main.lua:17: in function ‘setupAds’

        /Users/someuser/projects/corona/mathtilesproj/mathstiles/main.lua:58: in main chunk

Apr  6 22:26:05 MBA mathstiles[11421]: Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:

        /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator

Apr  6 22:26:05 MBA mathstiles[11421]: Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7a044860 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)

I guess the admob plugin is not compatible with the simulator

It seems to be fine on a real iPhone 5 device. I guess I will get hold of an iPhone 6 device, and test with that.

Try:

plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true, android=true } }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, },

Excellent that worked! Missed that iphone-sim key in the docs. It now works on both 32/64 bit simulators.

Thanks.

What version of Corona SDK are you using?

Are you using any plugins?

I am using Corona version 2015.2731.

Built with Xcode 7.2.

The plugins are admob and google in-app purcahse. This is the plugin section from the build.settings file

    plugins =

    {

        [“plugin.google.play.services”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, android=true }

        },

        [“plugin.google.iap.v3”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        },        

    },     

I upgraded to the latest corona public release 2016.2830. It now fails on both 32/64 bit simulators, stating that the 

** Terminating app due to uncaught exception ‘Corona Runtime Error’, reason: '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

        no field package.preload[‘CoronaProvider.ads.admob’]

.

.

.

        ?: in function ‘init’

        /Users/someuser/projects/corona/mathtilesproj/mathstiles/ad_management.lua:85: in function ‘initAds’

        /Users/someuser/projects/corona/mathtilesproj/mathstiles/main.lua:17: in function ‘setupAds’

        /Users/someuser/projects/corona/mathtilesproj/mathstiles/main.lua:58: in main chunk

Apr  6 22:26:05 MBA mathstiles[11421]: Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:

        /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator

Apr  6 22:26:05 MBA mathstiles[11421]: Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7a044860 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)

I guess the admob plugin is not compatible with the simulator

It seems to be fine on a real iPhone 5 device. I guess I will get hold of an iPhone 6 device, and test with that.

Try:

plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true, android=true } }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, },

Excellent that worked! Missed that iphone-sim key in the docs. It now works on both 32/64 bit simulators.

Thanks.