Delegate

The ARDelegate protocol provides a mechanism for your application to take action on events that occur in the ARViewController(Objc). You can use these callbacks by assigning an object to the ARViewController delegate property directly or connect through Interface Builder.

  • recognizedMarker(withId markerId: Int, assetIds: [Int]) - Function will be executed when marker has been recognized;
  • recognitionTimeoutReached - Function will be executed when timeout is reached and no one marker is recognized;
  • assetClicked(with assetId: Int) - Function will be executed on click of any asset;
  • viewStateChanged(_ state: ARViewState) - Function will be executed when BearSDK Scanner has changed state;
  • didFail(withError error: BearError) - Function will be executed when an error occurs while the BearSDK is loading content.