Salesforce移动推送通知以响应本机

问题描述 投票:0回答:1

[我正在尝试使用https://www.npmjs.com/package/react-native-marketingcloudsdk在反应本机中集成Salesforce SDK以进行移动推送通知,而我正在android real设备上运行该应用程序。但是,应用程序崩溃而没有任何错误日志。这是我的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
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.