【发布时间】:2020-05-15 17:18:11
【问题描述】:
我正在尝试使用 https://www.npmjs.com/package/react-native-marketingcloudsdk 将用于移动推送通知的 Salesforce SDK 集成到本机反应中,我正在 android 真实设备上运行该应用程序。但是应用程序崩溃而没有任何错误日志。这是我的 App.js
import React from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
} from 'react-native';
import RegisterComponent from './RegistrationComponent';
import LogginComponent from './LoggingComponent';
import MCReactModule from 'react-native-marketingcloudsdk';
export default class App extends React.Component {
componentDidMount = async () => {
alert('contactKey')
let contactKey = await MCReactModule.getContactKey();
alert(contactKey)
};
render() {
return (
<ScrollView>
<View style={{flex: 1, flexDirection: 'column', padding: 8}}>
<Text>working</Text>
</View>
</ScrollView>
);
}
}
请帮忙。
【问题讨论】:
标签: react-native react-native-android react-native-ios