<aside> 🔨 NEXTERS 15기 프로젝트 [팀 구성] 8인 (Server 2, Android 2, iOS 2, Designer 2)

</aside>

[2019. 06 ~ 2019. 08] 감정기록 앱 서비스 '찰랑말랑' (출시 완료)


개발 담당 파트


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8250c19d-64bb-4747-9143-474423c14606/lottieSpeed4.mp4


개발을 통해 얻은 점

  1. 예외처리 (statusCode 관리)
  2. API 요청 시점에 따른 Logic 관리 (semaphore, @escaping completion)
  1. Push 알림 및 특정 view 로 redirect

  2. Push 허용 상태에 따른 Push 설정 App 전환

    let current = UNUserNotificationCenter.current()
    guard let settingsUrl = NSURL(string:UIApplication.openSettingsURLString) as? URL else {return}
    UIApplication.shared.open(settingsUrl, options: [:], completionHandler: nil)
    
    // authorizationStatus 에 따른 분기
    current.getNotificationSettings(completionHandler: { (settings) in
    	if settings.authorizationStatus == .notDetermined {
    	} else if settings.authorizationStatus == .denied {
    	} else if settings.authorizationStatus == .authorized {
    	}
    })
    
    1. Push Payload 에 담겨서 오는 data 처리
    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any],
                     fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    	/*
    		userInfo 에 data가 NSDictionary 형태로 담겨서 오며 
    		Android는 data 구조체에 담겨져 오지만 iOS 는 Notification 에 담겨져 오는걸로 기억함. 다시 조사해보길.
    	*/
    }