Skyost/RateMyApp

iOS builds fail if Swift is not set up

amasciulx opened this issue · 1 comments

Describe the bug
iOS builds fail to link if Swift has not been set up for iOS.

The obvious workaround is to set up Swift. A disclaimer informing of that limitation in README.md would certainly help. Making the library Objective-C compatible would be even better, since a lot of Flutter projects don't need Swift.

To Reproduce
Steps to reproduce the behavior:

  1. Create a brand new project with only Objective-C support in iOS
  2. run flutter build ios --debug
  3. Build fails with the following trace:
    Undefined symbols for architecture x86_64:
      "value witness table for Builtin.UnknownObject", referenced from:
          full type metadata for __C.UIApplicationOpenExternalURLOptionsKey in librate_my_app.a(SwiftRateMyAppPlugin.o)
          full type metadata for rate_my_app.SwiftRateMyAppPlugin in librate_my_app.a(SwiftRateMyAppPlugin.o)
      "__swift_FORCE_LOAD_$_swiftCompatibility51", referenced from:
          __swift_FORCE_LOAD_$_swiftCompatibility51_$_rate_my_app in librate_my_app.a(SwiftRateMyAppPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility51_$_rate_my_app)
      "__swift_FORCE_LOAD_$_swiftCoreAudio", referenced from:
          __swift_FORCE_LOAD_$_swiftCoreAudio_$_rate_my_app in librate_my_app.a(SwiftRateMyAppPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreAudio_$_rate_my_app)
      "__swift_FORCE_LOAD_$_swiftCoreImage", referenced from:
          __swift_FORCE_LOAD_$_swiftCoreImage_$_rate_my_app in librate_my_app.a(SwiftRateMyAppPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreImage_$_rate_my_app)
  
    ...

I think a lot of Flutter native packages are relying on Swift right now, so it is really advised to build your projects with Swift. But I may consider adding a note about that in the README, yes.