Other Classes

The following classes are available globally.

  • Provides the flow for authoring an AR Annotation Scene using UIKit. Used to create the content for the cards, select an anchor Image, and position the entities in their real world locations. Publishing the scene using Mobile Services with an SAPURLSession. The onSceneEdit modifier provides a callback on editing events. When a scene was published, i.e. created or updated in SAP Mobile Services, then .published(sceneID) is called and returns the technical id of the scene. Note: Push onto a navigation stack, modal presenting not supported

    Usage

    // Use navigationController?.pushViewController()
    // Modal presenting not supported
    @objc func presentSceneAuthoringAction(sender: UIButton) {
        let sceneAuthoringController = SceneAuthoringController(title: "Annotations",
                                                                serviceURL: URL(string: IntegrationTest.System.redirectURL)!,
                                                                sapURLSession: self.sapURLSession,
                                                                sceneIdentifier: SceneIdentifyingAttribute.id(IntegrationTest.TestData.sceneId),
                                                                onSceneEdit: onSceneEdit)
        self.navigationController?.pushViewController(sceneAuthoringController, animated: true)
    }
    
    func onSceneEdit(sceneEdit: SceneEditing) {
        switch sceneEdit {
        case .created(card: let card):
            print("Created: \(card.title_)")
        case .updated(card: let card):
            print("Updated: \(card.title_)")
        case .deleted(card: let card):
            print("Deleted: \(card.title_)")
        case .published(sceneID: let sceneID):
            print("From SceneEdit:", sceneID)
        }
    }
    
    See more

    Declaration

    Swift

    public class SceneAuthoringController : UIHostingController<AnyView>