-
-
Notifications
You must be signed in to change notification settings - Fork 3
Starting to use SyncState
Zach edited this page Nov 29, 2023
·
1 revision
To utilize SyncState, you will first need to set up iCloud capabilities and entitlements in your Xcode project. Here's an introduction to guide you through the process:
- Open your Xcode project and adjust the Bundle Identifiers for both macOS and iOS targets to match your own.
- Next, you need to add the iCloud capability to your project. To do this, select your project in the Project Navigator, then select your target. In the tab bar at the top of the editor area, click on "Capabilities".
- In the Capabilities pane, turn on iCloud by clicking the switch in the iCloud row. You should see the switch move to the On position.
- Once you have enabled iCloud, you need to enable Key-Value storage. You can do this by checking the "Key-Value storage" checkbox.
- You will now need to update your entitlements file. Open the entitlements file for your target.
- Make sure the iCloud Key-Value Store value matches your unique key-value store ID. Your unique ID should follow the format
$(TeamIdentifierPrefix)<your key-value_store ID>
. The default value should be something like,$(TeamIdentifierPrefix)$(CFBundleIdentifier)
. This is fine for single platform apps, but if your app is on multiple Apple OSs, it’s important that the key-value store ID portions are the same for both targets.
In addition to configuring the project itself, you also need to prepare the devices that will run the project.
- Ensure that iCloud Drive is enabled on both iOS and macOS devices.
- Log into both devices using the same iCloud account.
If you have any questions or run into any issues, feel free to reach out or submit an issue.
🚧 Under Construction 🚧