diff --git a/examples/ios-feedback/.cargo/config b/examples/ios-feedback/.cargo/config deleted file mode 100644 index 47acd89..0000000 --- a/examples/ios-feedback/.cargo/config +++ /dev/null @@ -1,4 +0,0 @@ -[target.aarch64-apple-ios] -linker="/usr/bin/clang" -[target.x86_64-apple-darwin] -linker="/usr/bin/clang" diff --git a/examples/ios-feedback/build_rust_deps.sh b/examples/ios-feedback/build_rust_deps.sh index c9c2f17..be65a39 100755 --- a/examples/ios-feedback/build_rust_deps.sh +++ b/examples/ios-feedback/build_rust_deps.sh @@ -3,6 +3,13 @@ set -e PATH=$PATH:$HOME/.cargo/bin +if [[ -n "${DEVELOPER_SDK_DIR:-}" ]]; then + # Assume we're in Xcode, which means we're probably cross-compiling. + # In this case, we need to add an extra library search path for build scripts and proc-macros, + # which run on the host instead of the target. + # (macOS Big Sur does not have linkable libraries in /usr/lib/.) + export LIBRARY_PATH="${DEVELOPER_SDK_DIR}/MacOSX.sdk/usr/lib:${LIBRARY_PATH:-}" +fi # If you want your build to run faster, add a "--targets x86_64-apple-ios" for just using the ios simulator. if [ -n "${IOS_TARGETS}" ]; then diff --git a/examples/ios-feedback/cpal-ios-example.xcodeproj/project.pbxproj b/examples/ios-feedback/cpal-ios-example.xcodeproj/project.pbxproj index fde407c..7526f76 100644 --- a/examples/ios-feedback/cpal-ios-example.xcodeproj/project.pbxproj +++ b/examples/ios-feedback/cpal-ios-example.xcodeproj/project.pbxproj @@ -253,6 +253,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=*]" = arm64; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES;