Please follow the steps below to integrate the iOS SDK to your app.
Please note the latest stable release for iOS is 0.3.5
Step 1 Download CocoaPods
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries.
CocoaPods is distributed as a ruby gem and is installed by running the following commands in Terminal.app:
$ sudo gem install cocoapods $ pod setup
Depending on your Ruby installation, you may not have to run as sudo to install the cocoapods gem.
Step 2: Create a Podfile
Project dependencies to be managed by CocoaPods are specified in a file called Podfile. Create this file in the same directory as your Xcode project (.xcodeproj) file:
$ touch Podfile $ open -a Xcode Podfile
You just created the pod file and opened it using Xcode!
Copy and paste the following lines into the Xcode window:
target 'APP NAME TARGET' do pod 'BlueShift-iOS-SDK' end
If you are integrating attachment media type push notification with Notification Service Extension (for iOS 10 and above), add the following lines:
target 'APP EXTENSION TARGET NAME' do pod 'BlueShift-iOS-Extension-SDK' end
If you are using Swift, create bridge-header for your app and import the following header:
Step 3: Install Dependencies
Now you can install the dependencies in your project by Terminal:
$ pod install
From now on, be sure to always open the generated Xcode workspace, (.xcworkspace) instead of the project file when building your project (.xcodeproj):
$ open <ProjectName>.xcworkspace