Enterprise to Native Migration

This is truthfully bizarre. I can see that you have plugin…

It verifies splash screen plugin when “signing” your app. Could you please output you see in “Certify Build” stage? https://i.imgur.com/bK3Srut.png

Edit:

Do it for template App if you want. Again, do not do anything else: 1. copy template 2. delete _CoronaSplashScreen.png from project 3. build and run the App target (in Xcode simulator, to avoid setting up apple code signing)

Edit:

Run this 2 commands and paste output:

~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder checkauth ~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder version
  1. Certify Build:

 

Showing All Messages

PhaseScriptExecution Certify\ Corona\ Build /Users/tbuchler/Library/Developer/Xcode/DerivedData/TropeTrainer-buhxnatkikaqdqchtsyltfsfheaw/Build/Intermediates.noindex/TropeTrainer.build/Debug-iphonesimulator/TropeTrainer.build/Script-8D77A7A31FBB476F00B01786.sh

    cd /Users/tbuchler/Dropbox/TGBProjects/TFMelodyDesigner/TTM_Enterprise_Native/ios

    /bin/sh -c /Users/tbuchler/Library/Developer/Xcode/DerivedData/TropeTrainer-buhxnatkikaqdqchtsyltfsfheaw/Build/Intermediates.noindex/TropeTrainer.build/Debug-iphonesimulator/TropeTrainer.build/Script-8D77A7A31FBB476F00B01786.sh

 

Running app_sign for Debug

USING TOOL_PATH: /Users/tbuchler/Library/Application Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder

Signing /Users/tbuchler/Library/Developer/Xcode/DerivedData/TropeTrainer-buhxnatkikaqdqchtsyltfsfheaw/Build/Products/Debug-iphonesimulator/TropeTrainer.app/TropeTrainer

c2875cc0aca1a7a6f6822cb99cdb5f8d   /Users/tbuchler/Library/Developer/Xcode/DerivedData/TropeTrainer-buhxnatkikaqdqchtsyltfsfheaw/Build/Products/Debug-iphonesimulator/TropeTrainer.app/resource.corona-archive

Replacing signature… done.

 

===============

  1. Template App copied works as we all would expect without Splash Screen.

===============

  1. Commands:

  Current authorization is ‘Corona’ for user ‘tbuchler@kinnor.com’

  Authorization check succeeded.

  2017.3175

> Template App copied works as we all would expect without Splash Screen.

Does it means it works or shows alert error message? Because for me it works without any errors/alerts and without showing splash screen.

It works without alerts or errors, and without showing a splash screen.

So, template native app works without splash screen, your - doesn’t? Try copying Certify build phase from template app to yours. It signs Corona’s resources and checks if you have splash screen control license.

I’m not sure what you mean by “copying Certify build phase”.

It looks, from Build Phases for the App, that it calls CertifyBuild.sh then checks for errors.

If I’m looking at the right place then the two are identical. THey should be, since I copied the app template, then replaced the Corona folder’s contents and parts of IOS folder with my content.

-Tom

The new version supports both old Enterprise style projects and new Native style projects. After installing Corona go to /Applications/Corona/Native.

You will find two programs to run there, one setups up the environment for Enterprise, the other for Native and I believe you can run both. New projects using the “App” template will be “native” based.

For iOS, you can run a build dialog in Xcode to download and install the plugins. See: https://coronalabs.com/blog/2017/07/06/using-plugins-in-corona-native-projects-ios/

We don’t have similar functionality for Android yet. There are multiple complexities. For now the best we can offer is a command line tool (write to support AT coronalabs.com if you need it)  that will download them and then you have to hand copy them to your project and in some cases manually integrate them with Gradle. Hopefully we will have a documented path to doing this at some point in the near future.

Thanks for this. I’m having some trouble with this.

I have an Enterprise project I haven’t compiled in perhaps a year. My Enterprise subscription expired last spring, and I was told I did not need to renew as Native was now free.

I installed the 2017.3135 release, and ran the “Enterprise” setup app as you suggest.

