A simple Swift App QuickStart with the SQLite CloudSync extension loading. Now you can build cross-platform apps that sync data seamlessly across devices.
-
Open Xcode project
-
Download the latest version of
cloudsync-apple-xcframeworkfrom:
https://github.com/sqliteai/sqlite-sync/releases -
In Xcode, click on your project name in the source tree (top left with the Xcode logo)
-
In the new tab that opens, navigate to the left column under the Targets section and click on the first target
-
You should now be in the General tab. Scroll down to "Frameworks, Libraries, and Embedded Content"
-
Click the old
CloudSync.xcframeworkframework and press the - button -
Click the + button → Add Other... → Add Files...
-
Select the downloaded
CloudSync.xcframeworkfolder -
Switch to the Build Phases tab and verify that
CloudSync.xcframeworkappears under Embedded Frameworks
When you return to the main ContentView file, you may encounter an Apple security error:
- Click Done when the security dialog appears
- Open System Settings → Privacy & Security
- Scroll to the bottom and find the message "Mac blocked CloudSync"
- Click Allow Anyway
- Close and reopen ContentView in Xcode
- The same error should appear but now with a third button Open Anyway - click it
- If errors persist, try reopening and closing ContentView multiple times or repeat the security steps above
To verify that the extension loads correctly in your Swift project, run it for iOS or macOS.
When you run the test app, you should see status messages in the UI indicating:
- Database connection success
- Extension loading status
- CloudSync version information (if successfully loaded)
This confirms that CloudSync is properly integrated and functional in your Swift project.