upd: login ios

This commit is contained in:
2025-07-29 10:08:45 +08:00
parent 86a80213ca
commit def241a9c9

View File

@@ -55,9 +55,11 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
const hasil = await decryptToken(String(token)) const hasil = await decryptToken(String(token))
const permission = await requestPermission() const permission = await requestPermission()
if (permission) { if (permission) {
const tokenDevice = await getToken()
try { try {
if (Platform.OS === 'android') {
const tokenDevice = await getToken()
const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) }) const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) })
}
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} finally { } finally {