App Crashes when showShareSheet() function is call


#1

Hi,

The following is some major tools I am using.
“expo”: “31.0.5”,
“react”: “16.6.1”,
“react-native”: “0.57.7”,
IOS:10.3.2

In my code, I tried to call showShareSheet() given the Branch Universal Object. The object got created successfully but when the showShareSheet is call, my App tested on the Testflight crashes.

The following is my code where the function is called.

async createSharableLink(post) {
const linkProperties = {
feature: ‘userSharePost’,
}
const shareOptions = {
messageHeader: Post from ${post.author},
}
try {
const res = await this.branchUniversalObject
.showShareSheet(
shareOptions,
linkProperties
);
Sentry.captureMessage(JSON.stringify(res));
return res;
} catch (err) {
return null;
}
}

Anyone has idea on what’s happening?
Thanks!


#2

Hey @jasonwangsk,

I see you listed an iOS version above (though I think it’s wrong as 3.2 was released in 2010 haha). Have you tested to see if the crash occurs on Android as well?

Cheers,

Adam


#3

Thanks for the replay!

Sorry I meant 10.3.2 haha.
Not i have not tried Android yet.


#4

Hi Adam,

I managed to check the log for the crashes in Xcode and the following is the snapshot:

It seems something wrong with the Branch key?
Also, I have two Testflight build and working in one build but crashed in the latest one. Is it because I cannot use the same Branch key for two build?

Thanks for the help!

Best,

Jason


#5

I’m not sure. I’ll have to be back to you on that. Can you double check and make sure your app.json configuration is correct for the build that crashes?


closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.