Title: Theory / Important / CS / Programming / Objective-C / Library / UIKit / sort2
Tags: type constant
On every note of this deck, unless a note says otherwise:
Language: Objective-C

Name: UIKit framework
Definition: the core objects that you need to build apps for iOS and tvOS.
Page: https://developer.apple.com/documentation/uikit/about_app_development_with_uikit?language=objc

Question: todo
Page: https://developer.apple.com/documentation/uikit/app_and_environment?language=objc

Question: todo
Page: https://developer.apple.com/documentation/uikit/documents_data_and_pasteboard?language=objc

Question: todo resource management
Page: https://developer.apple.com/documentation/uikit/resource_management?language=objc

Question: todo app extension
Page: https://developer.apple.com/documentation/uikit/app_extensions?language=objc

Question: todo Interprocess Communication
Page: https://developer.apple.com/documentation/uikit/interprocess_communication?language=objc

Typ: NSUserActivity
Meaning: A representation of the state of your app at a moment in time.
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Language: Objective-C
Intuition: Allow to restore an app in a given state

Name: Quick note
Definition: webpageURL
An https: URL, ideally in a canonical form that’s consistent every time the user visits the same content.
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Definition2: persistentIdentifier
A string that uniquely identifies the content in this domain. The identifier should identify the same content across devices.
Conjdef: it must have either
Definition3: targetContentIdentifier
A string that uniquely identifies the content in this domain, but also allows disambiguating between multiple scenes of an app. The identifier should identify the same content across devices.
DefType: Link to any app content represented as an NSUserActivity

Question: What should be a Quick Note title?
Answer: be clear and concise. This text describes the content of the link, like “Photo taken on July 27, 2020” or “Conversation with Maria”. Use nouns for activity titles.
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Name: Quick note

Question: Constraint on quick note
Answer: The activity title should be clear and concise. This text describes the content of the link, like “Photo taken on July 27, 2020” or “Conversation with Maria”. Use nouns for activity titles.
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Answer2: Keep the app’s current activity up to date, using becomeCurrent and resignCurrent.
Answer3: Linkable identifiers (listed above) must be stable and consistent for the same content. When you link from a note to a document in an app, and later revisit that document, the system shows an indicator linking back to the note. The system compares identifiers to check that the document is the same as the original source of the link.
Answer4: Maintain support for activities provided by your app, and support navigating to linked content indefinitely. Links added to notes are important to the user, who may feel that a broken link indicates data loss.
Answer5: Gracefully handle attempts to navigate to an activity that points to content that doesn’t exist. For example, you can redirect to the new location of moved content, or show an error message. This situation may happen with shared notes, when a user links to content that exists only on another user’s device.
Name: Quick note

Variable: userActivity.eligibleForSearch
Meaning: userActivity contain information that the user might want to search for later
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Context: Quick note
Language: Objective-C
Variables: NSUserActivity userActivity

Variable: userActivity.webpageURL
Meaning: the canonical web page https url of the current activity
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Context: Quick note
Language: Objective-C
Variables: NSUserActivity userActivity

Variable: userActivity.persistentIdentifier
Meaning: A string that uniquely identifies the content in this domain. The identifier should identify the same content across devices.
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Context: Quick note
Language: Objective-C
Variables: NSUserActivity userActivity

Variable: userActivity.targetContentIdentifier
Meaning: A string that uniquely identifies the content in this domain, but also allows disambiguating between multiple scenes of an app. The identifier should identify the same content across devices.
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Context: Quick note
Language: Objective-C
Variables: NSUserActivity userActivity

Variable: userActivity.eligibleForPublicIndexing
Meaning: the webpageURL can be shared with apple and indexed for other users
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Context: Quick note
Language: Objective-C
Variables: NSUserActivity userActivity

Variable: todo user activity subsections
Page: https://developer.apple.com/documentation/foundation/nsuseractivity?language=objc
Context: Quick note
Language: Objective-C
Variables: NSUserActivity userActivity

Variable: todo handwritten recognition
Page: https://developer.apple.com/documentation/uikit/handwriting_recognition?language=objc
Language: Objective-C

Variable: todo keyboard
Page: https://developer.apple.com/documentation/uikit/keyboards_and_input?language=objc
Language: Objective-C

Variable: todo textkit
Page: https://developer.apple.com/documentation/uikit/textkit?language=objc
Language: Objective-C

