Skip to content

Commit b4621ef

Browse files
authored
Merge pull request #84 from AppsFlyerSDK/dev/fixedUDL
Fixed unified deeplink
2 parents bef6651 + e3c2de3 commit b4621ef

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Versions
22

3+
## 6.2.1+3
4+
- Fixed Unified deeplink crush on first launch
5+
36
## 6.2.1+2
47
- Hot Fix
58

ios/Classes/AppsFlyerStreamHandler.m

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,31 @@ - (void)onAppOpenAttributionFailure:(NSError *)_errorMessage {
128128
}
129129

130130
- (void)didResolveDeepLink:(AppsFlyerDeepLinkResult* _Nonnull) deepLinkResult {
131-
NSDictionary* message = @{
132-
@"status": afSuccess,
133-
@"type": afOnDeepLinking,
134-
@"data": deepLinkResult.deepLink.toString
135-
};
136-
NSError *error;
137-
NSString *JSONString = [self mapToJson:message withError:error];
138-
//use callbacks
139-
if([AppsflyerSdkPlugin udpCallback]){
140-
NSDictionary *fullResponse = @{
141-
@"id": afUDPCallback,
142-
@"data": deepLinkResult.deepLink.toString,
143-
@"status": afSuccess
144-
};
145-
JSONString = [self mapToJson:fullResponse withError:error];
146-
[AppsflyerSdkPlugin.callbackChannel invokeMethod:@"callListener" arguments:JSONString];
147-
return;
148-
}
149-
150-
if (error) {
151-
return;
131+
if(deepLinkResult.deepLink){
132+
NSDictionary* message = @{
133+
@"status": afSuccess,
134+
@"type": afOnDeepLinking,
135+
@"data": deepLinkResult.deepLink.toString
136+
};
137+
NSError *error;
138+
NSString *JSONString = [self mapToJson:message withError:error];
139+
//use callbacks
140+
if([AppsflyerSdkPlugin udpCallback]){
141+
NSDictionary *fullResponse = @{
142+
@"id": afUDPCallback,
143+
@"data": deepLinkResult.deepLink.toString,
144+
@"status": afSuccess
145+
};
146+
JSONString = [self mapToJson:fullResponse withError:error];
147+
[AppsflyerSdkPlugin.callbackChannel invokeMethod:@"callListener" arguments:JSONString];
148+
return;
149+
}
150+
151+
if (error) {
152+
return;
153+
}
154+
_eventSink(JSONString);
152155
}
153-
_eventSink(JSONString);
154156
}
155157

156158
- (void)sendObject:(NSDictionary *)message{

pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: appsflyer_sdk
22
description: A Flutter plugin for AppsFlyer SDK. Supports iOS and Android.
3-
4-
version: 6.2.1+2
3+
version: 6.2.1+3
54

65
homepage: https://github.com/AppsFlyerSDK/flutter_appsflyer_sdk
76

0 commit comments

Comments
 (0)