Minseong Kang
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ### iOS 13에서 Scene Delegate로 이관된 App Delegate의 역할은 무엇무엇이 있을까요? **App Delegate는 다음과 같은 역할을 수행합니다.** - 앱의 중요한 데이터 구조 초기화 - scene의 환경설정 - 앱 밖에서 발생하는 알림에 대응(메모리 부족 경고, 다운로드 완료 알림 등) - 특정 scene, view, viewcontroller에 한정되지 않고 앱 자체를 타깃으로 하는 이벤트에 대응 - 애플 푸시 알림 서비스처럼 실행시 요구되는 모든 서비스를 등록 **위의 내용을 수행하기 위해 아래와 같은 메서드들을 활용합니다.** 1. 애플리케이션 생명주기 관리: 애플리케이션의 상태 변화에 따른 처리를 담당합니다. - application(_:didFinishLaunchingWithOptions:) - 애플리케이션이 처음 시작될 때 호출됩니다. 이 메소드에서는 보통 애플리케이션의 초기 설정을 수행합니다. - applicationWillResignActive(_:) - 애플리케이션이 활성 상태에서 비활성 상태로 전환될 때 호출됩니다. 이 때 애플리케이션은 일시 중지되거나 백그라운드로 이동할 수 있습니다. - applicationDidEnterBackground(_:) - 애플리케이션이 백그라운드 상태에 진입했을 때 호출됩니다. 이 메소드에서는 보통 사용자 데이터를 저장하거나 네트워크 요청을 중지하는 등의 작업을 수행합니다. - applicationWillEnterForeground(_:) - 애플리케이션이 백그라운드 상태에서 활성 상태로 전환될 예정일 때 호출됩니다. 이 메소드에서는 보통 애플리케이션이 활성 상태로 전환될 때 필요한 업데이트를 수행합니다. - applicationDidBecomeActive(_:) - 애플리케이션이 활성 상태가 되었을 때 호출됩니다. 이 메소드에서는 보통 애플리케이션이 사용자와 상호작용을 시작하는 데 필요한 최종 준비를 수행합니다. - applicationWillTerminate(_:) - 애플리케이션이 종료되기 직전에 호출됩니다. 이 메소드에서는 보통 애플리케이션의 마지막 상태를 저장하는 등의 작업을 수행합니다. 2. 데이터 처리: 애플리케이션이 사용자의 데이터를 다루는 데 필요한 처리를 담당합니다. - application(_:open:options:) - 애플리케이션이 URL을 통해 데이터를 받았을 때 호출됩니다. 이 메소드에서는 보통 URL에서 데이터를 추출하고 적절하게 처리합니다. - application(_:handleEventsForBackgroundURLSession:completionHandler:) - 백그라운드에서 URL 세션 작업이 끝났을 때 호출됩니다. 3. Push 알림 처리: 애플리케이션의 푸시 알림 처리를 담당합니다. - application(_:didRegisterForRemoteNotificationsWithDeviceToken:) - 디바이스가 원격 알림을 위해 성공적으로 등록되었을 때 호출됩니다. - application(_:didFailToRegisterForRemoteNotificationsWithError:) - 디바이스가 원격 알림 등록에 실패하였을 때 호출됩니다. - application(_:didReceiveRemoteNotification:fetchCompletionHandler:) - 애플리케이션이 원격 알림을 받았을 때 호출됩니다. --- ### App Delegate와 Scene Delegate의 각각의 역할은 무엇일까요? **AppDelegate** `AppDelegate`는 애플리케이션 수준의 이벤트를 처리합니다. `AppDelegate`의 주요 역할은 다음과 같습니다: 1. **애플리케이션 생명주기 관리**: 애플리케이션이 처음 시작될 때, 백그라운드로 이동할 때, 앱이 종료될 때 등의 애플리케이션 전체에 영향을 미치는 이벤트를 처리합니다. 2. **데이터 처리**: URL을 통해 애플리케이션에 데이터가 전달될 때 이를 처리합니다. 3. **Push 알림 처리**: 원격 푸시 알림을 받고 처리하는 역할을 담당합니다. **SceneDelegate** `SceneDelegate`는 사용자 인터페이스와 관련된 이벤트를 처리합니다. `SceneDelegate`의 주요 역할은 다음과 같습니다: 1. **UI 생명주기 관리**: 애플리케이션의 윈도우가 활성화되거나 비활성화될 때, 윈도우의 크기가 변경될 때 등의 이벤트를 처리합니다. 2. **상태 복원**: 애플리케이션이 종료된 후 다시 시작될 때 이전의 UI 상태를 복원하는 역할을 담당합니다. --- ### Scene의 개념이 생긴 이유는 무엇이고, 언제 어디서 활용해볼 수 있을까요? App delegate는 별도의 화면에 표시되는 창을 포함하여 앱의 모든 창을 함께 관리합니다. 결과적으로, 앱 상태가 변경되면 외부 디스플레이의 콘텐츠를 포함한 앱의 전체 UI에 영향을 미치게 됩니다. Scene delecate는 각 scene마다 별도의 생명주기 이벤트를 제공합니다. 따라서 모든 scene은 서로 다른 실행 상태에 있을 수 있습니다. 예를 들어, 한 scene은 foreground에 있을 수 있고 다른 scene은 background에 있거나 suspended 상태일 수 있습니다. 사용자는 한 앱에서 다양한 작업을 동시에 처리할 수 있어 효율성이 향상됩니다. --- ### 앱은 언제언제 Foreground Inactive 상태가 될까요? 2가지 이상의 사례를 생각해봅시다 - scene 기반 - Unattached -> Foreground Inactive - 생성 후 Foreground Active가 되기 전: 앱이 시작되어 활성되기 직전에 잠시동안 - Foreground Active <-> Foreground Inactive - 다른 앱으로 전환될 때 - 사용자가 다른 앱을 열거나 홈 화면으로 돌아갈 때 - 앱 실행 중에 전화가 왔을 때 - Background <-> Foreground Inactive - 전화가 끊어졌을 때(앱은 백그라운드에 남아 있음) --- ### 앱의 상태가 Background로 지속되기 위한 요건은 무엇무엇이 있을까요? - 앱이 background에서 계속 실행되는 사례 - 아래와 같이 실시간 반응 및 업데이트가 필요한 경우 - AirPlay 또는 Picture in Picture 비디오를 사용한 오디오 통신 - 사용자를 위한 위치 기반 서비스 - VoIP(Zoom, Google Meet, Face Time등) - 외부 장치와의 통신 - 블루투스 LE 액세서리와의 통신 또는 장치를 블루투스 LE 액세서리로 변환 - 서버의 정기적인 업데이트 - Apple 푸시 알림 서비스(APN) 지원 - 앱을 background에서 실행하기 위한 처리 - background task로 등록 - beginBackgroundTask(withName:expirationHandler:) - endBackgroundTask(_:) ## 참고자료 - [Background Tasks](https://developer.apple.com/documentation/backgroundtasks) - [beginBackgroundTask()](https://developer.apple.com/documentation/uikit/uiapplication/1623051-beginbackgroundtask) - [endBackgroundTask()](https://developer.apple.com/documentation/uikit/uiapplication/1622970-endbackgroundtask) - [Preparing your UI to run in the background](https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully