1 min read

Emarsys

Last Updated - Platform 25.0 - SDK 20.0

The PoqEmarsys integrations wraps the Emarsys SDK to provide remote notifications, analytics and inbox messages driven by Emarsys.

Set up

https://github.com/poqcommerce/Poq.iOS.Emarsys.git

  1. Make sure the Emarsys dashboard is set up.
  2. Add the PoqEmarsys framework from the URL above to your project. How?
  3. Register the integration in your AppDelegate.swift.
import PoqEmarsys
class AppDelegate: BaseAppDelegate {
override func setupModules() {
PoqPlatform.shared.addModule(PoqEmarsys())
}
}
  1. Add an Emarsys.plist using the keys from your Emarsys dashboard.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>applicationCode</key>
<string></string>
<key>contactFieldId</key>
<int></int>
<key>merchantId</key>
<string></string>
</dict>
</plist>
  1. Optional: Add an Emarsys-Development.plist to support Emarsys in development mode. See the development mode section below.

Notifications

Emarsys apps can be set to 'Production' or 'Sandbox' when setting up the notification certificate in the dashboard. But, there is no reason to use 'Sandbox' apps. When the app is being run via Xcode it will only receive notifications from 'Sandbox' apps. When the app is archived for any type of distribution, Xcode switches the app to connect to 'Production' APNs.

We don't provide an out of the box method for 'Sandbox' apps. A developer can temporarily code their app to use a Sandbox app whilst setting up the integration.

A developer will need to make sure the Emarsys apps are set up with your Apple Account APNs Key. Use the existing key; there should only be 1 APNs key that should be shared by all apps in that account.

Developer Mode

Emarsys may be disabled in developer mode.

Emarsys switches to using the Emarsys-Development.plist config when in development mode. If this config does not exist then Emarsys is disabled in developer mode. This is to avoid tracking fake revenue, generated from development environments, against the live app.

Do not use the same app as in Emarsys.plist config unless you have read and understood the above.

History

  • 10.0 (Oct 23): Release for Poq SDK 20 (v25).
  • 9.0 (Mar 23): Release for Poq SDK 19 (v24) adopting the new analytics layer.
  • 8.1 (Jan 23): Added Inbox and major rework for deeplinks and notifications.
    • Contact tracking is temporarily disabled as it breaks the Inbox.
  • 8.0 (Nov 22): Release for Poq SDK 18 (v23) adopting developer mode and new config format.
  • Releases...