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

Support for VisionOS #188

Open
snowyao opened this issue Dec 4, 2023 · 11 comments
Open

Support for VisionOS #188

snowyao opened this issue Dec 4, 2023 · 11 comments

Comments

@snowyao
Copy link

snowyao commented Dec 4, 2023

Any plan for VisionOS support?

@derwaldgeist
Copy link

Bump. I'd also like to see this.

There's a couple of lines in the code where only iOS, tvOS and macOS are being checked for. I guess if these lines were modified to include visionOS as well, it might work out-of-the-box.

@derwaldgeist
Copy link

derwaldgeist commented Jan 5, 2024

Ok. I tried to patch the library in my fork:

https://github.com/marblear/apple-signin-unity/tree/visionos

Turns out that modifying the OS-specific conditional compilations was not enough. It seems as if the PolySpatial app delegate has to be patched as well. I get a runtime error that it does not accept a certain selector.

@lupidan
Copy link
Owner

lupidan commented Jan 21, 2024

My 2019 Macbook does not support the VisionOS simulator...

Screenshot 2024-01-21 at 12 34 41

@derwaldgeist
Copy link

Yep. I actually had to get an M3 macBook just to do that. Which is silly, but was the only way.

@delphinius81
Copy link

Ok. I tried to patch the library in my fork:

https://github.com/marblear/apple-signin-unity/tree/visionos

Turns out that modifying the OS-specific conditional compilations was not enough. It seems as if the PolySpatial app delegate has to be patched as well. I get a runtime error that it does not accept a certain selector.

Are you suggesting that Unity needs to make some kind of change? Do you have any further details (remember what the specific error was / have a stack trace?)

@ChuanlongChen
Copy link
Contributor

Same request, marked

@ChuanlongChen
Copy link
Contributor

Hey guys, I've successfully make it works in VisionOS, but seems I can't create PR for this repo, I modify it in my own fork.
Here is the PR: ccl2020#1
You can consider integrate my modifications to this repo too.

FYI @lupidan @snowyao @derwaldgeist @delphinius81

@ChuanlongChen
Copy link
Contributor

Update: I'm able to create PR for this repo
#198

@ChuanlongChen
Copy link
Contributor

@lupidan it would be great if you could take time to review my pr

@ZacharyLiu6
Copy link

Hi everyone,

I’m using version v1.4.4 of this plugin to support Apple Sign-In for my VisionOS application. I implemented login functionality by directly incorporating the MainMenu from the example scenes into my VisionOS scene and added the PressedAppleSignInButton method to handle click events for logging in.

However, when building for Vision Pro, I encountered some errors. It seems that the UnityPolySpatialAppDelegate does not implement methods related to window. Below is the Xcode console output during the app’s runtime:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyTestProject.UnityPolySpatialAppDelegate window]: unrecognized selector sent to instance 0x303d2bc20'
*** First throw call stack:
(0x19a485db8 0x191c40a40 0x19a49cde4 0x19a48a514 0x19a48d1b0 0x12656d598 0x19807e1b8 0x1029bd408 0x1029bef34 0x1029cea78 0x1029ce65c 0x19a3eda1c 0x19a3e7ba4 0x19a3e6f4c 0x1de6bc518 0x24b91b30c 0x24b91fe68 0x1abee2f54 0x1abee2c58 0x1abb0f230 0x1022239b4 0x25e4459fc)

Uncaught exception: NSInvalidArgumentException: -[MyTestProject.UnityPolySpatialAppDelegate window]: unrecognized selector sent to instance 0x303d2bc20


(
	0   CoreFoundation                      0x000000019a485dc4 4765193A-9326-36FA-9D46-F3AD50B28722 + 1187268
	1   libobjc.A.dylib                     0x0000000191c40a40 objc_exception_throw + 88
	2   CoreFoundation                      0x000000019a49cde4 4765193A-9326-36FA-9D46-F3AD50B28722 + 1281508
	3   CoreFoundation                      0x000000019a48a514 4765193A-9326-36FA-9D46-F3AD50B28722 + 1205524
	4   CoreFoundation                      0x000000019a48d1b0 _CF_forwarding_prep_0 + 96
	5   UnityFramework                      0x000000012656d598 -[AppleAuthManager presentationAnchorForAuthorizationController:] + 124
	6   AuthenticationServices              0x000000019807e1b8 B7FCD9B6-4694-324A-8166-149DD51CF3F6 + 151992
	7   libdispatch.dylib                   0x00000001029bd408 _dispatch_call_block_and_release + 32
	8   libdispatch.dylib                   0x00000001029bef34 _dispatch_client_callout + 20
	9   libdispatch.dylib                   0x00000001029cea78 _dispatch_main_queue_drain + 1036
	10  libdispatch.dylib                   0x00000001029ce65c _dispatch_main_queue_callback_4CF + 44
	11  CoreFoundation                      0x000000019a3eda1c 4765193A-9326-36FA-9D46-F3AD50B28722 + 563740
	12  CoreFoundation                      0x000000019a3e7ba4 4765193A-9326-36FA-9D46-F3AD50B28722 + 539556
	13  CoreFoundation                      0x000000019a3e6f4c CFRunLoopRunSpecific + 588
	14  GraphicsServices                    0x00000001de6bc518 GSEventRunModal + 164
	15  UIKitCore                           0x000000024b91b30c 7FE793B2-1769-34CC-9E4C-BCFBA56CA9B7 + 15946508
	16  UIKitCore                           0x000000024b91fe68 UIApplicationMain + 340
	17  SwiftUI                             0x00000001abee2f54 9767C5E3-32BB-3448-B7B3-389F8254393B + 12869460
	18  SwiftUI                             0x00000001abee2c58 9767C5E3-32BB-3448-B7B3-389F8254393B + 12868696
	19  SwiftUI                             0x00000001abb0f230 $s7SwiftUI3AppPAAE4mainyyFZ + 224
	20  VoxelParty                          0x00000001022239b4 main + 64
	21  dyld                                0x000000025e4459fc 3E58C4DA-00D7-319E-9269-C18F6A0CACFF + 6652
)

@lupidan
Copy link
Owner

lupidan commented Dec 9, 2024

@ZacharyLiu6 Can you provide a repro project for the issue you are mentioning?

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

No branches or pull requests

6 participants