iOS SDK Example App Readme

The Monetate iOS SDK Example App demonstrates how to use the Monetate iOS SDK in a typical iOS app. The example app uses the SDK to compile a list of events, send them to the Engine API, and then update its UI based on the actions that the API returns. The app can also be used to aid development of the SDK by directly including the SDK's source code to provide a faster developer feedback loop.

Developer Setup

To work on the app itself, download the repo and open the project in Xcode.

SDK Developer Setup

The example app can be used to improve development of the SDK. Once the SDK project is included in the example app project, the example app recompiles the SDK on each run/build. This allows a developer to make changes to the SDK and immediately have access to those changes within the example app. Including the SDK in the example app also provides a convenient way to test the SDK's Swift interface.

  1. Clone the example app repo and the SDK repo into the same directory.
  2. Launch the example app project in Xcode.

In the Navigator pane to the left, the monetate-ios-sdk.xcodeproj is included. Expanding the monetate-ios-sdk.xcodeproj project reveals the project files. Editing a file and recompiling the example app immediately makes that change available, with some minor caveats.

SDK Development Caveats

Config File Changes

While most file changes are seamlessly incorporated, changing any of the files in the SDK's config folder requires a few additional steps before they're picked up.

  1. After saving the file changes, clean the project by either using the Cmd + Shift + K shortcut or via the Product > Clean menu option.
  2. Outside of Xcode, navigate to Macintosh HD / Users / <USER> / Library / Developer / Xcode, where <USER> is the current user's account name.
  3. In the aforementioned folder, locate and delete the DerivedData folder.
  4. Recompile the example app, and the config file changes should now be included.