Errors occurred while compilation of ARKit Placing objets demo in xcode9 beta version on simulator

Hi. I have downloaded the Xcode9.0 Beta version and i downloaded the "Placing Objects" and i tried to build it on simulator. But it is giving 3 errors in compile time only. 1. Nil is not compatible with expected argument type '[String : Any]' 2&3.Switch must be exhaustive

Replies

Maybe you should try on a device. Not much point of using ARKit in the Simulator anyway.

Same here

I'll try that. Thank you 🙂

The Simulator doesn't have a camera, so trying to get ARKit to work on the Simulator is never going to be worth trying.

I tried on my device (not the simulator) but I have the same errors

Yes. I also tried. Same errors.

For error 1:

the signature for the

CIImage applyingFilter(_:withInputParameters:)
method changed as of iOS 11, so change your code to:
extension UIImage {
     func inverted() -> UIImage? {
          guard let ciImage = CIImage(image: self) else {
               return nil
          }
          return UIImage(ciImage: ciImage.applyingFilter("CIColorInvert", parameters: [:]))
          }
}


For problems 2 and 3:

Just use xcode to fill in the extra switch statements and create blank messages (or whatever you want). Ex:

case .initializing: message += "Initializing."

Thank you. It worked. I am able to see and place the objects.

https://forums.developer.apple.com/message/246350#246350