Hi,
My app keeps getting rejected during App Review with the reason that the Sign in with Apple button is unresponsive. However, I have tested it extensively on:
• A real iPad Pro (iPadOS 18.3.2)
• Multiple Xcode simulators
• Including an iPad Air 5th simulator (18.3.1)
In all of these cases, the button works correctly.
The reviewer mentioned they are using an iPad Air 5th running iPadOS 18.3.2, which I cannot find as a simulator in Xcode, nor do I have access to this exact device around me.
I’m using standard SignInWithAppleButton code with no custom wrappers or UI layers on top. Here is the relevant snippet:
GeometryReader { geometry in
ZStack {
Color.black.opacity(0.3)
.ignoresSafeArea()
.onTapGesture {
prompt = ""
showChat = false
}
VStack(alignment: .leading, spacing: 0){
switch purchaseManager.hasAISubscription {
case 1:
HStack{
}
case 2:
HStack{
}
case 3:
HStack{
}
default:
HStack{
}
}
Divider()
ScrollView {
VStack(alignment: .leading, spacing: 8) {
ForEach(filteredChatHistory, id: \.id) { chat in
}
}
Spacer()
}
.frame(maxHeight: geometry.size.height * 0.7)
.defaultScrollAnchor(.bottom)
.padding()
Divider()
HStack(){
if httpManager.isLoggedIn && purchaseManager.hasAISubscription > 0 {
}
}
else if purchaseManager.hasAISubscription == 0{
}
else{
Spacer()
SignInWithAppleButton(.continue){ request in
request.requestedScopes = [.email]
} onCompletion: { result in
switch result {
case .success(let auth):
switch auth.credential {
case let appleCredential as ASAuthorizationAppleIDCredential:
let userID = appleCredential.user
saveToKeychain(userID, for: "com.xing-fu.aireader.apple.userid")
if let identityTokenData = appleCredential.identityToken,
let identityToken = String(data: identityTokenData, encoding: .utf8) {
Task {
//后端认证过,才算登录成功
await httpManager.loginWithApple(identityToken)
}
}
break
default:
break
}
case .failure(let error):
print("error")
}
}
.frame(maxWidth: 350, maxHeight: 40)
.padding()
.cornerRadius(10)
Spacer()
}
}
}
.overlay( // 边框
RoundedRectangle(cornerRadius: 10)
.stroke(Color.g2, lineWidth: 4)
)
.background(Color(UIColor.systemBackground))
.cornerRadius(10) // 圆角
.shadow(color: Color.black.opacity(0.1), radius: 5, x: 0, y: 5)
.frame(width: geometry.size.width * 0.8)
.onDisappear{
httpManager.alertMessage = nil
}
}
}