Not exactly sure how to link .a lib statically.

So, I was going over example code to get iOS native stuff working and either I am totally do not understand how things work (very likely) or something is amiss with the docs.

So, I built the .a now I want to build corona app. I copy it over to corona app that next to main.lua. The File -> Build -> iOS. I select to build for simulator. Simulator launches and I get the following in the system log:

Jan 17 18:53:32 alexmac.local Corona[995] <Warning>: Runtime error

    module ‘libplugin.library’ not found:resource (libplugin.library.lu) does not exist in archive

        no field package.preload[‘libplugin.library’]

        no file ‘/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.library.lua’

        no file ‘/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.library.lua’

        no file ‘./libplugin.library.so’

        no file ‘/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.library.so’

        no file ‘./libplugin.so’

        no file '/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.so’libplugin.library

    stack traceback:

        [C]: ?

        [C]: in function ‘require’

        ?: in function ‘require’

        …/alex/CoronaProjects/NativePluginApp/Corona/main.lua:1: in main chunk

Jan 17 18:53:32 alexmac.local Corona[995] <Warning>: RuntimeErrorNotification: Runtime error: module ‘libplugin.library’ not found:resource (libplugin.library.lu) does not exist in archive

        no field package.preload[‘libplugin.library’]

        no file ‘/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.library.lua’

        no file ‘/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.library.lua’

        no file ‘./libplugin.library.so’

        no file ‘/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.library.so’

        no file ‘./libplugin.so’

        no file '/Users/alex/Library/Application Support/iPhone Simulator/7.0.3/Applications/DEDEE47C-FC8E-4104-AD2C-2E4AF763CF1F/Corona.app/libplugin.so’libplugin.library

    

    stack traceback:

        [C]: ?

        [C]: in function ‘require’

        ?: in function ‘require’

        …/alex/CoronaProjects/NativePluginApp/Corona/main.lua:1: in main chunk

Jan 17 18:53:32 alexmac.local Corona[995] <Warning>: Runtime error

    

    stack traceback:

        [C]: ?

        [C]: in function ‘require’

        ?: in function ‘require’

        …/alex/CoronaProjects/NativePluginApp/Corona/main.lua:1: in main chunk

Jan 17 18:53:32 alexmac.local Corona[995] <Warning>: RuntimeErrorNotification: Runtime error: 

    stack traceback:

        [C]: ?

        [C]: in function ‘require’

        ?: in function ‘require’

        …/alex/CoronaProjects/NativePluginApp/Corona/main.lua:1: in main chunk

So, what am I doing wrong? 

I am a bit confused. I thought .a file would have to work for both simulator and device.

Any help is apreciated.

Oh, wait am I basically stuck building this app from XCode forever? Looks like it (I actually did not realize this from the docs).

Cheers,

Alex.

Yes, if you want to include native code (e.g. a static library), you have to build using Xcode.

Yes, if you want to include native code (e.g. a static library), you have to build using Xcode.