Skip to content
Lucent
SEARCH LUCENT

Search guides, APIs, and examples.

GitHub

Very early and experimental. The language, the generated native code and every package API change without notice. Do not use Lucent in production.

Add permissions and native config

Android permissions come from the SDK; iOS usage descriptions go in Info.plist or app.json.

WhatAndroidiOS
permissions an SDK method needsadded for you, from the SDK's @RequiresPermissionan Info.plist usage description, which you add
other permissions and entriesthe app's AndroidManifest.xmlthe app's Info.plist
asking at run timerequestPermissions from lucent:android, or PermissionsAndroid in JavaScriptthe SDK from Lucent, such as requestWhenInUseAuthorization

When a module calls a method the SDK marks with @RequiresPermission, lucent build adds that permission to the native package's manifest. Android merges it into the app's. Location, network state, vibration and biometrics work this way.

app.json
{
"expo": {
"ios": {
"infoPlist": {
"NSLocationWhenInUseUsageDescription": "Shows where you are on the map."
}
}
}
}

Rebuild the app after changing either file. iOS shows a permission prompt only when the app gives the reason for it.