tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
83.78k stars 2.51k forks source link

[ios] enable specific framework usage #9204

Open dignifiedquire opened 7 months ago

dignifiedquire commented 7 months ago

I am trying to build an ios version of my tauri app, which uses https://docs.rs/system-configuration. This fails with

Undefined symbols for architecture arm64:
  "_SCDynamicStoreCopyProxies", referenced from:
      system_configuration::dynamic_store::SCDynamicStore::get_proxies::h2d6ce7ba00ed1fce in libapp.a(system_configuration-07ca0bebaffd1b05.system_configuration.61a651945613f0b0-cgu.0.rcgu.o)
<...>

because the system configuration framework needs to be enabled when linking. I have not found a way to do this though through the configuration. Any pointers would be appreciated.

matheus23 commented 5 months ago

In src-tauri/gen/apple/project.yml, add - sdk: SystemConfiguration.framework under targets.<your-app>_iOS.settings.base.

dignifiedquire commented 2 weeks ago

That wasn't enough, need to add it manually to the xcode project using cargo tauri ios open