NativeScript Plugin project implemented with the ia.de AppSDK services.
The plugin implementation is based on the native AppSDK libraries developed by the ia.de team with Kotlin and Swift.
These native libraries offer both checkout services as well as view components in order to ensure seamless integration with any client setup.
Public API Reference: https://ihreapotheken.github.io/docs/appsdk/nativescript
The library is supported on both of the major mobile operating systems, with constraints noted below:
30362.1.08.12.31516.05.9For official reference, please see the NativeScript SDK documentation on using plugins.
package.json fileThe library is accessed from Github NPM Package Registry.
Firstly, the location must be defined in your app's .npmrc file, located in the root of your project:
@ihreapotheken:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT
Make sure to replace YOUR_GITHUB_PAT with the actual value of your Github Personal Access Token.
Afterwards, the library can be installed from the command line:
npm install @ihreapotheken/ia-sdk@VERSION_NUMBER
The VERSION_NUMBER value can be referenced from the
package release page.
Add the following keys to your Info.plist file:
NSLocationWhenInUseUsageDescription
Used to show pharmacies nearby.
NSCameraUsageDescription
Camera access is needed for prescription upload.
| Permission | Key | Purpose |
|---|---|---|
| Location (When In Use) | NSLocationWhenInUseUsageDescription |
Find nearby pharmacies |
| Camera | NSCameraUsageDescription |
Upload prescriptions via camera |
In the host app references.d.ts file, a reference path is appended in order for the host app to access the library typings:
/// <reference path="./node_modules/@ihreapotheken/ia-sdk/references.d.ts" />
Methods and properties made available as public APIs implemented with the IaSdk object.
The client setup requires instantiation of this object for usage:
import { IaSdk } from '@ihreapotheken/ia-sdk/common';
export class MyAppClass {
iaSdk = new IaSdk();
}
You may then proceed with API usages on this object:
async initialize() {
try {
await this.iaSdk.initIaSdk(
"c33b7d2757ff7b24613b78c9dc69950aad1588c8d519706fb69b91fcedec65d7",
"5004",
IaSdkBase.ServerEnvironment.Staging,
);
} catch (error) {
console.error("Init failed:", error);
}
}
The host app developers must ensure the accessKey and clientId values are updated according to their specific setup.
For more information, please reach out to the ia.de development team.
For further information, please see the API reference and Usage and Testing documentation.