Skip to content

Declare Apple platform requirements and fix AndroidManifest dependency#4

Open
colemancda wants to merge 2 commits into
masterfrom
feature/apple-platform-requirements
Open

Declare Apple platform requirements and fix AndroidManifest dependency#4
colemancda wants to merge 2 commits into
masterfrom
feature/apple-platform-requirements

Conversation

@colemancda

Copy link
Copy Markdown
Member

Two manifest fixes found while building a downstream app (BluetoothExplorer) that depends on this
package.

Declare Apple platform requirements

The package declared only .macOS(.v15). SwiftPM defaults unspecified platforms to iOS 12, while
Bluetooth, BluetoothGAP and GATT require iOS 13 — so any Apple-platform resolve of a graph
containing this package failed:

the library 'AndroidBluetooth' requires ios 12.0, but depends on the product 'Bluetooth'
which requires ios 13.0; consider changing the library 'AndroidBluetooth' to require
ios 13.0 or later, or the product 'Bluetooth' to require ios 12.0 or earlier

Now declares .iOS(.v13), .watchOS(.v6), .tvOS(.v13) to match. This package only ever builds for
Android, but SwiftPM validates platform requirements across the whole graph regardless of
.when(platforms:) conditions on the usage, so the declaration has to be present.

Source AndroidManifest from swift-android-native

AndroidManifest moved out of PureSwift/Android into swift-android-native (Android PR #40), but
this package still requested it from Android:

error: 'androidbluetooth': product 'AndroidManifest' required by package 'androidbluetooth'
target 'AndroidBluetooth' not found in package 'android'

The other four products it takes from Android (AndroidOS, AndroidContent, AndroidUtil,
AndroidApp) are unaffected; only AndroidManifest moved. It now depends on
swift-android-native directly, using the same fork and branch that PureSwift/Android and
skip-android-bridge use so the package identity does not conflict.

Note: depends on MillerTechnologyPeru/swift-android-native#… (merging current upstream main
into feature/pureswift), because that branch did not yet export AndroidManifest. Merge that
first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant