Pushwoosh / pushwoosh-react-native-plugin

Other
57 stars 43 forks source link

Alert Notifications iPhone X #104

Closed omrip2 closed 4 years ago

omrip2 commented 4 years ago

Hi, I am testing in iPhoneX/iPhone11 and when I receive a push notification but the app is in foreground the push doesn't being showing correctly in iPhoneX/iPhone11, others iPhone devices show the alert notifications correctly. It looks like the notification's view doesn't go all the way down (part of it is under the phone's notch).

I'm using react-native: 0.61.5 and react-native-pushwoosh-plugin: 5.20.5

wfhm commented 4 years ago

Hi! Checking it

omrip2 commented 4 years ago

Additional information: The issuse occurs when sending a push notification with image while adding it from the deeplink section and pressing update image settings, example: image

wfhm commented 4 years ago

@omrip2,

I could not reproduce it so far with the latest plugin version on iPhone X and XR. Could you please try updating the plugin version, and, if it does not help, provide us with a reproducer project/IPA?

omrip2 commented 4 years ago

Hey @wfhm,

I've created a new project in order to reproduce this issue, In order to do so, please follow the following steps:

  1. Download the react-native project from this link
  2. Open the project directory, npm install
  3. cd ios && pod install
  4. Open the Xcode workspace using Xcode
  5. Enter relevant bundle id
  6. sign your team under signing & capabilities
  7. Open a file called Splash.tsx and enter your project data on the pushwoosh.register function.
  8. Build the app to iPhone 11
  9. Open It and enable push notifications
  10. Reopen the app and on the contacts list screen send a push notification with a banner.

As you can see on the splash screen I add a small logic which makes sure that the app is being registered to Pushwoosh once, In case I register every time I enter the app, the bug doesn't reproduce but I think it is a bad practice to do so.

I would glad to get your help with that.

Thank you very much.

wfhm commented 4 years ago

@omrip2,

Thanks, checking it.

wfhm commented 4 years ago

@omrip2,

Got it reproduced, will be fixed with the next release.

wfhm commented 4 years ago

@omrip2,

I just realized I missed this statement:

As you can see on the splash screen I add a small logic which makes sure that the app is being registered to Pushwoosh once, In case I register every time the bug doesn't reproduce but I think bad practice.

The Pushwoosh.init() method has to be called for our SDK to work correctly, and not calling it does explain this behavior. It is not mandatory to call Pushwoosh.register() on application start, however, Pushwoosh.init() is.

As you have mentioned, if you call this method every time, it works correctly, so could you please confirm that moving the init method out of this if condition and leaving only the registration method inside solves your issue?