Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native UI not rendering properly when clicked on push notifications in IOS 15

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

enter image description here

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

enter image description here

like image 393
Pratap Penmetsa Avatar asked Feb 02 '26 10:02

Pratap Penmetsa


1 Answers

I updated my XCODE and macOS, archive again and this build looks fine now. xcode version: 13.1 macOS version: 12.0.1

like image 129
denisas Avatar answered Feb 04 '26 01:02

denisas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!