Fix iOS app build#23
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #22: gets the iOS app building and running from a clean checkout with no
workarounds — no SwiftPM mirrors, no environment variables, no extra
xcodebuildflags, and noedits needed before pressing Run in Xcode.
Verified end to end: a clean
swift build,swift test(44 pass),xcodebuild build,xcodebuild archive, and the app launched in the simulator — the device list populates fromMockCentral, and all 13 bundled plugins install intoDocuments/Plugins/on first launch andappear in the Plugins tab.
Five fixes
1. Two regressions I introduced when removing Skip in #22, neither caught by
swift build:Darwin/BluetoothExplorer.xcconfigstill#included the deletedSkip.env, soPRODUCT_NAMEwas empty and archiving failed with "Multiple commands produce
.app". App identity (name,bundle id, version) is now declared in the xcconfig directly.
SKIP_ACTION = none, which I removed along with the rest of the Skip config — so simulatorbuilds started shelling out to gradle and failing on the missing
Skip.env. The phase is gone.Both only appear through Xcode, which is why
swift buildpassing in #22 did not catch them.2.
AndroidBluetoothis temporarily not declared. SwiftPM validates the whole package grapheven for
.android-conditional dependencies, so itsAndroidManifestbug (PureSwift/Android#40moved that product to
swift-android-native) broke Apple builds — a clean checkout could notbuild at all without a local mirror. The Swift sources already guard their use with
#if os(Android), so nothing else changed. Restore it alongside PureSwift/AndroidBluetooth#4.3. WasmKit now comes from a fork (MillerTechnologyPeru/WasmKit, one commit) that drops
.treatAllWarnings(as: .error). Upstream's setting collides with the-suppress-warningsXcodepasses to package dependencies:
I confirmed the override only reaches package targets from the command line — setting it in the
xcconfig or at project level does nothing — so opening the project in Xcode and pressing Run
failed, and only a patched WasmKit fixes that. Worth upstreaming; a package arguably should not
impose its warning policy on consumers.
4. CI is simplified accordingly. With the fork in place the
SWIFT_SUPPRESS_WARNINGS=NOworkaround is gone, and the Android job is dropped since the app no longer declares
AndroidBluetooth. Two jobs remain: Test, and iOS Archive, which asserts the archivecontains
BluetoothExplorer.appwith bundled.wasmplugins and uploads it as an artifact.Reviewer notes
Documentation/AndroidSwiftUIMigration.mdrecords what is neededto bring it back: the two PureSwift dependency PRs, an upstream fix for
AndroidBluetooth's@JavaImplementationmacro generating invalid code forswiftOnScanFailed(error:), and areplacement for Skip's gradle project.
setting.