Variable: todo text display and fonts
Page: https://developer.apple.com/documentation/uikit/text_display_and_fonts?language=objc
Language: Objective-C

Variable: todo printing
Page: https://developer.apple.com/documentation/uikit/printing?language=objc
Language: Objective-C

Variable: todo drawing
Page: https://developer.apple.com/documentation/uikit/drawing?language=objc
Language: Objective-C

Variable: todo images and pdf
Page: https://developer.apple.com/documentation/uikit/images_and_pdf?language=objc
Language: Objective-C

Instruction: todo animation and haptics
Page: https://developer.apple.com/documentation/uikit/animation_and_haptics?language=objc

Typ: UIApplication
Meaning: The centralized point of control and coordination for apps running in iOS.
Page: https://developer.apple.com/documentation/uikit/animation_and_haptics?language=objc
Language: Objective-C

Page: https://developer.apple.com/documentation/uikit/uiapplication?language=objc
Implementation: subclass UIApplictaion and override sendEvent or sendAction:to:from:forEvent
Effect: Allow the app to capture events before the system does
Language: Objective-C

Variable: application.sharedApplication
Meaning: The app instance is created in the UIApplicationMain function.
Page: https://developer.apple.com/documentation/uikit/uiapplication/1622975-sharedapplication?language=objc
Language: Objective-C
Variables: UIApplication application

Typ: UIApplicationDelegate
Meaning: A set of methods to manage shared behaviors for your app.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate?language=objc
Language: Objective-C

Name: The state of the app
Definition: What the app can and can't do
Page: https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle?language=objc
Typ: UIApplicationDelegate

