Skip to content

iOS builds fail if Swift is not set up #90

@amasciulx

Description

@amasciulx

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)
  
    ...

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions