I need to set width and height(368px, 592px) and disable full screen in my app on React Native for Windows + MacOs.
I tried to add width and height to app.json but it didn't work.
//app.json
{
"name": "Test",
"displayName": "test",
"width": "368px",
"height": "592px"
}
Thanks!
Related
I am using npm 8.11.0 in Ubuntu 18.04.2 LTS
I created a react native project using expo with the following app name (in App.json):
{
"expo": {
"name": "Waku News",
"slug": ...
I export the react native project to android and ios project using npm run eject. I find that the app name in ios (under project.pbxproj) has the space removed.
/* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
...
PRODUCT_NAME = "WakuNews";
...
But the app name in android project has no such issues:
<resources>
<string name="app_name">Waku News</string>
...
</resources>
I tried to add "displayName" in App.json but no use:
{
"expo": {
"name": "Waku News",
"displayName": "Waku News",
"slug": ...
I try other ways, like replacing the space with underscore "_", but the result is the same: The PRODUCT_NAME in ios project still have the space and underscore removed.
{
"expo": {
"name": "Waku_News",
"displayName": "Waku News",
"slug": ...
My question is: how can I customize the app name in the react native project such that the PRODUCT_NAME in ios and app_name in android use the same values, without removing any spaces or special characters?
I configured my app with landscape mode but on launch, during 1 second I have the orientation in portrait mode then it changes to landscape.
It happens only in ios in release mode
Configuration in app.json :
"expo": {
"orientation": "landscape",
...
"ios": {
"requireFullScreen": true,
},
}
hope you guys have a great day!
I'm in the middle of learning deeplink in react native, currently I've managed to open my app via cmd using npx uri-scheme open myapp://inv/12321312 --android, and the page I'm going to is also already open along with the :id I included in the link
now i have released my app (not yet uploaded in playstore - but just run npx react-native run-android --variant=release), then why when i access myapp://inv/12321312 link in my browser, my app doesn't open?
i'm using Google Chrome in my android device
please help:(
in app.json add intentFilters for android
if you are using expo
{
"expo": {
"scheme": "myapp",
.....
"android": {
...
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "myapp.com",
"pathPrefix": "/"
},
{
"scheme": "myapp",
"host": "*",
"pathPrefix": "/"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
]
...
},
}
}
or if you are using react native CLI
https://developer.android.com/training/app-links/deep-linking#adding-filters
after that generate APK for Android
and send https://myapp.com/ in message whatsapp
click this link from chat
it's work ^^
update : (test)
ios => after build ipa for test ios run this link in your browser phone when app installed : myapp://
android => after build apk for test android send in this link in message (email , whatsapp, ...) and click link for test (after installed app)
I'm looking for rendering 3D Buildings extrusion in a React-Native app using github /mapbox/react-native-mapbox-gl
I created a custom map in MapBox Studio,added the following line into the style.json and uploaded the map in Mapbox Studio
{
"id": "buildings",
"type": "fill-extrusion",
"source": "composite",
"source-layer": "building",
"minzoom": 15,
"filter": [
"all",
[
"==",
"extrude",
"true"
],
[
">",
"height",
1
]
],
"paint": {
"fill-extrusion-color": "hsl(206, 7%, 61%)",
"fill-extrusion-height": {
"type": "identity",
"property": "height"
},
"fill-extrusion-base": {
"type": "identity",
"property": "min_height"
},
"fill-extrusion-opacity": 1,
"fill-extrusion-translate-anchor": "viewport"
}
}
The buildings are rendered as expected in mapbox-studio but when I go back in my React-Native App the map is shown but without the buildings.
Do you guys have any idea about how to display buildings in 3D with the react-native-mapbox-gl sdk ?
Thanks.
Screenshot of mapbox studio
Screenshot of the React-Native Map
Compatibility fix for this issue:
Add a new layer for your custom map in Mapbox Studio
Source: Mapbox Streets V7 (building)
Type: Fill extrusion
Edit style
Click on Height and then Edit JSON (in the bottom of the panel)
Then, paste the following code:
{
"type": "identity",
"property": "height"
}
Paste and publish your style and use as a MapBox style for your map in React-Native
I hava a web project with express. when I convert the project to node-webkit use package.json
{
"name": "hello"
"main": "http://localhost:3001",
"node-main": "index.js",
"window": {
"toolbar": false,
"frame": true,
"width": 1170,
"height": 780
},
...
}
it can work well. but there is a button in one page, it will call window.print() on click and now it can't work in node-webkit application.
Any idea about what I am doing wrong? or are there any other solution to print the page?