This project uses XcodeGen to generate Xcode project files. As such, a prerequisite is to install XcodeGen.
- Install XcodeGen
brew install XcodeGen- Create a copy of
Dynavity/settings.yml.samplenamedDynavity/settings.yml.
cp Dynavity/settings.yml.sample Dynavity/settings.yml- Open
Dynavity/settings.ymland replaceDEVELOPMENT_TEAMandPRODUCT_BUNDLE_IDENTIFIERwith your Team ID and a unique product bundle identifier respectively. One way to get your Team ID is by going to the Build settings in Xcode, choosing your team, then viewing the source file ofproject.pbxproj.
You can now generate your project settings by navigating to the directory containing project.yml, and executing xcodegen.
To automate the process, the following githooks can be added so that the xcodegen command will be executed on checkouts / pulls.
Warning: The following commands will overwrite whatever githooks you previously had for post-checkout and post-merge.
Assuming you are at the root directory of the repository, execute the following commands:
echo -e '#!/bin/sh\nxcodegen --spec Dynavity/project.yml --use-cache' > .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
echo -e '#!/bin/sh\nxcodegen --spec Dynavity/project.yml --use-cache' > .git/hooks/post-merge
chmod +x .git/hooks/post-merge
CocoaPods is used to manage third-party dependencies such as Firebase.
Before opening the project in Xcode, run the following command in the project root directory (Dynavity/).
pod installPlease take note of the following to avoid issues when building the project:
- Once
pod installis done, do not re-runxcodegen. If you need to do so, re-runpod installafter eachxcodegen. - Open the project in Xcode using only
Dynavity.xcworkspaceand notDynavity.xcodeproj.