-
Notifications
You must be signed in to change notification settings - Fork 128
[Release] v0.4.1 - Integration / Beta Branch #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I have tried push notification this version. it's work in android but ios not working. How can I fix it ? please help. |
@petchkubb can you try to add this to your #import <RNCPushNotificationIOS.h>
#import <ChatProvidersSDK/ChatProvidersSDK.h>
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[ZDKChat registerPushToken:deviceToken];
[RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
} Regards |
@fbartho I think @petchkubb is right, if I don't add the code I posted before I'm not getting the push notifications. Maybe the token conversion from RCT_EXPORT_METHOD(registerPushToken:(NSString *)token) {
dispatch_sync(dispatch_get_main_queue(), ^{
[ZDKChat registerPushToken:[RCTConvert NSData:token]];
});
} |
@gabrielperales / @petchkubb -- Have you added log messages to prove you called the I'm happy to try other ways of converting an NSString to an NSData. |
@fbartho No, I haven't. I don't know too much about Objective-C... so when I made it work with the snipped I posted above... I stopped searching for other ways to make it work. |
@@ -282,10 +342,38 @@ public void startChat(ReadableMap options) { | |||
|
|||
@ReactMethod | |||
public void registerPushToken(String token) { | |||
PushNotificationsProvider pushProvider = Chat.INSTANCE.providers().pushNotificationProvider(); | |||
PushNotificationsProvider pushProvider = Chat.INSTANCE.providers().pushNotificationsProvider(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this update right? I got the code from the docs and is says that the method is pushNotificationProvider()
without the s
.
PushNotificationsProvider pushProvider = Chat.INSTANCE.providers().pushNotificationProvider();
if (pushProvider != null) {
pushProvider.registerPushToken("YOUR FIREBASE TOKEN");
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I just checked it and it's alright.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's works thank you @gabrielperales
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you make it work @petchkubb 👍 . It was working for you in android? I'm not able to receive push notifications from the chat in my android App. Did you configure something I could be missing or something?
I'm checking that there is another method called |
@fbartho I changed |
@petchkubb did you have to follow any extra steps to get things working on Android? |
This fix the following compilation error I have on the release/0.4.1 branch: /Users/my-user/work/my-app/node_modules/react-native-zendesk-chat/android/src/main/java/com/taskrabbit/zendesk/RNZendeskChatModule.java:146: error: cannot find symbol & ApplicationInfo.FLAG_DEBUGGABLE) == 0)) { ^ symbol: variable ApplicationInfo location: class RNZendeskChatModule
fix: added import to fix compilation error
Use same init wrapper on iOS as Android to handle optional param
switched registerPushToken by registerPushTokenString on ios
Added Obtaining the YOUR_ZENDESK_ACCOUNT_KEY section to readme
Necessary for calling [ZDKChat registerPushTokenWithString: ...]
v0.4.1-beta.7 is ready for anybody watching this PR! |
Fix typo and missing import
Feature/agents online
-- Change PRs are enumerated in the tracking milestone
Changes
setVisitorInfo
method #77setVisitorInfo
method #77