DanijelHuis / HDAugmentedReality

Augmented Reality component for iOS, written in Swift.
MIT License
480 stars 97 forks source link

Swift 4 iOS 11 Error #60

Closed mihai-salari closed 7 years ago

mihai-salari commented 7 years ago

Hi, I got this error: screen shot 2017-10-11 at 10 10 21 am

Why you updated pod but you didn't checked it works?

DanijelHuis commented 7 years ago

Hi, I always pull the pod from github and test it in demo project before I release the pod. Everything works as it should with Xcode 9 and Swift 4 project.

If you are using Swift 3 or Xcode 8 then use: pod 'HDAugmentedReality', '2.2.1'

I don't like bumping major version because of new Swift, even though it is not backward compatible.

DanijelHuis commented 7 years ago

Look at the first error you are getting, it says that AVMediaType doesn't have "video" member, but it does in Swift 4: https://developer.apple.com/documentation/avfoundation/avmediatype/1390661-video

I just tested it:

  1. Opened Xcode and created new project(Swift)
  2. Added podfile and run "pod update"
  3. Opened the workspace, imported HDAugmentedReality in ViewController.swift
  4. Build succeeded (Workspace is attached, you can test it)

Please check that your version is Swift 4 in Build Settings("Swift language version"). Attached png. Check it both for pod target and your project.

Edit: There is similar issue here: https://github.com/shogo4405/HaishinKit.swift/issues/318

Rony.zip

build_settings