Skip to content

Commit

Permalink
[버전] 2.0.0-beta.1 (#194)
Browse files Browse the repository at this point in the history
* [수정] 앱 설치 초기에 FCM 토큰 없을 때 API 요청 하지 않도록 수정
* [수정] `Image(systemName: "circle")` 에 잘못 적용된 색상 올바르게 수정
* [추가] 앱 카테고리를 "유틸리티"로 설정
* [추가] info.plist 에 수출 규정 문서 없음 설정 추가
  • Loading branch information
x-0o0 authored Mar 29, 2024
1 parent 2dd7f44 commit cb89aa4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
2 changes: 2 additions & 0 deletions KuringApp/KuringApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = KuringApp/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "쿠링";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
Expand Down Expand Up @@ -447,6 +448,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = KuringApp/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "쿠링";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
Expand Down
2 changes: 2 additions & 0 deletions KuringApp/KuringApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
</dict>
</dict>
</dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand Down
18 changes: 15 additions & 3 deletions package-kuring/Sources/UIKit/CommonUI/View.onFetchAllData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,24 @@ struct KuringLinkFetcher: ViewModifier {
@State private var showsNetworkError: Bool = false
@Dependency(\.kuringLink) private var kuringLink

@AppStorage("com.kuring.sdk.token.fcm")
var fcmToken: String = ""

let onRequest: () -> Void
let onCompletion: (Result<Void, Error>) -> Void

func body(content: Content) -> some View {
content
.task { await request() }
.task {
guard !fcmToken.isEmpty else { return }
await request()
}
.onChange(of: fcmToken) { oldValue, newValue in
// 앱 설치 초기에 뒤늦게 FCM 토큰을 발급 받는 경우
guard oldValue.isEmpty else { return }
guard !newValue.isEmpty else { return }
Task { await request() }
}
.alert("앗! 인터넷 연결이 좋지 않아요!", isPresented: $showsNetworkError) {
// 무시
Button(role: .cancel) {
Expand All @@ -39,11 +51,11 @@ struct KuringLinkFetcher: ViewModifier {

async let subscribedDepartments = try kuringLink.getSubscribedDepartments()
async let subscribedUnivNotices = try kuringLink.getSubscribedUnivNotices()
let _ = try await [subscribedDepartments, subscribedUnivNotices]
let _ = try? await [subscribedDepartments, subscribedUnivNotices]
onCompletion(.success(()))
} catch {
showsNetworkError = true
onCompletion(.failure(error))
showsNetworkError = true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct DepartmentRow: View {
.foregroundStyle(
isSelected
? Color.Kuring.primary
: Color.Kuring.gray400
: Color.Kuring.gray200
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct SubscriptionView: View {
Spacer()

Image(systemName: isSelected ? "checkmark.circle.fill" : "circle")
.foregroundStyle(isSelected ? Color.Kuring.primary : Color.black.opacity(0.1))
.foregroundStyle(isSelected ? Color.Kuring.primary : Color.Kuring.gray200)
.frame(width: 20, height: 20)
}
.padding(.horizontal, 21.5)
Expand Down

0 comments on commit cb89aa4

Please sign in to comment.