React native Expo: Change application configuration - react-native

I'm wondering how to change an expo app's configurations. Examples of what I mean by configurations:
Make the app only available for tablets, require location/wi-fi connection/bluetooth connection, specify multiple icon sizes, etc ...
I'm asking this because I generated an ipa, tried to build it with Application Loader but I got this error:
Missing required icon file. The bundle does not contain an app for
iPhone / iPod Touch of exactly '120x120' pixels, in .png format for
iOS versions >= 7.0
Does this have anything to do with exp.json ?
Thanks!

Set application icon in this pixel
Most likely your watchKit app icons are not of the correct size. You need follow the instructions in above image

Resizing the Icon to have square values (width = height) did the trick. The icon has to be a square.
See https://github.com/expo/expo/issues/278#issuecomment-309078847

Related

Expo App with zoomed Icon after installed

I made a simple app to convert units using Expo.
However, the icon is zoomed in once installed.
It was supposed to be like this
This is a 1024x1024 image.
The source code of my app is here -> https://github.com/Elson0509/peuc
The app in the Google Play Store is here -> https://play.google.com/store/apps/details?id=com.elsonramos.peuc
Someone can help me?
Thank you
The latest Android versions support adaptive icons which scaled well for different icon layouts - Square, Round, Circle, and more.
Expo Team provide a template to design adaptive icon
https://www.figma.com/community/file/1155362909441341285
New link for the Expo Team template: https://www.figma.com/community/file/1155362909441341285

React native packager: how to have both platform and retina suffix

As explained here the react native packager works well for images with retina suffix (#2x and #3x) and platform specific suffix (.android.png, .ios.png etc.) when used individually but it fails to serve retina images when both are used at once. I tried mixing them both ways both image#2x.android.png and image.android#2x.png but only 1x image is loaded on all devices regardless of device's pixel density. I'm importing image like import image from './images/image.png'. I tried searching for this on Google and in the react-native issues but couldn't find any helpful info.
Is it a bug or I'm doing something wrong? If it's a bug then is there a workaround? If I'm doing something wrong then what's is it? I do not want the ios specific images to be bundled in android and vice-versa.

How can I get the phone native font size in react native?

I need to get the phone native font size (set in accessibility on ios and screen settings on android). is there a way to get that parameter?
I couldn't find anything online.
I need that because whenever a user changes his phone native font size the font in the app also getting bigger(which is just fine! I want to support that) but the elements that contains it doesn't.
So I need that parameter to handle the container elements.
You can use react-native-device-info as it gives you a function getFontScale() for getting device font size in android and ios

screen resolution dependent image source

I am developing a Windows 8 metro (yeah!) app. How do i provide a screen resolution dependent image source ?
As per these guidelines, we can achieve it using image naming convention too.
I have an image control as show below.
<Image Source="Assets/test.jpeg"/>
I also have test.scale-100.jpg, test.scale-140.jpg & test.scale-180.jpg images in asset folder. Each image having different icon color to identify which image is loaded.
If i run the app in simulator and change screen resolutions, i still see test.scale-100.jpg for any resolution. Why is this happening ? In which case will the OS load test.scale-140.jpg or test.scale-180.jpg image ?
EDIT: I got it working. Once your app starts in simulator, close it by pressing home buton & uninstall it. In VS, right click on Project and click on Deploy. App should be now deployed to simulator. Change the resolution and start the app. You should now see correct image loaded by OS. Rinse and repeat to test other resolutions.
The scaling is automatic. If your images are correctly named, and you change resolution in the simulator you must restart the app to see scaled images. It doesn't happen on the fly, IIRC.
Finally got it working. close the app and uninstall it from
simulator.
In VS, right click the project and click deploy.
Change to desired screen resolution and start the app. OS should not pick proper image as per resolution.
Rinse and repeat same to test images on various resolutions.

iOs application icon, no as bright as on monitor

Small problem here, I'm building an app for ios, and I've added and icon to my project 57x57, and 114x114, but when I run my app on the device, icon is very dim, when original is very bright. How can I fix it? Does it matter if I build my app in debug mode or release?
iOS adds a gloss/shine effect to your app icon that can sometimes reduce the saturation of your image. Add the UIPrerenderedIcon flag to your info.plist file as described here to disable this.
EDITED to add iOS5 details
On iOS 5 there is a new key for specifying icons: CFBundleIcons is the raw name and it displays as 'Icon files (iOS5)' in the plist editor. To turn off the icon shine effect on iOS 5 devices you need to set the UIPrerenderedIcon flag on the Primary Icon as shown below.
To cover all cases (iOS3 - iOS5) you need to specify UIPrerenderedIcon in both places.
This is probably due to physical differences between your desktop monitor and iOS screen. Only thing you can do is redesign the icon and check the colors on an iOS device.
Check the brightness setting of your device's display. Perhaps it's not "up" as much as you think.
Or, you can disable the "shine" effect that iOS applies to your icon by adding the "Icon already includes gloss effects" boolean to your Info.plist file. That might help.