FIrst problem: I use Flurry and Bit Enterprise plugins. I could not access Enterprise plugins as the Corona web site said I don’t have an Enterprise license. I copied older plugins from a previous build, but don’t know how that will work out, nor where to find updated copies of what I need.

After cleaning up some issues such as missing Games, Photo and libSTDC++ vs libC++ overrides, etc, the app compiled, but failed to build with:

Could not launch Corona Builder. Your current subscription ‘Corona SDK’ does not have sufficient privileges.

ERROR: This computer is not properly authorized. You must have an account with the Enterprise (Native extensions) subscription. Please use the ‘authorize’ command or check that your subscription type is valid.

Using Bundle Id: (com.kinnor.xxx)

Using AppId: (com.kinnor.xxx)

Creating application.metadata …

Archiving /Users/tbuchler/Library/Developer/Xcode/DerivedData/TropeTrainer-akvmzbrcxxxtqedhaltopcazfhyr/Build/Products/Debug-iphonesimulator/xxx.app/*.lu into /Users/tbuchler/Library/Developer/Xcode/DerivedData/xxx-akvmzbrcxxxtqedhaltopcazfhyr/Build/Products/Debug-iphonesimulator/TropeTrainer.app/resource.car

ERROR: Failed to generate resource.car.

Exiting due to errors (above)

Command /bin/sh failed with exit code 255

 

What do I need to do to get this to build, and where do I find the latest Enterprise plugins for Flurry and Bit (bitwise arithmetic)?

 

Thanks,

-Tom

Hi,

  1. To download plugins follow these tutorials:

iOS - https://coronalabs.com/blog/2017/07/06/using-plugins-in-corona-native-projects-ios/

Android - https://coronalabs.com/blog/2017/10/19/using-plugins-with-native-android-builds/

  1. Go to Simulator preferences and press “Deauthoirze and Quit” button. After that you will have to log in again and will be able to build Native project. 
  1. In tthe Active Scheme button specified in the instructions to download the plugins does not have a “Download Plugins” entry in its dropdown menu.  

  2. I closed XCode, Deauthorized and Quit the SDK, reopened and relogged in successfully. Reopened XCode and project. I get the same authorization error I reported above.

  3. New question: Once 1 and 2 work, what do I do to purchase deactivation of the Corona Splash Screen for this Enterprise project?

-Tom

  1. Look into our iOS Native Template located in Corona/Native/Project template/ios folder. You will find how Download Plugins scheme is implemented.

  2. Try to execute

    ~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder deauthorize email password

and then

~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder authorize email password 
  1. You have to purchase Splash Screen Control plugin https://marketplace.coronalabs.com/plugin/splash-screen-control
  1. In Corona/Native/Project template/ there is no ios folder, only an App folder. In Corona/Native/Project template/App/ios I don’t know what to look for.

  2. I deauthorized and authorized via Terminal. I get the same error when building.

  3. Thank you.

What’s the next thing to try. I’ve got an app that is crashing on iPhone X, so I am beginning to get concerned that something is wrong with my project or environment that simple normal things are not working as documented.

-Tom

I would recommend you to start a brand new Native project. Copy your Corona folder and any native code files, libraries and frameworks and start with that fresh model.

It must be much easier than adapt your current project to new structure.

If you want to migrate your existing project from old Enterprise structure to new Native style projects, easiest way would be to copy a template app, and copy in your enterprise sources and only necessary application specific settings. This sounds tedious, but rather simple process.

Another alternative is try to copy settings from App template to your project. This would include:

  1. Select + in Targets window for your project, in Cross-Platform select Aggregate, name it Download Plugins.

  2. In Build Phases for Download Plugins target create New Run Script Phase, and copy over download plugins phase over from template app.

  3. Copy CoronaNative.xcconfig and CoronaApp.xcconfig files. In Targets select your app, and select CoronaApp and CoronaNative as in template project, do same for any plugin projects if you have any. Here’s a screenshot of how it should look like (and where to look for it):

https://i.imgur.com/Y1Yib4W.png

  1. Copy over build settings from the template app in your app targets. You can switch to basic view, to see which settings was changed. Make sure you have same C++ compiler and library. Note that if setting is different, but one project have it in bold and other in regular thin font, this means that setting is inherited from either config file or project.

  2. Go thorough script build phases for your app target, compare with template.

This should be it… Alternatively, if you just looking to reuse plugins, you can try running script which downloads plugins manually, or create dummy project, copy of template App with only build.settings entries to download your plugins, and manually copy them over (check out NativeApp.xcconfig to see downloaded plugin locations and settings)

Thanks guys! I’ve started with the Native Template, and copied my stuff in. I’m working out the little details.

Builds are succeeding, however I’m getting runtime error: Could not load provider (flurry) due to the following reason: modlule ‘CoronaProvider.analytics.flurry’ not found: resource (CoronaProvider.analytics.flurry.lu) does not exist in archive…

I put into build.settings

plugins =

    {

        [“plugin.bit”] =

        {

            publisherId = “com.coronalabs”

        },

        [“plugin.flurry.analytics”] =

        {

            publisherId = “com.coronalabs”

        },

    },

 

and ran Download Plugins. I find the plugins in my Library/APplication Support/Corona/Native Plugins folder.

 

There is a reference to them in CoronaApp.xconfig in their proper places.

 

There used to be a reference to these plugins in Frameworks and in  Build Phases: Link Binary with Frameworks, but I don’t see them in the new Native structure.

 

What am I missing?

-Tom

Currently CoronaApp.xcconfig should get generated lines to link with target plugins for iOS. Like, something like -lFlurryPlugin -lFlurry, which is exact equivalent of adding those libraries to linked frameworks section in xcode. Make sure they are reflected in your app’s target in build settings in linker settings.

It did add the -lFlurry etc to CoronaApp.xconfig.

In the simulator, the app showed a splash screen then failed with an exception that it could not find one of a dozen ways it was looking for flurry:

ERROR: Runtime error

ERROR: Could not load provider (flurry) due to the following reason: module ‘CoronaProvider.analytics.flurry’ not found:resource (CoronaProvider.analytics.flurry.lu) does not exist in archive

no field package.preload[‘CoronaProvider.analytics.flurry’]

no file '/Users/tbuchler/Library/Developer/CoreSimulator/Devices/CA28BBB7-3CC1-40F4-B319-8FE19875A1BC/data/Containers/Bundle/Application/2B238D98-2AF6-4786-B118-5B453489E50F/TropeTrainer.app/corona-plugins/CoronaProvider/analytics/flurry.lua’

no file '/Users/tbuchler/Library/Developer/CoreSimulator/Devices/CA28BBB7-3CC1-40F4-B319-8FE19875A1BC/data/Containers/Bundle/Application/2B238D98-2AF6-4786-B118-5B453489E50F/TropeTrainer.app/CoronaProvider/analytics/flurry.lua’

no file '/Users/tbuchler/Library/Developer/CoreSimulator/Devices/CA28BBB7-3CC1-40F4-B319-8FE19875A1BC/data/Containers/Bundle/Application/2B238D98-2AF6-4786-B118-5B453489E50F/TropeTrainer.app/CoronaProvider/analytics/flurry.lua’

no file '/Users/tbuchler/Library/Developer/Cor

 

etc.

Ah. I believe you’re included old Flurry plugin. One you included is https://docs.coronalabs.com/plugin/flurry-analytics/index.html, which is used as require( “plugin.flurry.analytics” ).

Corona provider one is “CoronaProvider.analytics.flurry” with same provider name.

tl;dr: try following and run “Download Plugins” again

plugins =

    {

        [“plugin.bit”] =

        {

            publisherId = “com.coronalabs”

        },

        [" CoronaProvider.analytics.flurry"] =

        {

            publisherId = “com.coronalabs”

        },

 

    },

Thanks, Vlads. I switched to plugin.flurry.analytics, fixed the Init syntax in my code, and all is well in that front.

I think I’m seeing one remaining issue: I’ve purchased the SplashScreen plugin, verified that is Activated, and put into build.settings:

    splashScreen =

    {

      enable = false

    },

 

yet the Corona Splash screen still appears for a couple of seconds. Suggestions?

-Tom

For native, try just unchecking _CoronaSplashScreen.png file from your app Target Membership in Xcode.