Integrate Referral Mobile iOS SDK into Loyalty Management Mobile iOS SDK
Import the Referral Mobile iOS SDK into the existing Loyalty Management Mobile iOS SDK by adding it as an external dependency.
| Required Editions |
|---|
| Available in: all editions that have Referral Marketing enabled |
-
Open the
LoyaltyMobileSDK-iOSproject in Xcode. -
Go to File | Swift Packages | Add Package Dependency.
-
Enter the repository URL:
https://github.com/salesforce-misc/ReferralMobileSDK-iOS, or if you’ve cloned the repository, click Add Local, and then select the localReferralMobileSDK-iOSfolder. -
Select a version, and click Add Package and on the confirmation window, click Add Package.
-
To import the
ReferralMobileSDK-iOSmodule into your Swift file, open the swift file where you want to useReferralMobileSDK-iOS, and to the first line of code, add:import ReferralMobileSDK
You can now use the classes, structures, and protocols in the ReferralMobileSDK-iOS module to extend, and manage the referral program feature in the MyNTORewards sample app.