The WonderPush Developer Hub

Welcome to the WonderPush developer hub. You'll find comprehensive guides and documentation to help you start working with WonderPush as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Configuring Sandbox & Production

Using WonderPush in both development in production versions of your app.

Using WonderPush in both development and production versions of your application requires 2 WonderPush projects.

Prerequisites

  • An iOS Universal push certificate. You can also use a sandbox certificate for the Development environment.
  • Xcode

Step 1. Create two WonderPush projects

Create two WonderPush projects: one for the development environment (let's call it MyApp - development) and one for the production environment (MyApp - production).

Upload the appropriate iOS push certificate to each WonderPush project by following steps 1 & 2 of our iOS Quickstart.

Step 2. Conditional initialization

When your app launches, it initializes WonderPush with the setClientId:secret: method. We'll use a conditional to switch between development and production:

#if DEBUG
  WonderPush.setClientId("DEVELOPMENT_PROJECT_CLIENT_ID", secret:"DEVELOPMENT_PROJECT_CLIENT_SECRET")
#else
  WonderPush.setClientId("PRODUCTION_PROJECT_CLIENT_ID", secret:"PRODUCTION_PROJECT_CLIENT_SECRET")
#endif
#ifdef DEBUG
  [WonderPush setClientId:@"DEVELOPMENT_PROJECT_CLIENT_ID" secret:@"DEVELOPMENT_PROJECT_CLIENT_SECRET"];
#else
[WonderPush setClientId:@"PRODUCTION_PROJECT_CLIENT_ID" secret:@"PRODUCTION_PROJECT_CLIENT_SECRET"];
#endif

Now whenever you launch your app via Xcode, the development project will be used, and when you'll distribute your app on the AppStore, the production project will be used.

Updated about a year ago

Configuring Sandbox & Production


Using WonderPush in both development in production versions of your app.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.