Amazon Pinpoint
Developer Guide

Setting Up the AWS Mobile SDK for iOS

Before modifying your app to use Amazon Pinpoint, set up the AWS Mobile SDK for iOS.

To set up the AWS Mobile SDK for iOS

  1. Open your app project in Xcode.

  2. Context-click in your project tree view, and select Add files to "<project name>"... from the context menu.

  3. Locate the AWSCore.framework and AWSPinpoint.framework files from the downloaded .zip file. Select the files, and choose Add.

  4. Open a target for your project, select Build Phases, expand Link Binary With Libraries. Then, click the + button, and add:

    • libsqlite3

    • libz

    • SystemConfiguration.framework

  5. Open the target for your project, choose General and expand the Embedded Binaries section. Then, choose the plus icon (+).

  6. In the window that opens, select the AWSCore and AWSPinpoint frameworks.

  7. Choose Capabilities. Enable push notification and remote notifications in background modes.

  8. Edit your Info.plist file to include your AWS information:

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ""> <plist version="1.0"> <dict> <key>AWS</key> <dict> <key>CredentialsProvider</key> <dict> <key>CognitoIdentity</key> <dict> <key>Default</key> <dict> <key>PoolId</key> <string>IDENTITY_POOL_ID</string> <key>Region</key> <string>us-east-1</string> </dict> </dict> </dict> <key>PinpointAnalytics</key> <dict> <key>Default</key> <dict> <key>AppId</key> <string>APP_ID</string> <key>Region</key> <string>us-east-1</string> </dict> </dict> <key>PinpointTargeting</key> <dict> <key>Default</key> <dict> <key>Region</key> <string>us-east-1</string> </dict> </dict> </dict> </dict>
  9. If, when a user taps a push notification sent to your app, you want your app to open a URL, add the following:

    <key>LSApplicationQueriesSchemes</key> <array> <string>http</string> <string>https</string> </array>