Closed arthedza closed 8 months ago
Me too: React native version: 0.61.5
Can confirm that I am experiencing the first part of this, where the iOS Share dialog shows up but immediately goes away (no crash). Everything works as expected on Android...
Can confirm that I am experiencing the first part of this, where the iOS Share dialog shows up but immediately goes away (no crash). Everything works as expected on Android...
I solved this by adding await before "share" function. Like this:
[...].then(async(result) => { await this.share({ title:
bla, message:
bla, filename:
bla, url:
bla })
"share" function, to be clear:
share = async (customOptions: OptionsShare) => { try { await Share.open(customOptions); } catch (err) { console.log('share in balance', err); } };
Works on android and iOS. I hope it helps.
Any updates to this Issue? Some additional context perhaps: in the iOS Simulator, the Share modal appears as expected when triggering the promise via async/await but in the final built app (via Expo SDK 45 through 48) the app crashes immediately.
Happy to provide any additional logs if anyone needs.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Description
Trying to use Share API to share a pdf file in base64 format, the iOS app crashes after the share button is pressed. The share action sheet opens for a little moment and then immediately closed (first part of the log). If I try to open a share dialog again, the application crashes (first part of the log). The android app is working well. Tried also to share a simple string message -- the same result. Also the same issue with React Native Share
The app was bootstrapped via React Native Boilerplate The log gist Podfile
Version
0.66.2
Output of
npx react-native info
System: OS: macOS 12.2.1 CPU: (8) x64 Apple M1 Memory: 31.48 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 17.3.1 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.3.0 - /usr/local/bin/npm Watchman: 2022.01.17.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/opt/ruby/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 29, 31, 32 Build Tools: 29.0.2, 29.0.3, 32.0.0 System Images: android-29 | Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a, android-32 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild Languages: Java: 11.0.11 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: ^0.66.2 => 0.66.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Use the Share API
Snack, code example, screenshot, or link to a repository
The log gist Podfile