Skip to content

Commit bfd1642

Browse files
authored
Release 6.0.0 (#236)
* [MOBILE-1044] update ios to SDK 13.0.1 * [MOBILE-1044] use location provider * [MOBILE-1044] add mc extension to native bridge * [MOBILE-1044] comments, update signatures for both platforms * [MOBILE-1044] update typescript interface * [MOBILE-1131] add module version tracking to ios and android (#234) * [MOBILE-1131] track module version ios * [MOBILE-1131] track module version android * Release 6.0.0 * bump ios to 13.0.3 * pod install * update changelog * changelog * update imports and refactor versionString to moduleVersionString * bump example deploy target version * update changelog and ios-sdk dependency to 13.0.4 * comment * nye * comments
1 parent 35f6ba4 commit bfd1642

27 files changed

+162
-394
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11

2+
Version 6.0.0 - December 31, 2019
3+
=================================
4+
Major release to update iOS to modularized SDK 13.0.4, update Android SDK to 12.1.0,
5+
add cross-platform attribute support and modernize the Message Center Javascript
6+
and Typescript interfaces.
7+
8+
Changes
9+
-------
10+
- Updated iOS SDK to 13.0.4
11+
- Updated Android SDK to 12.1.0
12+
- Added attributes support
13+
- Updated Message Center interfaces to reflect the removal of overlay Message Center views
14+
215
Version 5.0.1 - December 9, 2019
316
================================
417
Patch release to fix a bug affecting loss of tags on iOS during app

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2010-2019 Airship and Contributors
1+
Copyright 2010-2020 Airship and Contributors
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
@@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
1010
distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
13-
limitations under the License.
13+
limitations under the License.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# Urban Airship React Native
1+
# Airship React Native
22

3-
A React Native module for Urban Airship's iOS and Android SDK.
3+
A React Native module for Airship's iOS and Android SDK.
44

55
### Resources
66

7-
* [Getting started guide](http://docs.urbanairship.com/platform/react-native/)
8-
* [API docs](http://docs.urbanairship.com/reference/libraries/react-native/latest/index.html)
7+
* [Getting started guide](http://docs.airship.com/platform/react-native/)
8+
* [API docs](http://docs.airship.com/reference/libraries/react-native/latest/index.html)
99

1010
### Issues
1111

12-
Please visit https://support.urbanairship.com/ for any issues integrating or using this module.
12+
Please visit https://support.airship.com/ for any issues integrating or using this module.
1313

1414
### Requirements:
15-
- Xcode 10+
16-
- iOS: Deployment target 10.0+
15+
- Xcode 11+
16+
- iOS: Deployment target 11.0+
1717
- Android: minSdkVersion 16+, compileSdkVersion 28+
1818
- React Native >= 0.60.0
1919
- React Native cli >= 2.0.1
@@ -59,7 +59,7 @@ cd ios && pod install
5959

6060
4) Optional. In order to take advantage of iOS 10 notification attachments,
6161
such as images, animated gifs, and video, you will need to create a notification
62-
service extension by following the [iOS Notification Service Extension Guide](https://docs.urbanairship.com/platform/reference/ios-extension/)
62+
service extension by following the [iOS Notification Service Extension Guide](https://docs.airship.com/platform/reference/ios-extension/)
6363

6464
## Android Setup
6565

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require "json"
22

33
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4+
sync_version = `#{__dir__}/scripts/sync_version.sh #{package["version"]}`
45

56
Pod::Spec.new do |s|
67
s.name = "UrbanAirship-React-Native-Module"
@@ -9,9 +10,10 @@ require "json"
910
s.author = package['author']
1011
s.homepage = package['homepage']
1112
s.license = package['license']
12-
s.platform = :ios, "10.0"
13+
s.platform = :ios, "11.0"
1314
s.source = { :git => "https://github.com/urbanairship/react-native-module.git", :tag => "{s.version}" }
1415
s.source_files = "ios/**/*.{h,m}"
1516
s.dependency "React"
16-
s.dependency "Airship", "13.0.1"
17+
s.dependency "Airship", "13.0.4"
18+
1719
end

android/build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
apply plugin: 'com.android.library'
22

3+
import groovy.json.JsonSlurper
4+
35
android {
46
compileSdkVersion 28
57

68
defaultConfig {
79
minSdkVersion 16
810
targetSdkVersion 28
11+
12+
buildConfigField("String", "MODULE_VERSION", "\"${getModuleVersion()}\"")
913
}
1014
}
1115

16+
def getModuleVersion() {
17+
def jsonFile = file('../package.json')
18+
def parsedJson = new JsonSlurper().parseText(jsonFile.text)
19+
20+
return parsedJson["version"]
21+
}
22+
1223
def safeExtGet (prop, fallback) {
1324
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
1425
}
1526

1627
dependencies {
1728
implementation 'com.facebook.react:react-native:+'
18-
implementation ('com.urbanairship.android:urbanairship-fcm:12.0.0') {
29+
implementation ('com.urbanairship.android:urbanairship-fcm:12.1.0') {
1930
exclude group: 'com.google.firebase', module: 'firebase-messaging'
2031
}
2132
implementation "com.google.firebase:firebase-messaging:${safeExtGet('firebaseMessagingVersion', '20.1.0')}"

android/src/main/java/com/urbanairship/reactnative/ReactAutopilot.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.urbanairship.Logger;
1313
import com.urbanairship.UAirship;
1414
import com.urbanairship.actions.DeepLinkListener;
15+
import com.urbanairship.analytics.Analytics;
1516
import com.urbanairship.messagecenter.MessageCenter;
1617
import com.urbanairship.push.NotificationActionButtonInfo;
1718
import com.urbanairship.push.NotificationInfo;
@@ -27,6 +28,7 @@
2728
import com.urbanairship.reactnative.events.ShowInboxEvent;
2829
import com.urbanairship.richpush.RichPushInbox;
2930

31+
import static com.urbanairship.reactnative.BuildConfig.MODULE_VERSION;
3032
import static com.urbanairship.reactnative.UrbanAirshipReactModule.AUTO_LAUNCH_MESSAGE_CENTER;
3133

3234
/**
@@ -112,7 +114,7 @@ public void onNotificationBackgroundAction(@NonNull NotificationInfo notificatio
112114
@Override
113115
public void onNotificationDismissed(@NonNull NotificationInfo notificationInfo) {}
114116
});
115-
117+
116118
// Register a listener for inbox update event
117119
airship.getInbox().addListener(new RichPushInbox.Listener() {
118120
@Override
@@ -138,6 +140,8 @@ public boolean onShowMessageCenter(@Nullable String messageId) {
138140
ReactNotificationProvider notificationProvider = new ReactNotificationProvider(context, airship.getAirshipConfigOptions());
139141
airship.getPushManager().setNotificationProvider(notificationProvider);
140142

143+
airship.shared().getAnalytics().registerSDKExtension(Analytics.EXTENSION_REACT_NATIVE, MODULE_VERSION);
144+
141145
loadCustomNotificationChannels(context, airship);
142146
loadCustomNotificationButtonGroups(context, airship);
143147
}

android/src/main/java/com/urbanairship/reactnative/UrbanAirshipReactModule.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
package com.urbanairship.reactnative;
44

55
import android.Manifest;
6-
import android.app.Activity;
76
import android.app.NotificationManager;
87
import android.content.Context;
98
import android.content.Intent;
@@ -38,6 +37,7 @@
3837
import com.urbanairship.actions.ActionCompletionCallback;
3938
import com.urbanairship.actions.ActionResult;
4039
import com.urbanairship.actions.ActionRunRequest;
40+
import com.urbanairship.analytics.Analytics;
4141
import com.urbanairship.analytics.AssociatedIdentifiers;
4242
import com.urbanairship.messagecenter.MessageCenter;
4343
import com.urbanairship.push.PushMessage;
@@ -105,7 +105,6 @@ public UrbanAirshipReactModule(ReactApplicationContext reactContext) {
105105
public void initialize() {
106106
super.initialize();
107107

108-
109108
getReactApplicationContext().addLifecycleEventListener(new LifecycleEventListener() {
110109
@Override
111110
public void onHostResume() {

example/ios/AirshipSample.xcodeproj/project.pbxproj

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@
339339
"${BUILT_PRODUCTS_DIR}/FBReactNativeSpec/FBReactNativeSpec.framework",
340340
"${BUILT_PRODUCTS_DIR}/Folly/folly.framework",
341341
"${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework",
342+
"${BUILT_PRODUCTS_DIR}/RNGestureHandler/RNGestureHandler.framework",
343+
"${BUILT_PRODUCTS_DIR}/RNReanimated/RNReanimated.framework",
344+
"${BUILT_PRODUCTS_DIR}/RNScreens/RNScreens.framework",
342345
"${BUILT_PRODUCTS_DIR}/React-Core/React.framework",
343346
"${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework",
344347
"${BUILT_PRODUCTS_DIR}/React-RCTActionSheet/RCTActionSheet.framework",
@@ -358,7 +361,7 @@
358361
"${BUILT_PRODUCTS_DIR}/UrbanAirship-React-Native-Module/UrbanAirship_React_Native_Module.framework",
359362
"${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
360363
"${BUILT_PRODUCTS_DIR}/glog/glog.framework",
361-
"${BUILT_PRODUCTS_DIR}/UrbanAirship-iOS-AppExtensions/AirshipAppExtensions.framework",
364+
"${BUILT_PRODUCTS_DIR}/AirshipExtensions/AirshipExtensions.framework",
362365
);
363366
name = "[CP] Embed Pods Frameworks";
364367
outputPaths = (
@@ -367,6 +370,9 @@
367370
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBReactNativeSpec.framework",
368371
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework",
369372
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework",
373+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNGestureHandler.framework",
374+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNReanimated.framework",
375+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNScreens.framework",
370376
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework",
371377
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework",
372378
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTActionSheet.framework",
@@ -386,7 +392,7 @@
386392
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/UrbanAirship_React_Native_Module.framework",
387393
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
388394
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework",
389-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AirshipAppExtensions.framework",
395+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AirshipExtensions.framework",
390396
);
391397
runOnlyForDeploymentPostprocessing = 0;
392398
shellPath = /bin/sh;
@@ -465,6 +471,7 @@
465471
DEAD_CODE_STRIPPING = NO;
466472
DEVELOPMENT_TEAM = PGJV57GD94;
467473
INFOPLIST_FILE = AirshipSample/Info.plist;
474+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
468475
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
469476
OTHER_LDFLAGS = (
470477
"$(inherited)",
@@ -486,6 +493,7 @@
486493
CURRENT_PROJECT_VERSION = 1;
487494
DEVELOPMENT_TEAM = PGJV57GD94;
488495
INFOPLIST_FILE = AirshipSample/Info.plist;
496+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
489497
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
490498
OTHER_LDFLAGS = (
491499
"$(inherited)",
@@ -613,7 +621,7 @@
613621
DEVELOPMENT_TEAM = PGJV57GD94;
614622
GCC_C_LANGUAGE_STANDARD = gnu11;
615623
INFOPLIST_FILE = ServiceExtension/Info.plist;
616-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
624+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
617625
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
618626
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
619627
MTL_FAST_MATH = YES;
@@ -641,7 +649,7 @@
641649
DEVELOPMENT_TEAM = PGJV57GD94;
642650
GCC_C_LANGUAGE_STANDARD = gnu11;
643651
INFOPLIST_FILE = ServiceExtension/Info.plist;
644-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
652+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
645653
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
646654
MTL_FAST_MATH = YES;
647655
PRODUCT_BUNDLE_IDENTIFIER = com.urbanairship.richpush.ServiceExtension;

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ end
3838
target 'ServiceExtension' do
3939
platform :ios, '11.0'
4040
# Pods for Service Extension
41-
pod 'UrbanAirship-iOS-AppExtensions', '12.0.0'
41+
pod 'AirshipExtensions/NotificationService'
4242
end

0 commit comments

Comments
 (0)