Skip to content

Dioxus 0.7.3 serving iOS mobile on Intel Mac fails #5266

@petewatts

Description

@petewatts

Problem

Attempting to run dx serve --ios using dioxus 0.7.3 on an Intel Mac fails. I admit i'm completely new to rust and dioxus so no doubt it's something I'm doing wrong, but I just can't figure out what. Originally was trying to get it working with fullstack after following the examples, but reduced it to just mobile with no fullstack and still can't build. Many months ago I tried getting this working with Dioxus the previous 0.6.3 version but no luck there either.

Running dx serve --ios --verbose with the vanilla/basic app returns these errors:

18:43:43 [dev] Executing cargo for ios using x86_64-apple-ios 
18:44:48 [cargo] error: linking with `cc` failed: exit status: 1
  |
  = note:  "cc" "/var/folders/zd/pv6bp7fn5xv63nplfqsxgh4r0000gn/T/rustcvGmkr5/symbols.o" "<71 object files omitted>" "/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/deps/{libdioxus-e95ed9e4984963c5,libmanganis-fcb056b6b1703a71,libmanganis_core-d0b9f87a1a448bc7,libwinnow-da04c81c1b90313e,libconst_serialize-ef2e9c159e02fc16,libconst_serialize-b56e6f4540cbd94f,libdioxus_config_macros-13079189554be53c,libdioxus_desktop-c2b0b053ecff6c08,libdioxus_asset_resolver-185d552b8d32bd66,libinfer-710d8c33616b2f51,libcfb-7e9bb1948a5a125a,libuuid-90e71c481ba7470b,libfnv-4bf22e483769a0c4,libbyteorder-bc85eece39fdbd51,libsubtle-7ee1ab3c355ff919,libobjc_id-ec5ab11e29366859,libwebbrowser-a1430cd63c872da7,libbase64-f85634d3bb08bb17,libtokio-13fa825f93602505,libdioxus_interpreter_js-47aec2fed81665e3,libsledgehammer_utils-30646d2aca133f7b,librustc_hash-aba3644d75c6555c,libsledgehammer_bindgen-0d13e80058950744,libobjc-7239382279133200,libmalloc_buf-7ed13044b1757d71,libsignal_hook-49d52fe008104029,libsignal_hook_registry-c717951e19ba7b17,liberrno-b93f9e6458ff5424,libwry-314d952908fb3fb6,libdirs-4aa7171978896712,libdirs_sys-6b0def5bf8739ba7,liboption_ext-23b88f73f21f9727,libcookie-80ddfc51ecb05671,libtime-ba2952bc63a69cd0,libtime_core-9fd695491f32d56b,libnum_conv-6963121f87287ee0,libderanged-2b2f3efab93d6abb,libpowerfmt-24fea214853b9337,libobjc2_ui_kit-68f0986a07134c7a,libobjc2_web_kit-4998bb9590c066b4,libblock2-c84376045d03dbdc,libobjc2_foundation-8449bc881bc95333,libobjc2_core_foundation-d2087d1a763aa7e4,libtao-0464a3774d5c4580,liburl-a311f092591ad7ed,libidna-f69386ad67b43daf,libutf8_iter-9494e31abf86114e,libidna_adapter-0e7ba04ebe7fe921,libicu_properties-b76f3515a3f97750,libicu_properties_data-1eadbb919cf2ca31,libicu_normalizer-4d89d8e3de817d68,libicu_normalizer_data-6ca17b163267154b,libicu_collections-788e596735c4805f,libpotential_utf-c0a810a7198abbf5,libicu_provider-591c9b51fe8bd48e,libicu_locale_core-5d665c3b885bab23,libtinystr-d3e9b84292c493b7,liblitemap-fd6d33665139ab73,libwriteable-af51fb4890f262a3,libzerovec-68d503956d5b5ac7,libzerotrie-0d32065d0924eaff,libyoke-5d319c819ef2306c,libstable_deref_trait-0cbfca31a02baf19,libzerofrom-f649b4246826464a,libform_urlencoded-9405f4853588a780,libpercent_encoding-21d608d054747025,libcrossbeam_channel-3e70ae9492f4389a,libcrossbeam_utils-43bc449d2d6964cf,libdpi-6a5b0af10e2ec967,libraw_window_handle-e1330b7ce374aae3,libraw_window_handle-d8db8781ec00b4e5,libobjc2-00dd22cef812b1cb,libobjc2_exception_helper-839c65720495c4d4,libobjc2_encode-65788a7ec0613f45,libdioxus_devtools-ecedc20844bff109,libtungstenite-e193091205b04165,libdata_encoding-3c9c64c7c1dff2c0,librand-fd416d8270fed659,librand_chacha-7d09415868dfcb25,libppv_lite86-fa6735f21c8a53d6,libzerocopy-655a30514881bf9b,librand_core-0d0e0325345bf2dc,libgetrandom-5ddcedfbd9f57027,libnative_tls-2fb7d3727278c0cb,libsecurity_framework-6f66b4da081a3e4b,libsecurity_framework_sys-a1274995a191462a,libcore_foundation-2abb617f1917f63b,libcore_foundation_sys-666d74d4ac2e56bb,libutf8-0369fc4a126e5b46,libsha1-66ff1a48cb57ba6a,libcpufeatures-16dc17f36602d71e,libdigest-b2231b2cf10cc888,libblock_buffer-7014b494590c9a0c,libcrypto_common-bb6817b66ad912d1,libgeneric_array-33b34e8c3f2050bf,libtypenum-814da6a5e0ecf86a,libhttparse-b80ac9303a4bdb42,liblog-c232e8c4b2089ea3,libhttp-a46fe650e9b3463c,libdioxus_devtools_types-e5c0dd915d4d7c59,libdioxus_logger-903f26e68dbbd989,libdioxus_cli_config-1615f5c6b9cb33c2,libtracing_subscriber-85c8d82497358ead,libsharded_slab-2b6b0bb70d047683,liblazy_static-fac14aba013dd095,libmatchers-5488a72533a697a9,libregex_automata-3d65ab719227094c,libregex_syntax-cbf848b09ef0dde9,libthread_local-af538e43fd4934da,libdioxus_history-58f53321077f71b1,libdioxus_document-5e265d0ac01d9c04,libdioxus_html-d906ea43bd61e035,libserde_json-c8b85fb60e68f1ab,libmemchr-de4dca715f3832f5,libitoa-1f0780fe0a5f6f65,libzmij-02db839f2f61b3c7,libenumset-9a3f8614d2ab2bb1,libeuclid-f07700e7934a6f0c,libnum_traits-e6cb916788da8ce1,libbytes-6372cc83faf90a20,libkeyboard_types-1411a4c790b7dedf,libbitflags-e8dc23a91c54bd86,libdioxus_stores-f6a60d430d233b01,libdioxus_hooks-80143b3c6db1e6b1,libdioxus_signals-5bba4c3ba491109c,libwarnings-f5f4a34cdcbe12f8,libpin_project-815a62663b9bc8c9,libdioxus_core-c55e5159c82a7767,libsubsecond-c1bb5dd2e698eac1,liblibloading-2c253a3e2ba7b80a,libthiserror-eed6fd16a77459b8,libsubsecond_types-a3ae90336fcee7ad,liblongest_increasing_subsequence-2b7eae8918571470,libconst_format-7ee364cceea47313,libanyhow-bc04ecd0ae2a7c43,libslotmap-d27a17293cfffb6c,libfutures_channel-a1b6445db581303f,libserde-6781ddba825f83f8,libserde_core-23918a48879407b5,libdioxus_core_types-daf7dc368842e2c8,libgenerational_box-8b87538a8b0b4145,libtracing-3b896530df875301,libtracing_core-48fde37aa9113bfc,libonce_cell-168dd29cf2b0e4af,libparking_lot-ad968645aa2a037b,libparking_lot_core-ed745804f364dfa9,liblibc-68ea90cd9015050b,libcfg_if-6ec6dc3bdbc7009e,libsmallvec-90a4ef5f713dec60,liblock_api-071157eb30c06c97,libscopeguard-e01108493df877a6,libfutures_util-91487542a6d4a471,libslab-61206df1d68d0ee3,libpin_project_lite-c40ad66cd82a07ba,libfutures_task-aebc85858b2e4889,libpin_utils-d4f22a0899526a1b,libfutures_core-0a3d65a29b00a6fc,librustc_hash-a1021d371987817b}.rlib" "<sysroot>/lib/rustlib/x86_64-apple-ios/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-lobjc" "-framework" "WebKit" "-framework" "UIKit" "-framework" "WebKit" "-framework" "Foundation" "-framework" "CoreFoundation" "-framework" "UIKit" "-framework" "CoreFoundation" "-lobjc" "-framework" "Foundation" "-framework" "Security" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-target" "x86_64-apple-ios10.0.0-simulator" "-L" "/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/build/objc2-exception-helper-5a6c95dd44b0ab6b/out" "-o" "/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/deps/ios_app-25f11050f1cf7469" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath,@executable_path/../Frameworks" "-Wl,-rpath,@executable_pat  = note: some arguments are omitted. use `--verbose` to show all linker argumentsform/Developer/SDKs/iPhoneOS.sdk"
  = note: ld: warning: ignoring duplicate libraries: '-lobjc'
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libobjc.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libobjc.A.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libiconv.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libiconv.2.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/WebKit.framework/WebKit.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Cryptexes/OS/System/Library/Frameworks/WebKit.framework/WebKit.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Security.framework/Security.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Security.framework/Security.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libm.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.B.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.B.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libc.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.B.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd (2 slices)
          ld: warning: ignoring file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd': tapi error: missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd (2 slices)
          ld: warning: object file (/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/deps/libobjc2_exception_helper-839c65720495c4d4.rlib[4](dce005d523844fc4-try_catch.o)) was built for newer 'iOS-simulator' version (26.2) than being linked (10.0)
          Undefined symbols for architecture x86_64:

