<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-webxr" version="1.17.5">
    <name>WebXR</name>
    <description>WebXR Plugin</description>
    <author>Thomas Zachariah</author>
    <license>Apache 2.0</license>
    <keywords>webxr, webar, webvr, immersive web, mixed reality, xr, augmented reality, ar, virtual reality, vr, arkit, mozilla, w3c, polyfill</keywords>
    <platform name="ios">
        <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" />

        <config-file target="config.xml" parent="/widget">
            <feature name="WebXRPlugin">
                <param name="ios-package" value="WebXRPlugin" onload="true"/>
            </feature>
            <preference name="WebXRAuthorization" value="$WEBXR_AUTHORIZATION" />
            <preference name="GraphicsFramework" value="$GRAPHICS_FRAMEWORK" />
            <preference name="deployment-target" value="12.0.0" />
        </config-file>

        <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
            <string>$CAMERA_USAGE_DESCRIPTION</string>
        </config-file>

        <source-file src="XRViewer/ARKController/ARKController.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+Anchors.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+AppState.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+ARSessionDelegate.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+ARSessionObserver.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+Camera.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+Frame.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+Images.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKController+WorldMap.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/ARKControllerProtocol.swift" target-dir="ARKController" />
        <source-file src="XRViewer/ARKController/HitTestResult.swift" target-dir="ARKController" />
        
        <source-file src="XRViewer/ARKController/Metal/ARKMetalController.swift" target-dir="ARKController/Metal" />
        <header-file src="XRViewer/ARKController/Metal/Render/ShaderTypes.h" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/BlinnPhong.metal" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/BufferAllocator.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Camera.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Geometry.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Light.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Material.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/MathUtilities.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Node.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Plane.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Renderer.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Scene.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/ShaderManager.swift" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Shaders.metal" target-dir="ARKController/Metal/Render" />
        <source-file src="XRViewer/ARKController/Metal/Render/Transform.swift" target-dir="ARKController/Metal/Render" />

        <source-file src="XRViewer/ARKController/SceneKit/ARKSceneKitController.swift" target-dir="ARKController/SceneKit" />
        <source-file src="XRViewer/ARKController/SceneKit/ARSCNView+HitTest.swift" target-dir="ARKController/SceneKit" />
        <source-file src="XRViewer/ARKController/SceneKit/SCNNode+Show.swift" target-dir="ARKController/SceneKit" />
        <source-file src="XRViewer/ARKController/SceneKit/AnchorNode.swift" target-dir="ARKController/SceneKit" />
        <source-file src="XRViewer/ARKController/SceneKit/FocusNode.swift" target-dir="ARKController/SceneKit" />
        <source-file src="XRViewer/ARKController/SceneKit/PlaneNode.swift" target-dir="ARKController/SceneKit" />

        <source-file src="XRViewer/AppStateController/AppStateController.swift" target-dir="AppStateController" />
        <source-file src="XRViewer/AppStateController/AppState.swift" target-dir="AppStateController" />

        <header-file src="XRViewer/Resources/XRViewer-Bridging-Header.h" target-dir="Resources" />
        <source-file src="XRViewer/Resources/Prefix.swift" target-dir="Resources" />

        <source-file src="XRViewer/Utilities/Animator.swift" target-dir="Utilities" />
        <source-file src="XRViewer/Utilities/Constants.swift" target-dir="Utilities" />
        <source-file src="XRViewer/Utilities/Utils.swift" target-dir="Utilities" />

        <source-file src="XRViewer/WebXRPlugin.swift" />
        <source-file src="XRViewer/WebController.swift" />

        <dependency id="cordova-plugin-add-swift-support" version="^2.0.2"/>
        <dependency id="cordova-plugin-wkwebview-engine" version="^1.2.1"/>

        <hook type="before_plugin_install" src="prepare.js" />

        <resource-file src="XRViewer/Resources/webxrShim.js" target-dir="Resources" />
        <resource-file src="XRViewer/Resources/webxrPolyfill.js" target-dir="Resources" />
    </platform>
</plugin>