feat(creator): 현재 라이브 섹션을 연결한다
This commit is contained in:
@@ -25,6 +25,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
private var subscription = Set<AnyCancellable>()
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||
guard !Self.isRunningForPreviews else { return true }
|
||||
|
||||
FirebaseApp.configure()
|
||||
LoginManager.shared.setup(channelID: LINE_CHANNEL_ID, universalLinkURL: nil)
|
||||
Notifly.initialize(projectId: NOTIFLY_PROJECT_ID, username: NOTIFLY_USERNAME, password: NOTIFLY_PASSWORD)
|
||||
@@ -50,6 +52,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
private static var isRunningForPreviews: Bool {
|
||||
ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
|
||||
// Print full message.
|
||||
|
||||
@@ -29,8 +29,14 @@ struct SodaLiveApp: App {
|
||||
configureImageCache()
|
||||
// 앱 시작 직후, 초기 네트워크 요청도 올바른 언어 헤더를 갖도록 동기 초기화
|
||||
LanguageHeaderProvider.initialize()
|
||||
guard !Self.isRunningForPreviews else { return }
|
||||
|
||||
KakaoSDK.initSDK(appKey: KAKAO_APP_KEY)
|
||||
}
|
||||
|
||||
private static var isRunningForPreviews: Bool {
|
||||
ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
|
||||
}
|
||||
|
||||
private func configureImageCache() {
|
||||
// Kingfisher 전역 캐시 상한 설정
|
||||
@@ -50,6 +56,8 @@ struct SodaLiveApp: App {
|
||||
ContentView(canPgPaymentViewModel: canPgPaymentViewModel)
|
||||
.environment(\.locale, languageEnvironment.locale)
|
||||
.task {
|
||||
guard !Self.isRunningForPreviews else { return }
|
||||
|
||||
await LanguageContainer.service.bootstrap()
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in
|
||||
@@ -62,6 +70,8 @@ struct SodaLiveApp: App {
|
||||
ImageCache.default.clearMemoryCache()
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
|
||||
guard !Self.isRunningForPreviews else { return }
|
||||
|
||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||
AppsFlyerLib.shared().start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user