Swift Version NativeScript

前端 未结 5 790
醉梦人生
醉梦人生 2020-12-30 16:27

Using NativeScript how can I run a project under iOS? I get these messages when I run tns run iOS --bundle

Webpack compilation complete. Watchin         


        
5条回答
  •  再見小時候
    2020-12-30 17:07

    The problem here seems to be Toaster (2.0.4), which appears to have been developed for Swift 3.

    I did this in order to resolve the issue:

    1. go to the main folder for the nativescript project

    2. In your bash shell, do:

      % export SWIFT_VERSION=3

    3. Then do your usual:

      % tns build ios --bundle

    4. Then open the project in Xcode:

      % cd platforms/ios

      % Open *.workspace

    You'll get a warning about a build error in the pods project and may need to set your development team, but it should work.

提交回复
热议问题