RCT_EXPORT_METHOD(
register:(NSDictionary *)configurationDictionary
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)rejecter
) {
if (self.registered) {
rejecter(kRejectCode, @"Apptentive is already initialised", nil);
return;
}
This will boolean will always return true since
apptentiveKey and apptentiveSignature are required fields for the js sdk ie docs:
https://learn.apptentive.com/knowledge-base/react-native-integration-reference/
const configuration = new ApptentiveConfiguration(
credentials.apptentiveKey,
credentials.apptentiveSignature
);
- (BOOL)isRegistered {
return Apptentive.shared.apptentiveKey != nil && Apptentive.shared.apptentiveSignature != nil;
}