Skip to content

Commit

Permalink
Merge pull request #102 from apptentive/develop
Browse files Browse the repository at this point in the history
Release 5.5.0
  • Loading branch information
weeeBox authored Nov 14, 2019
2 parents c1d925d + f018df9 commit df15077
Show file tree
Hide file tree
Showing 71 changed files with 19,221 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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)

# 2019-11-14 - v5.5.0

- Fixed React Native `0.60.+` incompatibility on Android. For more information: https://learn.apptentive.com/knowledge-base/react-native-integration-reference/#migrating-from-support-library-to-androidx
- Apptentive Android SDK: 5.5.0
- Apptentive iOS SDK: 5.2.7

# 2019-11-05 - v5.4.6

- Fixed `podspec` file for 0.60-style auto-linking.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ repositories {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation 'com.apptentive:apptentive-android:5.4.0'
implementation 'com.apptentive:apptentive-android:5.5.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.support.annotation.Nullable;

import com.apptentive.android.sdk.Apptentive;
import com.apptentive.android.sdk.ApptentiveConfiguration;
import com.apptentive.android.sdk.ApptentiveInternal;
import com.apptentive.android.sdk.ApptentiveLog;
import com.apptentive.android.sdk.Availability;
import com.apptentive.android.sdk.conversation.Conversation;
import com.apptentive.android.sdk.conversation.ConversationDispatchTask;
import com.apptentive.android.sdk.lifecycle.ApptentiveActivityLifecycleCallbacks;
Expand All @@ -26,6 +26,8 @@

import java.util.Map;

import androidx.annotation.Nullable;

import static com.apptentive.android.sdk.ApptentiveHelper.dispatchConversationTask;

public class RNApptentiveModule extends ReactContextBaseJavaModule implements UnreadMessagesListener, Apptentive.AuthenticationFailedListener {
Expand All @@ -52,6 +54,11 @@ public void register(ReadableMap configurationMap, Promise promise) {
try {
Application application = reactContextWrapper.getApplication();

if (!Availability.isAndroidX()) {
promise.reject(CODE_APPTENTIVE, "Unable to register Apptentive SDK: AndroidX support required. For more information see: https://learn.apptentive.com/knowledge-base/react-native-integration-reference/#migrating-from-support-library-to-androidx");
return;
}

// TODO: override log level
if (ApptentiveInternal.isApptentiveRegistered()) {
promise.reject(CODE_APPTENTIVE, "Apptentive instance already initialized");
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="apptentive_distribution">React Native</string>
<string name="apptentive_distribution_version">5.4.6</string>
<string name="apptentive_distribution_version">5.5.0</string>
</resources>
2 changes: 1 addition & 1 deletion ios/RNApptentiveModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ - (dispatch_queue_t)methodQueue
if (configuration) {
configuration.appID = configurationDictionary[@"appleID"];
configuration.distributionName = @"React Native";
configuration.distributionVersion = @"5.4.6";
configuration.distributionVersion = @"5.5.0";
[Apptentive registerWithConfiguration:configuration];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(messageCenterUnreadCountChangedNotification:) name:ApptentiveMessageCenterUnreadCountChangedNotification object:nil];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apptentive-react-native",
"version": "5.4.6",
"version": "5.5.0",
"description": "React Native Module for Apptentive SDK",
"main": "js/index.js",
"types": "js/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion sample/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 3b112418f2faa6ed3cde7a7ee73502794a46f47c

COCOAPODS: 1.8.0
COCOAPODS: 1.8.4
6 changes: 6 additions & 0 deletions sample61/.buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
75 changes: 75 additions & 0 deletions sample61/.flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/

[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.105.0
1 change: 1 addition & 0 deletions sample61/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
59 changes: 59 additions & 0 deletions sample61/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
6 changes: 6 additions & 0 deletions sample61/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions sample61/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit df15077

Please sign in to comment.