ios - 使用按钮 [Expo] 在 React Native App 中打开 Measure App (iOS)
问题描述
我正在尝试在我的 react 本机应用程序中打开Measure iPhone 应用程序。我曾尝试使用链接,但正如此 stackoverflow 问题中所述,Measure 不支持 URL 方案或深度链接。有没有其他方法可以在内部打开 Measure App 或从我的应用程序重定向到 Measure App 以反应原生?
import React, { Component } from 'react';
import { Button, Linking, View, StyleSheet } from 'react-native';
import Constants from 'expo-constants';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<Button
title="Open Measure App"
onPress={this._handleOpenWithLinking}
style={styles.button}
/>
</View>
);
}
_handleOpenWithLinking = () => {
// Should open the Measure App
// This does not work as mentioned - Linking.openURL("measure://")
};
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
paddingTop: Constants.statusBarHeight,
backgroundColor: '#ecf0f1',
},
button: {
marginVertical: 10,
},
});
解决方案
推荐阅读
- firebase - 将 HashMap 值推送到同一节点下的 Firebase
- css - 反应脚本没有与另一个脚本一起启动服务器
- ios - iOS - CIImage autoAdjustmentFilters 泄漏
- javascript - React Native - 打开原生共享
- node.js - 解析来自 mongoose 对象的数组元素的数据产生未定义而简单的元素值正确返回
- php - 查询 PHP 到 Mysql 数据库
- spring-integration - Spring Cloud Stream:如何重新发布到死信队列并抛出异常
- javascript - 随机单词组合javascript
- jquery - 如何获取由 JQuery.data() 创建的具有特定数据属性的元素?
- jenkins - 来自 Jenkins Job 的 Groovy 脚本将数据填充为来自 oracle DB 的组合框需要大量时间