Learn how to set up ObjecBox in a project in no time.
The easiest way to add ObjectBox to your project is CocoaPods, however manual setup is quite straightforward, too.
Add the following to your Podfile:
And then run
pod repo updatepod installPods/ObjectBox/setup.rb
The first call will ensure your local copy of the list of available CocoaPods is current, the second call is your usual procedure when adding a new pod to your file that will download the newest release of ObjectBox to your
Pods directory and install the Pod in your workspace.
Once you have ObjectBox downloaded,
setup.rb will set up the ObjectBox preprocessor in your project.
You can now open and build your project.
To download the pre-built framework for your project, fetch the version you need from our GitHub releases page:
Currently, use of ObjectBox from a sandboxed macOS application requires you to set up at least one App Group for ObjectBox to be able to open a database, in addition to whatever you would normally have done to gain access to the destination folder under the sandbox:
Open your project in Xcode.
Select the project icon at the very to of the Project Navigator.
Select the Capabilities tab where you turned on App Sandbox.
Turn on the switch next to App Groups.
if the App Groups list is empty, Click the little "+" icon to add one.
You should now see a list entry like
FGDTDLOBXDJ.$(TeamIdentifierPrefix). If you only see
$(TeamIdentifierPrefix) , you still need to set up your team and code-signing under General.
That is all, ObjectBox will pick up the App Group Identifier without any additional work.