gpt4 book ai didi

ios - 在 IOS 15 中单击推送通知时,React-native UI 无法正确呈现

转载 作者:行者123 更新时间:2023-12-04 17:08:23 25 4
gpt4 key购买 nike

我在我的 React Native 应用程序中集成了推送通知。当我单击推送通知(已删除的应用程序实例)时,我的应用程序打开并导航到主屏幕,但 UI 未呈现(样式未应用于 UI)。它只发生在 IOS 中。安卓运行良好
我的版本

"@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"
我在 hooks 类之外使用 PushNotification.onNotificationOpened。
样式从外部样式表加载
示例代码
`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;
当我单击推送通知时,如何解决此问题 UI 应正确呈现所有应用的样式。
原创UI
enter image description here
当我点击推送通知应用程序打开并且样式不适用时。
enter image description here

最佳答案

我更新了我的 XCODE 和 macOS,再次存档,这个版本现在看起来不错。
xcode 版本:13.1
macOS 版本:12.0.1

关于ios - 在 IOS 15 中单击推送通知时,React-native UI 无法正确呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70019062/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com