Skip to content

Commit 81f5b62

Browse files
committed
final changes
1 parent 3975a5d commit 81f5b62

File tree

10 files changed

+103
-85
lines changed

10 files changed

+103
-85
lines changed

.github/workflows/ci.yml

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -12,72 +12,73 @@ jobs:
1212
runs-on: macos-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4
16-
- uses: dtolnay/rust-toolchain@stable
17-
18-
- name: Add iOS targets
19-
run: rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
20-
21-
- name: Rust Cache
22-
uses: Swatinem/rust-cache@v2
23-
with:
24-
workspaces: "./bevy_ios_iap"
25-
26-
- name: Check iOS Sim
27-
run: |
28-
cd bevy_ios_iap
29-
cargo c --target=aarch64-apple-ios-sim
30-
cargo b --target=aarch64-apple-ios-sim
31-
cargo clippy --target=aarch64-apple-ios-sim
32-
33-
- name: Check iOS
34-
run: |
35-
cd bevy_ios_iap
36-
cargo c --target=aarch64-apple-ios
37-
cargo b --target=aarch64-apple-ios
38-
cargo clippy --target=aarch64-apple-ios
39-
40-
- name: Check MacOs
41-
run: |
42-
cd bevy_ios_iap
43-
cargo c
44-
cargo b
45-
cargo clippy
46-
cargo t
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Add iOS targets
19+
run: rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
20+
21+
- name: Rust Cache
22+
uses: Swatinem/rust-cache@v2
23+
with:
24+
workspaces: "./bevy_ios_iap"
25+
26+
# TODO: enable once https://github.com/rust-lang/rust-bindgen/issues/3181 is released
27+
# - name: Check iOS Sim
28+
# run: |
29+
# cd bevy_ios_iap
30+
# cargo c --target=aarch64-apple-ios-sim
31+
# cargo b --target=aarch64-apple-ios-sim
32+
# cargo clippy --target=aarch64-apple-ios-sim
33+
34+
- name: Check iOS
35+
run: |
36+
cd bevy_ios_iap
37+
cargo c --target=aarch64-apple-ios
38+
cargo b --target=aarch64-apple-ios
39+
cargo clippy --target=aarch64-apple-ios
40+
41+
- name: Check MacOs
42+
run: |
43+
cd bevy_ios_iap
44+
cargo c
45+
cargo b
46+
cargo clippy
47+
cargo t
4748
4849
build_egui:
4950
runs-on: macos-latest
5051

5152
steps:
52-
- uses: actions/checkout@v4
53-
- uses: dtolnay/rust-toolchain@stable
54-
55-
- name: Add iOS targets
56-
run: rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
57-
58-
- name: Rust Cache
59-
uses: Swatinem/rust-cache@v2
60-
with:
61-
workspaces: "./bevy_ios_iap_egui"
62-
63-
- name: Check iOS Sim
64-
run: |
65-
cd bevy_ios_iap_egui
66-
cargo c --target=aarch64-apple-ios-sim
67-
cargo b --target=aarch64-apple-ios-sim
68-
cargo clippy --target=aarch64-apple-ios-sim
69-
70-
- name: Check iOS
71-
run: |
72-
cd bevy_ios_iap_egui
73-
cargo c --target=aarch64-apple-ios
74-
cargo b --target=aarch64-apple-ios
75-
cargo clippy --target=aarch64-apple-ios
76-
77-
- name: Check MacOs
78-
run: |
79-
cd bevy_ios_iap_egui
80-
cargo c
81-
cargo b
82-
cargo clippy
83-
cargo t
53+
- uses: actions/checkout@v4
54+
- uses: dtolnay/rust-toolchain@stable
55+
56+
- name: Add iOS targets
57+
run: rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
58+
59+
- name: Rust Cache
60+
uses: Swatinem/rust-cache@v2
61+
with:
62+
workspaces: "./bevy_ios_iap_egui"
63+
64+
- name: Check iOS Sim
65+
run: |
66+
cd bevy_ios_iap_egui
67+
cargo c --target=aarch64-apple-ios-sim
68+
cargo b --target=aarch64-apple-ios-sim
69+
cargo clippy --target=aarch64-apple-ios-sim
70+
71+
- name: Check iOS
72+
run: |
73+
cd bevy_ios_iap_egui
74+
cargo c --target=aarch64-apple-ios
75+
cargo b --target=aarch64-apple-ios
76+
cargo clippy --target=aarch64-apple-ios
77+
78+
- name: Check MacOs
79+
run: |
80+
cd bevy_ios_iap_egui
81+
cargo c
82+
cargo b
83+
cargo clippy
84+
cargo t

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Fixed
1313
* upgrade to bevy `0.16`
14+
* temporarily disabled ios-sim support until rust-bindgen [releases](https://github.com/rust-lang/rust-bindgen/issues/3181)
1415

1516
## [0.6.0] - 2025-03-30
1617

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ let package = Package(
1010
// Products define the executables and libraries a package produces, making them visible to other packages.
1111
.library(
1212
name: "bevy_ios_iap",
13-
targets: ["bevy_ios_iap"]),
13+
targets: ["bevy_ios_iap"])
1414
],
1515
targets: [
1616
// Targets are the basic building blocks of a package, defining a module or a test suite.
1717
// Targets can depend on other targets in this package and products from dependencies.
1818
.binaryTarget(
1919
name: "RustXcframework",
20-
// for local development:
21-
// path: "RustXcframework.xcframework"),
22-
url: "https://github.com/rustunit/bevy_ios_iap/releases/download/rs-0.6.0/RustXcframework.xcframework.zip",
23-
checksum: "ce0261d0fda41b2108b9f34bd2235f0e245c6b666a1921615a24a8a61fa41f1e"),
20+
//for local development:
21+
path: "RustXcframework.xcframework"),
22+
//url: "https://github.com/rustunit/bevy_ios_iap/releases/download/rs-0.6.0/RustXcframework.xcframework.zip",
23+
//checksum: "ce0261d0fda41b2108b9f34bd2235f0e245c6b666a1921615a24a8a61fa41f1e"),
2424
.target(
2525
name: "bevy_ios_iap",
2626
dependencies: ["RustXcframework"]),

