This is step is listed in the instructions for installing Realm. link here: https://realm.io/docs/swift/latest/
I am new to xcode and I don't understand how to complete this step. Can someone give me detailed instructions? I found the Framework Search Paths section in the build settings, but I don't even know what it means to add a parent path.
I also need help with the next step, creating a new run script phase.
xcode ver 6.4
In order to create an iOS Framework you need to click on File -> New -> Project (Shift + Cmd + N) -> Framework (under iOS tab, Framework & Library section). Framework under Framework & Library section.
To include a framework in your Xcode project, choose Project > Add to Project and select the framework directory. Alternatively, you can control-click your project group and choose Add Files > Existing Frameworks from the contextual menu.
If you follow to 2nd step correctly, the project directory will be like following:
Now, you can build main app's target fine. However, if you execute the unit test with Realm, it will be failed to build due to it cannot find the framework. So you should tell where in the framework is. (More precisely, you should also set the Framework Search Paths
for the app's primary target. It was set by Xcode automatically when step 2 is done.)
To set the Framework Search Paths
for the unit test target, do the following steps:
$(PROJECT_DIR)
to text field
("Parent path" is the place where is in the framework. The framework in the project root directory that is represented $(PROJECT_DIR)
.)Please see the below image:
Now, you have done to the step 3. Step 4 is following:
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework/strip-frameworks.sh"
The step 4 is not required for development, but it needs to work around an App Store submission bug when you submit the app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With