【问题标题】:Share is not working on iOS 13. Expo moduleShare 在 iOS 13 上不起作用。 Expo 模块
【发布时间】: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


    【解决方案1】:

    听起来这是个问题,是的。有一个feature request

    目前看来,如果它在相机胶卷上,您可以在 iOS 上分享到 Instagram。以this answer 为例。

    【讨论】:

      猜你喜欢
      • 2018-10-20
      • 1970-01-01
      • 2022-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-15
      • 2020-01-31
      • 1970-01-01
      相关资源
      最近更新 更多