0.1.4 • Published 2 years ago
@robingenz/capacitor-managed-configurations v0.1.4
Maintainers
Maintainer | GitHub | Social |
---|---|---|
Robin Genz | robingenz | @robin_genz |
Installation
npm install @robingenz/capacitor-managed-configurations
npx cap sync
On Android, see Define managed configurations and follow the instructions to declare the app's managed configurations correctly.
Configuration
No configuration required for this plugin.
Usage
import { ManagedConfigurations } from '@robingenz/capacitor-managed-configurations';
const getString = async () => {
const result = await ManagedConfigurations.getString({ key: 'server_url' });
return result.value;
};
const getNumber = async () => {
const result = await ManagedConfigurations.getNumber({ key: 'server_port' });
return result.value;
};
const getBoolean = async () => {
const result = await ManagedConfigurations.getBoolean({ key: 'download_on_cellular' });
return result.value;
};
API
getString(...)
getString(options: GetOptions) => Promise<GetResult<string>>
Param | Type |
---|---|
options | GetOptions |
Returns: Promise<GetResult<string>>
getNumber(...)
getNumber(options: GetOptions) => Promise<GetResult<number>>
Param | Type |
---|---|
options | GetOptions |
Returns: Promise<GetResult<number>>
getBoolean(...)
getBoolean(options: GetOptions) => Promise<GetResult<boolean>>
Param | Type |
---|---|
options | GetOptions |
Returns: Promise<GetResult<boolean>>
Interfaces
GetResult
Prop | Type |
---|---|
value | T | null |
GetOptions
Prop | Type |
---|---|
key | string |
Test your implementation
On Android, see Set up device owner for testing and follow the instructions to set up a device owner testing environment.
On iOS, you need to install the app as a managed app using an MDM solution.
Changelog
See CHANGELOG.md.
License
See LICENSE.
0.1.4-dev.6d90d88.1659603575
2 years ago
0.1.4
2 years ago
0.1.3
3 years ago
0.1.0
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.1-dev.c7824d7.1628777862
3 years ago
0.0.1-dev.f134b64.1628628268
3 years ago