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

Apple visionOS build support #2549

Merged
merged 3 commits into from
Mar 11, 2024
Merged

Apple visionOS build support #2549

merged 3 commits into from
Mar 11, 2024

Conversation

vincentneo
Copy link
Contributor

@vincentneo vincentneo commented Jul 25, 2023

This pull request aims to support building TDLib for the Apple xrOS/visionOS platform.

As it is essentially similar to modern Apple platforms, I reckon there be no other changes, except to update scripts to fit the platform.
Scripts are adapted to allow for building for the said platform right now but is yet to be tested, hence it is a draft PR.

Compiling requires Xcode 15 beta and CMake 3.27.

Do also note that this is based on #2517's OpenSSL script, and the CMake script also has legacy architectures removed for iOS right now.

UPDATE: Good news, built a quick sample project, and was able to see TDLib's verbose logs streaming into the console, when running on visionOS simulator, Xcode 15.0 beta 5 (15A5209g)!

@vincentneo vincentneo marked this pull request as ready for review March 9, 2024 08:59
@levlam levlam self-requested a review March 9, 2024 09:04
@levlam
Copy link
Contributor

levlam commented Mar 9, 2024

Thank you, @vincentneo!

After your pull request #2517 has been merged the example already uses OpenSSL 3 for building, hence the first commit isn't needed anymore. Could you rebase the commits on the latest master instead of merging?

@levlam
Copy link
Contributor

levlam commented Mar 9, 2024

The OS has been renamed to visionOS. Could you use this name for it instead of xrOS?

@vincentneo
Copy link
Contributor Author

Could you rebase the commits on the latest master instead of merging?

Have not done this before, will read up on it

The OS has been renamed to visionOS. Could you use this name for it instead of xrOS?

Screenshot 2024-03-09 at 5 26 37 PM

Well, Xcode 15.2 (not beta) still reports visionOS sdks as xros and xrsimulator
I have tested that all seems to build fine as before, before marking this pr as ready

@levlam
Copy link
Contributor

levlam commented Mar 9, 2024

I didn't mean that we need to rename Xcode flags. The comment was about local variables such as "XRSIMULATOR"/"XROS"/"xrOS".

@vincentneo
Copy link
Contributor Author

I didn't mean that we need to rename Xcode flags. The comment was about local variables such as "XRSIMULATOR"/"XROS"/"xrOS".

Ah got it;

Btw, did the rebase work? I can't tell.

@levlam
Copy link
Contributor

levlam commented Mar 9, 2024

Btw, did the rebase work? I can't tell.

Old commits are still there, therefore the branch as the whole cannot be rebased due to conflicts. Likely, you need to force push the new rebased branch instead of merging it with master.

@vincentneo
Copy link
Contributor Author

@levlam may I verify with you that the rebase is correct now? if so I will work on renaming xr

@levlam
Copy link
Contributor

levlam commented Mar 9, 2024

Yes, it looks correct now.

Also, why the applied patch was renamed from ../Python-Apple-support.patch to ../xros-support.patch in the first commit?

@vincentneo
Copy link
Contributor Author

Also, why the applied patch was renamed from ../Python-Apple-support.patch to ../xros-support.patch in the first commit?

Right, that will be changed.

Also, I tried to change the XR references, and it seems if I were to change xros to visionos (while keeping the target name xros/xrsimulator) in the openssl patch file, it doesn't compile, probably need more time to understand why that is the case.

@vincentneo
Copy link
Contributor Author

Have renamed to visionOS, and it should still build fine

@levlam levlam merged commit d326e32 into tdlib:master Mar 11, 2024
@levlam
Copy link
Contributor

levlam commented Mar 11, 2024

Thank you, @vincentneo!
I merged these 3 commits, fixed rename of xrOS to visionOS in iOS.cmake, and supported visionOS throughout TDLib.

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.

2 participants