Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use XCFramework and tbd to fix iOS private framework issue #21

Merged
merged 5 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove UIKitCore and add iOS test CI
  • Loading branch information
Kyle-Ye committed Jan 6, 2024
commit 11c083daf248223f64427c87db0f96d499c7693f
25 changes: 8 additions & 17 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,11 @@ jobs:
-destination "platform=iOS-Simulator" \
# OpenSwiftUI-Package is not listed currently
# OTHER_SWIFT_FLAGS="-warnings-as-errors" \ AccessLevelOnImport will cause build warning via xcodebuild
env:
OPENGRAPH_ATTRIBUTEGRAPH: 0
# Test is currently not supported due to the link issue to PrivateFramework
# - name: Build and run tests in debug mode with coverage
# run: |
# xcodebuild test \
# -scheme OpenSwiftUI-Package \
# -configuration Debug \
# -destination "platform=iOS-Simulator" \
# -enableCodeCoverage=YES \
# -derivedDataPath .build-test-debug
# # OTHER_SWIFT_FLAGS="-warnings-as-errors"
# profdata_file_path=$(find . -path "*.build-test-debug/Build/ProfileData*Coverage.profdata" -type f)
# xcrun llvm-cov show \
# -instr-profile=$profdata_file_path \
# .build-test-debug/Build/Products/Debug/OpenSwiftUITests.xctest/Contents/MacOS/OpenSwiftUITests \
# > coverage.txt
- name: Build and run tests in debug mode
run: |
xcodebuild test \
-scheme OpenSwiftUI \
-configuration Debug \
-skipMacroValidation -skipPackagePluginValidation \
-destination "platform=iOS-Simulator" \
# OTHER_SWIFT_FLAGS="-warnings-as-errors"
6 changes: 2 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ let openSwiftUITarget = Target.target(
dependencies: [
"OpenSwiftUIShims",
.target(name: "CoreServices", condition: .when(platforms: [.iOS])),
.target(name: "UIKitCore", condition: .when(platforms: [.iOS])),
.product(name: "OpenGraphShims", package: "OpenGraph"),
],
swiftSettings: [
Expand Down Expand Up @@ -67,7 +66,6 @@ let package = Package(
dependencies: [.product(name: "OpenFoundation", package: "OpenFoundation")]
),
.binaryTarget(name: "CoreServices", path: "PrivateFrameworks/CoreServices.xcframework"),
.binaryTarget(name: "UIKitCore", path: "PrivateFrameworks/UIKitCore.xcframework"),
openSwiftUITarget,
]
)
Expand Down Expand Up @@ -155,11 +153,11 @@ if swiftTestingCondition {
openSwiftUITestTarget.dependencies.append(
.product(name: "Testing", package: "swift-testing")
)
// package.targets.append(openSwiftUITestTarget)
package.targets.append(openSwiftUITestTarget)
openSwiftUICompatibilityTestTarget.dependencies.append(
.product(name: "Testing", package: "swift-testing")
)
// package.targets.append(openSwiftUICompatibilityTestTarget)
package.targets.append(openSwiftUICompatibilityTestTarget)
}

let compatibilityTestCondition = envEnable("OPENSWIFTUI_COMPATIBILITY_TEST")
Expand Down
4 changes: 0 additions & 4 deletions PrivateFrameworks/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
- CoreServices
- Header file source is https://developer.limneos.net + iOS 15.2.1
- Other file is from iOS 15.5 SDK
- UIKitCore
- Header file source is https://developer.limneos.net + iOS 15.2.1
- iOS's tbd is from https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS15.5.sdk/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore.tbd
- iOS Simulator's tbd is build by `tbd -p --ignore-weak-def-syms -r -v4 "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework" -o ./`
41 changes: 0 additions & 41 deletions PrivateFrameworks/UIKitCore.xcframework/Info.plist

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading