Create a new project in Xcode as you would normally.
Open a terminal window, and $ cd into your project directory.
Create a Podfile. This can be done by running $ pod init .
Open your Podfile. The first line should specify the platform and version supported.
Add SDK package to your newly created podfile
pod 'EXISDK', :git => 'git@github.com:exiteam/exi-ios-framework.git', :branch => 'develop'
Install pod by running the following command in the project directory
$ pod install
On success
Please close any current Xcode sessions and use `YourAppName.xcworkspace` for this project from now on.
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Please note: Currently the pod is not published to the CocoapPods master repository but is available via an EXI private repo. Contact your line manager if authentication details have not been provided.
Your PodFile should look similar to this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'TestEXIiOSSDK' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TestEXIiOSSDK
pod 'EXISDK', :git => 'git@github.com:exiteam/exi-ios-framework.git', :branch => 'develop'
target 'TestEXIiOSSDKTests' do
inherit! :search_paths
# Pods for testing
end
target 'TestEXIiOSSDKUITests' do
# Pods for testing
end
end
Installation using Swift Package Manager
Launch your Xcode project file
Click on Swift Packages and click on the plus to add a package
Paste the newly generated API key into the AppConfig-debug file to variable EXI_API_KEY
4. Start your development journey with EXI®
let configuration = EXIConfiguration(apiKey: "YOUR_DEVELOPER_API_KEY", jwsToken: "YOUR_JWT_TOKEN")
EXISDK.setup(configuration: configuration)
EXISDK.getPrescription { result in
switch result {
case .success:
print("All Good")
case .failure(let error):
print(error)
}
}
You are now ready to build your customer health journeys!