Swiftpack.co - Package - Leanplum/Leanplum-iOS-SDK

Leanplum -

Installation & Usage

cd "Example/"
pod install
open "Leanplum-SDK.xcworkspace"

Development Workflow

  • We use feature branches that get merged to master.

Build the SDK

To build the sdk run:

cd "Example/"
pod install
cd -


Please follow the guidelines under https://github.com/Leanplum/Leanplum-iOS-SDK/blob/master/CONTRIBUTING.md


See LICENSE file.


Leanplum does not support custom modifications to the SDK, without an approved pull request (PR). If you wish to include your changes, please fork the repo and send a PR to the develop branch. After the PR has been reviewed and merged into develop it will go into our regular release cycle which includes QA. Once QA has passed the PR will be available in master and your changes are now officialy supported by Leanplum.


Stars: 47


Used By

Total: 0


iOS SDK 3.1.0 -


  • Defer In-App messages (docs)
  • Mark Inbox message as read without running Open Action (docs)
  • Set AppId and Dev or Prod keys from a plist (docs)
  • Handle App Store links in Web and Rich Interstitials
  • Added support for SPM 5.3
  • Switch device ID


  • Expose ActionContext arguments and message id
  • Request Sender improvements
  • Refactored network layer
  • Improved SDK logging
  • Removed IDFA macro


  • Prevent tracking Open for push notifications when app is in foreground
  • Register for push message tracks View even when the message is not shown
  • Perform actions after start error
  • Check defineAction options for nil

iOS SDK 3.0.0 -


  • Swift support improvements
  • Centralized push notifications logic
  • Huge improvements to In-App Messages UI - performance and reliability
  • Push types are now sent when device registers with token


  • Fix for push notification open when mute inside app is true
  • Fix for new and old user id match

We have released a number of improvements for better Swift support. This might require some small tweaks to upgrade to this version. Use this article for the Swift changes. The Leanplum documentation samples are also updated.

iOS SDK 2.7.3 -


  • change certain method names to readonly properties. Relevant for mostly ReactNative users

iOS SDK 2.7.2 -


  • don't crash on repeated Start calls in Development mode

iOS SDK 2.7.0 -

The way Templates are handled is changing, and therefore this is a minor release. None of the changes are breaking, but if you are manually integrating the SDK, the various templates are now in their own files.


[LP-11143] fix accessibility elements (#343) [LP-11154] Fixing action not triggered (#341) [LP-11206] Adding synchronization (#348) [LP-11199] Fixing background deadlock (#350) Synchronize access to callbacks (#347) [LP-11199] Fixing a crash when entering background [LP-11142] Fixing a potential objc_release crash (#337)

iOS SDK 2.6.4 -


  • Rich interstiail orientation fix (#330)
  • Removing exception when wss is used (#329)

iOS SDK 2.6.3 -

Bugfixes: • [LP-10948] Potential fix for pause crash (#328) • Fix the old cached data based check (#327) • [LP-11004] Fixing not hiding rich interstitial (#326) • Fixing a potential crash (#319)

Features: • [LP-10929] Using operation queue to execute writes in bg (#324) • Enabling use of TLS (#323) • E2-1227 Excluding database from iCloud/iTunes sync (#325)

iOS SDK 2.6.2 -


• Fixed an issue with accessing local resources using WebKit

iOS SDK 2.6.1 -

Bugfixes: • Move to WebKit, moving away from deprecated UIWebView

Leanplum iOS SDK 2.6.0 -

• iOS 13 support - push token fix. Please upgrade to the new SDK to keep push notifications working smoothly iOS 13 support guide: https://docs.leanplum.com/changelog/leanplum-ios-13-compatibility

Leanplum iOS SDK 2.5.1 -

Fixes: • Fix for the safe area for bottom padding. • Fix a potential crash for push notifications post delivery.

Leanplum iOS SDK 2.5.0 -

Adds support for disabling automatic method swizzling for push notification methods. For more details, see: https://docs.leanplum.com/changelog/custom-push-notification-swizzling-for-ios

iOS SDK 2.4.3 -

Fixes: • Fixes for edge case crashes. • Full screen view fixes for landscape view for rich interstitial.

iOS SDK 2.4.2 -

Fixes: • Added umbrella file to remove all warnings for the framework • Fix Carthage project for using with source • LP-10296 fix: iOS banner expand to fullscreen and unresponsive (#285) • E2-1815: download files directly from URL instead of API call

Leanplum iOS SDK 2.4.1 -

Fixes: Suppress warnings Move bitcode flags to podfile from podspec

Leanplum iOS SDK 2.4.0 -

Feature: Data gzip compression to optimize payloads. Bugfix: Adding cache update if variants are changed.

Leanplum iOS SDK 2.3.1 -

Bugfix: request id parameter

Leanplum iOS SDK 2.3.0 -

Fixes: Leanplum-iOS-Location now includes bitcode support

Leanplum iOS SDK 2.2.4 -

Release Notes

Bugfix: Adds sophisticated handling of multiple messages with the same priority. In the interest of showing all possible message, it will show all messages with different display times. However, in the case of identical priority and display time, it will pick one in an undefined manner Feature: added the ability to directly build with Carthage instead of using the precompiled framework (thanks @rpassis)

Leanplum iOS SDK 2.2.2 -

Release Notes

Bugfix: Fixes for rendering interstitial messages with proper spacing on iPhone X


Bugfix: Safe Area fixes when status bar is hidden. Bugfix: Message archive handles all kinds of content.

Leanplum iOS SDK 2.2.1 -

Release Notes

Bugfix: Fixes a caching bug where certain in app messages would continue to show after the campaign was over Bugfix: Fixes for rendering interstitial messages with proper spacing on iPhone X


Leanplum iOS SDK 2.2.0 -

Important: This release of the iOS SDK introduced a critical bug that has been fixed as of the 2.2.1 release. Please use 2.2.1+ versions of the iOS SDK.

Release Notes

Feature: Users can now provide a callback to call whenever an in-app message is displayed Feature: the Cocoapod now pulls in the source files instead of a built framework, making it much easier to step through the code!

Leanplum iOS SDK 2.1.0 -

Apple SDK 2.1.0


  • Added beta leanplum-monitoring feature - help us keep our SDK bug free by sending us crash reports automatically. We'll release more info as we build this feature out

Leanplum iOS SDK 2.0.7 -

Apple SDK 2.0.7


  • Access to debugVariantInfo - getting more details on how the content assignments happened on the server by enabling debug variant info on the Leanplum object

Leanplum iOS SDK 2.0.6 -

Bug Fixes

  • constants: Remove warnings for LP_NOT_TV (#134) E2-1133 (e903a8b)
  • iPhone X: Fix for bottom area padding for accept button on iPhone X. (#138) (94ecdca)
  • message: HTML Y inconsistency with iPhoneX on bottom aligned (#136) E2-69 (f933edf)
  • tv: Put sqlite in cache for tvOS (#128) LP-8642 (2893e72)
  • URL encoding: Encode URL in unicode: LP-6329 (e0be5c3)


  • in-app: Adds support active period for in-app messages. (e7c25d9)

Leanplum iOS SDK 2.0.5 -

Fixed exceptions that were causing some crashes.

Bug Fixes

  • database: Prevent exception loop LP-8132 (#113) (0107d3f)
  • Database: Remove init loops (#108) LP-7855 (750d4f4)
  • leanplum: Record attribute exception LP-7622 (#114) (c9a5b26)
  • leanplum: Response callback called from background LP-8195 (#116) (a60cfe1)
  • varcache: saveDiff and loadDiff exceptions LP-7621 (#115) (6bc9be1)

Leanplum iOS SDK 2.0.4 -

Adds a callback for when Inbox was synced via forceContentUpdate. Fixes HTML in-app templates on the iPhone X. Bug fixes.

Bug Fixes

  • request: Try/Catch block for NSOperationQueue (233a47e)
  • tests: fixing wrong derived data path (#92) (efd7808)


  • inbox: Callback for when Inbox was synced via forceContentUpdate LP-6294 (#89) (816968f)

Leanplum iOS SDK 2.0.3 -

Banner alignment features. Data persistence improvements and network enhancements. Bug fixes


  • api: adding purchase track method to manually track purchases outside IAPs. (dbcd622)
  • api: replace with constant (169a2bb)
  • badges: adding badges (#63) (948648a)
  • message: Custom width for Banner LP-4381 (25b0c77)
  • message: Tap outside to close Html in-app (#79) LP-5983 (691e792)
  • message: Y offset for Html in-app (#76) LP-4281 (ac61299)
  • tests: adding check for currencyCode (d8c5eeb)
  • tests: adding code coverage reports (#86) (5e63527)
  • tests: adding unit test for manual purchase event (1418051)
  • tests: opensourcing tests (9f70de5)
  • tvos: adding tvos podspec (7941f1b)
  • websocket: Add applyVars in socket. (#77) (2f782c6)

Bug Fixes

  • Make sure start/track, UI, callbacks are not run in background (eb958c0)
  • action: Inbox data returns string when payload is string (#82) LP-6234 (d0518f1)
  • action: Local notification was not swizzled in static (70cd676)
  • action: Show and capture one message on same triggered event (#85) LP-3811 (e576eef)
  • ActionManager: Local push not showing the Open Action (5bf72b5)
  • compile: adding include before macro (6438508)
  • compile: fixing pr comments (16b6ab1)
  • compile: removing dependency on pch file from example project (77116b8)
  • event: iOS7 was not deleting events (95c91fe)
  • event: Pause event was sent without going into operation queue (b9c15b4)
  • EventDataManager: Bind objects so that it is more robust (65ae121)
  • icon: App icon logic may run in background inside unit test (#84) LP-6272 (0e13dcc)
  • inbox: Inbox message not loading properly from cache (#81) LP-4998 (9bdd9c4)
  • leanplum: This commit fixes the unit tests. Shouldn't affect the code. (fa6a260)
  • message: Fix openURL freeze on iOS10 (#88) LP-5219 (7fed0be)
  • message: Remove popup from view hierarchy (#78) LP-4907 (fbb46a0)
  • MessageTemplate: App Icon showing the popup twice (f96cc66)
  • MessageTemplate: Fix web view not stopping js when closing (eb7a6f8)
  • MkNetwork: Removed the 's' that was magically inputted (12cf6c5)
  • network: Callbacks were not called in some situations (7aa30a6)
  • network: Handle http response from the server correctly (49f8e09)
  • request: Added some minor protection for getResponseAt: (8b272b6)
  • request: Error callbacks are handled properly in sendNow (3fdb4cd)
  • request: Fixed when requests sent in order was blocking the main thread (8f5bc0a)
  • request: Removed lock from loadRequests and add additional protection for 500 (b1cc1cf)
  • request: Send response json at event index instead of last one (8983211)
  • request: Write requests to file instead of keeping in memory (bb6f5fd)
  • Request: Retry on 5xx (ee07745)
  • Fetch chained message via forceContentUpdate if it doesn't exist (c9e868d)
  • RequestStorage: Add pushRequests method and deleted saveRequest method (fa63cc8)
  • tests: removing unused classes (cc0cee0)
  • tvos: fixing tvos build (#61) (371153e)
  • utils: Ruby string count check (ac7f1d3)
  • VarCache: Fix crash when LPInboxMessage.data() was called and the data field is empty. (6cd1fc5)

Performance Improvements

  • ActionManager: Send push token in start and when token changed (bafe588)
  • request: Add UUID logic. Delete on success and permanent failure state (23e6608)
  • request: Moving to SQLite (689377d)
  • request: Send another request if the last request had maximum events per api call (88b3e5d)
  • request: Send requests in order (7aefc70)


  • ios: reverting copyright year (4460778)