Sources/bevy_ios_iap/BevyIosIAP.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ public func convert_storekit_error(_ error: (StoreKitError)) -> IosIapStoreKitEr
214214
case .systemError(let e): IosIapStoreKitError.system_error(e.localizedDescription)
215215
case .notAvailableInStorefront: IosIapStoreKitError.not_available_in_storefront()
216216
case .notEntitled: IosIapStoreKitError.not_entitled()
217+
218+
@unknown default:
219+
IosIapStoreKitError.unknown()
217220
}
218221
}
219222

bevy_ios_iap/build-rust-release.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ cd $THISDIR
1010
touch ./src/lib.rs
1111
cargo build --release --target aarch64-apple-ios
1212
cargo build --release --target x86_64-apple-ios
13-
cargo build --release --target aarch64-apple-ios-sim
13+
# TODO: enable once https://github.com/rust-lang/rust-bindgen/issues/3181 is released
14+
# cargo build --release --target aarch64-apple-ios-sim
15+
#
1416
mkdir -p ./target/universal-ios/release
1517

16-
lipo \
17-
./target/aarch64-apple-ios-sim/release/libbevy_ios_iap.a \
18-
./target/x86_64-apple-ios/release/libbevy_ios_iap.a -create -output \
19-
./target/universal-ios/release/libbevy_ios_iap.a
18+
# TODO: add back sim target
19+
lipo -create \
20+
"./target/aarch64-apple-ios/release/libbevy_ios_iap.a" \
21+
"./target/x86_64-apple-ios/release/libbevy_ios_iap.a" \
22+
-output ./target/universal-ios/release/libbevy_ios_iap.a

bevy_ios_iap/build-rust.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ cd $THISDIR
1010
touch ./src/lib.rs
1111
cargo build --target aarch64-apple-ios
1212
cargo build --target x86_64-apple-ios
13-
cargo build --target aarch64-apple-ios-sim
13+
# TODO: enable once https://github.com/rust-lang/rust-bindgen/issues/3181 is released
14+
# cargo build --target aarch64-apple-ios-sim
15+
1416
mkdir -p ./target/universal-ios/debug
1517

16-
lipo \
17-
./target/aarch64-apple-ios-sim/debug/libbevy_ios_iap.a \
18-
./target/x86_64-apple-ios/debug/libbevy_ios_iap.a -create -output \
19-
./target/universal-ios/debug/libbevy_ios_iap.a
18+
# TODO: add back sim target
19+
lipo -create \
20+
"./target/aarch64-apple-ios/debug/libbevy_ios_iap.a" \
21+
"./target/x86_64-apple-ios/debug/libbevy_ios_iap.a" \
22+
-output ./target/universal-ios/debug/libbevy_ios_iap.a

bevy_ios_iap/justfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
check:
2+
cargo c
3+
cargo c --target=aarch64-apple-ios
4+
cargo clippy
5+
cargo fmt -- --check

bevy_ios_iap_egui/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.2.0"
44
edition = "2021"
55

66
[dependencies]
7-
bevy_ios_iap = "0.6.0"
8-
bevy = { version = "0.15", default-features = false }
9-
bevy_egui = { version = "0.32", default-features = false }
10-
egui_extras = { version = "0.30" }
7+
bevy_ios_iap = "0.7.0"
8+
bevy = { version = "0.16", default-features = false }
9+
bevy_egui = { version = "0.34", default-features = false }
10+
egui_extras = { version = "0.31" }

bevy_ios_iap_egui/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ pub struct IosIapEguiPlugin {
3333
impl Plugin for IosIapEguiPlugin {
3434
fn build(&self, app: &mut App) {
3535
if !app.is_plugin_added::<EguiPlugin>() {
36-
app.add_plugins(EguiPlugin);
36+
app.add_plugins(EguiPlugin {
37+
enable_multipass_for_primary_context: false,
38+
});
3739
}
3840

3941
app.init_resource::<DebugUiResource>();

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
check:
2-
cd ./bevy_ios_iap/ && cargo c --target=aarch64-apple-ios-sim
2+
cd ./bevy_ios_iap/ && just check
33

44
build-rust-release:
55
./bevy_ios_iap/build-rust-release.sh

0 commit comments

Comments
 (0)