Skip to content

Fix iOS 17 apps hanging just by linking library (🤦‍♂️) #401

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

Merged
merged 2 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Changelog

## master

## [1.1.3]

Due to a mysterious bug on Apple's part that may cause a complete app hang, the unfortunate decision has been made to remove support for `SignInWithAppleButton` introspection.

We apologize for this inconvenience.

More details can be found at https://github.com/siteline/swiftui-introspect/issues/400

## [1.1.2]

- Fixed: "Protocol requirement cannot be declared '@_spi'" (#392)
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ Introspection
- [`.searchable`](https://swiftpackageindex.com/siteline/swiftui-introspect/main/documentation/swiftuiintrospect/searchfieldtype)
- [`SecureField`](https://swiftpackageindex.com/siteline/swiftui-introspect/main/documentation/swiftuiintrospect/securefieldtype)
- [`.sheet`](https://swiftpackageindex.com/siteline/swiftui-introspect/main/documentation/swiftuiintrospect/sheettype)
- [`SignInWithAppleButton`](https://swiftpackageindex.com/siteline/swiftui-introspect/main/documentation/swiftuiintrospect/SignInWithAppleButtonType)
- [`Slider`](https://swiftpackageindex.com/siteline/swiftui-introspect/main/documentation/swiftuiintrospect/slidertype)
- [`Stepper`](https://swiftpackageindex.com/siteline/swiftui-introspect/main/documentation/swiftuiintrospect/steppertype)
- [`Table`](https://swiftpackageindex.com/siteline/swiftui-introspect/main/documentation/swiftuiintrospect/tabletype)
Expand Down
48 changes: 13 additions & 35 deletions Sources/ViewTypes/SignInWithAppleButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,42 +72,20 @@ import SwiftUI
/// ```
public struct SignInWithAppleButtonType: IntrospectableViewType {}

#if canImport(AuthenticationServices)
import AuthenticationServices

extension IntrospectableViewType where Self == SignInWithAppleButtonType {
public static var signInWithAppleButton: Self { .init() }
}
@available(
*,
unavailable,
message: """
Due to a mysterious bug on Apple's part that may cause a complete
app hang, the unfortunate decision has been made to remove support
for `SignInWithAppleButton` introspection.

We apologize for this inconvenience.

extension iOSViewVersion<SignInWithAppleButtonType, ASAuthorizationAppleIDButton> {
@available(*, unavailable, message: "SignInWithAppleButton isn't available on iOS 13")
public static let v13 = Self.unavailable()
public static let v14 = Self(for: .v14)
public static let v15 = Self(for: .v15)
public static let v16 = Self(for: .v16)
public static let v17 = Self(for: .v17)
}

extension tvOSViewVersion<SignInWithAppleButtonType, ASAuthorizationAppleIDButton> {
@available(*, unavailable, message: "SignInWithAppleButton isn't available on tvOS 13")
public static let v13 = Self.unavailable()
public static let v14 = Self(for: .v14)
public static let v15 = Self(for: .v15)
public static let v16 = Self(for: .v16)
public static let v17 = Self(for: .v17)
}

extension macOSViewVersion<SignInWithAppleButtonType, ASAuthorizationAppleIDButton> {
@available(*, unavailable, message: "SignInWithAppleButton isn't available on macOS 10.15")
public static let v10_15 = Self.unavailable()
public static let v11 = Self(for: .v11)
public static let v12 = Self(for: .v12)
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
}

extension visionOSViewVersion<SignInWithAppleButtonType, ASAuthorizationAppleIDButton> {
public static let v1 = Self(for: .v1)
More details can be found at https://github.com/siteline/swiftui-introspect/issues/400
"""
)
public static var signInWithAppleButton: Self { .init() }
}
#endif
#endif
6 changes: 0 additions & 6 deletions Tests/Tests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@
D5ADFACC2A4A22AE009494FD /* SheetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ADFACB2A4A22AE009494FD /* SheetTests.swift */; };
D5ADFACE2A4A3482009494FD /* FullScreenCoverTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ADFACD2A4A3482009494FD /* FullScreenCoverTests.swift */; };
D5ADFAD02A4A3E54009494FD /* PopoverTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ADFACF2A4A3E54009494FD /* PopoverTests.swift */; };
D5ADFAD22A4A41CB009494FD /* SignInWithAppleButtonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ADFAD12A4A41CB009494FD /* SignInWithAppleButtonTests.swift */; };
D5ADFAD32A4A4649009494FD /* SignInWithAppleButtonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ADFAD12A4A41CB009494FD /* SignInWithAppleButtonTests.swift */; };
D5ADFAD42A4A4653009494FD /* FullScreenCoverTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ADFACD2A4A3482009494FD /* FullScreenCoverTests.swift */; };
D5ADFAD52A4A4653009494FD /* SheetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ADFACB2A4A22AE009494FD /* SheetTests.swift */; };
D5ADFAD62A4A4653009494FD /* VideoPlayerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D503B2AB2A49BFE300027F5F /* VideoPlayerTests.swift */; };
Expand Down Expand Up @@ -223,7 +221,6 @@
D5ADFACB2A4A22AE009494FD /* SheetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetTests.swift; sourceTree = "<group>"; };
D5ADFACD2A4A3482009494FD /* FullScreenCoverTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullScreenCoverTests.swift; sourceTree = "<group>"; };
D5ADFACF2A4A3E54009494FD /* PopoverTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopoverTests.swift; sourceTree = "<group>"; };
D5ADFAD12A4A41CB009494FD /* SignInWithAppleButtonTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignInWithAppleButtonTests.swift; sourceTree = "<group>"; };
D5AEC33E2A66F31F0015AC1D /* UITestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITestCase.swift; sourceTree = "<group>"; };
D5AEC3412A66F6470015AC1D /* RootView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootView.swift; sourceTree = "<group>"; };
D5AEC3422A66F6470015AC1D /* HostingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HostingController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -399,7 +396,6 @@
D57506A12A281B9C00A628E4 /* SearchFieldTests.swift */,
D57E66F92A6956EB0092F43E /* SecureFieldTests.swift */,
D5ADFACB2A4A22AE009494FD /* SheetTests.swift */,
D5ADFAD12A4A41CB009494FD /* SignInWithAppleButtonTests.swift */,
D58119CF2A23A62C0081F853 /* SliderTests.swift */,
D58119D12A23A77C0081F853 /* StepperTests.swift */,
D575069F2A27FC0400A628E4 /* TableTests.swift */,
Expand Down Expand Up @@ -728,7 +724,6 @@
D534D4DD2A4A596200218BFB /* WindowTests.swift in Sources */,
D50E2F662A2B9F6600BAFB03 /* DatePickerWithWheelStyleTests.swift in Sources */,
D50E2F672A2B9F6600BAFB03 /* ListWithInsetGroupedStyleTests.swift in Sources */,
D5ADFAD32A4A4649009494FD /* SignInWithAppleButtonTests.swift in Sources */,
D50E2F682A2B9F6600BAFB03 /* FormWithGroupedStyleTests.swift in Sources */,
D5ADFAD52A4A4653009494FD /* SheetTests.swift in Sources */,
D50E2F692A2B9F6600BAFB03 /* ListWithPlainStyleTests.swift in Sources */,
Expand Down Expand Up @@ -839,7 +834,6 @@
D57506882A27CB9800A628E4 /* FormTests.swift in Sources */,
D58119C82A22AC130081F853 /* ToggleTests.swift in Sources */,
D58119D22A23A77C0081F853 /* StepperTests.swift in Sources */,
D5ADFAD22A4A41CB009494FD /* SignInWithAppleButtonTests.swift in Sources */,
D58119DA2A23B7700081F853 /* ColorPickerTests.swift in Sources */,
D575068E2A27D4DC00A628E4 /* ToggleWithButtonStyleTests.swift in Sources */,
D5F0BE6A29C0DC4900AD95AB /* PlatformVersionTests.swift in Sources */,
Expand Down
50 changes: 0 additions & 50 deletions Tests/Tests/ViewTypes/SignInWithAppleButtonTests.swift

This file was deleted.