BranchMetrics / cordova-ionic-phonegap-branch-deep-linking-attribution

The Branch Cordova Ionic Phonegap SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/cordova-phonegap-ionic/
MIT License
234 stars 144 forks source link

[iOS only] `showShareSheet` causes crash due to uncaught "NSUnknownKeyException" #665

Closed EvelinJK closed 4 years ago

EvelinJK commented 4 years ago

cordova: 10.0.0 cordova-ios: 5.1.1 branch-cordova-sdk: 4.1.3 XCode: 11.6

Executing branchUniversalObj.showShareSheet(analytics, properties, message) causes an exception in iOS that leads to a crash of the app. The same code is working fine on Android.

Below are the logs we get in XCode. The error is caused by the BranchSDK.m file

We have no Swift devs here so we're not able to make much of that error. Does anyone experience that too or has a clue what went wrong here?

image

image

EvelinJK commented 4 years ago

Ok, my fault. It was a typo 🤦‍♀️ in one key of our analytics object passed to the generateShortUrl function. Seemingly Android doesn't care at all if the key is written correctly or not, but in iOS it causes a crash. Interesting...

Anyway. Sorry for the useless ticket. Will close