@@ -67,68 +67,6 @@ The `cleanup_exclude_files` array in the config file allows you to specify files
6767before bundling. This is useful for removing files like logs or other temporary files that aren't required for your app
6868to function and bloat your downloads.
6969
70- ## Permissions
71- In general, the app stores don't want your app to have permissions (a.k.a entitlements) it doesn't need.
72-
73- By default, all optional permissions are disabled.
74-
75- You may enable the features you intend to use simply by changing the value of the appropriate permission to ` true ` :
76-
77- ``` php
78- 'permissions' => [
79- 'biometric' => false,
80- 'camera' => false,
81- 'location' => false,
82- 'microphone' => false,
83- 'microphone_background' => false,
84- 'network_state' => true,
85- 'nfc' => false,
86- 'push_notifications' => false,
87- 'storage_read' => false,
88- 'storage_write' => false,
89- 'scanner' => false,
90- 'vibrate' => false,
91- ],
92- ```
93-
94- For iOS, this will provide a sensible default description.
95-
96- ### Custom permission descriptions
97-
98- For iOS, it's possible to define custom permission descriptions. In most cases, you are required to provide clear
99- reasons why your app needs certain permissions. You can do this easily from the config file:
100-
101- ``` php
102- 'permissions' => [
103- 'biometric' => 'Access to the biometric sensor is needed to secure user resources',
104- //...
105- ],
106- ```
107-
108- ### Available permissions
109-
110- - ` biometric ` - Allows your application to use fingerprint or face-recognition hardware (with a fallback to PIN code)
111- to secure parts of your application.
112- - ` camera ` - Allows your application to request access to the device's camera, if present. Required for taking photos and
113- recording video. Note that the user may deny access and any camera functions will then result in a no-op.
114- - ` nfc ` - Allows your application to request access to the device's NFC reader, if present.
115- - ` push_notifications ` - Allows your application to request permissions to send push notifications. Note that the user
116- may deny this and any push notification functions will then result in a no-op.
117- - ` location ` - Allows your application to request access to the device's GPS receiver, if present. Note that the user
118- may deny this and any location functions will then result in a no-op.
119- - ` vibrate ` - In modern Android devices this is a requirement for most haptic feedback.
120- - ` storage_read ` - Grants your app access to read from device storage locations. This is not required for basic app file manipulation.
121- - ` storage_write ` - Allows your app to write to device storage. This is not required for basic app file manipulation.
122- - ` microphone ` - Allows your application to request access to the device's microphone, if present. Required for audio
123- recording functionality. Note that the user may deny access and any microphone functions will then result in a no-op.
124- - ` microphone_background ` - Allows your application to request access to the device's microphone, if present. Required
125- for audio recording functionality. Note that the user may deny access and any microphone functions will then result in
126- a no-op.
127- - ` scanner ` - Allows your application to scan QR codes and barcodes. Note that the user may deny camera access and any
128- scanning functions will then result in a no-op.
129- - ` network_state ` - Allows your application to access information about the device's network connectivity status. This
130- permission is enabled by default as it's commonly needed for basic network state detection.
131-
13270## Orientation
13371
13472NativePHP (as of v1.10.3) allows users to custom specific orientations per device through the config file. The config
@@ -173,3 +111,40 @@ Once you've published an app with iPad support, it cannot be undone. If you wish
173111will need to change your ` NATIVEPHP_APP_ID ` and publish the app under a new App Store listing.
174112
175113</aside >
114+
115+ ## Android SDK Versions
116+
117+ The ` android ` section of your config file lets you control which Android SDK versions are used when building your app.
118+ These are nested under the ` android ` key in ` config/nativephp.php ` :
119+
120+ ``` php
121+ 'android' => [
122+ 'compile_sdk' => env('NATIVEPHP_ANDROID_COMPILE_SDK', 36),
123+ 'min_sdk' => env('NATIVEPHP_ANDROID_MIN_SDK', 33),
124+ 'target_sdk' => env('NATIVEPHP_ANDROID_TARGET_SDK', 36),
125+ ],
126+ ```
127+
128+ - ` compile_sdk ` - The SDK version used to compile your app. This determines which Android APIs are available to you
129+ at build time. (default: ` 36 ` )
130+ - ` min_sdk ` - The minimum Android version your app supports. Devices running an older version won't be able to install
131+ your app. (default: ` 33 ` , Android 13)
132+ - ` target_sdk ` - The SDK version your app is designed and tested against. Google Play uses this to apply appropriate
133+ compatibility behaviors. (default: ` 36 ` )
134+
135+ You can also set these via environment variables:
136+
137+ ``` dotenv
138+ NATIVEPHP_ANDROID_COMPILE_SDK=36
139+ NATIVEPHP_ANDROID_MIN_SDK=33
140+ NATIVEPHP_ANDROID_TARGET_SDK=36
141+ ```
142+
143+ <aside >
144+
145+ Most apps won't need to change these defaults. Only adjust them if you have a specific reason, such as supporting
146+ older devices or targeting a newer API level. Always ensure that ` compile_sdk ` >= ` target_sdk ` >= ` min_sdk ` .
147+
148+ The lowest supported ` min_sdk ` is ` 29 ` (Android 10). Setting it lower than this is not supported.
149+
150+ </aside >
0 commit comments