Emre Önder
Emre Önder

Reputation: 2537

Unable to run the session when trying to run ARKit Test

I'm trying to figure out how ARKit works. Therefore, I download a two different project from GitHub.

1-)https://github.com/brianadvent/Simple-ARKit-Game

2-)https://github.com/exyte/ARTetris

Both of them I'm getting " Unable to run the session, configuration is not supported on this device: " error. I'm running latest version of betas both in Xcode and iOS.

Edit: I have this code in Viewcontroller. Shouldn't It work?

private func getSessionConfiguration() -> ARSessionConfiguration {
    if ARWorldTrackingSessionConfiguration.isSupported {
        // Create a session configuration
        let configuration = ARWorldTrackingSessionConfiguration()
        configuration.planeDetection = .horizontal
        return configuration;
    } else {
        // Slightly less immersive AR experience due to lower end processor
        return ARSessionConfiguration()
    }
}

Upvotes: 1

Views: 993

Answers (1)

Marcel T
Marcel T

Reputation: 657

You have to change the Variable ARWorldTrackingSessionConfiguration which is set as configuration in both Projects to a normal ARSessionConfiguration. Consider, that if you are doing that, you can only get the Orientation of the device and not its Position in the real World! So it could might be, that the applications are not working proberly. You could also change to another Device, which supports the ARWorldTrackingSessionConfiguration then everything should be fine, but the iPhone 6 for example cant do that.

As karthik mentioned only 6s and 6s plus , 7 and 7s plus support the WorldTracking Configuration. It is also working on iPad (5th. Gen.) AFAIK.

Update: I think the Problem is, that the iPhone 6 just has a A8 processor. The ARKit Module has an important notice which says:

Important ARKit requires an iOS device with an A9 or later processor.

To make your app available only on devices supporting ARKit, use the arkit key in the UIRequiredDeviceCapabilities section of your app's Info.plist. If augmented reality is a secondary feature of your app, use the isSupported property to determine whether the current device supports the session configuration you want to use.

If you look at the Simple-ARGame you can see, that the Touches will be listened but are computed extremely slow. I looked at an Technical Dokumentation of the iPhone 6 where it says, that it only has an A8 processor. So probably you have to test ARKit with another Device.

Upvotes: 3

Related Questions