A React Native module for Airship's iOS and Android SDK.
Please visit https://support.airship.com/ for any issues integrating or using this module.
Airship React Native module
License: Other
A React Native module for Airship's iOS and Android SDK.
Please visit https://support.airship.com/ for any issues integrating or using this module.
Hi
Im using
UrbanAirship.setAutoLaunchDefaultMessageCenter(false);
and then UrbanAirship.getInboxMessages()
But the object does not seem to contain any images if the message has one. We just see a key with the item 'Image'
is this the correct behaviour.
Thanks in advance.
I've just updated to v1.4.1. Due to lack of clear instruction in the documentation, I didn't realise that the update also involved SDKs upgrade, which I've did. However, on my Android build it throwing error with this output
/node_modules/urbanairship-react-native/android/build/intermediates/manifests/aapt/release/AndroidManifest.xml:52:28-51: AAPT: No resource found that matches the given name (at 'theme' with value '@style/LandingPageStyle').
/node_modules/urbanairship-react-native/android/build/intermediates/manifests/aapt/release/AndroidManifest.xml:49: error: Error: No resource found that matches the given name (at 'theme' with value '@style/LandingPageStyle').
:urbanairship-react-native:processReleaseResources FAILED
I've updated the SDK to 9.0.0 in build.gradle
. Below are the properties in my gradle.
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.rhbinsurancemobile"
minSdkVersion 16
targetSdkVersion 22
versionCode 32
versionName "0.1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
...
compile 'com.google.android.gms:play-services-gcm:[11.0.1,)'
compile 'com.urbanairship.android:urbanairship-sdk:9.0.0'
I've cleaned gradle, upgrade my Android Studio to v3 but to no avail.
React Native version 0.53.0
We have a scenario where a user logs into our app, the named user is set and UA is enabled.
The device receives a message center inbox notification that is sent to all devices.
When the user logs out and logs in with a different user, they still see the message in the message center. Is this the correct behaviour.
Thanks
Hi
Is see that their is a method to set the named user.
Is their also a possibility to set alias, as were migrating from an old app a system that our client uses still sends notifications to users alias.
Or is it a case that if they still send notifications to alias that it will automatically push to a named user.
Thanks in advance.
Hello there are some breaking changes in 9.0.1 version so I think you should change this:
[[UAirship defaultMessageCenter] display];
to
[[UAirship messageCenter] display];
In the 1.4.0 version.
Thank you
Cocoapod is good, but would be great to have Carthage option in here:
https://github.com/urbanairship/ios-library#carthage
Hello
Is their any way of unsetting the named user.
I have a scenario where user A logs in, a named user is set based on their id.
I then log in with a new user with a different user B, and user B can see user A's messages.
This still occurs If I setNamedUser to an empty string when logging out.
Thanks in advance.
Currently the build is failing on ios (RN 0.47), with this error
use of undeclared identifier SKStoreReviewController urban airship
I've integrated the react-native-module
in my app and successfully received notifications. Everything seems to work great, except when I send a test-notification that contains buttons on android.
Clicking on the notification itself also works fine. When I click on the 'accept' or 'yes' button of the received notification, the app immediately crashes with the following exception:
03-14 10:22:24.643 7887-7964/? I/ReactNativeJS: 'UA notificationResponse:', { actionId: 'yes',
isForeground: true,
notification:
{ extras:
{ 'google.ttl': 2419200,
'google.sent_time': 1521019325514,
'com.urbanairship.summary': 'My summary',
'com.urbanairship.push.PUSH_ID': '...PUSH_ID...',
'com.urbanairship.push.ALERT': 'My body',
'com.urbanairship.interactive_type': 'ua_yes_no_foreground',
from: '...fromNr...',
'google.message_id': '...message_id...',
'com.urbanairship.title': 'Test message',
'com.urbanairship.push.APID': '...APID',
'com.urbanairship.push.CANONICAL_PUSH_ID': '...PUSH_ID...' },
notificationId: '1008',
title: 'Test message',
alert: 'My body' } }
03-14 10:22:24.648 550-1180/? V/WindowManager: addAppToken: AppWindowToken{29883f07 token=Token{3f22f146 ActivityRecord{28521921 u0 nl.my_app.test/nl.my_app.MainActivity t133}}} to stack=1 task=133 at 2
03-14 10:22:24.662 7887-7887/? D/Test - UALib: Analytics - New session: 2c79231f-f5a2-498e-b0a4-3a0f6fdb6c75
03-14 10:22:24.683 7887-8127/? E/AndroidRuntime: FATAL EXCEPTION: pool-28-thread-1
Process: nl.my_app.test, PID: 7887
java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Set java.util.Map.entrySet()' on a null object reference
at com.urbanairship.CoreReceiver$2.run(CoreReceiver.java:335)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Device: Nexus 4
Android: 5.1.1
NOTE: My app uses https://github.com/wix/react-native-navigation
Deep link events are always emitted, but sometimes not handled. Particularly when:
I managed to do a quick and dirty fix, by altering EventEmitter.java
:
final ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext != null && reactContext.hasActiveCatalystInstance()) {
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
emit(reactContext, event.getName(), event.getBody());
}
}, 3500);
} else if (event.isCritical() || reactInstanceManager.hasStartedCreatingInitialContext()) {
reactInstanceManager.addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() {
public void onReactContextInitialized(final ReactContext reactContext) {
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
emit(reactContext, event.getName(), event.getBody());
}
}, 3500);
reactInstanceManager.removeReactInstanceEventListener(this);
}
});
}
I delay the emission to ensure that the JS is ready to handle the event.
A better way to fix this issue is to keep track whether emitted events have been handled, and if not, reemitting them after a certain delay.
In my react-native Project i want to Integrate urban airship module. I followed the procedure from your website. [https://docs.urbanairship.com/platform/react-native/]
First I installed and linked . react-native install urbanairship-react-native.Then now i tried to install the cocaopods.I tried pod init command, but i am unable to create the podfile and getting error like below.
`## Command
/usr/local/bin/pod init
What did you do?
What did you expect to happen?
What happened instead?
CocoaPods : 1.3.1
Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
RubyGems : 2.0.14.1
Host : Mac OS X 10.12.6 (16G29)
Xcode : 8.3.3 (8E3004b)
Git : git version 2.14.1
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ f025a02cd07d05eb8d7b340cccc91d99f90d9dc8
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.2.0
cocoapods-try : 1.1.0
Nanaimo::Reader::ParseError - [!] Dictionary missing ';' after key-value pair for "HEADER_SEARCH_PATHS", found "\""
# -------------------------------------------
# DEAD_CODE_STRIPPING = NO;
# DEVELOPMENT_TEAM = E24SB49T85;
1020> HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native/React/**""$(SRCROOT)/../node_modules/urbanairship-react-native/ios/UARCTModule";
^
# INFOPLIST_FILE = Koopi/Info.plist;
# IPHONEOS_DEPLOYMENT_TARGET = 9.3;
# -------------------------------------------
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:284:in `raise_parser_error'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:198:in `parse_dictionary'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:192:in `parse_dictionary'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:192:in `parse_dictionary'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:192:in `parse_dictionary'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:106:in `parse!'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.5.1/lib/xcodeproj/plist.rb:27:in `read_from_path'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.5.1/lib/xcodeproj/project.rb:200:in `initialize_from_file'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.5.1/lib/xcodeproj/project.rb:102:in `open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Dictionaries
suttacentral/suttacentral#98 [open] [7 comments]
29 Feb 2016
Alert if dictionary file is missing
harleygn/WordsWithChilwell#19 [open] [0 comments]
a week ago
update gettext dictionaries
facundoolano/advenjure#44 [open] [1 comment]
a week ago
I'm building and app with the react native module, I'm trying to enable push notifications for my app.
Devices: Samsung galaxy S6 (7.0) , Samsung Galaxy On 5 (6.0.1)
Steps:
Expectation:
Result:
More:
UrbanAirship.isUserNotificationsOptedIn()
the result is false for the Galaxy S6, so I'm not sure if is related with Samsung issue with android 7 or something else is happeningHeyo, running into some issues linking the UA library to my Android Manifest.
React-native-cli: 2.0.1
react-native: 0.53.3
node: v8.0.0
urbanairship-react-native: 1.4.2
I'm following the installation guide to a T, here are the tasks I suspect aren't quiet completing:
react-native link urbanairship-react-native
produces an Unhandled Promise Rejection Warning with "Error no such file or directory, open "/Users/me/Desktop/ourproj/android/app/src/main/java/com/teamname/projectname/MainApplication.java"In fact that file doesn't exist...but /Users/me/Desktop/ourproj/android/app/src/main/java/com/projectname/MainApplication.java does. Note the missing /teamname/
As a result MainApplication.java doesn't get updated... I did manually update this file to
import com.urbanairship.reactnative.ReactAirshipPackage;
and include new ReactAirshipPackage()
in my packages array, though this didn't get me any further, possibly due to the following error:
react-native run-android
after that results inFAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':urbanairship-react-native'.
> Could not resolve all dependencies for configuration ':urbanairship-reac
-native:_debugPublishCopy'.
> Could not find any version that matches com.google.android.gms:play-s
rvices-gcm:[11.8.0,).
Versions that do not match:
11.0.4
11.0.2
11.0.1
11.0.0
10.2.6
+ 18 more
Searched in the following locations:
file:/Users/me/Library/Android/sdk/extras/google/m2repo
sitory/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Users/me/Desktop/our-project/android/sdk-manager/
com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Users/me/Desktop/our-project/android/sdk-manager/
com/google/android/gms/play-services-gcm/
file:/Users/me/Library/Android/sdk/extras/android/m2rep
ository/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Users/me/Library/Android/sdk/extras/android/m2rep
ository/com/google/android/gms/play-services-gcm/
file:/Users/me/Desktop/our-project/android/sdk-manager/
com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Users/me/Desktop/our-project/android/sdk-manager/
com/google/android/gms/play-services-gcm/
Required by:
Authenticator:urbanairship-react-native:unspecified
Looks like it wants google play services but can't find it. So in my android/app/build.gradle I include the following dependencies:
dependencies {
...
compile project(':urbanairship-react-native')
compile 'com.google.android.gms:play-services-gcm:+'
Doesn't seem to have an effect. (Before running I installed the Google Play Services through the SDK Manager of Android Studio, version 46)
Other possibly relevant info in my app level build.gradle:
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 24
...
}
And the top level build.gralde:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
allprojects {
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
details.useVersion "0.53.3"
}
}
}
}
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
Is this funkiness with the maven reference, do you think? Thanks.
I'm having trouble getting this RN lib (version 1.2.2
) integrated into a React Native 0.48.4
project using CocoaPods version 1.3.1
in Xcode 9.
I followed all the directions in the README and it still fails. I'm not sure how to go about setting the AIRSHIP_SEARCH_PATH
manually, so I still can't get it to run.
I'm happy to provide more info. Thanks
I implement urbanairship on my react native app. After user had logged in, inside the authentication saga, we called the below and listen to the registration event.
UrbanAirship.setUserNotificationsEnabled(true)
UrbanAirship.addListener("register", (event) => {
// save the channelId on the DB
});
On the iOS, I’ve observed that the channel ID always the same no matter how many time I’ve deleted the app and reinstalled it again. The only difference is between channel ID in development and production.
However, on Android the channel ID for the same device keeps changing whenever we reinstall the app. Is this expected? If so, how do I maintain a correct device identifier so that I know that i want to only push to this particular device, not all of this unused ID. At the moment when we save channel ID we check if the channel ID already exists or not, so we only store a unique channel ID for the user. They might have multiple channel ID, which we assumed should represent multiple device.
Any thoughts in this?
var channelId = UrbanAirship.getChannelId().then(channelId => {
alert('Channel: '+ channelId)
})
UrbanAirship.addListener("register", (event) => {
alert('Channel registration updated: ', event.channelId);
alert('Registration token: ', event.registrationToken);
})
UrbanAirship.setNamedUser(myUserIdl)
UrbanAirship.getNamedUser().then((namedUser) => {
alert('Named User: ', namedUser)
})
I am giving these four steps when i login method successful response.
how can I get the Channel Id and How can I pass the User id in UrbanAirship.setNamedUser(myUserIdl) . //is it right way for passing the User Id?
Hi,
I'm experiencing problem when using setUserNotificationsEnabled()
and setQuietTimeEnabled()
. Both these functions seems to be connected in some way; isUserNotificationsEnabled()
and isQuietTimeEnabled()
always returns the same value...
For example, when I run setQuietTimeEnabled(false)
, the userNotifications also gets disabled (and also the other way around).
Is this expected?
Release 1.2.0 together with RN 0.47.
Native integration, react-native-ua
and Android (using AutoPilot
) allow for using a custom config file, but as far as I can tell that is not yet possible for iOS in this wrapper. This means that it's not possible to have different build targets use different settings.
For an internal requirement we need to expose all tags under android and ios
https://docs.urbanairship.com/reference/libraries/android/latest/reference/com/urbanairship/push/PushManager.html#getTags()
I've made already a pull request (not merged yet) on the "old" library to expose the tags
globocom/react-native-ua#56
Are you maybe planning to provide this by your own in a later state, or are you open to let me make a pull request for it. We'd like to migrate from the old soon be deprecated "globocom" library as fast as possible.
Best regards
Is this plugin compatible with buildToolsVersion '23.0.1'? Seems like it requires the app to use buildToolsVersion '25.0.0`, but I'm not entirely sure. If that's the case, is there a way to make the min 23.0.1?
I'm using version 1.2.2
of this plugin.
Thanks
Hello guys, one question that is actually very blocking for me,
When I am running react-native install urbanairship-react-native
the native link is done automatically and my Xcode project will not open any more:
john$ react-native install urbanairship-react-native
Scanning 640 folders for symlinks in /Users/john/Documents/projects/my_project/node_modules (6ms)
npm WARN [email protected] requires a peer of eslint@^3.19.0 but none was installed.
+ [email protected]
removed 1 package and updated 1 package in 4.847s
Scanning 640 folders for symlinks in /Users/john/Documents/projects/my_project/node_modules (6ms)
rnpm-install info Linking urbanairship-react-native android dependency
rnpm-install info Android module urbanairship-react-native has been successfully linked
rnpm-install info Linking urbanairship-react-native ios dependency
rnpm-install info iOS module urbanairship-react-native has been successfully linked
rnpm-install info Module urbanairship-react-native has been successfully installed & linked
And after that I cannot open my Xcode project. Can I perform an install without linking the library natively? If yes, where can I find the instructions for that?
The in-app messages feature doesn't seem to work. The notification is received (checked with debug: verbose) but does not display in the app.
We send notifications to our users with Web Pages. To avoid the browser to be opened instead of our own app, we configured a predicate in Android:
ActionRegistry.Predicate routeOpenUrlPredicate = new ActionRegistry.Predicate() {
@Override
public boolean apply(ActionArguments arguments) {
return false;
}
};
UAirship.shared().getActionRegistry().getEntry(OpenExternalUrlAction.DEFAULT_REGISTRY_NAME).setPredicate(routeOpenUrlPredicate);
This was working until we updated the react-native-module to version 1.3.1. Since we made this change the expected behavior happens only when the app is running in background. If this is not the case, the browser is opened together with the app and after close the browser the app is visible.
Can you help?
When I try sending a push notification from the Urban Airship dashboard, I do get an app notification on Android, but the notification message text is empty.
When I tap the notification it opens the correct app.
In logcat, I see the message content text that should be displaying in the push notification: HELLO THIS IS A TEST NOTIFICATION
ReactNativeNotifs: New message from GCM: Bundle[{com.urbanairship.push.ALERT=HELLO THIS IS A TEST NOTIFICATION, google.sent_time=1518420400840, google.ttl=2419200, com.urbanairship.push.PUSH_ID=<hidden>, google.message_id=<hidden>, com.urbanairship.push.APID=<hidden>, com.urbanairship.push.CANONICAL_PUSH_ID=<hidden>}]
I Spot - UALib: Received push: {google.sent_time=1518420400840, com.urbanairship.push.PUSH_ID=<hidden>, com.urbanairship.push.CANONICAL_PUSH_ID=<hidden>, com.urbanairship.push.ALERT=HELLO THIS IS A TEST NOTIFICATION, com.urbanairship.push.APID=<hidden>, google.ttl=2419200, google.message_id=<hidden>}
V NotificationService: pkg=com.myapp canInterrupt=false intercept=true
Xcode 9.2
I follow Carthage setup method: https://github.com/urbanairship/ios-library
$ brew update
$ brew install carthage
Cartfile
github "urbanairship/ios-library"
then ran command
$ carthage update
then follow Carhage instructions:
If you're building for iOS, tvOS, or watchOS
On your application targets’ General settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk.
On your application targets’ Build Phases settings tab, click the + icon and choose New Run Script Phase. Create a Run Script in which you specify your shell (ex: /bin/sh), add the following contents to the script area below the shell:
/usr/local/bin/carthage copy-frameworks
$(SRCROOT)/Carthage/Build/iOS/Result.framework
$(SRCROOT)/Carthage/Build/iOS/ReactiveSwift.framework
$(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.framework
$(BUILT_PRODUCTS_DIR)/$ (FRAMEWORKS_FOLDER_PATH)/Result.framework
$(BUILT_PRODUCTS_DIR)/$ (FRAMEWORKS_FOLDER_PATH)/ReactiveSwift.framework
$(BUILT_PRODUCTS_DIR)/$ (FRAMEWORKS_FOLDER_PATH)/ReactiveCocoa.framework
any ideas ??
I want to try this but we're not using cocoapods on the project because it created issues previously. I see issue #9 is looking for a carthage path, is a manual path documented anywhere?
where it is add the below code in react native android Platform
factory.setSound(Uri.parse(path)); // path = android.resource://" + this.getPackageName() + "/" + R.raw.somesoundfile
According to the docs the notificationOptInStatus
event should have a boolean property named optIn
. This is true for iOS, but not for Android, where the name instead is optedIn
I assume optIn
is the correct name? I realize it would be a breaking change to fix this, but I thought I should at least let you know :)
hello
react-native-module/android/src/main/AndroidManifest.xml
is missing "@style/LandingPageStyle"
on
line 42
<activity android:name="com.urbanairship.reactnative.CustomLandingPageActivity"
android:exported="false"
android:theme="**@style/LandingPageStyle**">
Hello, I don't find a way to get the device token once I hace the permissions.
I tried with this
UrbanAirship.addListener('register', (event) => {
console.log(event)
})
In Objective C you can get the device token here
didRegisterForRemoteNotificationsWithDeviceToken
Thanks
Helloo
Is their a method to get the Message Center content.
Thanks in advance.
:0)
iOS working fine But When i was run in android application getting errorLike this
Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':urbanairship-react-native'.
> Could not resolve all dependencies for configuration ':urbanairship-react-native:_debugPublishCopy'.
> Could not find any version that matches com.facebook.react:react-native:[0.40,).
Versions that do not match:
0.20.1
0.20.0
0.19.1
0.19.0
0.18.0
+ 12 more
Required by:
Koopi Customer:urbanairship-react-native:unspecified
Steps to reproduce:
Result: Listener is sometimes called, sometimes it isn't.
Note: On Android, it works as expected. If I use the iOS task switcher, then it works better, but still not reliable enough.
As a workaround, I created a native module in iOS that uses UNUserNotificationCenter to check if the notifications are enabled when the app becomes active. This works, but I really don't want to have a separate logic for this for iOS and Android.
Can you look into the issue?
I'm not sure if I report this here or at AndroidSDK but since I'm using react-native so I guess it better be here.
Progaurd build failing on fresh react-native app.
What I did:
react-native init AwesomeProject
and added keystore configs and enabled Proguard and also changed compileSdkVersion -> 26
assembleRelease -> Success
Then
react-native install urbanairship-react-native
that successfully linked into android
gradlew clean
assembleRelease -> Failed
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest$1: can't find superclass or interface com.google.android.gms.location.LocationListener
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationServices
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.FusedLocationProviderApi
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.FusedLocationProviderApi
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationServices
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationServices
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.FusedLocationProviderApi
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.LocationServices
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.FusedLocationProviderApi
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.FusedLocationProviderApi
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.LocationServices
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.FusedLocationProviderApi
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.LocationRequest
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest: can't find referenced class com.google.android.gms.location.LocationListener
Warning: com.urbanairship.location.FusedLocationAdapter$SingleLocationRequest$1: can't find referenced class com.google.android.gms.location.LocationListener
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced method 'android.view.View findViewById(int)' in program class com.urbanairship.push.iam.view.BannerCardView
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced field 'int CardView_cardBackgroundColor' in program class com.urbanairship.R$styleable
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced method 'void setCardBackgroundColor(int)' in program class com.urbanairship.push.iam.view.BannerCardView
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced field 'int CardView_cardElevation' in program class com.urbanairship.R$styleable
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced method 'float getMaxCardElevation()' in program class com.urbanairship.push.iam.view.BannerCardView
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced method 'void setMaxCardElevation(float)' in program class com.urbanairship.push.iam.view.BannerCardView
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced method 'void setCardElevation(float)' in program class com.urbanairship.push.iam.view.BannerCardView
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced field 'int CardView_cardCornerRadius' in program class com.urbanairship.R$styleable
Warning: com.urbanairship.push.iam.view.BannerCardView: can't find referenced method 'void setRadius(float)' in program class com.urbanairship.push.iam.view.BannerCardView
Warning: there were 27 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 9 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
:app:transformClassesAndResourcesWithProguardForRelease FAILED
/build.gradle
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
/app/build.gradle
compileSdkVersion 26
buildToolsVersion "26.0.0"
dependencies {
compile project(':urbanairship-react-native')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
Is there anything I'm missing? Could you please help me out here?
Maybe I'm going about this the wrong way, but after reading this migration guide it looks like "notificationResponse" should have the same functionality as "launchedFromNotification," however when launching my app from a notification nothing is happening. All I have in the event is a simple alert, set up the exact same way as the sample project, inside the componentWillMount lifecycle step.
Could there be something I'm missing? My goal is to have a user open the app via a notification and upon entering the application see an alert that has a message and a few other things from the "extras" field. I even tried including the message and extra data in the "in_app" attribute in the push object being sent to UA from my server, no dice.
Thanks in advance.
RN: 0.48.1
OS: Android
Build fails with the following error:
ReactAirshipPackage.java:25
error: "Method does not override method from its superclass"
@Override
In the editor, the linter also indicates the same issue and error.
The build succeeds if you comment out lines 25-28.
public class ReactAirshipPackage implements ReactPackage {
// @Override
// public List<Class<? extends JavaScriptModule>> createJSModules() {
// return Collections.emptyList();
// }
}
The issue seems to be related to there no longer being a createJSModules with no params.
Hi Thanks for the great module.
When I set
UrbanAirship.setAutoLaunchDefaultMessageCenter(false)
and a push notification is received - it still opens the Message Center.
Tested on IOS 11 - iPhone7
Thanks for fixing the Message Center title bug!
Unfortunately that release seems to have broken our builds on Android devices as it is unable to resolve a few dependencies.
The following message is produced when building the app, right before it fails (this message does not show on any other version I have tried):
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':urbanairship-react-native'.
> Could not resolve all dependencies for configuration ':urbanairship-react-native:_debugPublishCopy'.
> Could not find com.google.android.gms:play-services-gcm:11.4.0.
Searched in the following locations:
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
Required by:
HalfordsConsumerApp:urbanairship-react-native:unspecified
> Could not find com.android.support:support-v4:26.0.2.
Searched in the following locations:
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
Required by:
HalfordsConsumerApp:urbanairship-react-native:unspecified > com.urbanairship.android:urbanairship-sdk:8.9.4
> Could not find com.android.support:support-annotations:26.0.2.
Searched in the following locations:
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.pom
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.pom
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
Required by:
HalfordsConsumerApp:urbanairship-react-native:unspecified > com.urbanairship.android:urbanairship-sdk:8.9.4
> Could not find com.google.android.gms:play-services-gcm:11.4.0.
Searched in the following locations:
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
Required by:
HalfordsConsumerApp:urbanairship-react-native:unspecified > com.urbanairship.android:urbanairship-sdk:8.9.4
> Could not find com.android.support:support-v4:26.0.2.
Searched in the following locations:
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
Required by:
HalfordsConsumerApp:urbanairship-react-native:unspecified > com.facebook.react:react-native:0.44.2 > com.android.support:appcompat-v7:23.0.1
Thanks,
Josh
Hi, first of all thanks for the awesome package.
I have a problem with the title of the message center. I read in the documentation that the message center title will default to 'Message Center' when not explicitly set, and this happens fine on iOS but on Android the title is the name of the app.
Is this a bug or are the docs out of date?
Is there a way I can set the title using this SDK or do I have to set it via native code?
Thanks
Hi,
Hopefully you can help.
I have a scenario where a user is asking to withdraw permissions on the deviceID. In the android settings one can withdraw access to phone and prevent notifications, but I see no permissions for deviceID. Do you know if this is possible? Am I correct in thinking that if you prevent notifications, thats also related to the device ID.
Thanks in advance.
Error:
CoreData: error: Cannot load NSManagedObjectModel. nil is an illegal URL parameter
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
stacktrace:
dispatch_once(&takeOffPred_, ^{ [UAirship executeUnsafeTakeOff:[config copy]]; });
[UAirship takeOff:[UAConfig defaultConfig]];
[UAirship takeOff];
+(void)performTakeOff:(NSNotification *)notification {...}
Enterprise iOS certificate & provisioning.
pod 'UrbanAirship-iOS-SDK', '~>8.3'
"urbanairship-react-native": "1.2.2"
"react": "16.0.0-alpha.6"
"react-native": "0.44.3"
EDIT:
UrbanAirship-iOS-SDK (8.6.0) (Podfile.lock).
The app crashes on every initialization.
Cannot reconcile AirshipLib path in IOS.
The current version of "UARCTMessageViewController.h" path is failing.
#import "AirshipLib.h"
Prepending the directory fixes the issue.
#import "AirshipKit/AirshipLib.h"
In the instructions, it mentions:
if it's unable to find it for your project due to a non-standard install path or manual installation, you can set AIRSHIP_SEARCH_PATH variable with the location of the framework.
Could you clarify on how this can be done?
Hi there,
Thanks for this module! I'm getting a persistent build failure that I wonder if anyone has seen before.
I'm migrating away from react-native-ua (0.1.2) (followed all the steps here for removing references to the old module) to urbanairship-react-native (version 1.4.2)
Then followed the iOS installation steps here exactly.
Currently running:
react-native-cli 2.0.1
react-native 0.53.3
Xcode 9.2.
After Cleaning and Building, I get two errors within UARCTMessageCenter.m, No known class method for selector 'messageCenter'
.
Possibly related, warning in the same module - warning: ignoring recursive header expansion for path '/**'
I have an app in IOS and Android, everything works except for the "deepLink" event in IOS. When the app is closed and I open a notification with a deepLink, it doesn't trigger the event (the exact same behaviour works in Android).
Is there anything i'm missing? I did add the specific urlscheme in info.plist, and the deeplink is recognized as it does open the app when typing it in safari.
It would be great if we could have access to delivered notifications (Notifications Panel). To remove specific or all notifications. Or should we look for another library for that? Thanks!
Edit: I found this WIX React native notifications but it'd nice to use just one lib for notifications.
I am using the npm module 1.2.2 and pod 8.5.3
UrbanAirship.addListener('register', event => {
alert('reg done!');
});
UrbanAirship.setUserNotificationsEnabled(true);
The register event never gets fired, I do however see the accept push notification alert box.
Any idea what could be wrong? This was previously working fine for me.. Is there an error event I can hook into? Or a debug mode?
Hi
Should the IN-APP MESSAGE trigger an event when setAutoLaunchDefaultMessageCenter is set to false.
Thanks in advance
:0)
Any progress towards integrating with Expo?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.