All operating systems control access to sensitive parts of the device such as the Camera or Location, requiring that the user approve when an app wants to use these features. For example, using our GPS APIs will cause the user to be prompted to allow access to location for the app the first time they are used.
The mobile platforms – iOS and Android – are most tightly controlled, but Apple also has restrictions on MacOS as well. Windows to date does not restrict access to such features for native Win32 applications like Umajin.
When you use Umajin Editor or Viewer, these permissions are all listed up front in store listings since any app may use them. The permission message that will be given is somewhat generic because Umajin cannot tell what the particular app is using it for.
Once published as standalone apps, Umajin Editor will build in code and resources to request only the permissions that are required.
For the most part this will be handled automatically based on scanning your app’s Javascript, components and actions, however, you may need to be aware of permissions details in some cases.
iOS
Apple devices have from the start required that the app request permissions to access sensitive features, only when it wants to use them.
Recently (2019) the Apple app store requires that you supply a specific description of why your app needs permission, with a particular emphasis on where any private information may end up. For example, if taking a photo, the description should say what happens to the photo and if it is transported anywhere outside the app.
These descriptions can be added in a file named “ios_usage_descriptions.json” that the editor will create in your project folder, the first time you go to the App Stores publish dialog.
ios_usage_descriptions.json
{ "NSLocationWhenInUseUsageDescription": "to help guide you to your destination.", "NSLocationAlwaysUsageDescription": "to track your location over time", "NSPhotoLibraryUsageDescription": "to choose a user profile photo", "NSPhotoLibraryAddUsageDescription": "to save a cool framed user photo", "NSCameraUsageDescription": "to take photos for your profile and to scan QR codes", "NSBluetoothPeripheralUsageDescription": "to find your location using bluetooth beacons.", "NSBluetoothAlwaysUsageDescription": "to find your location using bluetooth beacons.", "NSMicrophoneUsageDescription": "We use the microphone to listen for your voice instructions." }
The entries in this file will be copied into the iOS info.plist file when you complete publishing.
Android
Since Android Marshmallow (6.0), permissions are requested when the app wants to use a feature, in the same way as iOS. However, the Android Manifest is required to list all the permissions that the code will request; this is also used to show in the Play Store listing what the app will use.
Umajin Editor will generate the Android manifest file automatically when you publish, based on the Components, Actions and APIs that your app contains. If you need to add additional permissions that Umajin Editor could not automatically detect, you can add them into AndroidPermissions.txt:
android_permissions.txt
This text file in your Project /scripts folder specifies additional permissions your app may need. It’s only needed if Umajin Editor scanning didn’t detect everything automatically.
The entries in this file are added to the Android Manifest at publishing time.
Each line lists a permission to add. You can comment out lines to ignore them using #.
# Because we use the Dial Number action android.permission.CALL_PHONE
Example
# Additional android permissions required by your Javascript code # If you make API calls, callAction calls, or dynamically create components which require permissions # Actions specified within the Umajin Editor, will automatically get appropriate permissions. # Note: lines starting with hash are ignored # if you want to write to user pictures, or anywhere else outside the app's own data. # android.permission.WRITE_EXTERNAL_STORAGE # to use GPS location services, OR to use Bluetooth #android.permission.ACCESS_FINE_LOCATION #android.permission.ACCESS_COARSE_LOCATION # to use the camera (cameraCapture, cameraCodeScan) #android.permission.CAMERA # to use NFC #android.permission.NFC # to use Bluetooth or Bluetooth beacons, specify both permissions #android.permission.BLUETOOTH #android.permission.BLUETOOTH_ADMIN #android.permission.RECORD_AUDIO
MacOS
We support permissions for Camera and Sound recording (microphone) on MacOS. These are detected the same way as for iOS or Android. If somehow your app uses these features but it is not detected automatically, you can add manual permissions as for Android, above.