NextLevel / NextLevel

⬆️ Media Capture in Swift
http://nextlevel.engineering
MIT License
2.19k stars 271 forks source link

Configuring ARKit with Swift Package Dependency #254

Open BoazTelem opened 3 years ago

BoazTelem commented 3 years ago

Hi Guys!

I am using the NextLevel framework as a Swift Package Dependency in order to enable the ARKit I have added the compiler flag: USE_ARKIT

I can see that it works within project but the flag is not passed to the Swift Package Dependency when complaining the whole project.

I have noticed that in the documentation it's mentioned that if you use POD you should further do this:

_If you use Cocoapods, you can include -D USE_ARKIT or -D USE_TRUEDEPTH with the following Podfile addition or by adding it to your Xcode build settings.

  installer.pods_project.targets.each do |target|
    # setup NextLevel for ARKit use
    if target.name == 'NextLevel'
      target.build_configurations.each do |config|
        config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '-DUSE_ARKIT']
      end
    end
  end

My question is what I need to do to enable this flag when using Swift Package Dependency?

BoazTelem commented 3 years ago

@piemonte - Patrick maybe you know?