Dependency Managers - Mobile SDKs
iOS SDK
Overview
Installation
Dependency Managers
Installation with dependency managers
Forter SDK is distributed both on Swift Package Manager and CocoaPods. The deliverables are the same for both integration methods.
Swift Package Manager
If you have used CocoaPods as the integration method previously, please delete pod 'ForterSDK' from the Podfile and run the following commands:
pod cache clean ForterSDK
pod install --no-repo-update
Xcode
- In the Project Navigator, select the Project and then the Package Dependencies tab and click the + button.
- In the search bar, enter https://bitbucket.org/forter-mobile/forter-ios-sdk.git
- Set the dependency rule to Up to Next Major Version and click the "add package" button.
Package.swift
To add the Forter SDK to your project using Package.swift, include it in your package dependencies:
dependencies:[
.package(url:"https://bitbucket.org/forter-mobile/forter-ios-sdk.git", .upToNextMajor(from:"3.2.1"))
]
CocoaPods
In order to integrate Forter SDK to your project using CocoaPods, please take the following steps:
- Make sure your Podfile includes the use_frameworks! flag.
- Add the ForterSDK Pod to the Podfile next to the rest of the frameworks you're using:
pod 'ForterSDK',:git =>'https://bitbucket.org/forter-mobile/forter-ios-sdk.git'
- Run pod install
Version Updates
Swift Package Manager
To update the Forter SDK using Swift Package Manager:
- In Xcode, go to File > Packages > Update to Latest Package Versions.
- Xcode will automatically update to the latest version that matches your version rule.
Cocoapods
- In your Podfile, ensure you're not pinned to a specific version:
pod 'ForterSDK',:git =>'https://bitbucket.org/forter-mobile/forter-ios-sdk.git','~> 3.2.1' # Use this for the latest minor version
# or
pod 'ForterSDK',:git =>'https://bitbucket.org/forter-mobile/forter-ios-sdk.git' # Use this for the latest version overall
- Run pod update ForterSDK