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    

Migrate your Accengage iOS app

Step-by-step instructions to migrate your iOS app from Accengage to WonderPush

👍

Migrating to WonderPush is easy, in most cases all you have to do is add WonderPush to your app and publish a new version to the AppStore.
When users install the new version, they will automatically be added to WonderPush.

This guide will help you remove Accengage from your app, add WonderPush, and show you how to import your existing Accengage users into WonderPush. Please note that this last step is usually unnecessary as users installing the new version of your app will automatically be imported to WonderPush.

Shipping WonderPush in a new version of your app

Step 1. Removing the Accengage Notification Extension

In your Xcode project General tab, select the notification extension target you've created during the Accengage setup. In this example, we've named it RichNotificationsExtension. Select the RichNotificationsExtension target and click Edit / Delete.

Select the AccengageExtension.framework from the left column and choose Edit / Delete. When asked if you want to remove the references or the files choose Move to trash.

Select the RichNotificationsExtension folder from the left column and choose Edit / Delete. When asked if you want to remove the references or the files choose Move to trash.

Finally, get rid of the build phases you added to your main target: select your project, then the main target, go to the Build phases tab and hit the remove button for the Copy files and Run script phases you've added during the Accengage setup.

Step 2. Removing the Accengage SDK

If you're using CocoaPods

Open your Podfile and remove any Accengage related line:

# Remove next line
source 'https://github.com/Accengage/ios-pod-specs.git'
 
# CocoaPods master specs repo
source 'https://github.com/CocoaPods/Specs.git'
 
use_frameworks!
 
target 'YOUR_APP_TARGET' do
    # Remove next line
    pod 'Accengage-iOS-SDK', '~> 6.1'
end

If you're using Carthage

Open your Cartfile and remove these lines:

github  "Accengage/accengage-ios-sdk-releases"
github  "Accengage/accengage-ios-extension-sdk-releases"

If you've made a manual integration

Select Accengage.framework and choose Edit / Delete. When asked if you want to remove the references or the files choose Move to trash.

Step 3. Clean your AppDelegate

Open your AppDelegate file and remove the following chunks:

import Accengage
#import <Accengage/Accengage.h>
Accengage.startWithOpt(ACCOptIn.enabled)
[Accengage startWithOptIn: ACCOptInEnabled];

Also remove any other code that calls the Accengage library within your entire app's codebase.

Step 4. Add WonderPush

Follow our iOS Quickstart guide to add WonderPush to your app, and publish a new version. Users that update their app will automatically appear in your WonderPush dashboard.

Importing your subscribers into WonderPush

Importing your existing subscribers into WonderPush will allow you to reach all of them via WonderPush right from the start.

Please note that you can usually skip this step and simply wait for your users to update their app.

Step 1. Export your push tokens from Accengage

Export your push tokens using the List devices API call from Accengage.

Step 2. Import your subscribers into WonderPush

Take note of your Access Token which can be found on the Management API tab of the Configuration page.

For every push token, call the Create or update an installation method of our Management API by adapting the following snippet with:

  • an INSTALLATION_ID that must be an hexadecimal string (if you're unsure what to put here, you can use the push token itself),
  • YOUR_APPLICATION_ACCESS_TOKEN with the Access Token you've just taken note of,
  • PUSH_TOKEN with the push token.
curl -XPOST https://management-api.wonderpush.com/v1/installations/INSTALLATION_ID \
    -d accessToken=YOUR_APPLICATION_ACCESS_TOKEN \
    -d userId= \
    -d overwrite=false \
    -d body='{"pushToken":{"data":"PUSH_TOKEN"},"device":{"platform":"iOS"}}'

Please note that if you have lots of subscribers to import, you can use the /batch method of our API to create multiple installations in one call :

curl -XPOST https://management-api.wonderpush.com/v1/batch \
    -d accessToken=YOUR_APPLICATION_ACCESS_TOKEN \
    -d body='{"requests":[{"method":"POST","path":"/v1/installations/INSTALLATION_ID_1","args":{"userId":"","overwrite":true},"body":{"pushToken":{"data":"PUSH_TOKEN_1"},"device":{"platform":"iOS"}}},{"method":"POST","path":"/v1/installations/INSTALLATION_ID_2","args":{"userId":"","overwrite":true},"body":{"pushToken":{"data":"PUSH_TOKEN_2"},"device":{"platform":"iOS"}}}]}'

👍

That's it!

You can go to your dashboard segments page and see the newly created installations in the All users segment.

Updated about a year ago

Migrate your Accengage iOS app


Step-by-step instructions to migrate your iOS app from Accengage to WonderPush

Suggested Edits are limited on API Reference Pages

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