【发布时间】:2016-04-20 11:11:33
【问题描述】:
由于某种原因,React Native Linking API 的“canOpenURL”方法无法检测到我设备上的 Uber 应用程序,即使“openURL”方法可以正常打开它。
下面有什么我遗漏的吗?
constructor(props) {
super(props);
this.state = {
uberURL: 'uber://?client_id=eJCfG86Rz&action=setPickup',
isUberInstalled: false
};
}
componentWillMount() {
Linking.canOpenURL(this.state.uberURL).then(isUberInstalled => {
this.setState({ isUberInstalled: isUberInstalled });
});
}
this.state.isUberInstalled 总是 false
【问题讨论】:
标签: ios react-native