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

Add VisionOS support #1237

Merged
merged 15 commits into from
Apr 13, 2024
Merged

Add VisionOS support #1237

merged 15 commits into from
Apr 13, 2024

Conversation

AnthonyMDev
Copy link
Contributor

This PR adds support or VisionOS by:

  • Adding the visionOS platform to the Package.swift file
  • Adding a visionOS target, test target, test plan, and scheme to the Xcode Project

When running the tests on visionOS, there is a single failing test. I'm not familiar enough with the library to know what could be causing that failure. If someone is able to point me in the right direction, I'd be happy to get the test passing so this can be merged in.

@AnthonyMDev
Copy link
Contributor Author

It looks like this test failure is unrelated to this PR, as it was also failing in this other PR.

@AnthonyMDev
Copy link
Contributor Author

@nathanfallet, any chance we could get some eyes on this? We've got users of our SDK asking for VisionOS support, and we are waiting on support in this library to make that work.

Copy link
Collaborator

@nathanfallet nathanfallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just waiting for checks to run

@AnthonyMDev
Copy link
Contributor Author

Awesome thank you! Looks like the just that one broken test that is failing still.

@nathanfallet
Copy link
Collaborator

Yes I need to check why; I don't think it's related to visionOS addition, but I don't want to merge if it's failing 😅

@loganblevins
Copy link

@nathanfallet Where does this stand?

@nathanfallet
Copy link
Collaborator

nathanfallet commented Feb 23, 2024

EDIT: This is fixed

It fails at:

Test Case '-[SQLiteTests.QueryTests test_insert_encodable_with_nested_encodable]' started.
/Users/runner/work/SQLite.swift/SQLite.swift/Tests/SQLiteTests/Typed/QueryTests.swift:367: error: -[SQLiteTests.QueryTests test_insert_encodable_with_nested_encodable] : XCTAssertEqual failed: ("INSERT INTO "emails" ("int", "string", "bool", "float", "double", "date", "uuid", "optional", "sub") VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F', 'optional', '{"bool":true,"double":4,"uuid":"E621E1F8-C36C-495A-93FC-0C247A3E6E5F","float":3,"string":"2","date":-978307200,"int":1}')") is not equal to ("INSERT INTO "emails" ("int", "string", "bool", "float", "double", "date", "uuid", "optional", "sub") VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F', 'optional', '{"string":"2","int":1,"bool":true,"date":-978307200,"float":3,"double":4,"uuid":"E621E1F8-C36C-495A-93FC-0C247A3E6E5F"}')")
Test Case '-[SQLiteTests.QueryTests test_insert_encodable_with_nested_encodable]' failed (0.268 seconds).

It's actually the json is not ordered the same way... (it represents the same thing but not equals as a string)

{"bool":true,"double":4,"uuid":"E621E1F8-C36C-495A-93FC-0C247A3E6E5F","float":3,"string":"2","date":-978307200,"int":1}
{"string":"2","int":1,"bool":true,"date":-978307200,"float":3,"double":4,"uuid":"E621E1F8-C36C-495A-93FC-0C247A3E6E5F"}

It seems to be a change to a newer version of Swift, because it does not happen in other PR's tests.
After some tests in Xcode Playground, it looks like encoding to JSON gives a random order each time.
image

@nathanfallet nathanfallet force-pushed the vision-os branch 2 times, most recently from 05af27b to 5bfaddf Compare February 23, 2024 13:29
@nathanfallet
Copy link
Collaborator

nathanfallet commented Feb 23, 2024

Last thing to fix:

-> SQLite.swift/standalone (0.14.1)
    - ERROR | [SQLite.swift/standalone] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [SQLite.swift/standalone] xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [SQLite.swift/standalone] xcodebuild:  note: Building targets in dependency order
    - NOTE  | [iOS] [SQLite.swift/standalone] xcodebuild:  note: Target dependency graph (4 targets)
    - NOTE  | [SQLite.swift/standalone] xcodebuild:  clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target
    - NOTE  | [SQLite.swift/standalone] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 12.0 to 17.0.99. (in target 'sqlite3' from project 'Pods')
    - NOTE  | [iOS] [SQLite.swift/standalone] xcodebuild:  note: Target dependency graph (3 targets)

[!] SQLite.swift did not pass validation, due to 1 error.

I had the warning for IPHONEOS_DEPLOYMENT_TARGET 3 times (the two other ones were from 11.0, I updated it in the podspec) but I'm unable to get rid of this last one. (it's a warning but I read the missing libarclite was linked to this)

@jberkel any idea on this?

@groue
Copy link

groue commented Feb 23, 2024

Last thing to fix

It's probably CocoaPods/CocoaPods#11839. If you manage to work around it, I'll be happy to know your solution :-)

@calvincestari
Copy link
Contributor

@nathanfallet - where are we on getting this resolved and merged?

@nathanfallet
Copy link
Collaborator

@calvincestari I'm trying to find a solution with cocoapods that currently breaks the project. When that will be fixed, we'll be able to merge it.

@fenhelix
Copy link

@nathanfallet Any luck or insight on the cocoapods breaking the VisionOS support?

@nathanfallet nathanfallet merged commit 2d964a7 into stephencelis:master Apr 13, 2024
2 checks passed
@calvincestari
Copy link
Contributor

Thanks for getting this merged @nathanfallet, much appreciated!

@calvincestari
Copy link
Contributor

@nathanfallet, another question for this: will the podspec be updated to declare support for visionOS too? When I try push our updated podspec I get an error about incompatibility with SQLite.swift and visionOS. I believe it requires another deployment target.

- ERROR | [visionOS] [Apollo/SQLite] unknown: Encountered an unknown error (The platform of the target `App` (visionOS 1.0) is not compatible with `SQLite.swift (0.15.1)`, which does not support `visionOS`.) during validation.

@nathanfallet
Copy link
Collaborator

@calvincestari I'll have a look at that, it might have been missing in the PR

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.

6 participants