Merge pull request 'amalia/01-sept-25' (#33) from amalia/01-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#33
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -44,4 +44,4 @@ x.ts
|
|||||||
x.sh
|
x.sh
|
||||||
|
|
||||||
google-services.json
|
google-services.json
|
||||||
mobile-darmasaba-firebase-adminsdk-fbsvc-f5abb292b5.json
|
service-account.json
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export default {
|
|||||||
},
|
},
|
||||||
android: {
|
android: {
|
||||||
package: "mobiledarmasaba.app",
|
package: "mobiledarmasaba.app",
|
||||||
|
versionCode: 1,
|
||||||
adaptiveIcon: {
|
adaptiveIcon: {
|
||||||
foregroundImage: "./assets/images/splash-icon.png",
|
foregroundImage: "./assets/images/splash-icon.png",
|
||||||
backgroundColor: "#ffffff"
|
backgroundColor: "#ffffff"
|
||||||
|
|||||||
40
eas.json
40
eas.json
@@ -5,20 +5,52 @@
|
|||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"development": {
|
"development": {
|
||||||
"developmentClient": true,
|
"distribution": "internal",
|
||||||
"distribution": "internal"
|
"android": {
|
||||||
|
"buildType": "apk"
|
||||||
|
},
|
||||||
|
"ios": {
|
||||||
|
"simulator": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"preview": {
|
"preview": {
|
||||||
"distribution": "internal",
|
"distribution": "internal",
|
||||||
"android": {
|
"android": {
|
||||||
"buildType": "apk"
|
"buildType": "apk"
|
||||||
|
},
|
||||||
|
"ios": {
|
||||||
|
"simulator": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"production": {
|
"production": {
|
||||||
"autoIncrement": true
|
"distribution": "store",
|
||||||
|
"android": {
|
||||||
|
"buildType": "app-bundle"
|
||||||
|
},
|
||||||
|
"ios": {
|
||||||
|
"simulator": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"submit": {
|
"submit": {
|
||||||
"production": {}
|
"production": {
|
||||||
|
"android": {
|
||||||
|
"serviceAccountKeyPath": "./service-account.json",
|
||||||
|
"track": "production"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"beta": {
|
||||||
|
"android": {
|
||||||
|
"serviceAccountKeyPath": "./service-account.json",
|
||||||
|
"track": "beta",
|
||||||
|
"releaseStatus": "completed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"internal": {
|
||||||
|
"android": {
|
||||||
|
"serviceAccountKeyPath": "./service-account.json",
|
||||||
|
"track": "internal"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export const requestPermission = async () => {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
return true
|
||||||
} else if (Platform.OS === 'ios') {
|
} else if (Platform.OS === 'ios') {
|
||||||
const { status } = await Notifications.requestPermissionsAsync();
|
const { status } = await Notifications.requestPermissionsAsync();
|
||||||
return status === 'granted';
|
return status === 'granted';
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
|
|||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
const tokenDevice = await getToken()
|
const tokenDevice = await getToken()
|
||||||
const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) })
|
const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) })
|
||||||
|
}else{
|
||||||
|
const register = await apiRegisteredToken({ user: hasil, token: "" })
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@@ -84,6 +86,8 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
|
|||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
const token = await getToken()
|
const token = await getToken()
|
||||||
const response = await apiUnregisteredToken({ user: hasil, token: String(token) })
|
const response = await apiUnregisteredToken({ user: hasil, token: String(token) })
|
||||||
|
}else{
|
||||||
|
const response = await apiUnregisteredToken({ user: hasil, token: "" })
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user