-
Notifications
You must be signed in to change notification settings - Fork 231
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
feat: added support for visionOS platform #859
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
13c54dd
feat: added visionOS target, test target and a sample app
desusai7 511b789
feat: updated code to support visionOS as a platform
desusai7 8c16d16
Merge branch 'master' into feature/supportVisionOS
desusai7 b438c62
test: upgraded quick & nimble to latest versions and updated code to β¦
desusai7 b988913
test: replaced OHHTTPStubs with our custom implementation for stubbinβ¦
desusai7 dc453f1
chore: updated build settings of visionos target, test target, sampleβ¦
desusai7 0939c82
fix: removed SFSafariViewController as a provider for visionos as itsβ¦
desusai7 1b609eb
chore: upgraded all the gems to the latest versions
desusai7 6c53e9c
chore: added custom networking stubs to be available for tvos test taβ¦
desusai7 1099e36
chore: added arm64-darwin-22 as a supported platform
desusai7 be64bfb
chore: bumped up the dependency on Quick & Nimble in Package.swift
desusai7 76afe51
chore: dropped support for xcode 14, swift versions [5.7, 5.8], iOS 1β¦
desusai7 48e3524
test: minor changes
desusai7 67249f1
chore: removed reference to Auth0.plist in sample iOS app
desusai7 c6b834c
chore: added cwlPreCondition swift package to tvOS tests
desusai7 bcb1db5
test: removed sharedExamples with Behavior from Quick
desusai7 59e152e
chore: removed references to OHHTTPStubs across the repository
desusai7 88ef7f5
chore: updated support policy in the readme
desusai7 de437dc
chore: added conditional blocks for visionOS as required
desusai7 a8727dd
chore: minor changes
desusai7 2479461
chore: upgraded versions of SimpleKeychain & JWTDecode.swift to beta β¦
desusai7 9acf0da
chore: addressed review comments
desusai7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
Auth0.xcodeproj/xcshareddata/xcschemes/Auth0.visionOS.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1540" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES" | ||
buildArchitectures = "Automatic"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C1B3B9BF2C24B39E004A32A4" | ||
BuildableName = "Auth0.framework" | ||
BlueprintName = "Auth0.visionOS" | ||
ReferencedContainer = "container:Auth0.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C1B3B9BF2C24B39E004A32A4" | ||
BuildableName = "Auth0.framework" | ||
BlueprintName = "Auth0.visionOS" | ||
ReferencedContainer = "container:Auth0.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
#if os(iOS) | ||
#if os(iOS) || os(visionOS) | ||
import UIKit | ||
import AuthenticationServices | ||
|
||
extension UIApplication { | ||
|
||
static func shared() -> UIApplication? { | ||
return UIApplication.perform(NSSelectorFromString("sharedApplication"))?.takeUnretainedValue() as? UIApplication | ||
} | ||
|
||
} | ||
|
||
extension ASUserAgent: ASWebAuthenticationPresentationContextProviding { | ||
|
||
|
||
#if os(iOS) | ||
func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor { | ||
return UIApplication.shared()?.windows.last(where: \.isKeyWindow) ?? ASPresentationAnchor() | ||
} | ||
|
||
#endif | ||
|
||
#if os(visionOS) | ||
func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor { | ||
if let windowScene = UIApplication.shared()?.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene { | ||
return windowScene.windows.last(where: \.isKeyWindow) ?? ASPresentationAnchor() | ||
} else { | ||
return ASPresentationAnchor() | ||
} | ||
} | ||
#endif | ||
|
||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the
else
is not necessary here because of the early return on L24.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, modified it accordingly