Skip to content

Commit 6190efe

Browse files
uercegnonelse
authored andcommitted
feat: add handling of deeplink referrer url
1 parent 69979aa commit 6190efe

File tree

14 files changed

+161
-31
lines changed

14 files changed

+161
-31
lines changed

Adjust.xcodeproj/project.pbxproj

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,24 @@
727727
9D775B642A1F9CCE009D0BE8 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D775B602A1F9CC5009D0BE8 /* ADJPurchaseVerificationHandler.m */; };
728728
9D775B652A1F9CCF009D0BE8 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D775B602A1F9CC5009D0BE8 /* ADJPurchaseVerificationHandler.m */; };
729729
9D775B662A1F9CD0009D0BE8 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D775B602A1F9CC5009D0BE8 /* ADJPurchaseVerificationHandler.m */; };
730+
9D7D3DEC2C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
731+
9D7D3DED2C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
732+
9D7D3DEE2C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
733+
9D7D3DEF2C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
734+
9D7D3DF02C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
735+
9D7D3DF12C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
736+
9D7D3DF22C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
737+
9D7D3DF32C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
738+
9D7D3DF42C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
739+
9D7D3DF52C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
740+
9D7D3DF62C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
741+
9D7D3DF72C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
742+
9D7D3DF82C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
743+
9D7D3DF92C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
744+
9D7D3DFA2C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
745+
9D7D3DFB2C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
746+
9D7D3DFC2C49A8B200FACB18 /* ADJDeeplink.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */; settings = {ATTRIBUTES = (Public, ); }; };
747+
9D7D3DFD2C49A8B200FACB18 /* ADJDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */; };
730748
9DB561852C072BA10004CCAD /* ADJUrlStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FBEE8F124E2C26F00FEF3F1 /* ADJUrlStrategy.h */; };
731749
9DB561862C072BAF0004CCAD /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE8F224E2C26F00FEF3F1 /* ADJUrlStrategy.m */; };
732750
9DD0E9AE1F44690B00B2A759 /* ADJUserDefaults.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DD0E9AC1F44690B00B2A759 /* ADJUserDefaults.h */; };
@@ -987,6 +1005,8 @@
9871005
9D775B582A1F7C7A009D0BE8 /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = "<group>"; };
9881006
9D775B5F2A1F9CC5009D0BE8 /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = "<group>"; };
9891007
9D775B602A1F9CC5009D0BE8 /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = "<group>"; };
1008+
9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJDeeplink.h; sourceTree = "<group>"; };
1009+
9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJDeeplink.m; sourceTree = "<group>"; };
9901010
9D9D154D212EB3D00081445E /* AdjustExample-FbPixel.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "AdjustExample-FbPixel.xcodeproj"; path = "examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj"; sourceTree = "<group>"; };
9911011
9DBE560723054FCC0065E19C /* AdjustExample-ObjC.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "AdjustExample-ObjC.xcodeproj"; path = "examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj"; sourceTree = "<group>"; };
9921012
9DD0E9AC1F44690B00B2A759 /* ADJUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUserDefaults.h; sourceTree = "<group>"; };
@@ -1241,6 +1261,8 @@
12411261
969952D11A01309200928462 /* ADJAttribution.m */,
12421262
960A8BB71A029A8000F2BB95 /* ADJConfig.h */,
12431263
960A8BB81A029A8000F2BB95 /* ADJConfig.m */,
1264+
9D7D3DEA2C49A8B200FACB18 /* ADJDeeplink.h */,
1265+
9D7D3DEB2C49A8B200FACB18 /* ADJDeeplink.m */,
12441266
9609BC6819EEA55800E02303 /* ADJEvent.h */,
12451267
9609BC6919EEA55800E02303 /* ADJEvent.m */,
12461268
9601CAE61C74BAAE00670879 /* ADJEventFailure.h */,
@@ -1430,6 +1452,7 @@
14301452
0A584CE12C3E95B10071A651 /* ADJEventFailure.h in Headers */,
14311453
0A584CE22C3E95B10071A651 /* ADJEventSuccess.h in Headers */,
14321454
0A584CE32C3E95B10071A651 /* ADJLinkResolution.h in Headers */,
1455+
9D7D3DF62C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
14331456
0A584CE42C3E95B10071A651 /* ADJLogger.h in Headers */,
14341457
0A584CE52C3E95B10071A651 /* ADJPurchaseVerificationResult.h in Headers */,
14351458
0A584CE62C3E95B10071A651 /* ADJSessionFailure.h in Headers */,
@@ -1475,6 +1498,7 @@
14751498
0A584D082C3E96250071A651 /* ADJEventFailure.h in Headers */,
14761499
0A584D092C3E96250071A651 /* ADJEventSuccess.h in Headers */,
14771500
0A584D0A2C3E96250071A651 /* ADJLinkResolution.h in Headers */,
1501+
9D7D3DF92C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
14781502
0A584D0B2C3E96250071A651 /* ADJLogger.h in Headers */,
14791503
0A584D0C2C3E96250071A651 /* ADJPurchaseVerificationResult.h in Headers */,
14801504
0A584D0D2C3E96250071A651 /* ADJSessionFailure.h in Headers */,
@@ -1520,6 +1544,7 @@
15201544
0A584D2F2C3E968A0071A651 /* ADJEventFailure.h in Headers */,
15211545
0A584D302C3E968A0071A651 /* ADJEventSuccess.h in Headers */,
15221546
0A584D312C3E968A0071A651 /* ADJLinkResolution.h in Headers */,
1547+
9D7D3DFA2C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
15231548
0A584D322C3E968A0071A651 /* ADJLogger.h in Headers */,
15241549
0A584D332C3E968A0071A651 /* ADJPurchaseVerificationResult.h in Headers */,
15251550
0A584D342C3E968A0071A651 /* ADJSessionFailure.h in Headers */,
@@ -1598,6 +1623,7 @@
15981623
0A584D772C3E97020071A651 /* ADJTimerOnce.h in Headers */,
15991624
0A584D782C3E97020071A651 /* ADJUrlStrategy.h in Headers */,
16001625
0A584D792C3E97020071A651 /* ADJUserDefaults.h in Headers */,
1626+
9D7D3DFC2C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
16011627
0A584D7A2C3E97020071A651 /* ADJUtil.h in Headers */,
16021628
);
16031629
runOnlyForDeploymentPostprocessing = 0;
@@ -1615,6 +1641,7 @@
16151641
9D2F23E22447CE5C00B7CA90 /* ADJAppStoreSubscription.h in Headers */,
16161642
9601CAE81C74BAAE00670879 /* ADJEventFailure.h in Headers */,
16171643
9D52A3212C071BBC00E0AA55 /* ADJAdditions.h in Headers */,
1644+
9D7D3DEC2C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
16181645
968173871C3C2D36002AE1DE /* ADJSessionFailure.h in Headers */,
16191646
968173831C3C2D07002AE1DE /* ADJSessionSuccess.h in Headers */,
16201647
9DF92D832630ED02000FC3FC /* ADJPackageParams.h in Headers */,
@@ -1693,6 +1720,7 @@
16931720
0A584CD62C3E95710071A651 /* ADJTimerOnce.h in Headers */,
16941721
0A584CD72C3E95710071A651 /* ADJUrlStrategy.h in Headers */,
16951722
0A584CD82C3E95710071A651 /* ADJUserDefaults.h in Headers */,
1723+
9D7D3DF42C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
16961724
0A584CD92C3E95710071A651 /* ADJUtil.h in Headers */,
16971725
);
16981726
runOnlyForDeploymentPostprocessing = 0;
@@ -1710,6 +1738,7 @@
17101738
0A584C1A2C3E94B50071A651 /* ADJEventFailure.h in Headers */,
17111739
0A584C1B2C3E94B50071A651 /* ADJEventSuccess.h in Headers */,
17121740
0A584C1C2C3E94B50071A651 /* ADJLinkResolution.h in Headers */,
1741+
9D7D3DF12C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
17131742
0A584C1D2C3E94B50071A651 /* ADJLogger.h in Headers */,
17141743
0A584C1E2C3E94B50071A651 /* ADJPurchaseVerificationResult.h in Headers */,
17151744
0A584C1F2C3E94B50071A651 /* ADJSessionFailure.h in Headers */,
@@ -1755,6 +1784,7 @@
17551784
0A584BCF2C3E944F0071A651 /* ADJEventFailure.h in Headers */,
17561785
0A584BD02C3E944F0071A651 /* ADJEventSuccess.h in Headers */,
17571786
0A584BD12C3E944F0071A651 /* ADJLinkResolution.h in Headers */,
1787+
9D7D3DEE2C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
17581788
0A584BD22C3E944F0071A651 /* ADJLogger.h in Headers */,
17591789
0A584BD32C3E944F0071A651 /* ADJPurchaseVerificationResult.h in Headers */,
17601790
0A584BD42C3E944F0071A651 /* ADJSessionFailure.h in Headers */,
@@ -1800,6 +1830,7 @@
18001830
0A584C652C3E94FA0071A651 /* ADJEventFailure.h in Headers */,
18011831
0A584C662C3E94FA0071A651 /* ADJEventSuccess.h in Headers */,
18021832
0A584C672C3E94FA0071A651 /* ADJLinkResolution.h in Headers */,
1833+
9D7D3DF22C49A8B200FACB18 /* ADJDeeplink.h in Headers */,
18031834
0A584C682C3E94FA0071A651 /* ADJLogger.h in Headers */,
18041835
0A584C692C3E94FA0071A651 /* ADJPurchaseVerificationResult.h in Headers */,
18051836
0A584C6A2C3E94FA0071A651 /* ADJSessionFailure.h in Headers */,
@@ -2396,6 +2427,7 @@
23962427
9D4CC6D52C0735B400A1E0C0 /* ADJAdditions.m in Sources */,
23972428
0AB1C99A27DD4B3100509231 /* Adjust.m in Sources */,
23982429
0AB1C99B27DD4B3100509231 /* ADJActivityHandler.m in Sources */,
2430+
9D7D3DF72C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
23992431
0AB1C99C27DD4B3100509231 /* ADJActivityKind.m in Sources */,
24002432
0AB1C99D27DD4B3100509231 /* ADJActivityPackage.m in Sources */,
24012433
0AB1C99E27DD4B3100509231 /* ADJActivityState.m in Sources */,
@@ -2440,6 +2472,7 @@
24402472
9D4CC6E82C0735BC00A1E0C0 /* ADJAdditions.m in Sources */,
24412473
0AB1CA3227DF49CB00509231 /* Adjust.m in Sources */,
24422474
0AB1CA3327DF49CB00509231 /* ADJActivityHandler.m in Sources */,
2475+
9D7D3DF82C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
24432476
0AB1CA3427DF49CC00509231 /* ADJActivityKind.m in Sources */,
24442477
0AB1CA3527DF49CC00509231 /* ADJActivityPackage.m in Sources */,
24452478
0AB1CA3627DF49CC00509231 /* ADJActivityState.m in Sources */,
@@ -2484,6 +2517,7 @@
24842517
9D4CC6E92C0735C400A1E0C0 /* ADJAdditions.m in Sources */,
24852518
0AB1CA7527DF61F200509231 /* Adjust.m in Sources */,
24862519
0AB1CA7627DF61F200509231 /* ADJActivityHandler.m in Sources */,
2520+
9D7D3DFB2C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
24872521
0AB1CA7727DF61F200509231 /* ADJActivityKind.m in Sources */,
24882522
0AB1CA7827DF61F200509231 /* ADJActivityPackage.m in Sources */,
24892523
0AB1CA7927DF61F200509231 /* ADJActivityState.m in Sources */,
@@ -2560,6 +2594,7 @@
25602594
0AB1CB2727DF68C100509231 /* ADJAppStoreSubscription.m in Sources */,
25612595
0AB1CB2827DF68C100509231 /* ADJUrlStrategy.m in Sources */,
25622596
0AB1CB2927DF68C100509231 /* ADJThirdPartySharing.m in Sources */,
2597+
9D7D3DFD2C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
25632598
0AB1CB2A27DF68C100509231 /* ADJAdRevenue.m in Sources */,
25642599
0AB1CB2B27DF68C100509231 /* ADJLinkResolution.m in Sources */,
25652600
0AB1CB2C27DF68DB00509231 /* AdjustBridge.m in Sources */,
@@ -2589,6 +2624,7 @@
25892624
9DB561862C072BAF0004CCAD /* ADJUrlStrategy.m in Sources */,
25902625
9DF92D842630ED02000FC3FC /* ADJPackageParams.m in Sources */,
25912626
96E5E38118BBB48A008E7B30 /* Adjust.m in Sources */,
2627+
9D7D3DED2C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
25922628
96E5E38B18BBB48A008E7B30 /* ADJActivityHandler.m in Sources */,
25932629
96E5E38C18BBB48A008E7B30 /* ADJActivityKind.m in Sources */,
25942630
96E5E38D18BBB48A008E7B30 /* ADJActivityPackage.m in Sources */,
@@ -2665,6 +2701,7 @@
26652701
0A584CA52C3E952C0071A651 /* ADJTimerCycle.m in Sources */,
26662702
0A584CA62C3E952C0071A651 /* ADJTimerOnce.m in Sources */,
26672703
0A584CA72C3E952C0071A651 /* ADJUrlStrategy.m in Sources */,
2704+
9D7D3DF52C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
26682705
0A584CA82C3E952C0071A651 /* ADJUserDefaults.m in Sources */,
26692706
0A584CA92C3E952C0071A651 /* ADJUtil.m in Sources */,
26702707
0A584CAA2C3E952C0071A651 /* AdjustBridge.m in Sources */,
@@ -2682,6 +2719,7 @@
26822719
0A584BEF2C3E949B0071A651 /* ADJAdRevenue.m in Sources */,
26832720
0A584BF02C3E949B0071A651 /* ADJAppStorePurchase.m in Sources */,
26842721
0A584BF12C3E949B0071A651 /* ADJAppStoreSubscription.m in Sources */,
2722+
9D7D3DF02C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
26852723
0A584BF22C3E949B0071A651 /* ADJAttribution.m in Sources */,
26862724
0A584BF32C3E949B0071A651 /* ADJConfig.m in Sources */,
26872725
0A584BF42C3E949B0071A651 /* ADJEvent.m in Sources */,
@@ -2726,6 +2764,7 @@
27262764
0A584BA42C3E94230071A651 /* ADJAdRevenue.m in Sources */,
27272765
0A584BA52C3E94230071A651 /* ADJAppStorePurchase.m in Sources */,
27282766
0A584BA62C3E94240071A651 /* ADJAppStoreSubscription.m in Sources */,
2767+
9D7D3DEF2C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
27292768
0A584BA72C3E94240071A651 /* ADJAttribution.m in Sources */,
27302769
0A584BA82C3E94240071A651 /* ADJConfig.m in Sources */,
27312770
0A584BA92C3E94240071A651 /* ADJEvent.m in Sources */,
@@ -2770,6 +2809,7 @@
27702809
0A584C3A2C3E94E70071A651 /* ADJAdRevenue.m in Sources */,
27712810
0A584C3B2C3E94E70071A651 /* ADJAppStorePurchase.m in Sources */,
27722811
0A584C3C2C3E94E70071A651 /* ADJAppStoreSubscription.m in Sources */,
2812+
9D7D3DF32C49A8B200FACB18 /* ADJDeeplink.m in Sources */,
27732813
0A584C3D2C3E94E70071A651 /* ADJAttribution.m in Sources */,
27742814
0A584C3E2C3E94E70071A651 /* ADJConfig.m in Sources */,
27752815
0A584C3F2C3E94E70071A651 /* ADJEvent.m in Sources */,

