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
sample code
`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;
How can I solve this issue when I click on push notifications UI should render properly with all the styles applied.
Original UI

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

I updated my XCODE and macOS, archive again and this build looks fine now. xcode version: 13.1 macOS version: 12.0.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With