Skip to content

Commit

Permalink
-Swift.h (& therefore MODULE_NAME) no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
tzachari committed Sep 5, 2019
1 parent a8a1024 commit 209cf9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ The plugin provides a set of a configurable options:
- `sceneKit` (default): Uses [SceneKit](https://developer.apple.com/scenekit/)
- `metal`: Uses [Metal](https://developer.apple.com/metal/) (experimental)

- **CAMERA_USAGE_DESCRIPTION**: Describes to user why camera access is required
- Default: `This app uses the camera for augmented reality`

To set these options, specify them when adding the plugin, e.g:

cordova plugin add cordova-plugin-webxr --variable GRAPHICS_FRAMEWORK=metal
Expand All @@ -46,12 +49,6 @@ Or add them within the plugin's tag in config.xml, e.g:
<variable name="WEBXR_AUTHORIZATION" value="lite" />
</plugin>

There are also some additional parameters that can be overridden:

- **CAMERA_USAGE_DESCRIPTION**: Describes why camera access is required. Default: `This app uses the camera for augmented reality`

- **PRODUCT_MODULE_NAME**: If the Product Module Name in the iOS Target Build Settings differs from the Cordova project name (e.g. when embedding a Cordova WebView into an existing app), the module name must be passed to this variable. If omitted, the app may not build.


## NOTE: Mozilla WebXR ≠ W3C WebXR (yet)
Mozilla is in the process of aligning [their version of the API](https://github.com/mozilla/webxr-polyfill/) with the [official draft W3C spec](https://www.w3.org/TR/webxr/).
Expand All @@ -70,4 +67,4 @@ This plugin will be updated as the API stabilizes.

## Credits

This plugin is based on the source for Mozilla's WebXR Viewer ([webxr-ios@d3485fb](https://github.com/mozilla-mobile/webxr-ios/tree/d3485fb65fae52bcfb925cf5feeecca0f66f6f47))
This plugin is based on the source for Mozilla's WebXR Viewer ([webxr-ios@c91decb](https://github.com/mozilla-mobile/webxr-ios/tree/c91decbecd11b0691f974fb5edc80a06b62cec11))
1 change: 0 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<preference name="CAMERA_USAGE_DESCRIPTION" default="This app uses the camera for augmented reality"/>
<preference name="WEBXR_AUTHORIZATION" default="minimal" />
<preference name="GRAPHICS_FRAMEWORK" default="sceneKit" />
<preference name="PRODUCT_MODULE_NAME" default=" " />

<config-file target="config.xml" parent="/widget">
<feature name="WebXRPlugin">
Expand Down
6 changes: 0 additions & 6 deletions prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ const fs = require( 'fs' );
const path = require( 'path' );

module.exports = function( ctx ) {
var CP = ctx.requireCordovaModule('cordova-common/src/ConfigParser/ConfigParser');
var rootDir = path.join( ctx.opts.plugin.dir, 'XRViewer' );

var projectName = ctx.opts.plugin.pluginInfo.getPreferences( 'ios' ).PRODUCT_MODULE_NAME;
if ( projectName == " " ) {
projectName = new CP( path.join( ctx.opts.projectRoot, 'config.xml' ) ).name();
}

var replaceInDir = dir => {
fs.readdirSync( dir ).forEach( f => {
Expand Down

0 comments on commit 209cf9c

Please sign in to comment.