Adjust/ADJDeeplink.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// ADJDeeplink.h
3+
// Adjust
4+
//
5+
// Created by Uglješa Erceg (@uerceg) on 18th July 2024.
6+
// Copyright © 2024-Present Adjust. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
@interface ADJDeeplink : NSObject
12+
13+
@property (nonatomic, copy, readonly, nonnull) NSURL *deeplink;
14+
15+
@property (nonatomic, copy, nullable) NSURL *referrer;
16+
17+
- (nullable ADJDeeplink *)initWithDeeplink:(nonnull NSURL *)deeplink;
18+
19+
@end

Adjust/ADJDeeplink.m

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// ADJDeeplink.m
3+
// Adjust
4+
//
5+
// Created by Uglješa Erceg (@uerceg) on 18th July 2024.
6+
// Copyright © 2024-Present Adjust. All rights reserved.
7+
//
8+
9+
#import "ADJDeeplink.h"
10+
11+
@implementation ADJDeeplink
12+
13+
- (id)initWithDeeplink:(NSURL *)deeplink {
14+
self = [super init];
15+
if (self == nil) {
16+
return nil;
17+
}
18+
19+
_deeplink = deeplink;
20+
21+
return self;
22+
}
23+
24+
@end

Adjust/Adjust.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
@class ADJLinkResolution;
1919
@class ADJAppStorePurchase;
2020
@class ADJPurchaseVerificationResult;
21+
@class ADJDeeplink;
2122

