This repository holds the sample source code for an iOS app which displays 3D models in Augmented Reality, and Virtual 360° images managed in Oracle Content Management. This is a companion app to a custom-built Oracle Content Management site.
Please see the complete solution article.
Source code may be obtained from Github:
git clone https://github.com/oracle-samples/oce-ios-arvr-sample
Open the project file, ARDemo.xcodeproj
.
Select an appropriate iOS target and click the Run button.
When you run on-device, the application is intended to be used by scanning an on-screen QR code from an Oracle Content Management web page. The instance URL and content identifiers are passed along as part of QR code, so no additional configuration is necessary.
When you run on the simulator, the camera is unavailable so QR codes may not be scanned. However, you may click the gear icon in the top right to display two additional (simulator-only) buttons to preview a 3D mug and view a 360 degree panorama image. Just keep in mind that you must supply some parameters so that data may be retrieved from your Oracle Content Management instance.
Open the file DemoParameters.swift
and provide values that correspond to your Oracle Content Management instance and published assets:
{
"scheme": "https",
"host": "oce.example.com",
"channelToken": "",
"mugAssetID": "",
"mugDecalID": "",
"panoramaAssetID": ""
}
scheme
- will always be "https"host
- the host (and optional port) for your Content Management instacechannelToken
- the token associated with the location to which assets have been publishedmugAssetID
- the identifier of structured content representing the coffee mugmugDecalID
- the identifier of the image asset that will be applied to the mugpanoramaAssetID
- the identifier of the structured content representing the 360 degree panorama to display
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.
Please consult the security guide for our responsible security vulnerability disclosure process.
Copyright (c) 2023 Oracle and/or its affiliates and released under the Universal Permissive License (UPL), Version 1.0