diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd1ff98..cd6ccb7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,10 @@ This document lets you know what has changed in the React Native module. For cha
- [Android Changelog](https://github.com/apptentive/apptentive-android/blob/master/CHANGELOG.md)
- [iOS Changelog](https://github.com/apptentive/apptentive-ios/blob/master/CHANGELOG.md)
+# 2018-07-26 - v5.1.3
+
+- Fix check for registered status on iOS
+
# 2018-07-26 - v5.1.2
- Fix missing dependency in podspec
diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml
index 82500f6..21fa6b6 100644
--- a/android/src/main/res/values/strings.xml
+++ b/android/src/main/res/values/strings.xml
@@ -1,5 +1,5 @@
React Native
- 5.1.2
+ 5.1.3
diff --git a/apptentive-react-native.podspec b/apptentive-react-native.podspec
index bace0f6..81c67f8 100644
--- a/apptentive-react-native.podspec
+++ b/apptentive-react-native.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "apptentive-react-native"
- s.version = "5.1.2"
+ s.version = "5.1.3"
s.summary = "Apptentive SDK module for React Native"
s.description = <<-DESC
diff --git a/ios/RNApptentiveModule.m b/ios/RNApptentiveModule.m
index 455324b..0b8aadb 100644
--- a/ios/RNApptentiveModule.m
+++ b/ios/RNApptentiveModule.m
@@ -52,7 +52,7 @@ - (dispatch_queue_t)methodQueue
if (configuration) {
configuration.appID = configurationDictionary[@"appleID"];
configuration.distributionName = @"React Native";
- configuration.distributionVersion = @"5.1.2";
+ configuration.distributionVersion = @"5.1.3";
[Apptentive registerWithConfiguration:configuration];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(messageCenterUnreadCountChangedNotification:) name:ApptentiveMessageCenterUnreadCountChangedNotification object:nil];
@@ -62,11 +62,8 @@ - (dispatch_queue_t)methodQueue
[self sendEventWithName:@"onAuthenticationFailed" body:@{ @"reason": reasonString }];
};
- if (Apptentive.shared != nil) {
- resolve(configuration.distributionName);
- } else {
- rejecter(kRejectCode, @"Unable to register", nil);
- }
+ _registered = YES;
+ resolve(configuration.distributionName);
} else {
rejecter(kRejectCode, @"Configuration returned nil", nil);
}
@@ -412,10 +409,6 @@ - (dispatch_queue_t)methodQueue
RCT_EXPORT_MODULE()
-- (BOOL)isRegistered {
- return Apptentive.shared != nil;
-}
-
- (NSArray *)supportedEvents
{
return @[@"onUnreadMessageCountChanged", @"onAuthenticationFailed"];
diff --git a/package.json b/package.json
index 1341dc8..1948820 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "apptentive-react-native",
- "version": "5.1.2",
+ "version": "5.1.3",
"description": "React Native Module for Apptentive SDK",
"main": "js/index.js",
"scripts": {