Instruction: [applicationDelegate
  application:application
  willFinishLaunchingWithOptions:launchOptions
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623032-application?language=objc
Effect: Tells the delegate that the launch process has begun but that state restoration hasn’t occured. Use launchOptions to figure out what must be done
Returns: Whether the app can handle the URL and can perform it
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  didFinishLaunchingWithOptions:launchOptions
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623032-application?language=objc
Effect: Tells the delegate that the launch process is almost done and the app is almost ready to run.
Returns: Whether the app can hanlde the URL and continue the user activity
Variables: UIApplicationDelegate applicationDelegate
Name: The state of the app

Typ: UIApplicationLaunchOptionsKey
Meaning: The keys you use to access values in the launch options dictionary that the system passes to your app at initialization.
Page: https://developer.apple.com/documentation/uikit/uiapplicationlaunchoptionskey?language=objc
Language: Objective-C

Constant: UIApplicationDidFinishLaunchingNotification
Page: https://developer.apple.com/documentation/uikit/uiapplicationdidfinishlaunchingnotification?language=objc
Language: Objective-C
Typ: NSNotificationName

Instruction: [applicationDelegate
  application:application
  configurationForConnectingSceneSession:connectingSceneSession
  options:options
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/3197905-application?language=objc
Returns: the configuration data for UIKit to use when creating a new scene.
Variables: UIApplicationDelegate applicationDelegate
Typ: NSNotificationName

Instruction: [applicationDelegate
  application:application
  didDiscardSceneSessions:sceneSessions
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/3197906-application?language=objc
Effect: Tells the delegate that the user closed one or more of the app's scenes from the app switcher.
Variables: UIApplicationDelegate applicationDelegate
Typ: NSNotificationName

Instruction: [applicationDelegate
  applicationDidBecomeActive:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/3197906-application?language=objc
Effect: Tells the delegate that the app has become active.
Variables: UIApplicationDelegate applicationDelegate
Assuming: Scenes are not used
Typ: NSNotificationName

Instruction: [applicationDelegate
  applicationWillResignActive:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/3197906-application?language=objc
Effect: tells the delegate that the app is about to become inactive.
Variables: UIApplicationDelegate applicationDelegate
Assuming: Not called if we use Scene
Typ: NSNotificationName

Instruction: [applicationDelegate
  applicationDidEnterBackground:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622997-applicationdidenterbackground?language=objc
Effect: Tells the delegate that the app is now in the background.
Variables: UIApplicationDelegate applicationDelegate
Assuming: Not called if we use Scene
Typ: NSNotificationName

Instruction: [applicationDelegate
  applicationWillEnterForeground:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623076-applicationwillenterforeground?language=objc
Effect: Tells the delegate that the app is about to enter the foreground.
Variables: UIApplicationDelegate applicationDelegate
Assuming: Not called if we use Scene
Typ: NSNotificationName

Instruction: [applicationDelegate
  applicationWillTerminate:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623076-applicationwillenterforeground?language=objc
Effect: Tells the delegate when the app is about to terminate.
Returns: in at most 5 seconds
Variables: UIApplicationDelegate applicationDelegate
Assuming: Not called if it suport background execution.
Typ: NSNotificationName

Constant: UIApplicationDidBecomeActiveNotification
Meaning: A notification that posts when the app becomes active.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdidbecomeactivenotification?language=objc
Language: Objective-C

Constant: UIApplicationDidEnterBackgroundNotification
Meaning: A notification that posts when the app enters the background.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdidbecomeactivenotification?language=objc
Language: Objective-C

Constant: UIApplicationWillEnterForegroundNotification
Meaning: A notification that posts shortly before an app leaves the background state on its way to becoming the active app.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdidbecomeactivenotification?language=objc
Language: Objective-C

Constant: UIApplicationWillResignActiveNotification
Meaning: A notification that posts when the app is no longer active and loses focus.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdidbecomeactivenotification?language=objc
Language: Objective-C

Constant: UIApplicationWillTerminateNotification
Meaning: A notification that posts when the app is about to terminate.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdidbecomeactivenotification?language=objc
Language: Objective-C

Instruction: [applicationDelegate
  applicationProtectedDataDidBecomeAvailable:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623044-applicationprotecteddatadidbecom?language=objc
Effect: Tells the delegate that protected files are available now.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  applicationProtectedDataWillBecomeUnavailable:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623019-applicationprotecteddatawillbeco?language=objc
Effect: Tells the delegate that the protected files are about to become unavailable.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  applicationDidReceiveMemoryWarning:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623019-applicationprotecteddatawillbeco?language=objc
Effect: Tells the delegate when the app receives a memory warning from the system.
Your implementation of this method should free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  applicationSignificantTimeChange :application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623019-applicationprotecteddatawillbeco?language=objc
Effect: Tells the delegate when there is a significant change in the time.
Variables: UIApplicationDelegate applicationDelegate
Example: Examples of significant time changes include the arrival of midnight, an update of the time by a carrier, and the change to daylight savings time.

Constant: UIApplicationProtectedDataDidBecomeAvailable
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatadidbecomeavailable?language=objc
Language: Objective-C

Constant: UIApplicationProtectedDataWillBecomeUnavailable
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatawillbecomeunavailable?language=objc
Language: Objective-C

Constant: UIApplicationDidReceiveMemoryWarningNotification
Meaning: A notification that posts when the app receives a warning from the operating system about low memory availability.
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatawillbecomeunavailable?language=objc
Language: Objective-C

Instruction: [applicationDelegate
  application:application
  shouldSaveSecureApplicationState:coder
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatawillbecomeunavailable?language=objc
Returns: whether to securely preserve the app’s state.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  shouldRestoreSecureApplicationState:coder
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatawillbecomeunavailable?language=objc
Returns: whether to restore the app’s saved state.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  viewControllerWithRestorationIdentifierPath:identifierComponents
  coder:coder
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatawillbecomeunavailable?language=objc
Returns: The view controller object to use or nil if the app delegate does not supply this view controller.
Variables: UIApplicationDelegate applicationDelegate
Extra: If this method returns nil, UIKit tries to find the view controller implicitly using the available restoration path and storyboard information.

Instruction: [applicationDelegate
  application:application
  willEncodeRestorableStateWithCoder:coder
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatawillbecomeunavailable?language=objc
Effect: Tells your delegate to save any high-level state information at the beginning of the state preservation process in coder
Variables: UIApplicationDelegate applicationDelegate
Extra: This method is not a substitute for saving your app’s data structures persistently to disk

Instruction: [applicationDelegate
  application:application
  didDecodeRestorableStateWithCoder:coder
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationprotecteddatawillbecomeunavailable?language=objc
Effect: Tells your delegate to restore any high-level state information as part of the state restoration process.
Variables: UIApplicationDelegate applicationDelegate
Extra: This method is not a substitute for saving your app’s data structures persistently to disk

Constant: UIApplicationStateRestorationBundleVersionKey
Page: https://developer.apple.com/documentation/uikit/uiapplicationstaterestorationbundleversionkey?language=objc
Language: Objective-C

Constant: UIApplicationStateRestorationSystemVersionKey
Meaning: The version of the system on which your app created the restoration archive.
Page: https://developer.apple.com/documentation/uikit/uiapplicationstaterestorationbundleversionkey?language=objc
Language: Objective-C

Constant: UIApplicationStateRestorationTimestampKey
Meaning: The time your app created the restoration archive.
Page: https://developer.apple.com/documentation/uikit/uiapplicationstaterestorationbundleversionkey?language=objc
Language: Objective-C

Constant: UIApplicationStateRestorationUserInterfaceIdiomKey
Meaning: The user interface idiom that was in effect when your app created the restoration archive.
Page: https://developer.apple.com/documentation/uikit/uiapplicationstaterestorationbundleversionkey?language=objc
Language: Objective-C

Constant: UIStateRestorationViewControllerStoryboardKey
Meaning: A reference to the storyboard that contains the view controller.
Page: https://developer.apple.com/documentation/uikit/uiapplicationstaterestorationbundleversionkey?language=objc
Language: Objective-C

Instruction: [applicationDelegate
  application:application
  handleEventsForBackgroundURLSession:identifier
  completionHandler:completionHandler
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622941-application?language=objc
Effect: Tells the delegate that events related to a URL session are waiting to be processed.
Variables: UIApplicationDelegate applicationDelegate

Typ: UIBackgroundFetchResult
TypMeaning: Constants that indicate the result of a background fetch operation.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622941-application?language=objc
Language: Objective-C
Value: UIBackgroundFetchResultNewData
New data was successfully downloaded.
Value2: UIBackgroundFetchResultNoData
There was no new data to download.
Value3: UIBackgroundFetchResultFailed
An attempt to download data was made but that attempt failed.

Instruction: [applicationDelegate
  application:application
  didRegisterForRemoteNotificationsWithDeviceToken:deviceToken
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate that the app successfully registered with Apple Push Notification service (APNs).
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  didFailToRegisterForRemoteNotificationsWithError:error
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate when Apple Push Notification service cannot successfully complete the registration process.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  didReceiveRemoteNotification:userInfo
  fetchCompletionHandler:completionHandler
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the app that a remote notification arrived that indicates there is data to be fetched, informations to get them are in userInfo.
Execute completionHandler once done.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  willContinueUserActivityWithType:userActivityType
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Returns: Whether you want to notify the user that a continuation is in progress. Otherwise iOS do it
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  continueUserActivity:userActivity
  restorationHandler:handler
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: execute handler to continue the userActivity
Returns: Whether you want to notify the user that a continuation is in progress. Otherwise iOS do it
Variables: UIApplicationDelegate applicationDelegate
Intuition: Allow to transition from another app, or siri

Instruction: [applicationDelegate
  application:application
  didUpdateUserActivity:userActivity
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate that the activity was updated.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  didFailToContinueUserActivityWithType:userActivityType
  error:error
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate that the activity couldn’t be continued.
Variables: UIApplicationDelegate applicationDelegate

Instruction: [applicationDelegate
  application:application
  performActionForShortcutItem:shortcutItem
  completionHandler:completionHandler
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate that the user selected a Home screen quick action for your app, except when you’ve intercepted the interaction in a launch method.
Variables: UIApplicationDelegate applicationDelegate
Assuming: This method is not called for scene-based apps.

Instruction: [applicationDelegate
  application:application
  handleWatchKitExtensionRequest:userInfo
  reply:reply
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Asks the delegate to respond to a request from a paired watchOS app.
Variables: UIApplicationDelegate applicationDelegate
Assuming: This method is not called for scene-based apps.

Instruction: [applicationDelegate
  applicationShouldRequestHealthAuthorization:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate when your app should ask the user for access to his or her HealthKit data.
Variables: UIApplicationDelegate applicationDelegate
Assuming: In your implementation of this method, call the handleAuthorizationForExtensionWithCompletion: method of the HKHealthStore object.

Instruction: [applicationDelegate
  applictation:application
  openURL:url
  options:options
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Asks the delegate to open a resource specified by a URL, and provides a dictionary of launch options.
Returns: whether the delegate successfully handled the request
Variables: UIApplicationDelegate applicationDelegate

Constant: UIApplicationOpenURLOptionsKey
Meaning: Keys you use to access values in the options dictionary when opening a URL.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Language: Objective-C

Typ: UIApplicationExtensionPointIdentifier
Meaning: A structure that identifies types of extensions.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Language: Objective-C

Instruction: A structure that identifies types of extensions.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Returns: The identifier for custom keyboards.

Instruction: [applicationDelegate
  application:application
  handlerForIntent:intent
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Returns: An instance of a type capable of handling the specified intent, or nil if your app doesn’t handle the intent.
Variables: UIApplicationDelegate applicationDelegate
Extra: Siri invokes this method on the main queue when it wants to process one of your app’s supported intents. To indicate the intents that your app supports, populate the INIntentsSupported array in your app target’s Info.plist file.

Instruction: [applicationDelegate
  application:application
  userDidAcceptCloudKitShareWithMetadata:cloudKitShareMetadata
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate that the app now has access to shared information in CloudKit.
Variables: UIApplicationDelegate applicationDelegate
Extra: Siri invokes this method on the main queue when it wants to process one of your app’s supported intents. To indicate the intents that your app supports, populate the INIntentsSupported array in your app target’s Info.plist file.

Instruction: [applicationDelegate
  applicationShouldAutomaticallyLocalizeKeyCommands:application
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc
Effect: Tells the delegate that the app now has access to shared information in CloudKit.
Returns: Whether to enable automatic shortcut localization for all app-specific menus
Variables: UIApplicationDelegate applicationDelegate
Extra: Siri invokes this method on the main queue when it wants to process one of your app’s supported intents. To indicate the intents that your app supports, populate the INIntentsSupported array in your app target’s Info.plist file.

Question: Why must you localize shortcut
Answer: some shortcut may use letter not available on the user keyboard
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/3783574-applicationshouldautomaticallylo?language=objc
Variables: UIApplicationDelegate applicationDelegate
Answer2: keyboard may move punctuation, making some shortcuts hard to make
Extra: Siri invokes this method on the main queue when it wants to process one of your app’s supported intents. To indicate the intents that your app supports, populate the INIntentsSupported array in your app target’s Info.plist file.

Instruction: [applicationDelegate
  application:application
  supportedInterfaceOrientationsForWindow:window
]
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/3783574-applicationshouldautomaticallylo?language=objc
Returns: A bit mask of the UIInterfaceOrientationMask constants that indicate the orientations to use for the view controllers.
Variables: UIApplicationDelegate applicationDelegate
Extra: Siri invokes this method on the main queue when it wants to process one of your app’s supported intents. To indicate the intents that your app supports, populate the INIntentsSupported array in your app target’s Info.plist file.

Typ: UIInterfaceOrientation
TypMeaning: Constants that specify the orientation of the app's user interface.
Page: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/3783574-applicationshouldautomaticallylo?language=objc
Language: Objective-C
Value: todo

Typ: UIInterfaceOrientationMask
TypMeaning: Constants that specify a view controller’s supported interface orientations.
Page: https://developer.apple.com/documentation/uikit/uiinterfaceorientationmask?language=objc
Language: Objective-C
Value: Todo

Constant: UIApplicationInvalidInterfaceOrientationException
Meaning: An exception that’s thrown if a view controller or the app returns an invalid set of supported interface orientations.
Page: https://developer.apple.com/documentation/uikit/uiinterfaceorientationmask?language=objc
Language: Objective-C

Variable: applicationDelegate.window
Meaning: The window to use when presenting a storyboard.
Page: https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background?language=objc
Language: Objective-C
Variables: UIApplicationDelegate applicationDelegate

Question: Why may an app run in background
Answer: It leaves foreground and is closing
Page: https://developer.apple.com/documentation/uikit/uiinterfaceorientationmask?language=objc
Answer2: It is started in background because it do not need to show UI
Answer3: it may moves from suspended to perform an important task

Name: App snapshot
Definition: A snapshot of the app content, to represents the app in the app manager
Page: https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background?language=objc

Question: What to do during a background transition
Answer: Discard any images or media that you read directly from files.
Discard any large, in-memory objects that you can recreate or reload from disk.
Page: https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background?language=objc
Answer2: Release access to the camera and other shared hardware resources.
Close connections to any shared system databases.
Answer3: Hide sensitive information (such as passwords) in your app’s user interface.
Answer4: Dismiss alerts and other temporary interfaces.
Answer5: Unregister from Bonjour services and close any listening sockets associated with them
Name: App snapshot
Answer6: Ensure that all Metal command buffers have been scheduled. For more information, see Preparing Your Metal App to Run in the Background.
Answer7: Ensure that all OpenGL commands you previously submitted have finished.

Question: What to do before in UI before taking a snapshot
Answer: Hide all sensitive data
Page: https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background?language=objc
Answer2: Dismiss alert, temorary interface and system view controlles
Name: App snapshot

Question: Events that can be received while in background
Answer: Audio communication using AirPlay, or Picture in Picture video.
Page: https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background?language=objc
Answer2: Location-sensitive services for users.
Answer3: Voice over IP.
Answer4: Communication with an external accessory.
Answer5: Communication with Bluetooth LE accessories, or conversion of the device into a Bluetooth LE accessory.
Name: App snapshot
Answer6: Regular updates from a server.
Answer7: Support for Apple Push Notification service (APNs).

Question: Constraint on background task
Answer: They must be registered by the app before the end of the launch sequence
Page: https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/using_background_tasks_to_update_your_app?language=objc
Name: App snapshot

Question: todo: background task
Page: https://developer.apple.com/documentation/backgroundtasks?language=objc
Name: App snapshot

Question: How to get more time to end the app critical task before closing
Answer: use background tasks
Page: https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/extending_your_app_s_background_execution_time?language=objc
Name: App snapshot

Instruction: [application
  openURL:url
  options:options
  completionHandler:completion
]
Page: https://developer.apple.com/documentation/uikit/uiapplication/1648685-openurl?language=objc
Effect: Attempts to asynchronously open the resource at the specified URL. Execute completion(success) when done,
Variables: UIApplication *application
Name: App snapshot

Instruction: [application
  registerForRemoteNotifications
]
Page: https://developer.apple.com/documentation/uikit/uiapplication/1648685-openurl?language=objc
Effect: Registers to receive remote notifications through Apple Push Notification service. In cass of success, it calls application:didRegisterForRemoteNotificationsWithDeviceToken:
Variables: UIApplication *application
Name: App snapshot

Variable: application.applicationSupportsShakeToEdit
Meaning: whether shaking the device displays the undo-redo user interface.
Page: https://developer.apple.com/documentation/uikit/uiapplication/1623127-applicationsupportsshaketoedit?language=objc
Context: App snapshot
Language: Objective-C
Variables: UIApplication *application
Initialization: YES

Instruction: [application
  canOpenURL:url
]
Page: https://developer.apple.com/documentation/uikit/uiapplication/1623127-applicationsupportsshaketoedit?language=objc
Returns: whether an app is available to handle a URL scheme.
Variables: UIApplication *application
Assuming: If your app is linked on or after iOS 9.0, you must declare the URL schemes you pass to this method by adding the LSApplicationQueriesSchemes key to your app's Info.plist file.

Constant: applicationSupportsShakeToEdit
Meaning: A unique identifier for the new background task. You must pass this value to the endBackgroundTask: method to mark the end of this task. Handler is called shortly before remaining time is 0
Page: https://developer.apple.com/documentation/uikit/uiapplication/1623127-applicationsupportsshaketoedit?language=objc
Language: Objective-C
Assuming: Must call endBackgroundTask: before end of timer or the app halt

Instruction: [application
  beginBackgroundTaskWithName:name
  expirationHandler:handler
]
Page: https://developer.apple.com/documentation/uikit/uiapplication/1623127-applicationsupportsshaketoedit?language=objc
Effect: Same as
[application beginBackgroundTaskWithExpirationHandler:handler]
and show "name" in the debugger
Variables: UIApplication *application

Typ: UIUserInterfaceSizeClass
TypMeaning: the size class of a view.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIUserInterfaceSizeClassUnspecified
Indicates the size class has not been specified.
Value2: UIUserInterfaceSizeClassCompact
Indicates a compact size class.
Value3: UIUserInterfaceSizeClassRegular
Indicates a regular size class.

Typ: UIUserInterfaceStyle
TypMeaning: the interface style for the app.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIUserInterfaceStyleUnspecified
An unspecified interface style.
Value2: UIUserInterfaceStyleLight
The light interface style.
Value3: UIUserInterfaceStyleDark
The dark interface style.

Typ: UIAccessibilityContrast
TypMeaning: the accessibility contrast setting
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIAccessibilityContrastUnspecified
An unspecified contrast.
Value2: UIAccessibilityContrastNormal
A normal contrast level.
Value3: UIAccessibilityContrastHigh
A high contrast level.

Typ: UIUserInterfaceLevel
TypMeaning: the visual level for content in the window.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIUserInterfaceLevelUnspecified
An unspecified interface level.
Value2: UIUserInterfaceLevelBase
The level for your window's main content.
Value3: UIUserInterfaceLevelElevated
The level for content visually above your window's main content.

Typ: UILegibilityWeight
TypMeaning: the weight to apply to text in your interface.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UILegibilityWeightUnspecified
An unspecified text weight.
Value2: UILegibilityWeightRegular
A regular font weight.
Value3: UILegibilityWeightBold
A bold font weight.

Typ: UIForceTouchCapability
TypMeaning: the availability of 3D Touch on a device.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIForceTouchCapabilityUnknown
The availability of 3D Touch is unknown.
Value2: UIForceTouchCapabilityAvailable
3D Touch is available on the device.
Value3: UIForceTouchCapabilityUnavailable
3D Touch is not available on the device.

Typ: UITraitEnvironmentLayoutDirection
TypMeaning: the layout direction associated with the current environment.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UITraitEnvironmentLayoutDirectionUnspecified
An unknown layout direction.
Value2: UITraitEnvironmentLayoutDirectionLeftToRight
A left-to-right layout direction.
Value3: UITraitEnvironmentLayoutDirectionRightToLeft
A right-to-left layout direction.

Typ: UIUserInterfaceActiveAppearance
TypMeaning: whether the user interface has an active appearance.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIUserInterfaceActiveAppearanceUnspecified
The interface has an unspecified appearance.
Value2: UIUserInterfaceActiveAppearanceInactive
The interface has an inactive appearance.
Value3: UIUserInterfaceActiveAppearanceActive
The interface has an active appearance.

Typ: UITraitEnvironment
Meaning: A set of A set of methods that makes the iOS interface environment available to your app.methods that makes the iOS interface environment available to your app.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C

Instruction: [traitEnvironment
  traitCollectionDidChange
]
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Effect: Called when the iOS interface environment changes.
Variables: UITraitEnvironment traitEnvironment

Variable: traitEnvironment.traitCollection
Meaning: The traits, such as the size class and scale factor, that describe the current environment of the object.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Variables: UITraitEnvironment traitEnvironment

Typ: UIContentSizeCategory
TypMeaning: the preferred size of your content.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIContentSizeCategoryUnspecified
An unspecified font size.
UIContentSizeCategoryExtraSmall
An extra-small font.
UIContentSizeCategorySmall
A small font.
UIContentSizeCategoryMedium
A medium-sized font.
UIContentSizeCategoryLarge
A large font.
UIContentSizeCategoryExtraLarge
An extra-large font.
UIContentSizeCategoryExtraExtraLarge
A font that is larger than the extra-large font but smaller than the largest font size available.
UIContentSizeCategoryExtraExtraExtraLarge
The largest font size.

Constant: UIContentSizeCategoryNewValueKey
Meaning: A key that reflects the new preferred content size.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C

Constant: UIContentSizeCategoryDidChangeNotification
Meaning: A notification that posts when the user changes the preferred content size setting.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C

Variable: traitCollection.userInterfaceStyle
Meaning: The style associated with the user interface.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Typ: UIUserInterfaceStyle
Variables: UITraitCollection traitCollection

Typ: UIUserInterfaceIdiom
TypMeaning: the interface type for the device or an object that has a trait environment, such as a view and view controller.
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Language: Objective-C
Value: UIUserInterfaceIdiomUnspecified
An unspecified idiom.
Value2: UIUserInterfaceIdiomPhone
An interface designed for iPhone and iPod touch.
Value3: UIUserInterfaceIdiomPad
An interface designed for iPad.
Value4: UIUserInterfaceIdiomTV
An interface designed for tvOS and Apple TV.
Value5: UIUserInterfaceIdiomCarPlay
An interface designed for an in-car experience.
Value6: UIUserInterfaceIdiomMac
An interface designed for the Mac.