Open Source & Free  

TIP: Global Settings

TIP: Global Settings

Header Image

A somewhat hidden feature of Codename One Settings is the ability to define global settings. Global settings are useful when you have multiple projects and would like to use common defaults. E.g. we have standard certificate definitions for iOS/Android that allow us to just send a device build on a new project without configuring anything.

For iOS this can only work for debug builds and won’t allow features such as push etc. It requires some work…​
The global settings toggle button
Figure 1. The global settings toggle button

A good use for this is in the Android settings where you can define one certificate for use with all your apps. For iOS you can define the same certificate for all applications as they don’t change between apps. However, you would need a different provisioning profile so for distribution you will need to re-run the wizard and generate only the provisioning.

There is a trick for iOS where you can create a “generic” provisioning profile to the * package/identifier. This can be done via the web UI on apples developer site here:

You can generate an “AllApps” provisioning profile and save it to your disk, then point the debug provisioning to that. Once this is defined, new projects will build on iOS without a single change.


  • Francesco Galgani says:

    I was unaware of the “AllApps” tips, thank you, it can be useful to don’t waste time with signing when we want only to try simple test cases in new projects. I’ve just tried this tip, I noted that to make it working it’s also necessary to set the correct “TeamID” (the string like 12ABCDEFG8) in the first part of the “AppID” inside the iOS signing settings of each project (because the default one is not correct). Is there any way to change how the String “AppID” is generated by Codename One for new projects? I tried to set the TeamID in the iOS signing of global settings, but new projects still have a wrong new AppID, that starts with “Q5GHSKAL2F”. I noted that “Q5GHSKAL2F” is used in your demo projects and it’s hard coded in your “CodenameOneWizardIterator” class of the Netbeans plugin.

  • Shai Almog says:

    Yes the team ID would also be essential, back when we created this feature team ID wasn’t supported so I’m not sure how well it will work in a global configuration. The app id is hardcoded into the wizard, I’ll need to give this some thought.

Leave a Reply