Skip to content

Commit

Permalink
Merge pull request #78 from AppsFlyerSDK/removePlayServicesAds
Browse files Browse the repository at this point in the history
Remove play services ads
  • Loading branch information
GM-appsflyer authored Aug 2, 2023
2 parents 533f797 + b1092c5 commit ea97ea4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
19 changes: 10 additions & 9 deletions appsflyer.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,18 @@ export const generateInviteUrl = function (args: AppsFlyerLinkGeneratorArgs) {
return linkGenerator
}

let completionHandler = null;
if(args.onSuccess && args.onFailure){
completionHandler = function(url: string){
if(url !== null){
args.onSuccess(link);
}else{
args.onFailure("failed to generate link");
let completionHandler = function(url: string){};
if(args.onSuccess && args.onError){
completionHandler = function(url: string){
if(url !== null){
args.onSuccess(url);
}else{
args.onError("failed to generate link");
}
}
}
}
AppsFlyerShareInviteHelper.generateInviteUrlWithLinkGeneratorCompletionHandler(linkGenerator, completionHandler)

AppsFlyerShareInviteHelper.generateInviteUrlWithLinkGeneratorCompletionHandler(linkGenerator, completionHandler)

} catch (ex) {
console.log("AF_IOS :: Error: " + ex);
Expand Down
4 changes: 2 additions & 2 deletions demoNative/app/main-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class HelloWorldModel extends Observable {
amount: 1,
},
},
onSuccess: function(link){console.log(link);},
onFailure: function(err){console.log(err);}
onSuccess: function(link: string){console.log(link);},
onError: function(err: string){console.log(err);}
}
);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ appsFlyer.generateInviteUrl(
},
},
onSuccess: function(link){console.log(link);},
onFailure: function(err){console.log(err);}
onError: function(err){console.log(err);}
}
);
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-plugin-appsflyer",
"version": "6.12.4",
"version": "6.12.5",
"description": "Appsflyer SDK for NativeScript applications",
"main": "appsflyer",
"typings": "index.d.ts",
Expand Down

0 comments on commit ea97ea4

Please sign in to comment.