2223
typedef void(^ADJResolvedDeeplinkBlock)(NSString * _Nullable resolvedLink);
2324
typedef void(^ADJAttributionGetterBlock)(ADJAttribution * _Nullable attribution);
@@ -88,17 +89,17 @@ extern NSString * __nonnull const ADJEnvironmentProduction;
8889
/**
8990
* @brief Read the URL that opened the application to search for an adjust deep link.
9091
*
91-
* @param deeplink URL object which contains info about adjust deep link.
92+
* @param deeplink Deeplink object which contains info about adjust deep link.
9293
*/
93-
+ (void)processDeeplink:(nonnull NSURL *)deeplink;
94+
+ (void)processDeeplink:(nonnull ADJDeeplink *)deeplink;
9495

9596
/**
9697
* @brief Process the deep link that has opened an app and potentially get a resolved link.
9798
*
9899
* @param deeplink URL object which contains info about adjust deep link.
99100
* @param completion Completion block where either resolved or echoed deep link will be sent.
100101
*/
101-
+ (void)processAndResolveDeeplink:(nonnull NSURL *)deeplink
102+
+ (void)processAndResolveDeeplink:(nonnull ADJDeeplink *)deeplink
102103
withCompletionHandler:(nonnull ADJResolvedDeeplinkBlock)completion;
103104

