Scene Authoring

  • Provides the flow for authoring an AR Annotation Scene. 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.

    Usage

    SceneAuthoringView(title: "Car Engine",
                       serviceURL: URL(string: IntegrationTest.System.redirectURL)!,
                       sapURLSession: sapURLSession,
                       sceneIdentifier: SceneIdentifyingAttribute.id(IntegrationTest.TestData.sceneId)) // Alternative Scene: 20110993
        .onSceneEdit { sceneEdit in
            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 struct SceneAuthoringView : View
  • Callbacks during scene authoring

    See more

    Declaration

    Swift

    public enum SceneEditing
  • Unique attribute and its value identifiying a scene stored in SAP Mobile Services

    See more

    Declaration

    Swift

    public enum SceneIdentifyingAttribute