Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ How to implement UI state restoration

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š How to implement UI state restoration


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: developer.apple.com

People naturally multitask on their devices. Whether theyโ€™re switching from app to app, bringing together apps on iPad using Slide Over or Split View, or creating multiple windows of the same app, they should be able to pick up right where they left off โ€”ย and UI state restoration is a core part of making that experience seamless.

When your app goes out of view, the appโ€™s process is typically put on pause; itโ€™s not given any more CPU time, which keeps the processor free for other tasks. If your app has background processes that are running, the system can even terminate those if an active app needs more resources than currently available.

Restoring the state of your UI is a crucial part of making your app feel responsive โ€”ย and itโ€™s especially important if you plan to support multiple windows in your iPadOS app. If you have a note-taking app that has four different notes open in different Split View pairings, for example, state restoration helps preserve each note, rather than returning someone to the main screen when they open one of the windows.

Two different types of scenes can be backgrounded and processes halted. These scenesโ€™ states should be saved to restore later.

Meet NSUserActivity

NSUserActivity is a core part of modern state restoration with UIScene and UISceneDelegate: It provides a lightweight way to capture the state of your app and put it to use later, holding key information for both view controllers and important view states โ€” information that can also be used when constructing view controllers for Handoff and Universal Linking.

While what you store in NSUserActivity is up to you, we recommend collecting only the bare minimum so that your app can quickly restore itself. Think of the most unique and simple way you can identify your view controller, like a clear identifier or URL. Include that information, and make sure you can identify where the view controller lives in your navigation and how content should appear within it. For example, when using an Xcode storyboard you may want to store and retrieve view controllers using restoration IDs.

Get started with UI state restoration

The best way to implement UI state restoration is to make your app scene-based, which requires iOS 13, iPadOS 13, Mac Catalyst 10.13, or tvOS 13 or later. (For more information on working with scenes in your app, check out the Developer Library.) Hereโ€™s how to get started with scene-based state restoration:

  1. Create a NSUserActivity object to save the app's state. This can be created in your scene delegate.
  2. In this NSUserActivity, store relevant information (like the current navigationโ€™s state, and view controllers that have been presented or pushed) along with your userโ€™s intent.
  3. Return this NSUserActivity within stateRestorationActivity(for:) in the scene delegate.

You need to collect the right information in each UIScene to pick up where someone left off.

This NSUserActivity will now be stored inside the sceneโ€™sย stateRestorationActivity property. When your app needs to restore its state, it should do so by looking for this saved NSUserActivity under scene(_:willConnectTo:options:) in the scene delegate.

What about the older view controller-based state restoration APIs?

If you need to support older versions of iOS, macOS, or tvOS, you can use older view controller-based APIs for state restoration via restoration classes and the app delegate. This also means if you want to update your app to adopt UIScene as well as implement UI state restoration across multiple versions of iOS, you will need to implement both scene-based and view-controller based APIs. However, we highly recommend building scene-based UI state restoration.

Compared to the older APIs, modern state restoration requires a different approach to how you define, save, and restore your UI state and your userโ€™s intent. With a scene-based app, you have to separate events in an applicationโ€™s life cycle and the sceneโ€™s life cycle, which means tracking changes also differs. Having multiple scenes means there are many more windows to track, each with unique user actions and navigation history. For some of those windows, you may choose not to restore state depending on their function, requiring state restoration to be more flexible and dependent on how you define the userโ€™s intent.

Prior to the introduction of UIScene, each app had a singular life cycle.

If you can update your app to scene-based restoration and take advantage of NSUserActivity, youโ€™ll also unlock easier pathways to implementing features like Spotlight search, Handoff, enabling Universal Links, and creating new scenes as primary or auxiliary windows. And youโ€™ll provide a smoother and frictionless experience for people using your app, too.


Resources

Watch โ€œArchitecting your app for multiple windowsโ€

Watch โ€œTargeting content with multiple windowsโ€

Watch โ€œWindow management in your multitasking appโ€

Learn more about restoring state in non-scene based apps

Explore sample code for restoring your appโ€™s state

...



๐Ÿ“Œ How to implement UI state restoration


๐Ÿ“ˆ 42.14 Punkte

๐Ÿ“Œ Montana Becomes First State To Implement Net Neutrality After FCC Repeal


๐Ÿ“ˆ 21.17 Punkte

๐Ÿ“Œ NVIDIA's Image Restoration AI: Almost Perfect


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Lucasfilm Creates A 4K Ultra-HD Restoration of the Original 'Star Wars'


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ The 4 Best Identity Theft Protection with Restoration


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Mirror of the Restoration of 1st Edition UNIX kernel source. 1972, Bell Telephone Laboratories Inc.


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ cPanel up to 74.0.7 File and Directory Restoration Stored cross site scripting


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ cPanel up to 73.x WHM File Restoration Interface Stored cross site scripting


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ cPanel up to 73.x File Restoration directory traversal


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Lucasfilm Creates A 4K Ultra-HD Restoration of the Original 'Star Wars'


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Venezuela's Maduro Says Cyber Attack Prevented Power Restoration


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Venezuela's Maduro Says Cyber Attack Prevented Power Restoration


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Google Android 10.0/11.0 restoration.c extend_frame_highbd heap-based overflow


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Florida Attempts the Largest Hydraulic Restoration Project In the World To Save the Everglades


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ HPR3073: Matchbox and Diecast Restoration


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Ransomware/exfiltration Campaign Targets Remote Access, Resists Resolution Through Data Restoration


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Google Android 11.0 restoration.c extend_frame_lowbd out-of-bounds write


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ OVH offers restoration timeline for fire-damaged data center


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ CNA Confirmed Complete Service Restoration A Month After The Ransomware Attack


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Searching for gold with habitat restoration in mind


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ FUJIFILM Ransomware Attack Update: Company Confirms Normal Service Restoration


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ The Touhou PC-98 Restoration Project


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ HPR3088: Matchbox Restoration Part 2


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Duke Nukem Forever Restoration Project gets a trailer


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ 8 Best Photo Restoration Software for PC


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Duke Nukem Forever: Restoration Project got a big upgrade


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Detected: Esteem Restoration Eagle targets the website of Signatory Contractors Association


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Detected: Esteem Restoration Eagle targets the website of Mantis Studios


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ HPR3098: Matchbox Restoration Part 3


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ AI Restoration Makes Apollo Moon Landing Footage Look Like It Was Shot In HD


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Detected: Esteem Restoration Eagle targets the website of thehaveneswatini.com


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ Detected: Esteem Restoration Eagle targets the website of DocEbills


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ HPR3109: Matchbox Restoration Part 4


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ one of the Codia AI Design technologies: Font Restoration Technology


๐Ÿ“ˆ 20.97 Punkte

๐Ÿ“Œ DuckDuckGo's Privacy Pro bundles a VPN with personal data removal and identity theft restoration


๐Ÿ“ˆ 20.97 Punkte











matomo