Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/ios_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: iOS Build
on:
pull_request:
branches:
- main
- 'main'
push:
branches:
- main
Expand Down Expand Up @@ -36,7 +36,13 @@ jobs:
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}


- name: Setup iOS SDK env for bindgen
run: |
export SDKROOT=$(xcrun --sdk iphonesimulator --show-sdk-path)
echo "SDKROOT=$SDKROOT" >> $GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=--sysroot=$SDKROOT" >> $GITHUB_ENV

- name: Build mycelmob
run: bash build-ios.sh
working-directory: mycelmob
Expand Down
6 changes: 3 additions & 3 deletions mycelmob/build-ios.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env bash
set -euxo pipefail

NAME="mycelmob"
HEADERPATH="out/${NAME}FFI.h"
TARGETDIR="target"
Expand All @@ -9,6 +6,9 @@ RELDIR="release"
STATIC_LIB_NAME="lib${NAME}.a"
NEW_HEADER_DIR="out/include"

export SDKROOT=$(xcrun --sdk iphonesimulator --show-sdk-path)
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=${SDKROOT} -target arm64-apple-ios15.0-simulator"

cargo build
cargo run --bin uniffi-bindgen generate --library target/debug/lib${NAME}.dylib --language swift --out-dir out

Expand Down