Skip to main content
InformationCocoaPods is being deprecated. MoEngage recommends using Swift Package Manager for all new integrations. For more information, refer here.
Version Cocoapods is a dependency manager for Objective C & Swift projects and makes integration easier.
  1. If you don’t have CocoaPods installed, you can do it by executing the following line in your terminal.
  2. If you don’t have a Podfile, then create one by using pod init command. Post this add MoEngage-iOS-SDK pod to your pod file as shown below:
    InformationThe ~> operator bumps only the last component you write, so the number of components you pin decides which updates you receive:
    • To take patch updates only, pin all three components: pod 'MoEngage-iOS-SDK', '~> 11.02.0'. This resolves to >= 11.2.0, < 11.3.0.
    • To take minor and patch updates, pin two components: pod 'MoEngage-iOS-SDK', '~> 11.02'. This resolves to >= 11.2, < 12.0.
    • To take the latest version including major changes, use pod 'MoEngage-iOS-SDK'.
    MoEngage zero-pads the minor version, but the padding is cosmetic and does not affect resolution: 11.02.0 parses to the segments [11, 2, 0], so ~> 11.02.0 and ~> 11.2.0 are the same requirement.
  3. Integrate MoEngage iOS SDK by executing the following in the terminal at your project’s root directory:
  4. Now, open your project workspace and check if MoEngage SDK is properly added.