... snipped long hierarchy of referenced symbol chain ...

            "dyld_stub_binder", referenced from:
                <initial-undefines>
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

18:44:48 [cargo] error: could not compile `ios_app` (bin "ios_app") due to 1 previous error 
18:44:48 [cargo] Caused by: 
18:44:48 [cargo]   process didn't exit successfully: `/Users/pete/.cargo/bin/dx /Users/pete/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc --crate-name ios_app --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --cfg 'feature="mobile"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "desktop", "mobile", "web"))' -C metadata=24b86757fa59ae19 -C extra-filename=-25f11050f1cf7469 --out-dir /Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/deps --target x86_64-apple-ios -C incremental=/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/incremental -L dependency=/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/deps -L dependency=/Users/pete/dev/tmp/ios_app/target/ios-dev/deps --extern dioxus=/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/deps/libdioxus-e95ed9e4984963c5.rlib '-Clink-arg=-Wl,-rpath,@executable_path/../Frameworks' '-Clink-arg=-Wl,-rpath,@executable_path' -Clink-arg=-isysroot -Clink-arg=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -L native=/Users/pete/dev/tmp/ios_app/target/x86_64-apple-ios/ios-dev/build/objc2-exception-helper-5a6c95dd44b0ab6b/out` (exit status: 1) 

