Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run in release mode, compile error report Undefined symbol: _rust_greeting #22

Closed
Aaron009 opened this issue Feb 4, 2021 · 1 comment

Comments

@Aaron009
Copy link

Aaron009 commented Feb 4, 2021

dart-archive/ffi#75

@brickpop
Copy link
Owner

brickpop commented Feb 4, 2021

There are two points here.

First

NOTE: By default, XCode will skip bundling the libexample.a library if it detects that it is not being used. To force its inclusion, add dummy invocations in SwiftMylibPlugin.swift that use every single native function that you use from Flutter:

The workaround on the Readme will get you around the fact that XCode strips unused symbols (from the Swift perspective, ignoring Dart invications).

Second

Even this trick will not suffice with the latest version of XCode, so there is another issue to track this:
#16 (comment)

Closing as duplicate of #16

@brickpop brickpop closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants