yarn add @krmao/react-native-talkingdata
//region init talkingdata
let appId = Constants.TALKING_DATA_APP_ID;
let channelId = 'default';
let custom = 'hello talking data';
TalkingDataSDK.init(appId, channelId, custom);
TalkingDataSDK.startA();
TalkingDataSDK.setExceptionReportEnabled(true);
//endregion
react-native-talkingdata.d.ts
declare module '@krmao/react-native-talkingdata' {
export const TalkingDataSDK: {
init: (appId, channelId, custom) => void;
startA: () => void;
setExceptionReportEnabled: (boolean) => void;
};
export const TalkingDataGender: any;
export const TalkingDataProfile: any;
export const TalkingDataProfileType: any;
export const TalkingDataSDK: any;
export const TalkingDataSearch: any;
}
config root build.gradle in android project
buildscript {
ext {
enableTalkingDataGooglePlay = true // default false
}
}
- libTalkingDataSDK.a not support ios simulators, but support real iphone.
- TalkingDataSDK.xcframework support both ios simulators and real iphone.
- com.apple.commcenter.coretelephony.xpc was invalidated