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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ios/Sources/Kith/AppModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class AppModel {
private let store: KithStore
private let cloud: KithCloudStore?
private let platform: PersonalPlatformConnection?
let account: PersonalAppleSignInModel?
let account: PersonalWebSignInModel?

init(
store: KithStore = KithStore(),
Expand All @@ -31,7 +31,9 @@ final class AppModel {
) {
self.store = store
self.platform = platform
account = platform.map { PersonalAppleSignInModel(identity: $0.identity) }
account = platform.map {
PersonalWebSignInModel(identity: $0.identity, callbackScheme: "kith")
}
let arguments = ProcessInfo.processInfo.arguments
self.cloud = Self.isDemoLaunch(arguments) ? nil : cloud
if arguments.contains("--person-demo") {
Expand Down
11 changes: 11 additions & 0 deletions ios/Sources/Kith/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>kith</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down
4 changes: 0 additions & 4 deletions ios/Sources/Kith/Kith.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
<!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
11 changes: 4 additions & 7 deletions ios/Sources/Kith/KithConnectionView.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import AuthenticationServices
import PersonalSyncKit
import SwiftUI

Expand Down Expand Up @@ -29,16 +28,14 @@ struct KithConnectionView: View {
Task { await account.signOut() }
}
} else {
SignInWithAppleButton(.continue) { request in
account.prepare(request)
} onCompletion: { result in
Button("Connect Significant Hobbies") {
Task {
await account.complete(result)
await account.connect()
await model.syncFromPlatform()
}
}
.signInWithAppleButtonStyle(.black)
.frame(height: 48)
.buttonStyle(ClayButtonStyle())
.disabled(account.isConnecting)
}
if account.isConnecting { ProgressView() }
if let error = account.errorMessage {
Expand Down
4 changes: 4 additions & 0 deletions ios/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ targets:
CFBundleDisplayName: Kith
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleURLTypes:
- CFBundleTypeRole: Editor
CFBundleURLSchemes:
- kith
ITSAppUsesNonExemptEncryption: false
LSApplicationCategoryType: public.app-category.lifestyle
UIApplicationSupportsIndirectInputEvents: true
Expand Down
Loading