Skip to content
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
4 changes: 4 additions & 0 deletions ios/Sources/Kith/Kith.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<!--
Private CloudKit on Sarthak Agrawal's personal team (8F7LXHTJZR).
One person's people and notes, in that person's iCloud only.
Expand Down
14 changes: 13 additions & 1 deletion ios/Sources/Kith/KithConnectionView.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import AuthenticationServices
import PersonalSyncKit
import SwiftUI

Expand Down Expand Up @@ -28,7 +29,18 @@ struct KithConnectionView: View {
Task { await account.signOut() }
}
} else {
Button("Connect Significant Hobbies") {
SignInWithAppleButton(.continue) { request in
account.prepareApple(request)
} onCompletion: { result in
Task {
await account.completeApple(result)
if account.isSignedIn { await model.syncFromPlatform() }
}
}
.signInWithAppleButtonStyle(.black)
.frame(minHeight: 46)
.disabled(account.isConnecting)
Button("Continue with Google") {
Task {
await account.connect()
await model.syncFromPlatform()
Expand Down
Loading