Swift and scriptingbridge object initialization

前端 未结 4 1940
天命终不由人
天命终不由人 2021-02-03 14:45

I\'m trying to write an application for swift control iTunes. But when initializing the application returns an object of type AnyObject, but must iTunesApplication.

4条回答
  •  不思量自难忘°
    2021-02-03 15:33

    I wrote a Python script to generate Scripting Bridge headers and then automatically make a native Swift version. That way you don't have to deal with writing full wrappers or even using a Bridging Header. Also, no worry of Linker Errors because it's completely in Swift. https://github.com/garrett-davidson/SwiftingBridge/

提交回复
热议问题