I think the problem is relating to the use of "-target" "x86_64-apple-ios10.0.0-simulator" which might not play nicely with Xcode 26.0, or that it's using iPhoneOS.sdk instead of iPhoneSimulator.sdk, but that's not based on any actual knowledge just some searching. .Honestly, i'm guessing 😂 I've tried to locate any remnant leftover Xcode old config. Is there anything else I can do to help it find the right iOS version to build against?

I have run exactly the same commands on an Apple Silicon Mac and everything worked as expected. (unfortunately may main machine is Intel currently so really need to be able to develop on that)

Any help or pointers to resolve this would be gratefully received.

Steps To Reproduce

Steps to reproduce the behavior:

  • On an Intel X86 Mac:
  • dx new ios_app
    • Which sub-template should be expanded? Bare-Bones
    • Do you want to use Dioxus Fullstack? false
    • Do you want to use Dioxus Router? false
    • Do you want to use Tailwind CSS? false
    • Do you want to include prompts for LLMs? false
    • Which platform do you want DX to serve by default? Mobile
  • cd ios_app
  • dx serve --ios

Expected behavior

Project compiles, iOS simulator starts, app is loaded and runs in simulator.

Screenshots

Environment:

  • Dioxus version: dioxus 0.7.3 (was built without git repository)
  • Rust version: rustc 1.93.0 (254b59607 2026-01-19)
  • OS info: macOS 15.6.1
  • App platform: mobile iOS

Questionnaire

I'm interested in fixing this myself but don't know where to start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions