-
Couldn't load subscription status.
- Fork 22
Integration via Swift Package Manager
Swift Package Manager integration is supported since 10.22.0 version of the Mobile Messaging SDK.
- Requires Xcode 14.1 or above
- iOS 13.0+
If you previously used CocoaPods, remove pods from project
pod deintegrateand integrate Notification Service Extension with SPM option
In Xcode select File->Add Packages...
Search for the Mobile Messaging Swift Package using repository's URL https://github.com/infobip/mobile-messaging-sdk-ios.git, set the Dependency Rule to Up to Next Major Version, then, select Add Package.
May be needed to add your GitHub account to the Xcode, to be able to search though repo's URLs. It can be added in
Xcode->Settings->Accounts
Choose modules, which you want to add to your application.
After that, it should be possible to use all added modules in the application as usual, just by importing the module you'd like to use:
import MobileMessaging
import MobileMessagingLogging
import MobileMessagingInbox
import InAppChat
import WebRTCUIThis is how project looks like after adding swift package:

For more information on Notification Service Extension and how it improves push notifications delivery check this documentation.
To integrate Notification Service Extension automatically, install latest version of mmine Ruby Gem and run integrate command with the following parameters (--spm is for adding MobileMessaging module automatically to Notification Service Extension dependencies):
$ sudo gem install mmine
$ mmine integrate \
--application-code <your Push Application Code from Infobip portal> \
--project <absolute path to your Xcode project (.xcodeproj file)> \
--app-group <your App Group Id from previous section> \
--target <name of your projects main target> \
--spm
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.