{"id":16625436,"url":"https://github.com/chiliz/nativescript-wikitude","last_synced_at":"2026-01-06T05:03:49.843Z","repository":{"id":46693144,"uuid":"189252269","full_name":"chiliz/nativescript-wikitude","owner":"chiliz","description":"NativeScript plugin for Wikitude Augmented Reality","archived":false,"fork":false,"pushed_at":"2022-12-09T04:30:22.000Z","size":95444,"stargazers_count":1,"open_issues_count":8,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T05:02:32.475Z","etag":null,"topics":["android","camera","ios","nativescript","wikitude","wikitude-ar"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chiliz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-29T15:28:27.000Z","updated_at":"2024-05-30T17:18:57.000Z","dependencies_parsed_at":"2023-01-25T16:16:29.064Z","dependency_job_id":null,"html_url":"https://github.com/chiliz/nativescript-wikitude","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiliz%2Fnativescript-wikitude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiliz%2Fnativescript-wikitude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiliz%2Fnativescript-wikitude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiliz%2Fnativescript-wikitude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chiliz","download_url":"https://codeload.github.com/chiliz/nativescript-wikitude/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245401377,"owners_count":20609163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","camera","ios","nativescript","wikitude","wikitude-ar"],"created_at":"2024-10-12T04:05:37.839Z","updated_at":"2026-01-06T05:03:44.813Z","avatar_url":"https://github.com/chiliz.png","language":"TypeScript","readme":"# nativescript-wikitude\n\n##### This is a fork of [@breningham/nativescript-wikitude](https://github.com/breningham/nativescript-wikitude) that has been unfortunately inactive.\n\n[![npm version](https://badge.fury.io/js/nativescript-wikitude-chiliz.svg)](http://badge.fury.io/js/nativescript-wikitude-chiliz)\n\n[![NPM](https://nodei.co/npm/nativescript-wikitude-chiliz.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/nativescript-wikitude-chiliz/)\n\nProvides nativescript access to Wikitude AR (9.1.0 on Android and 9.0.0 on iOS).\n\n## Prerequisites / Requirements\n\n### Permissions\n\nBefore you can use this plugin you should ensure your application has permissions for Camera and Location, for an easy way to do this on both android and ios, you can make use of this plugin [@spartadigital/nativescript-permissions](https://bitbucket.org/SD-CLIENTPROJ/nativescript-permissions)\n\n### Running the Demo\n\nWe include a very basic AR Sample in the Demo app,\n\nbut if you want to check something a bit more advanced from [wikitude examples](https://github.com/Wikitude/wikitude-sdk-samples) and place them in [`demo/app/wikitude`](demo/app/WikitudeExamples)... Then update the URL Reference in either the `items.component.ts` for Nativescript-angular or the `main-view-model.ts` in Regular Nativescript.\n\nand then go and grab a Trial License from [Wikitude's Website](http://www.wikitude.com/developer/licenses) and place it in [`demo/app/main-view-model.ts`](demo/app/main-view-model.ts) on line 13\n\n## Installation\n\nto install for your project you can use :\n\n```javascript\ntns plugin add nativescript-wikitude\n```\n\nfor Nativescript Angular Projects you will need to import the Element in your `app.component.ts`\n\n```javascript\nimport { Wikitude } from \"nativescript-wikitude\";\n// ...snip....\nregisterElement(\"Wikitude\", () =\u003e Wikitude);\n```\n\nand then in your `ar.component.html` :\n\n```html\n\u003cWikitude\n  [url]=\"WikitudeURL\"\n  (WorldLoaded)=\"onWorldLoaded($event)\"\n  (JSONReceived)=\"onJSON($event)\"\n\u003e\n\u003c/Wikitude\u003e\n```\n\nand in your `ar.component.ts`:\n\n```javascript\n    import { Wikitude } from 'nativescript-wikitude';\n\n    // ...snip...\n\n    WikitudeInstance: Wikitude;\n    WikitudeURL: string = \"~/wikitude_world/index.html\";\n\n    onWorldLoaded($event) {\n        this.WikitudeInstance = $event.owner; // or you can use Angular's ViewChild\n    }\n\n    onJSON($event) {\n        console.log(JSON.stringify($event.data));\n    }\n\n    // ...snip...\n```\n\nand somewhere in your application you will need to define the wikitude license, you can get one from wikitude (free trial license)\n\n```javascript\n    (global as any).wikitudeLicense: string = \"YOUR_LICENSE_KEY_HERE\"\n```\n\nAnd Voila! you have Wikitude AR working in your Nativescript Application!\n\n## Usage\n\n### using your own location provider\n\nby default this plugin has a basic Location Provider, if this does not suit your purpose, you can disable it once it is fully loaded, with the following code :\n\n```javascript\n\n    onWorldLoaded($event) {\n        this.WikitudeInstance = $event.owner; // or you can use Angular's ViewChild\n        this.WikitudeInstance.disableLocationProvider();\n    }\n\n```\n\nOnce Disabled, Geo-location based AR will not work unless you provide your own location, this can be achieved with the following\n\n```javascript\nthis.WikitudeInstance.setLocation({ latitude, longitude, altitude, accuracy });\n```\n\nthis is useful if you want a single location state.\n\nonce you have disabled it you can re-enable it with the following :\n\n```javascript\nthis.WikitudeInstance.enableLocationProvider();\n```\n\n## TODO\n\n- Plugins API Exposure, not sure how to go about this, Wikitude allows Plugins, built in CPP to be used, and linked using their Plugin's API (an Example of a plugin would be face recognition). I'm unsure how to go about allowing users to do this. any advice would be appreciated...\n- Detecting if Device needs Calibration: Currently being held back by Android causing a crash when i try to listen to this event.\n- Camera Events: Could be useful for the Developer to check for the Camera Open, Closed, and any Crashes.\n- a better way to set the Wikitude LicenseKey and Required Features.\n\n## API\n\n### Properties\n\n| Property | Default value                                                                      | Description                                                             |\n| -------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |\n| url      | `\"\"`                                                                               | the URL of the Wikitude \"ARWorld\"                                       |\n| features | `Features.ImageTracking | Features.InstantTracking | ObjectTracking | GeoTracking` | The Required Features you need, this is _experimental_ and may not work |\n\n### Functions\n\n| Function                  | Arguments                                                                     | Description                                                                              |\n| ------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |\n| setLocation()             | `{ latitude: number, longitude: number, altitude: number, accuracy: number }` | sets the location in the ARWorld                                                         |\n| hasFeature()              | `feature : number`                                                            | checks if your device can support said features (or if your license supports it)         |\n| loadUrl()                 | `url: string`                                                                 | loads the URL in the Wikitude WebView                                                    |\n| reload()                  |                                                                               | reloads the current Wikitude WebView                                                     |\n| clearCache()              |                                                                               | clears the wikitude Cache                                                                |\n| toggleFlash()             |                                                                               | Toggles the Devices Flash-light                                                          |\n| switchCamera()            |                                                                               | switches the Camera that wikitude uses                                                   |\n| captureScreen()           | `captureWebViewContent: boolean`                                              | captures the current view, can also capture the webview content                          |\n| disableLocationProvider() |                                                                               | disables the location Provider (you will need to provide your own for GEO/POI's to work) |\n| enableLocationProvider()  |                                                                               | enables the location Provider                                                            |\n\n### Events\n\n| Event                | Description                                         | Type                            |\n| -------------------- | --------------------------------------------------- | ------------------------------- |\n| WorldLoadSuccess     | Fires when the ARWorld Loads Successfully           | `WorldLoadSuccessEventData`     |\n| WorldLoadFail        | Fires if an Error Occurs while loading the AR World | `WorldLoadFailedEventData`      |\n| JSONReceived         | Fires when the ARWorld sends a JSON Object          | `JSONReceivedEventData`         |\n| ScreenCaptureSuccess | fires when the screen is captured                   | `ScreenCaptureSuccessEventData` |\n| ScreenCaptureFail    | fires when wikitude fails to capture the screen     | `ScreenCaptureFailedEventData`  |\n\nall can be imported from the index.d.ts.\n\n## License\n\nWikitude is (c) Wikitude GmbH Before using see their [End-User License Agreement](http://www.wikitude.com/doc/EULA_Wikitude_1.1.pdf)\n\nApache License Version 2.0, January 2004\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiliz%2Fnativescript-wikitude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchiliz%2Fnativescript-wikitude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiliz%2Fnativescript-wikitude/lists"}