Expo React Native iOS push notifications - How to change the icon - react-native

I have my Expo React Native - Stand Alone app (Published to Test Flight) and I still seeing the Expo icon on the push notifications:
This is my app.json
{
"expo": {
"name": "test-answers",
"slug": "test-answers",
"version": "1.0.6",
"orientation": "portrait",
"icon": "./assets/images/appicon-1024.png",
"scheme": "myapp",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"notification":{
"icon":"./assets/images/push-notification-icon-expo.png",
"color": "#311b92",
"androidMode": "default",
"androidCollapsedTitle": "Updates from Test Answers",
"iosDisplayInForeground": true
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"platforms" :[
"ios",
"android"
],
"ios": {
"icon": "./assets/images/appicon-1024.png",
"usesAppleSignIn": true,
"supportsTablet": true,
"bundleIdentifier": "com.test.test",
"config": {
"googleMobileAdsAppId": "ca-app-pub-111222~111222",
"googleMobileAdsAutoInit" : true
},
"googleServicesFile": "./assets/GoogleService-Info.plist",
"buildNumber": "1.0.6"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"config": {
"googleMobileAdsAppId": "ca-app-pub-111222~111222",
"googleMobileAdsAutoInit" : true
},
"googleServicesFile": "./assets/google-services.json",
"package": "com.test.test",
"versionCode": 1
},
"web": {
"favicon": "./assets/images/favicon.png",
"config": {
"firebase": {
"apiKey": "abc123",
"measurementId": "G-123abc"
}
}
}
}
}
Any clue?

Related

Expo notification icon not showing

I have built an app using React Native (Reminder App) and i need it to show notification. That is working perfectly but when i receive a notification the icon shows as a small purple square. Below is an image of similar output found on google
Expected Output: Should show my icon on top left of notification
My current code in app.json is:
"expo": {
"name": "Reminders",
"slug": "Reminders",
"version": "2.0.0",
"orientation": "portrait",
"icon": "./assets/icon1.png",
"splash": {
"image": "./assets/splash1.png",
"resizeMode": "cover",
"backgroundColor": "#FFFFFF",
"plugins": [
[
"expo-notifications",
{
"icon": "./assets/icon1.png",
"color": "#ffffff"
}
]
]
},
"notification": {
"icon":"./assets/icon1.png",
"color": "#7f2ee1"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon1.png",
"backgroundColor": "#FFFFFF"
},
"icon":"./assets/icon1.png",
"package": "com.d99.reminders",
"versionCode":4
},
"web": {
"favicon": "./assets/icon1.png"
}
}
}
I followed the instructions on the official docs for expo-notifications but the issue remains.
Any idea on how to show my icon there?
edit: here is the icon [icon]

expo development client error: No scheme specified for development client

