Closed yasaricli closed 4 years ago
@yasaricli Can you let me know why you need to call requestPermissions
method twice? Is it because the first run didn't succeed or you want to request different permissions in the second run?
When I run "requestPermissions" every time in version 0.9.0
it doesn't give an error.
Here's an example of how I run it.
import React, { Component } from 'react';
import NotificationHubIos from 'react-native-azurenotificationhub/index.ios';
import Index extends Component {
componentDidMount() {
// Maybe an permission check can be done here?
NotificationHubIos.requestPermissions();
}
render() {
return (
...
)
}
}
thanks.
I'm waiting for this bug. When can you do it @phongcao
Thanks.
I plan to have a look at this issue in a couple days and it should be resolved with the next release.
@yasaricli Should be fixed on master branch.
thanks @phongcao
@phongcao this error continues.
I updated it in v0.9.5 version, it gives error.
@yasaricli That's strange. I just did some testing again and this issue doesn't seem to occur. Please provide more details/error logs/screenshots if you still see it.
Make sure you update your App.js
as well since there is a lot of changes in 095.
there is no problem at first start. But then ctrl + r, or refresh, gets an error.
I have this issue as well. Is there a solution? @yasaricli @phongcao
I am currently on "^0.9.5-Patched.1"
and using it like such
<Button
buttonStyle={styles.button}
title="Enable Notifications"
onPress={async () => {
await iosNotifications.getInstance().register(true);
await dismiss();
}}
/>
I get an error when I try to get permission as follows.
error:
It only happens when ios and 2nd run
Thanks.