When beginning your Leanplum integration, you'll need to decide whether you want to separate your app into a staging environment and a live environment, or if you would like to rely on the use of Development and Production keys to keep QA data separate from production data.
Each Leanplum app you create will have two keys, a Production key and a Development key. The Production key should be used when the app is live and in production. The Development key is used to send data to the development/test pipeline; this allows the data to be processed in real-time as well as to viewed in the debugger for validation, and in the Developer Activity section of Analytics.
For many clients, using the Development key for testing will suffice for keeping QA and production data separate, but you may also want to create separate staging and live environments within your Leanplum account. This can be useful if you have a large QA/dev team and would like to give them the ability to make changes within Leanplum and see what the changes would look like using a Production key, without worrying about the changes going to a production app.
To do so, navigate to the App Settings page by clicking on the App Selection menu at the top of the screen, and select Manage Apps (Note: This menu will be accessible from any page of the Leanplum dashboard). Once in the App Settings page, you can generate a new app by:
- Typing an app name into the App name field
- Selecting a category for your app
- Clicking Add
The recommended nomenclature is to explicitly label apps as the staging version and the live version. For example, for an app called “Checkers”, you should create two apps, one called “Checkers Staging” and another called “Checkers Live”. This will give you two separate apps with two independent sets of API keys.
If you’ve previously been testing and releasing with one app but would like to add a staging environment, you will want to rename your existing app for clarity. Clicking on an app name will allow you to change the name of the existing app.
We recommend having your development team use the staging environment for development, including developing new A/B tests and messaging campaigns. When you're ready for QA, you can switch to the live environment but still use the app in Development mode, which allows you to:
- See your registered developer devices on the dashboard,
- Force your device into specific A/B test variants
- Keep your data segregated from the live users (instead it will show up in the Developer Activity section)
- Update custom templates and variables to the content management system
When you are ready to release an update of your app to the App Store, it is important to ensure that you are using the Production app keys in the live version of the application.