【发布时间】:2021-12-25 11:23:29
【问题描述】:
我有以下简单的代码,在 Android 中可以正常工作,但在 IOS 中 await 不起作用。
const CheckAsyncfucntion = async () => {
console.log('Before Await execution');
const authenticateuser = await newUser(registration_id); // return true or false
console.log('After Await Execution => ', authenticateuser);
}
在 andorid 中它工作正常。但在 ios 中,两个日志都以未定义的身份验证用户值打印。然后 newUser 值得到回报。
我们将不胜感激。 我正在使用 IOS 模拟器 iphone12 iOS 15.0
【问题讨论】:
标签: ios react-native async-await ios-simulator