gao0122 / ARKit-Example-by-Apple

Placing objects. This example can be downloaded from apple.com.
284 stars 87 forks source link

Issues on Xcode 9 beta 5 #8

Open jerocosta opened 7 years ago

jerocosta commented 7 years ago

Hi! Anyone has the updates to get the code working on Xcode 9 beta 5?

Thanks!

markmacau commented 7 years ago

I am very new for ARKit. After I modified code as below diff, it seems work.

ARCameraTrackingState.swift:
12d11
<     
14c13
<         switch self {
---
>       switch self {
25,26d23
<             case .initializing:
<                 return "initializing"

TextManager.swift:
139,144c139,141
<                 case .initializing:
<                     message += "initializing."
<                 }
<             case .normal:
<                 message += " normal "
<             }
---
>               }
>           case .normal: break
>           }

Utilities.swift:
18c18
<         return UIImage(ciImage: ciImage.applyingFilter("CIColorInvert"))
---
>         return UIImage(ciImage: ciImage.applyingFilter("CIColorInvert", withInputParameters: nil))
446c446
<       let points = features.__points
---
>       let points = features.points
448c448
<       for i in 0...features.__count {
---
>       for i in 0...features.count {
518c518
<       let points = features.__points
---
>       let points = features.points
524c524
<       for i in 0...features.__count {
---
>       for i in 0...features.count {

ViewController.swift:

46c46
<     var sessionConfig: ARConfiguration = ARWorldTrackingConfiguration()
---
>   var sessionConfig: ARSessionConfiguration = ARWorldTrackingSessionConfiguration()
50c50
<                 sessionConfig = ARWorldTrackingConfiguration()
---
>               sessionConfig = ARSessionConfiguration()
607c607
<         if let worldSessionConfig = sessionConfig as? ARWorldTrackingConfiguration {
---
>       if let worldSessionConfig = sessionConfig as? ARWorldTrackingSessionConfiguration {
680c680
<             self.featurePointCountLabel.text = "Features: \(cloud.__count)".uppercased()
---
>           self.featurePointCountLabel.text = "Features: \(cloud.count)".uppercased()
corneel commented 6 years ago

Thank you Mark, I adopted your changes and the app works fine for the latest XCode and ARKit.

chrisscholly commented 6 years ago

Thank you @markmacau!