question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UI not rendering properly when clicked on push notifications in IOS

See original GitHub issue

Description

I had integrated push notification in my react native application. when I click on the push notification (removed app instance) my application opens and it navigates to the Home screen but UI does not render (styles are not applied to UI). it happens only in IOS. Android works fine

my versions

"@aws-amplify/pushnotification": "^3.2.32"
"aws-amplify": "4.3.7"
"aws-amplify-react-native": "6.0.1"
"@react-native-community/push-notification-ios": "1.9.0"
"react": "16.13.1"
"react-native": "0.63.4"

I am using PushNotification.onNotificationOpened outside the hooks class. Styles are loaded from external StyleSheet

I am using 
`import PushNotification from '@aws-amplify/pushnotification'`

PushNotification.onNotificationOpened(notification => {
    let obj = notification["_data"]["data"]["jsonBody"]
    setTimeout(()=>{
      notificationAPI(obj.id)
    },1000)
});

const Home = ({route, navigation}) =>{

useEffect(() => {
APICall()
  })
}, [isVisible]);

return (
 <View>
**CUSTOME UI**
</View>
)
}

export default Home;

Version

0.63.4

Output of react-native info

System: OS: macOS 10.15.7 CPU: (8) x64 Intel® Core™ i7-3615QM CPU @ 2.30GHz Memory: 602.55 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.16.1 - /usr/local/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.14.12 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: API Levels: 23, 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.3, 31.0.0 System Images: android-27 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7621141 Xcode: 12.4/12D4e - /usr/bin/xcodebuild Languages: Java: 1.8.0_222 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-macos: Not Found

Steps to reproduce

How can I solve this issue when I click on push notifications UI should render properly with all the styles applied.

Original UI 25823

when i click on push notification app opens and styles does not apply.

97905

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
rahult-sdeicommented, Dec 10, 2021

I had same issue but didnt resolved even after updating the xcode

0reactions
kukadiyaAnicommented, Nov 23, 2022

I had same issue but didn’t resolved even after updating the xCode to 13.2.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

UI is not rendering properly when clicked on push notifications ...
I'm trying to send a push notification from the backend when the app is in close/kill state. Then clicked on the notification, it...
Read more >
React-native UI not rendering properly when ... - Stack Overflow
How can I solve this issue when I click on push notifications UI should render properly with all the styles applied. Original UI....
Read more >
React-native UI not rendering properly when clicked on push ...
Coding example for the question React-native UI not rendering properly when clicked on push notifications in IOS 15.
Read more >
Push Notification Troubleshooting for iOS - Braze
Check that your app is prompting you to allow push notifications. · Check you have properly enabled push capability in your app. ·...
Read more >
What are Push Notifications? A Complete Guide [Up-to-date]
Push notification alerts can be displayed in three locations on your phone—lock screen, banner, and notification center, when the app user opts-in for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found