Skip to content

Commit

Permalink
Merge pull request #13 from AppsFlyerSDK/liaz/add_deep_link_sub2_shar…
Browse files Browse the repository at this point in the history
…e_invite

User invite - add deep_link_sub2 to carry the referrer user ID
  • Loading branch information
liaz-af authored Feb 17, 2022
2 parents e6c44e6 + 2617a57 commit da5589e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions swift/basic_app/basic_app/DLViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import AppsFlyerLib
class DLViewController: UIViewController {

var deepLinkData: [String: Any]? = nil
var fruitAmountStr: String = "000"

override func viewDidLoad() {
super.viewDidLoad()
Expand Down Expand Up @@ -71,8 +72,10 @@ class DLViewController: UIViewController {
AppsFlyerShareInviteHelper.generateInviteUrl(linkGenerator:
{(_ generator: AppsFlyerLinkGenerator) -> AppsFlyerLinkGenerator in
generator.addParameterValue(fruitName, forKey: "deep_link_value")
generator.addParameterValue("user_referrer", forKey: "deep_link_sub1")
generator.setCampaign("share_invite")
generator.addParameterValue(self.fruitAmountStr, forKey: "deep_link_sub1")
generator.addParameterValue("THIS_USER_ID", forKey: "deep_link_sub2")
generator.setCampaign("summer_fruits")
generator.setChannel("mobile_share")
return generator },
completionHandler: {(_ url: URL?) -> Void in
if url != nil{
Expand Down Expand Up @@ -111,6 +114,7 @@ class DLViewController: UIViewController {
NSLog("[AFSDK] Fruit amount is not a whole number")
return nil
}
fruitAmountStr = fruitAmount as? String ?? "000"
return fruitAmount as? String
}
}
Expand Down

0 comments on commit da5589e

Please sign in to comment.