iOS SDK Cocoapod - Flutter Plugin

ENGAGE® iOS SDK Cocoapod

The pod is located in the First Orion Artifactory. This particular method requires setting the correct system configurations to authenticate against Artifactory.

CocoaPod >= 1.10 Requirement

The required CocoaPods version must be 1.10 or above to support the ENGAGE SDK which is compiled as an XCFramework.

Required Prerequisites

  • Ruby >= 2.0 installed
  • CocoaPods >= 1.10 Installed
  • CocoaPods Artifactory Plugin >= 1.4 installed

Install CocoaPods Artifactory Plugin

 $ gem install cocoapods-art

Add First Orion Repository

To resolve ENGAGE pods, add First Orion repo to client

$ pod repo-art add fo-cocoapods-external
"https://firstorion.jfrog.io/firstorion/api/pods/fo-cocoapods-external"

Authentication

To authenticate, please add the credentials to the client .netrc file. Below are the steps to create .netrc file:

  • Open Terminal: You can open Terminal by searching for it in Spotlight or by navigating to Applications > Utilities > Terminal.
  • Once Terminal is open, type the following command and press Enter:
nano ~/.netrc

This command will open the .netrc file (or create it if it doesn't exist) in the nano text editor.

  • Add the following lines to the file, replacing and with your actual credentials provided in the Prerequisites:
machine firstorion.jfrog.io
login <USERNAME>
password <PASSWORD>
  • Press Ctrl + X to exit nano. It will prompt you to save the changes; press Y for yes, then press Enter to confirm the filename.
  • Finally, make sure the .netrc file has the correct permissions by typing the following command and pressing Enter:
chmod 600 ~/.netrc

This command ensures that only you, the file owner, can read and write to the .netrc file, which is important for security.


The following steps should be performed during App Integration. Refer Flutter Plugin Quick Start Guide

Configure Podfile

In your Podfile, make sure to perform the following three steps:

# Step 1 - Setup Artifactory
plugin 'cocoapods-art', :sources => [
	'fo-cocoapods-external'
]

# Step 2 - Define Engage shared pod
def engage
  # For Engage Versions < 4.0.0, use `Engage` instead of `EngageKit`
	pod 'EngageKit', '=4.0.1'
end


target '<Your-Notification-Service-Extension-Target>' do
	# Comment the next line if you don't want to use dynamic frameworks
	use_frameworks!
  
  # Step3 - Add Engage to NSE target
	engage
end

Install pods

Run the following commands in your terminal at your project directory.

pod repo-art update fo-cocoapods-external
pod install

Open the newly created .xcworkspace file.

🚧

Be sure to always open the project using this workspace file from now on. This allows Xcode to open both your project and the Cocoapods project at once.