The camera app that minds its own business.
Apple provides a number of security features we can use on our devices to ensure the device is as secure as possible. This section outlines settings you can use to protect your device.
This option controls when the USB port is deactivated. By default, this should be in the most secure setting which is a setting of: disabled. This is important because it hardens the device from attacks via the USB port. The behavior of the USB port is dependent on the lock state of the device.
| Condition | What the port will do |
|---|---|
| Device has been unlocked < 1 h ago | Accept data from known accessories and hosts; prompt for “Trust This Computer” for new hosts |
| Locked ≥ 1 h | New accessories are blocked until the user unlocks; previously-trusted ones still work for 30 days ➀ |
| No accessory use for ≥ 3 d | The moment the device locks, all data connections are torn down; user must unlock to re-enable ➀ |
To check whether you have this setting disabled, go to:
Settings → Face ID & Passcode (or Touch ID & Passcode) → Allow Access When Locked → Accessories
Verify the setting is disabled (the default).
Use swiftformat to do this.
swiftformat --swiftversion 6.0.3 .
You're going to probably have your own team ID used in builds/provisioning. You can set that inside Configs/LocalOverrides.xcconfig. The contents of that file
should look something like this. Use your ID you see inside the .pbxproj file.
DEVELOPMENT_TEAM = AABBCC12345
Then to make sure this is included, do this in Xcode:
- Click on the project.
- Info > expand the Configuration section > Debug
- Expand the debug section.
- All targets are listed. At least set a config file for
SnapSafewhich is the main app local build. - In the column called
based on configuration file, select the fileConfigs/Signing.xcconfig.
That should point to that local config and your value there will override whatever is in the signing or project-level config. This avoids the .pbxproj file shenanigans.