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.sample
namedDynavity/settings.yml
.
cp Dynavity/settings.yml.sample Dynavity/settings.yml
- Open
Dynavity/settings.yml
and replaceDEVELOPMENT_TEAM
andPRODUCT_BUNDLE_IDENTIFIER
with 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 install
Please take note of the following to avoid issues when building the project:
- Once
pod install
is done, do not re-runxcodegen
. If you need to do so, re-runpod install
after eachxcodegen
. - Open the project in Xcode using only
Dynavity.xcworkspace
and notDynavity.xcodeproj
.