Start a new topic

iOS Not enabling camera on first run

I have inherited an older iOS app that uses Wikitude.  I was able to update from version 4 up to version 7 but am running into an issue where the first time I load the ViewController object that contains the Wikitude logic the camera never turns on.  If I close the view and then reload it, it works fine after that.  Also, if it's the first time running the app, it will prompt to use the Camera in an Dialog and if I select yes, that interrupt does cause the camera to work as well.


As far as I can tell we are following all of the setup instructions here including a ViewController class nearly identical.

http://www.wikitude.com/external/doc/documentation/latest/ios/setupguideios.html


I also did some digging and found the GitHub sample project:

https://github.com/Wikitude/wikitude-sdk-basic-projects


I can't run that project on my iPad because it says iOS 10 is not supported.  I believe this is because that project is using Wikitude version 6.  When I drop in my Wikitude version 7 WikitudeSDK.framework, it also has the same no camera problem on every launch after the initial which prompts to use the Camera.


Has anyone run into this?  Are there any plans to update that Github sample using the latest Wikitude SDK?


Thanks,
Jeff

1 Comment

Hi Jeff,

With SDK 7 we introduced a new API to specifically request access to e.g. the camera. Please have a look at our example application on how to use it. In short, we use it to request access for all restricted APIs and once this is done, we allow the transition to the view controller which manages the WTArchitectView.

Otherwise it's important that the `-start:completion:` method is called. A call to this method starts the camera and rendering.Usually you would call this in `-viewWillAppear:` `-viewDidAppear:` (Is the WTArchitectView nil the first time you hit `-start:complection:`?).


Is your view controller the initial view controller or one that is presented at a later point in time?


The best place for examples on how to use our API is our example application that is included in the download package. 


Please let me know how it is going with the new information.


Best regards,

Andreas


 

Login or Signup to post a comment