@webority-technologies/mobile-core
v0.0.19
Published
Platform layer for Webority React Native apps: HTTP clients, auth/token storage, config, logging, formatters, validators, network status, permissions, storage and version checks. No UI.
Maintainers
Readme
@webority-technologies/mobile-core
The platform layer for Webority React Native apps: HTTP clients, auth and token storage, config,
logging, formatters, validators, network status, permissions, storage, image compression and
version checks. No UI — components live in
@webority-technologies/mobile-ui.
npm install @webority-technologies/mobile-coreExternal runtime dependency: axios, and nothing else. react-native-keychain is a REQUIRED
peer, because the HTTP client reads the bearer token. Every other native peer is optional and lazily
required, so the package installs and runs without any of them.
Full documentation lives in the repository's docs/ directory.
Import paths
Anything needing a native package lives behind its own path, so an app only bundles what it imports:
import { Permissions } from '@webority-technologies/mobile-core/permissions';
import { Geolocation } from '@webority-technologies/mobile-core/geolocation';
import { openDatabase } from '@webority-technologies/mobile-core/sqlite';
import { downloadFile } from '@webority-technologies/mobile-core/download';
import { compressImage } from '@webority-technologies/mobile-core/compressor';Metro resolves requires statically, so anything reachable from the main barrel is bundled for every consumer. Keeping these off it is what makes their peers genuinely optional.
Storage and network status stay on the main barrel but load no package on their own. Wire them at
startup with setStorageImplementation and setNetworkStatusImplementation if you want them.
