LogoLogo
  • Home
  • Integration & SDKs
    • Web / Browser Push
      • Wordpress Integration Steps
      • Wix Integration Steps
      • Safari
        • Safari on Desktop
        • Safari on Mobile (iOS / iPadOS)
      • SDK
        • SDK Methods
        • SDK Events
        • Customizing Prompt CSS
        • AMP Support
        • E-Commerce / Abandoned Cart
    • Native App Push
      • Apple / iOS
        • P8 Key or P12 Cert Setup
        • SDK: Swift / Obj-C
          • Activity Tracking
          • Deep Linking
          • Live Activities
          • App Messages
          • Identity Synchronization
          • SDK Methods
          • SDK Delegates
        • SDK: React Native
        • SDK: Flutter
        • Advanced
          • Self-Managed Integration
        • iOS SDK Changelog
      • Android
        • Firebase App Setup
        • SDK: Kotlin / Java
          • Deep Linking
          • Activity Tracking
          • App Messages
          • Identity Synchronization
          • SDK Methods
          • SDK Callbacks
          • Live Activities
        • SDK: React Native
        • SDK: Flutter
        • Advanced
          • Self-Managed Integration
        • Android SDK Changelog
      • React Native
        • Android: Firebase App Setup
        • iOS: P8 Key or P12 Cert Setup
        • SDK: React Native
          • Deep Linking
          • Activity Tracking
          • Subscriber Matching
          • Live Activities
          • App Messages
          • SDK Methods
      • Flutter
        • Android: Firebase App Setup
        • iOS: P8 Key or P12 Cert Setup
        • SDK: Flutter
          • Deep Linking
          • Activity Tracking
          • Subscriber Matching
          • Live Activities
          • App Messages
          • SDK Methods
  • API
    • API Access Management
    • API Reference
  • Platform
    • Dashboard
    • Notifications
      • A/B Testing
      • Custom Buttons
      • Notification Previews
      • Inline Segmentation
      • Notification Templates
      • Macros
      • Native App Push Notifications
    • App Messages
    • Segments
      • Custom Geo Segmentation
    • Campaigns
    • Insights
    • User Management
    • Organizations
      • Multi-Factor Authentication
      • Single Sign On
        • Google Workspace
        • Microsoft Azure AD
        • Okta Workforce
      • Multi-Domain Notifications
      • Multi-Domain Segments
      • API Access
    • Multi-Channel Notifications
  • Info Center
    • Launch Guide & Best Practices
      • Landing Domain Whitelist
    • Web / Browser Push
      • Common Questions
      • Browser Support
      • Retrieve Push User ID
      • Not Getting Prompted
      • Not Receiving Notifications
      • How to Unsubscribe
    • Native App Push
      • Retrieve Push User ID
    • Workflow Planning
Powered by GitBook
On this page
  • Prerequisites
  • Step 1: iOS SDK Setup
  • Step 2: Create and Schedule an App Message
  • Step 3: (Optional) Trigger Your App Message's Custom Condition
  • Step 4: (Optional) Listen to App Message Lifecycle Events
  1. Integration & SDKs
  2. Native App Push
  3. Apple / iOS
  4. SDK: Swift / Obj-C

App Messages

A quick start guide to adding App Message support to your iOS application with the Pushly PushSDK

PreviousLive ActivitiesNextIdentity Synchronization

Last updated 1 year ago

App Messages, unlike Push Notifications and Live Activities, allow you to interact with and engage your user base without the need for a subscription token. App Message can be configured to automatically display based on a number of criteria including custom conditions that can be provided programmatically.

For App Messages with custom conditions the PushSDK provides convenience methods for you to signal when these conditions have been met as well as the ability to listen to certain lifecycle events.

Prerequisites

Before you can integrate App Messages with the SDK the following requirements must be met:

  • An iOS app

  • A device or emulator with iOS 11.0 or newer installed

  • PushSDK release supporting App Messages (See version support chart below)

Step 1: iOS SDK Setup

For applications not already using the PushSDK please see our Native App Push setup guide for .

For applications already using the PushSDK you might need to upgrade to a later version that includes App Message support. Use the following table to determine if you need to upgrade your installation.

SDK
Earliest Version with App Messages

1.3.0+

1.2.0+

1.2.0+

Within the Xcode project navigator panel locate Package Dependencies. Locate and right-click on Pushly and select Update Package.

If after an update the package is not >= version 1.3.0 select your Project in the project navigator, select your project, and then navigate to Package Dependencies. Select Pushly and ensure the Dependency Rule is set to Up to Next Major Version with 1.3.0, or greater, as the target.

  • Ensure you are targeting 'Pushly', '>= 1.3', '< 2.0' in your Podfile.

  • Run pod update Pushly

  • Confirm the latest version has been downloaded by looking in your Podfile.lock.

Step 2: Create and Schedule an App Message

Step 3: (Optional) Trigger Your App Message's Custom Condition

When using custom conditions the PushSDK is used to provide these conditions programmatically which then triggers an evaluation of which App Messages are currently active and match the provided conditions.

In most cases a single condition is triggered and evaluated at a time. For these situations you would use the trigger(condition: String, withValue: String) method signature.

PushSDK.AppMessages.trigger(condition: "enabled_subscription", withValue: "true")
[PushSDKAppMessages triggerCondition:@"enabled_subscription" withValue:@"true"];

However, there might be situations where it is more convenient to trigger multiple conditions at once for evaluation. In these cases you can pass a dictionary containing any number of conditions to the trigger(conditions: [String : String]) method signature.

PushSDK.AppMessages.trigger(conditions: [
    "enabled_subscription": "true",
    "subscriber_tier": "premium"
])
[PushSDKAppMessages triggerConditions:@{
    @"enabled_subscription" : @"true",
    @"subscriber_tier": @"premium"
}];

Step 4: (Optional) Listen to App Message Lifecycle Events

Use the Pushly Platform to build and schedule your first .

See our documentation for information on handling lifecycle events of your App Messages.

App Message
Objective-C / Swift
React Native SDK
Flutter SDK
Apple / iOS
SDK Delegates