Challenge - 5 Problems
Offline Data Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Why does storing data locally help offline use?
Imagine you use an app that shows your notes. Why does saving notes on your phone let you see them even without internet?
Attempts:
2 left
💡 Hint
Think about where the app gets data when internet is not available.
✗ Incorrect
Local storage means data is saved on the device itself. So the app can access it anytime, even without internet.
❓ ui_behavior
intermediate1:30remaining
What happens to app UI when offline with local data?
If an app saves user settings locally, what will the user see when offline?
Attempts:
2 left
💡 Hint
Think about where the app reads settings from when offline.
✗ Incorrect
Local data lets the app display saved user settings even without internet, keeping UI consistent.
❓ lifecycle
advanced2:00remaining
How does local data affect app lifecycle during offline use?
When an app is closed and reopened offline, how does local data help?
Attempts:
2 left
💡 Hint
Consider what the app can do with data saved on the device after reopening.
✗ Incorrect
Local data allows the app to quickly load content on startup even without internet, improving user experience.
advanced
2:00remaining
How does local data support navigation offline?
An app has multiple screens showing user info. How does local data help navigation when offline?
Attempts:
2 left
💡 Hint
Think about how saved data on device helps each screen show content.
✗ Incorrect
Local data lets each screen access needed info instantly, so users can move through the app offline.
🔧 Debug
expert2:30remaining
Why does this offline app crash when accessing local data?
This Swift code tries to read local data but crashes offline. What is the cause?
let data = try? Data(contentsOf: URL(string: "https://example.com/data.json")!)
Options:
Attempts:
2 left
💡 Hint
Check if the data source is local or remote and what happens offline.
✗ Incorrect
Loading data from a web URL requires internet. Offline, this fails and causes crash or nil data.