Mobile Protect SDK for iOS: Migrating from the Data Theorem private CocoaPods repository
To fetch the Mobile Protect SDK via CocoaPods, an API key is needed. If you haven’t received an API key for Mobile Protect, please contact us.
When using the private CocoaPods repository, it is required to add a source
directive to the project’s Podfile
. This should look like the following snippet, added somewhere before a target definition:
source "https://:{MOBILEPROTECT_REPO_API_KEY}@mobile-protect-repos.securetheorem.com/cocoapod-specs"
Step 1: Remove the source line
When migrating to the CocoaPods distribution, this source
directive is no longer necessary and should be removed.
Step 2: Update pods
Run pod trunk update
so that CocoaPods is updated and has the latest Mobile Protect SDK.
Run pod install MobileProtect
so that CocoaPods updates the SDK via their trunk distribution.
Troubleshooting
CocoaPods may encounter issues if it is updating a pod from a private source to another or to trunk. In these situations some extra modifications have to be done.
Step 1
Delete the reference to MobileProtect
under SPEC REPOS
along with the URL.
For example, a Podfile.lock file will look like this
PODS:
- Firebase (9.2.0)
- MobileProtect (22.3.7)
DEPENDENCIES:
- Firebase
- MobileProtect
SPEC REPOS:
https://mobile-protect-repos.securetheorem.com/cocoapod-specs:
- MobileProtect
trunk:
- Firebase
SPEC CHECKSUMS:
MobileProtect: 9b66b6b4e4efb8ae0fd3fd34fa7be1e75e69f35c
PODFILE CHECKSUM: 4d8f618da9536e1e73060e088ba1692e23738d06
COCOAPODS: 1.11.3
After editing it should look like this:
PODS:
- Firebase (9.2.0)
DEPENDENCIES:
- Firebase
SPEC REPOS:
trunk:
- Firebase
SPEC CHECKSUMS:
MobileProtect: 9b66b6b4e4efb8ae0fd3fd34fa7be1e75e69f35c
PODFILE CHECKSUM: 4d8f618da9536e1e73060e088ba1692e23738d06
COCOAPODS: 1.11.3