I am trying to get EAS builds and development clients working on Expo SDK 44, but I ran into the following error in http://localhost:19002/:
Error loading DevTools
No scheme specified for development client
Unfortunately, there isn't any additional logs regarding this error.
Here is my eas.json file:
{
"cli": {
"version": ">= 0.48.2"
},
"build": {
"development": {
"releaseChannel": "dev2",
"developmentClient": true,
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleDebug"
},
"ios": {
"buildConfiguration": "Debug"
}
},
"preview": {
"releaseChannel": "preview1",
"distribution": "internal"
},
"production": {
"releaseChannel": "prod4"
}
},
"submit": {
"production": {}
}
}
And my app.json:
{
"expo": {
"name": "Truffle",
"slug": "simmer2",
"version": "1.0.7",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "truffle-tg",
"project": "truffle-tg",
"authToken": "c5dc914d80434bdca0762c1404179552e6695d7813114928945fc2c1c9fab08a"
}
}
]
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.simmer2.foodie",
"buildNumber": "1.0.6",
"infoPlist": {
"NSPhotoLibraryUsageDescription": "Truffle accesses your library so you can upload a picture for your profile.",
"NSLocationWhenInUseUsageDescription": "Truffle uses your location to find restaurants near you."
},
"config": {
"googleMapsApiKey": "AIzaSyDD2MM_1D1ztXv8iAzVReIQUVjetfAfyoo"
}
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"config": {
"googleMaps": {
"apiKey": "AIzaSyBGnK6cBCTMxM5O2be5pwi-zVoIWNBsdVA"
}
},
"softwareKeyboardLayoutMode": "pan",
"package": "com.simmer2.foodie",
"versionCode": 7
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
"sentry-expo"
]
}
}
I did add import 'expo-dev-client'; at the top of App.tsx file, because according to the documentation (https://docs.expo.dev/development/getting-started/), this improves the error messaging during the development process, but I didn't see any additional error messages.
Do you have any guidance on why the build does not work on the dev client? Thanks!
7 months has passed, so guessing you found a way. My suggestion would be to add a scheme to the app.json:
{
"expo": {
"name": "Truffle",
"slug": "simmer2",
"scheme": "truffle"
"version": "1.0.7",
...

React Native: How to build android app in Expo?

I am building an android app with Expo, but failed every time.
Here is my app.json
"expo": {
"name": "Imct",
"slug": "Imct",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./src/asset/Logo/IMCT.png",
"splash": {
"image": "./src/asset/Logo/imct2.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.isuzu.imct"
},
"android": {
"versionCode": 2,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"googleServicesFile": "./google-services.json",
"package": "com.isuzu.imct"
},
when I run
expo build:android
I got the results is
Screenshot 2022-03-17 104029
How can I fix this?

Why I get stuck in loading Screen after building the apk in expo?

Usually when i login either with google or Facebook in my app i get automatically redirected to the home menu that is a map but after i build and ran my app i get stuck in loading Screen every-time after i log in
this is my app.json
{
"expo": {
"name": "AgriEdgeApp",
"slug": "AgriEdgeApp",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "expo.AgriEdgeApp.AgriEdgeApp",
"versionCode": 1
},
"description": ""
}
}
before building :
before building
after building :
after building

Deep linking using react native expo?

How to get deep linking url using react native expo?
I tried as per Expo documentation https://docs.expo.io/versions/latest/guides/linking.html#handling-urls-in-your-app using scheme but it is not working for android.
app.json =>
{
"expo": {
"scheme": "myapp"
}
}
Thanks!
It works if you click on a html link like :
Link to your app
Indeed in the production environnement (not in the dev one) your user click on a link on the Internet. So no problems !
You need also to add this to your app.json
{ "expo": { "scheme": "myapp" } }
In fact, there is a known and open issue with Android. Take a look: https://github.com/expo/expo/issues/765
{
"expo": {
"name": "Spoton Pay",
"slug": "spotonpay_expo_mobile",
"sdkVersion": "47.0.0",
"version": "1.4.1",
"userInterfaceStyle": "automatic",
"icon": "./src/assets/icons/mainbtn.png",
"assetBundlePatterns": ["**/*"],
"extra": {
"eas": {
"projectId": "649e06cd-43b5-4749-b455-7e886a61d9c2"
}
},
"android": {
"package": "com.codelantic.spotonexpomobile",
"versionCode": 24,
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "merchants",
"host": "qaspoton.monexfintech.com"
}
],
"category": ["BROWSABLE", "DEFAULT"]
}
],
"adaptiveIcon": {
"foregroundImage": "./src/assets/icons/mainbtn.png",
"backgroundColor": "#fff"
}
}
}
}
Delete the /android folder and expo
run "expo prebuild" command and build it.
{
"expo": {
"name": "Spoton Pay",
"slug": "spotonpay_expo_mobile",
"sdkVersion": "47.0.0",
"version": "1.4.1",
"userInterfaceStyle": "automatic",
"icon": "./src/assets/icons/mainbtn.png",
"assetBundlePatterns": ["**/*"],
"extra": {
"eas": {
"projectId": "649e06cd-43b5-4749-b455-7e886a61d9c2"
}
},
"android": {
"package": "com.codelantic.spotonexpomobile",
"versionCode": 24,
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "merchants",
"host": "qaspoton.monexfintech.com"
}
],
"category": ["BROWSABLE", "DEFAULT"]
}
],
"adaptiveIcon": {
"foregroundImage": "./src/assets/icons/mainbtn.png",
"backgroundColor": "#fff"
}
}
}
}