iOS Hacking
Understand iOS app security, jailbreak concepts, storage, biometrics and official Activation Lock recovery, with a practical app-review workflow.
iOS security research includes application logic, storage, network behaviour and the platform’s trust boundaries. Start with an app you own or an intentionally vulnerable training app in a controlled environment.
Jailbreaking, a forgotten passcode, Touch ID or Face ID, and Activation Lock are different subjects. This guide explains the distinctions and links to official recovery processes for devices you own.
Before You Start
- Basic programming, HTTP and mobile-security concepts.
- A Mac with Xcode for the simulator-based project, or access to an appropriate authorised training environment.
- A test app and synthetic data; a physical device is needed for some hardware-security behaviour.
- Create an iOS App project using SwiftUI and Swift in Xcode, with bundle ID com.example.labnotes and an iOS 17-or-later deployment target for the lifecycle example. The platform-specific code requires Apple’s SDK; the reading and report exercises can be followed on any computer.
YOUR PRACTICAL PROJECT
An iOS App Security Review
Build LabNotes in SwiftUI on a Mac, inspect its data container, add a scoped Keychain helper, test a local authentication gate and correct an intentional diagnostic logging issue. Produce an app review that distinguishes Simulator observations from hardware-backed guarantees.
SECTION 01
Start with the Platform’s Boundaries
iOS uses code signing, sandboxing, entitlements and data-protection mechanisms to constrain software and protect data. The Secure Enclave supports sensitive operations on compatible hardware. These features do not automatically correct a vulnerable application or its backend. An app can still make a bad authorisation decision or expose data it is legitimately allowed to access.
Separate the device, app and server in your threat model. A local biometric prompt may gate a feature, but the server must still verify the user’s authority for a requested object. A secure design depends on each boundary making the right decision.
Start with the app’s responsibilities: what it stores, which actions should require local authentication, and which requests a server would need to authorise. Code signing and sandboxing help constrain software, but cannot decide whether your app should log a note or let one account access another account’s record. Entitlements are declared capabilities, not a list of verified vulnerabilities. Your review will follow one invented note through UI, file storage and diagnostic output.
Define an iOS Review Boundary
App: owned LabNotes training project
Asset: an invented study note
Expected readers: the user of this app
Expected storage: app container; demo credential in a scoped Keychain item
Review: file handling, logs, local gate and one optional HTTPS request
Limits: Simulator findings do not establish physical-device protectionExpected Result
Save as ios-review.md. Use it to keep platform claims separate from app behaviour.
Build Your Project · Step 1
Draw a test notes app, local storage, biometric or passcode interaction and a fictional server. Label where each access decision belongs.
- Draw the app sandbox and mark the file, Keychain and optional server boundaries.
- Define which action the later local gate should protect.
- List hardware-backed behaviours that require a physical device to assess.
Keep This Deliverable
A small threat model and a clear evidence scope.
Common Mistakes and Fixes
- An entitlement’s presence is a starting point for review. Identify the capability and actual code path before making a finding.
Check Your Understanding
Can a correctly signed sandboxed app still expose data through its own logic?
Reveal the explanation
Platform controls and application logic address different boundaries. A correctly signed sandboxed app can still expose data through its own code.
Useful Links for This Step
SECTION 02
Use a Simulator and State Its Limits
Xcode’s simulator is useful for developing an app and testing many UI and logic behaviours. It is not a physical iPhone and does not reproduce every hardware-backed protection, biometric property or performance characteristic. Simulator observations should be labelled accordingly.
Start with a small app you control or a training app linked from OWASP MASTG. Keep test data fictional and use a separate test configuration. A real-device review needs appropriate signing, deployment and authorisation; follow current Apple developer instructions for your environment rather than assuming any downloaded app can be inspected or modified.
Create an iOS App project in Xcode, choose SwiftUI and Swift, and use com.example.labnotes as the bundle identifier for this exercise. Select an installed simulator runtime and run the generated app once. Keep the generated app entry file; the next step replaces ContentView.swift. Record the chosen runtime, build configuration and whether a debugger is attached. On Windows or Linux, read the code and complete the planning sections, but do not label the iOS runtime steps as executed.
Inspect Available Simulator Targets
xcrun simctl list devices available
xcrun simctl help get_app_containerExpected Result
Run in Terminal on the Mac with Xcode tools selected. The first lists usable simulated devices; the second explains the installed tool’s container-query syntax. No device is erased or modified.
Build Your Project · Step 2
Record Xcode, the simulated device and the app build configuration in your private notebook. List which checks need a real device before you claim they are validated.
- Run the untouched generated app before editing it.
- Record the app bundle ID and selected simulator identifier.
- Choose one simulator for the rest of the project so later container commands are unambiguous.
Keep This Deliverable
A verified project baseline and simulator record.
Common Mistakes and Fixes
- If xcrun cannot find simctl, use Xcode’s documented command-line tools selection. Missing runtime support is an environment issue, not an app security result.
Check Your Understanding
Which Simulator results should not be generalised to physical devices?
Reveal the explanation
Simulator is useful for app logic and UI tests, but does not reproduce every hardware capability, performance characteristic or data-protection behaviour.
Useful Links for This Step
SECTION 03
Create the SwiftUI Notes App
Replace ContentView.swift with this complete view and keep the generated LabNotesApp entry point. Save writes a small UTF-8 file, Load reads it and Delete removes it. The example requests complete file protection for the file, but observing a readable simulator container does not measure the physical device’s encryption boundary. That distinction is part of the later storage review.
Save intentionally prints the fictional note to the debug console. This gives you a specific data-handling mistake to investigate and fix. Use invented content only. The app is deliberately small: it has no real accounts, no database and no server session. Short file operations keep the first example readable; larger production workloads need appropriate background I/O and error handling.
ContentView.swift - Training App
import SwiftUI
import Foundation
struct ContentView: View {
@State private var note = ""
@State private var feedback = "Use invented notes only"
private var noteURL: URL {
FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
.appendingPathComponent("note.txt")
}
var body: some View {
NavigationStack {
Form {
TextEditor(text: $note)
.frame(minHeight: 140)
.accessibilityLabel("Fictional note")
Button("Save", action: saveNote)
Button("Load", action: loadNote)
Button("Delete", action: deleteNote)
Text(feedback)
}
.navigationTitle("LabNotes")
}
}
private func saveNote() {
guard note.count <= 200 else { feedback = "Use at most 200 characters"; return }
do {
try Data(note.utf8).write(to: noteURL, options: [.atomic, .completeFileProtection])
print("LabNotes saved: " + note) // Intentional training defect.
feedback = "Saved"
} catch { feedback = "Save failed" }
}
private func loadNote() {
guard FileManager.default.fileExists(atPath: noteURL.path) else {
note = ""; feedback = "No saved note"; return
}
do { note = try String(contentsOf: noteURL, encoding: .utf8); feedback = "Loaded" }
catch { feedback = "Load failed" }
}
private func deleteNote() {
do {
if FileManager.default.fileExists(atPath: noteURL.path) {
try FileManager.default.removeItem(at: noteURL)
}
note = ""; feedback = "Note removed"
} catch { feedback = "Delete failed" }
}
}Expected Result
Build and run on your selected simulator. Save SYNTHETIC-ALPHA, change the editor text and Load to retrieve the file. Delete removes it. Xcode’s debug console also contains the intentional log copy.
Build Your Project · Step 3
Build the exact data flow that the review will assess.
- Replace only ContentView.swift and confirm the baseline interactions.
- Try a note longer than 200 characters and observe the validation message.
- Draw the file copy and the console copy as distinct destinations.
Keep This Deliverable
An owned training app with a known, observable logging defect.
Common Mistakes and Fixes
- If ContentView is declared twice, remove the duplicate view declaration rather than replacing the generated app entry point.
Check Your Understanding
Does requesting a file-protection option prove that no other copy of the data exists?
Reveal the explanation
No. Logs, backups, caches and network requests are separate paths. Review each copy and its actual access conditions.
Useful Links for This Step
SECTION 04
Map Storage, Permissions and Sensitive Data
Identify what the app stores in files, preferences, databases and the Keychain. Different storage mechanisms support different purposes; a convenient preferences store is not automatically the right place for a credential. Choose protection and accessibility settings based on when the data needs to be available and what happens when the device is locked.
Review requested permissions and the explanation shown to the user. Test denial, later revocation and feature failure. Inspect logs and screenshots for accidental sensitive content. A review should connect each observation to an actual data flow rather than declaring every file in the app container a vulnerability.
After saving a note, use simctl to locate the owned app’s data container. The command returns a path specific to your Mac and simulator; do not hardcode that path into the guide or report. Inspect only the synthetic note. Reading the file through your development environment confirms where the app stored it; it does not demonstrate a sandbox escape or disprove hardware-backed protection. Record the storage location, requested protection class and what your observation can actually establish.
Read the Owned Simulator Note
xcrun simctl get_app_container booted com.example.labnotes data
# In macOS Terminal, with exactly one simulator booted:
APP_DATA=$(xcrun simctl get_app_container booted com.example.labnotes data)
cat "$APP_DATA/Documents/note.txt"Expected Result
The first command prints the selected simulator container. The last reads the fictional note from your own app. If several simulators are booted, replace booted with your recorded simulator identifier.
Build Your Project · Step 4
Follow one note from creation through deletion. Check whether unnecessary copies appear in logs or exported files.
- Compare Save, Load and Delete with the presence of Documents/note.txt.
- Record file protection as a source/configuration observation, not a verified device-encryption claim.
- Identify potential backups and caches as separate follow-up questions.
Keep This Deliverable
A storage inventory with clear simulator limitations.
Common Mistakes and Fixes
- A missing file may mean you have not saved a note, selected the wrong simulator or used a different bundle ID. Check those before changing permissions.
Check Your Understanding
Does reading your own simulator container demonstrate a sandbox escape?
Reveal the explanation
Your debugger and host have development access to the simulator. That observation does not establish what another app or a locked physical device can access.
Useful Links for This Step
SECTION 05
Store a Small Demo Secret in the Keychain
Preferences are convenient for harmless UI choices, while small credentials need an appropriate protected store. Add DemoTokenStore.swift to the app target. The helper scopes every query to a service and account name so removal affects only its own training item. It updates an existing item or adds one when missing, and treats an absent item as a normal read result.
The accessibility choice here is when-unlocked, this-device-only. It is a policy choice with tradeoffs for background access and migration, not a universal answer for every app. Store only the fixed demo string supplied below. This item does not establish a real server session, and a successful Keychain operation in Simulator does not test Secure Enclave hardware.
DemoTokenStore.swift
import Foundation
import Security
enum DemoTokenStore {
private static var query: [String: Any] {
[kSecClass as String: kSecClassGenericPassword,
kSecAttrService as String: "com.example.labnotes.training",
kSecAttrAccount as String: "demo-token"]
}
private static func requireSuccess(_ status: OSStatus) throws {
if status != errSecSuccess {
throw NSError(domain: NSOSStatusErrorDomain, code: Int(status), userInfo: nil)
}
}
static func save(_ value: String) throws {
let data = Data(value.utf8)
let changes: [String: Any] = [kSecValueData as String: data]
let status = SecItemUpdate(query as CFDictionary, changes as CFDictionary)
if status == errSecItemNotFound {
var item = query
item[kSecValueData as String] = data
item[kSecAttrAccessible as String] = kSecAttrAccessibleWhenUnlockedThisDeviceOnly
try requireSuccess(SecItemAdd(item as CFDictionary, nil))
} else { try requireSuccess(status) }
}
static func read() throws -> String? {
var item = query
item[kSecReturnData as String] = true
item[kSecMatchLimit as String] = kSecMatchLimitOne
var result: CFTypeRef?
let status = SecItemCopyMatching(item as CFDictionary, &result)
if status == errSecItemNotFound { return nil }
try requireSuccess(status)
guard let data = result as? Data, let value = String(data: data, encoding: .utf8) else {
throw NSError(domain: NSOSStatusErrorDomain, code: Int(errSecDecode), userInfo: nil)
}
return value
}
static func remove() throws {
let status = SecItemDelete(query as CFDictionary)
if status != errSecItemNotFound { try requireSuccess(status) }
}
}Expected Result
The helper creates, updates, reads and deletes only the scoped demo-token item. Add the following temporary test button inside the existing Form.
Exercise the Scoped Demo Item
Button("Test Demo Keychain Item") {
do {
try DemoTokenStore.save("demo-value-one")
guard try DemoTokenStore.read() == "demo-value-one" else {
feedback = "Initial read failed"; return
}
try DemoTokenStore.save("demo-value-two")
guard try DemoTokenStore.read() == "demo-value-two" else {
feedback = "Update read failed"; return
}
try DemoTokenStore.remove()
feedback = try DemoTokenStore.read() == nil ? "Demo item checks passed" : "Delete check failed"
} catch { feedback = "Keychain operation failed" }
}Expected Result
The button reports success after a save, update, read and scoped deletion. It never prints the stored value or removes unrelated Keychain items.
Build Your Project · Step 5
Add a protected-storage experiment with a clearly scoped cleanup path.
- Include the helper in the app target and run the demo button.
- Explain the service/account scope and accessibility choice.
- Keep “server authentication not implemented” in the review limitations.
Keep This Deliverable
A tested helper and a short storage-policy rationale.
Common Mistakes and Fixes
- Inspect OSStatus in the debugger if an operation fails. Do not replace the scoped query with a broad delete or add unnecessary Keychain sharing entitlements.
Check Your Understanding
Does storing a string in the Keychain make it a valid server credential?
Reveal the explanation
No. Storage protects a local value under a chosen policy. The server still decides whether a credential is valid, expired, revoked or authorised for a request.
Useful Links for This Step
SECTION 06
Review Network and Account Behaviour
Observe only your own app or an authorised lab app, using synthetic accounts. Check that sensitive traffic uses appropriate TLS and that certificate validation has not been weakened. App Transport Security provides platform defaults, but exceptions and application choices still need review. Do not modify other people’s devices or intercept their traffic.
Use two controlled accounts to test the server’s object permissions, just as in a web application. Logging out should invalidate the intended session state, and the app should handle expired credentials without exposing private content. Certificate pinning, when used, is a separate design choice and can affect how a permitted test environment is instrumented.
The base app has no backend, so do not invent a network finding. For an optional experiment, add the button below inside Form. It makes a GET request to example.com using URLSession, sends no note and checks the HTTP response type. App Transport Security’s defaults remain in place; no broad insecure-load exception is needed for this HTTPS URL. A transport success and an application success are different outcomes, so display the status and handle non-2xx responses deliberately.
Optional HTTPS Check Inside Form
Button("Check HTTPS") {
Task { @MainActor in
guard let url = URL(string: "https://example.com/") else { return }
var request = URLRequest(url: url)
request.timeoutInterval = 5
do {
let (_, response) = try await URLSession.shared.data(for: request)
guard let http = response as? HTTPURLResponse else {
feedback = "Unexpected response type"; return
}
feedback = (200..<300).contains(http.statusCode)
? "HTTPS request succeeded"
: "HTTP status: " + String(http.statusCode)
} catch { feedback = "Request failed; check connectivity and TLS" }
}
}Expected Result
The button reports the ordinary HTTPS request outcome without sending note content. Disconnect networking to verify the failure message. Do not treat this single request as a complete network-security assessment.
Build Your Project · Step 6
Document the optional HTTPS request and test its success or failure message. Sketch missing, expired and wrong-owner credential cases as a future backend design exercise; LabNotes does not implement a real session.
- Check that the request contains no note or demo token.
- Test success and unavailable networking without weakening TLS checks.
- Write a future account-API matrix for missing, expired and wrong-owner credentials; mark it as design work because this app has no real server session.
Keep This Deliverable
A network-flow record and an honest unimplemented-authentication note.
Common Mistakes and Fixes
- Inspect connectivity, URL and certificate trust before changing ATS settings. Broad exceptions can hide the issue you intended to understand.
Check Your Understanding
Does a successful local biometric prompt authorise a server request?
Reveal the explanation
A local biometric success does not authorise a server request. The server must validate its own session or credential and enforce object permissions.
Useful Links for This Step
SECTION 07
Understand Touch ID, Face ID and Passcodes
Biometrics provide a convenient way to authorise certain operations, while the device passcode remains central to the platform’s security model. Some situations require the passcode, and particular protected actions can have additional requirements. A biometric match is not the same thing as knowing an online account password.
For an app, test both successful and cancelled authentication, unavailable biometrics and the fallback behaviour its chosen policy permits. Do this through the simulator’s supported test controls or your own device’s normal settings. A claim about bypassing a real device’s fingerprint protection needs real evidence; changing a mock authentication result in your own app does not establish that claim.
Add import LocalAuthentication, @State private var unlocked = false and @State private var authenticating = false to ContentView. Add a Face ID usage description in the app target’s Info settings with the reason “Unlock the fictional lab note”. Place the method below inside ContentView and add Button("Unlock Note") { Task { await unlockNote() } } to Form. Disable that button while authenticating. Add .disabled(!unlocked) to TextEditor and the Save, Load and Delete buttons, and guard unlocked at the start of their action methods.
The policy allows the device-owner authentication options available on that system, including a passcode fallback where supported. This is a local UI gate, not a server login or a cryptographic binding of the note to a biometric operation. For stronger Keychain-bound access requirements, study Apple’s access-control APIs separately. Test success, cancellation and unavailable authentication rather than checking only a successful prompt.
Add a Local Authentication Method
@MainActor
private func unlockNote() async {
guard !authenticating else { return }
authenticating = true
defer { authenticating = false }
unlocked = false
let context = LAContext()
var failure: NSError?
guard context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &failure) else {
feedback = "Device-owner authentication is unavailable"
return
}
do {
unlocked = try await context.evaluatePolicy(.deviceOwnerAuthentication,
localizedReason: "Unlock the fictional lab note")
feedback = unlocked ? "Unlocked for this session" : "Still locked"
} catch { feedback = "Not unlocked" }
}Expected Result
With the supporting state, import and UI/action guards described above, only a successful policy result unlocks the note actions. Simulator availability and simulated biometric controls vary; unavailable policy should keep the app locked.
Guard Each Note Action
guard unlocked else { feedback = "Unlock the note first"; return }Expected Result
Insert as the first statement of saveNote, loadNote and deleteNote. Disabling a button improves the UI; the action guard also prevents an accidental call from skipping the gate.
Build Your Project · Step 7
Run the cases your environment supports and mark the rest “not tested”. Check that error messages help the user recover without disclosing sensitive data.
- Add the state, usage description, unlock button and guards.
- Test success, cancel and unavailable authentication using the environment’s supported controls.
- Record that the app receives a result, not fingerprint or face images.
Keep This Deliverable
A local-gate test matrix with actual outcomes and clear limits.
Common Mistakes and Fixes
- A missing Face ID usage description can prevent the intended flow. If the policy is unavailable on your simulator, keep the expected locked result and mark successful-device testing as outstanding.
Check Your Understanding
Does your app receive fingerprint images from LocalAuthentication?
Reveal the explanation
The app receives policy success or failure; it does not inspect a fingerprint. A local gate is also separate from server-side identity and object permissions.
Useful Links for This Step
SECTION 08
Remove Note Content from Diagnostic Output
The initial saveNote method prints the note. Reproduce that observation using a distinctive synthetic value and the Xcode console for your owned app. A debugger-attached build is a different environment from an ordinary user’s production installation, so the report must explain the access path. Do not claim that another random app can read the output merely because you can see it in Xcode.
Replace the print statement with an operation-only message and rebuild. Use a new marker for the retest so old console output cannot be mistaken for a new leak. Also check error paths: logging a whole request or model object in a catch block can reintroduce sensitive data after the obvious success-path message is fixed.
Replace the Intentional Logging Defect
print("LabNotes: note saved")Expected Result
Replace print("LabNotes saved: " + note) in saveNote. A new save reports the operation without including note content.
Build Your Project · Step 8
Fix and verify the app’s unnecessary diagnostic copy.
- Capture a before-fix console observation containing only invented text.
- Rebuild with the corrected message and save a new synthetic marker.
- Verify the marker is absent from new logs while Save and Load still work after unlocking.
Keep This Deliverable
A logging finding with before/after evidence and debugger prerequisites.
Common Mistakes and Fixes
- Make sure Xcode runs the rebuilt target and the correct simulator. Do not infer a failed fix solely from retained old console messages.
Check Your Understanding
Why use a new marker when retesting?
Reveal the explanation
Old logs can remain visible. A unique new value connects an observation to the rebuilt app and current test rather than historical output.
Useful Links for This Step
SECTION 09
Relock the View and Test State Transitions
An unlock flag should have a defined lifetime. Add @Environment(\.scenePhase) private var scenePhase to ContentView. For this simple foreground-only gate, relock when the scene leaves active state and clear the visible note text. Add the modifier below to the NavigationStack. The disk file remains, so the next successful unlock can Load it again. This is intentional; clearing the editor is not secure erasure of storage.
State transitions require testing: leaving the app, returning, cancelling authentication and handling an unavailable policy can occur in different orders. A local-authentication prompt can itself affect scene activity. Add the active-scene check after a successful evaluatePolicy call so a late result cannot unlock an inactive view. Review app-switcher snapshots on a physical test device before claiming a complete screen-privacy solution.
Relock When the Scene Leaves Active State
.onChange(of: scenePhase) { _, phase in
if phase != .active {
unlocked = false
note = ""
feedback = "Unlock to load your note"
}
}Expected Result
For the iOS 17-or-later target, attach this to NavigationStack. Add the scenePhase environment property to the view. The next example belongs immediately after evaluatePolicy returns in unlockNote.
Reject a Late Inactive Unlock
if scenePhase != .active {
unlocked = false
feedback = "Return to the app and unlock again"
return
}Expected Result
Place before assigning the success feedback. If authentication finishes while the view is inactive, the app remains locked. This conservative teaching policy may require retrying after an interrupted prompt.
Build Your Project · Step 9
Define and verify the lifetime of local access.
- Unlock and Load, leave the app, then return and confirm a new unlock is required.
- Cancel the next authentication and confirm protected actions remain unavailable.
- Separate screen-clearing observations from file deletion and hardware-protection claims.
Keep This Deliverable
A lifecycle matrix covering active, inactive, return and cancellation states.
Common Mistakes and Fixes
- If authentication causes an inactive transition, the conservative gate may remain locked. Record that behaviour and retry in the foreground rather than bypassing the guard.
Check Your Understanding
Does clearing the SwiftUI text state erase the file or Keychain item?
Reveal the explanation
No. UI state, app files and Keychain items are separate stores. Each needs its own lifecycle and deletion policy.
Useful Links for This Step
SECTION 10
Treat Jailbreaking as a Research Environment Choice
Jailbreaking changes platform restrictions and can permit deeper inspection or instrumentation on supported device and software combinations. Availability depends on the exact hardware and operating-system build. It can weaken protections, affect stability and change how applications behave. It is not a prerequisite for learning mobile security.
Use an owned spare device only when a research question actually requires that environment and you understand its consequences. Keep it separate from daily accounts and sensitive data. Findings that rely on a jailbroken environment should say so; do not present them as ordinary remote attacks against every iPhone.
Keep the core project on an ordinary simulator; it does not need a jailbreak. More advanced research may require a particular physical device, OS build and instrumented environment, but those prerequisites change what an observation means. A result obtained after disabling a platform protection cannot be reported as if it worked on every standard device. Record stock-device behaviour separately from modified-environment experiments and keep your main personal phone outside this learning setup.
State Environment-Dependent Conclusions
Observed in Simulator: file path, UI state and debug-console output
Requires physical testing: hardware-backed access and lock-state behaviour
Requires a separate research setup: jailbreak-dependent instrumentation
Not established: universal bypass of sandbox, passcode or biometricsExpected Result
Use this classification in the review’s limitations. It is an evidence map, not a jailbreak procedure.
Build Your Project · Step 10
Write one test you can perform without jailbreaking and one advanced question that might require deeper instrumentation. State the evidence and environment each would need.
- Label every finding with its actual environment.
- Explain why a modified-device observation has additional prerequisites.
- Choose one advanced topic to read after completing the standard app review.
Keep This Deliverable
A clear separation of normal and modified-environment evidence.
Common Mistakes and Fixes
- Version-specific research is not a general promise of access. Use the actual device/build conditions when assessing a claim.
Check Your Understanding
Why must modified-device findings state their prerequisites?
Reveal the explanation
A jailbreak changes platform assumptions. Results from that environment must state those prerequisites and cannot automatically be generalised to standard devices.
Useful Links for This Step
SECTION 11
Activation Lock and Forgotten-Passcode Recovery
Activation Lock helps associate a device with its owner through Find My and the Apple Account. Erasing a device does not automatically remove that ownership check. A forgotten device passcode and a forgotten Apple Account password require different recovery steps; some recovery paths erase local data.
For your own device, use Apple’s supported account or device recovery instructions. For a second-hand device, ask the previous owner to remove it through their account. Organisation-managed devices should go through the administrator. Apple may offer a support request with proof of purchase where applicable. Do not give account credentials or payment details to services promising a universal iCloud or fingerprint bypass.
Use a decision table to separate a device passcode, Apple Account access and Activation Lock. They are not interchangeable passwords. Official device recovery may erase data, while account recovery addresses the account itself; an ownership lock can require the legitimate owner’s action or documented support process. This course does not require a reset, account change or lock removal. Add official references and the expected consequences to a conceptual appendix instead of experimenting on a personal device.
Choose the Appropriate Recovery Route
Forgotten device passcode -> Apple's device-passcode recovery guidance
Forgotten Apple Account credentials -> official account recovery
Activation Lock -> legitimate owner removal or Apple's supported proof process
Organisation-managed device -> authorised administrator
LabNotes bug -> change and retest the app sourceExpected Result
The table identifies distinct problems. Read the official instructions before any real recovery action and do not promise that erasing a device removes Activation Lock.
Build Your Project · Step 11
Create a fictional recovery decision tree: passcode forgotten, account password forgotten, previous-owner lock and managed device. Link each case to the correct official process without resetting your daily device.
- Link each problem to its official recovery documentation.
- Record potential data loss separately from ownership verification.
- Keep recovery outside the app’s test results.
Keep This Deliverable
An ownership-recovery reference appendix with accurate distinctions.
Common Mistakes and Fixes
- A service offering a universal iCloud, fingerprint or passcode bypass is not evidence that it works for the user’s device and state.
Check Your Understanding
Are device passcode, account access and Activation Lock the same control?
Reveal the explanation
Local passcode recovery, account recovery and Activation Lock address different controls. An app vulnerability review does not establish a way around them.
Useful Links for This Step
SECTION 12
Choose Tools and Finish the Review
Xcode and its debugging tools cover development-time inspection. OWASP MASVS and MASTG provide a structured mobile-security reference. A permitted testing proxy or static-analysis tool can add evidence, but its output needs context and verification. Choose the tool based on the question and the environment you are authorised to inspect.
Finish with one finding or a clearly scoped negative result. Include the environment, steps, expected and actual behaviour, impact, fix and retest. State which hardware-specific checks remain untested. A precise limitation is more useful than a broad claim that a simulator exercise proves a device secure.
Use Xcode for source, target configuration and the debug console; simctl for the owned simulator container; and MASVS/MASTG to choose relevant requirements and tests. The completed report should trace the note, describe the logging issue, verify the fix, list the Keychain helper results and record the local-gate matrix. Keep tests that need a physical device in a clearly marked follow-up section. Do not turn a small tutorial review into an unsupported claim of complete app certification.
Finish the iOS Review
## Environment
Owned SwiftUI app; selected Simulator; debug build
## Data Flows
Editor -> protected-file request; editor -> corrected diagnostic message
Demo value -> scoped Keychain item -> scoped deletion
## Verified Behaviour
[record actual Save/Load/Delete, logging and gate results]
## Finding and Fix
Synthetic note in debug output; remove content and retest with a new marker
## Limits
No real server session; hardware-backed protection and physical-device snapshots not established
## Cleanup
Delete the synthetic note and only the scoped demo Keychain itemExpected Result
Replace the bracketed line with observations you actually performed. Keep unsupported platform claims out of the conclusion.
Build Your Project · Step 12
Write the review report and include the data inventory, authentication matrix and one concrete improvement. Repeat the relevant checks after the change.
- Repeat Save/Load/Delete, the Keychain button and local-gate tests after all changes.
- Write the logging finding with exact prerequisites, fix and retest evidence.
- Delete only the project’s synthetic data and preserve a reproducible source copy and review.
Keep This Deliverable
A complete iOS review with source, data inventory, tests, finding, remediation and explicit limits.
Common Mistakes and Fixes
- If a later UI change breaks an earlier test, fix the regression before marking the final report complete. Record skipped hardware tests honestly.
Check Your Understanding
What should the final app review explain?
Reveal the explanation
A useful app review states what was tested, what failed, why it failed, how it was fixed and what evidence confirms the change. It also states what remains unknown.
Useful Links for This Step
Check Your Finished Project
- Device, app and server security boundaries are distinguished.
- Simulator limitations are stated beside the evidence.
- Authentication tests include failure and cancellation.
- Recovery guidance follows ownership-verification processes.
- Follow the numbered project tasks and retain the named deliverable from each step.
- Record actual example results, failed cases and any environment-dependent tests you could not perform.
Access and Offline Reading
The complete guide is free to read here. Linked providers may require accounts or offer paid features; check their own access conditions.
The guide text, examples and illustrations are included in this website’s local copy. External documentation, platform accounts, downloads and hosted labs need an internet connection.
References and Further Learning
- Apple Platform Security
- Apple: Touch ID Security
- Apple: Activation Lock
- Apple: Forgotten Passcode
- Apple Account Recovery
- Xcode Documentation
- OWASP Mobile Application Security
- OWASP Mobile Application Security Testing Guide
- Xcode: Run on Simulated or Physical Devices
- Apple: Complete File Protection
- Apple Keychain Services
- Apple: Keychain Item Accessibility
- Apple: URLSession
- Apple: App Transport Security
- Apple Local Authentication
- Apple: Face ID Usage Description
- Apple: Logging
- Apple: Scene Phase

