【发布时间】:2020-01-27 02:00:28
【问题描述】:
SDK 版本:35 平台(Android/iOS/web/all):iOS:13 在我将我的 iPhone 更新到 iOS 13 之后。当我选择分享到 Instagram 时,分享不起作用。 当我选择它时,什么都不会发生。 分享正在与其他社交网络合作
iOS 13. SDK 35. Expo v35
handleShare = async () =>{
this.setState({share : true, opa : 0.4})
if(!this.state.downloaded){
await this.handleDownload();
}
if(Platform.OS == 'ios'){
try {
const result = await Share.share({
message : this.state.uri,
url : this.state.uri,
}, {
excludedActivityTypes : [
"net.whatsapp.WhatsApp.ShareExtension",
]
});
if (result.action === Share.sharedAction) {
if (result.activityType) {
// shared with activity type of result.activityType
} else {
// shared
}
} else if (result.action === Share.dismissedAction) {
this.setState({share: false, opa : 1})
}
} catch (error) {
alert(error.message);
}
}
else{
Sharing.shareAsync(this.state.uri).then(() =>{
this.setState({share : false, opa : 1})
})
}
};
【问题讨论】:
标签: react-native expo ios13