Я использую npx expo run:android для запуска сборки
-Я попробовал использовать ./gradlew SigningReport, что дало мне ту же отладочную и производственную схему-1
-Я попробовал учетные данные eas как для разработки, так и для производства, которые отличаются от ключ из gradle
-Я попробовал ключ из keytool -keystore путь к отладочному или производственному хранилищу ключей -list -v
вот мой app.json
Код: Выделить всё
{
"expo": {
"name": "rent",
"slug": "rent",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.rentway.rentway"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.rentway.rentway"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router",
[
"@react-native-google-signin/google-signin",
{
"iosUrlScheme": "com.googleusercontent.apps._some_id_here_"
}
]
],
"experiments": {
"typedRoutes": true
},
"extra": {
"router": {
"origin": false
},
"eas": {
"projectId": "xxxxxxxx"
}
}
}
}
Код: Выделить всё
{
"cli": {
"version": ">= 10.0.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
Код: Выделить всё
// utils/googleLogin.ts
import { Dispatch, SetStateAction } from 'react';
import { GoogleSignin, statusCodes } from '@react-native-google-signin/google-signin';
import { supabase } from '@/utils/supaBase';
GoogleSignin.configure({
scopes: ['https://www.googleapis.com/auth/drive.readonly'],
webClientId: "xxxx",
});
export const handleGoogleLogin = async (setLoading: Dispatch): Promise => {
setLoading(true);
try {
await GoogleSignin.hasPlayServices();
const userInfo = await GoogleSignin.signIn();
if (userInfo.idToken) {
const { data, error } = await supabase.auth.signInWithIdToken({
provider: 'google',
token: userInfo.idToken,
});
console.log(error, data);
} else {
throw new Error('No ID token present!');
}
} catch (error: any) {
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
console.log('User cancelled the login flow');
} else if (error.code === statusCodes.IN_PROGRESS) {
console.log('Operation (e.g. sign in) is in progress already');
} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
console.log('Play services not available or outdated');
} else {
console.error('Some other error happened', error.message, error.code);
}
} finally {
setLoading(false);
}
};
Подробнее здесь: https://stackoverflow.com/questions/786 ... ing-for-me
Мобильная версия