104105
/**

Adjust/Adjust.m

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#import "ADJActivityHandler.h"
1515
#import "ADJSKAdNetwork.h"
1616
#import "ADJPurchaseVerificationResult.h"
17+
#import "ADJDeeplink.h"
1718

1819
#if !__has_feature(objc_arc)
1920
#error Adjust requires ARC
@@ -109,13 +110,13 @@ + (void)isEnabledWithCompletionHandler:(nonnull ADJIsEnabledGetterBlock)completi
109110
}
110111
}
111112

112-
+ (void)processDeeplink:(NSURL *)deeplink {
113+
+ (void)processDeeplink:(ADJDeeplink *)deeplink {
113114
@synchronized (self) {
114-
[[Adjust getInstance] processDeeplink:[deeplink copy]];
115+
[[Adjust getInstance] processDeeplink:deeplink];
115116
}
116117
}
117118

118-
+ (void)processAndResolveDeeplink:(nonnull NSURL *)deeplink
119+
+ (void)processAndResolveDeeplink:(nonnull ADJDeeplink *)deeplink
119120
withCompletionHandler:(nonnull ADJResolvedDeeplinkBlock)completion {
120121
@synchronized (self) {
121122
[[Adjust getInstance] processAndResolveDeeplink:deeplink
@@ -396,28 +397,32 @@ - (void)isEnabledWithCompletionHandler:(nonnull ADJIsEnabledGetterBlock)completi
396397
[self.activityHandler isEnabledWithCompletionHandler:completion];
397398
}
398399

399-
- (void)processDeeplink:(NSURL *)deeplink {
400-
[ADJUserDefaults cacheDeeplinkUrl:deeplink];
400+
- (void)processDeeplink:(ADJDeeplink *)deeplink {
401+
[ADJUserDefaults cacheDeeplinkUrl:deeplink.deeplink];
401402
NSDate *clickTime = [NSDate date];
402403
if (![self checkActivityHandler]) {
403-
[ADJUserDefaults saveDeeplinkUrl:deeplink andClickTime:clickTime];
404+
[ADJUserDefaults saveDeeplinkUrl:deeplink.deeplink
405+
referrerUrl:deeplink.referrer
406+
clickTime:clickTime];
404407
return;
405408
}
406409
[self.activityHandler processDeeplink:deeplink withClickTime:clickTime];
407410
}
408411

409-
- (void)processAndResolveDeeplink:(nonnull NSURL *)deeplink
412+
- (void)processAndResolveDeeplink:(nonnull ADJDeeplink *)deeplink
410413
withCompletionHandler:(nonnull ADJResolvedDeeplinkBlock)completion {
411414
// if resolution result is not wanted, fallback to default method
412415
if (completion == nil) {
413416
[self processDeeplink:deeplink];
414417
return;
415418
}
416419
// if deep link processing is triggered prior to SDK being initialized
417-
[ADJUserDefaults cacheDeeplinkUrl:deeplink];
420+
[ADJUserDefaults cacheDeeplinkUrl:deeplink.deeplink];
418421
NSDate *clickTime = [NSDate date];
419422
if (![self checkActivityHandler]) {
420-
[ADJUserDefaults saveDeeplinkUrl:deeplink andClickTime:clickTime];
423+
[ADJUserDefaults saveDeeplinkUrl:deeplink.deeplink
424+
referrerUrl:deeplink.referrer
425+
clickTime:clickTime];
421426
self.cachedResolvedDeeplinkBlock = completion;
422427
return;
423428
}

Adjust/Internal/ADJActivityHandler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
- (void)isEnabledWithCompletionHandler:(nonnull ADJIsEnabledGetterBlock)completion;
7676
- (BOOL)isGdprForgotten;
7777

78-
- (void)processDeeplink:(NSURL * _Nullable)deeplink
78+
- (void)processDeeplink:(ADJDeeplink * _Nullable)deeplink
7979
withClickTime:(NSDate * _Nullable)clickTime;
80-
- (void)processAndResolveDeeplink:(NSURL * _Nullable)deeplink
80+
- (void)processAndResolveDeeplink:(ADJDeeplink * _Nullable)deeplink
8181
clickTime:(NSDate * _Nullable)clickTime
8282
withCompletionHandler:(ADJResolvedDeeplinkBlock _Nullable)completion;
8383
- (void)setPushTokenData:(NSData * _Nullable)pushTokenData;

0 commit comments

Comments
 (0)