-
Create repo on Github with
.gitignore
andREADME.md
. Repositories should be named with the format<project-name>-ios
. The project name should be inkebab-case
and must include the-ios
suffix because it is important for other services. -
Create Xcode Project
-
Ensure your Xcode Project is in the top level of the future git repo directory
-
In the Xcode project directory, run:
git init git remote add origin <remote-url> git pull origin master git push --set-upstream origin master
Pull before pushing to get the Github-generated
.gitignore
so ignored files don't end up in the repo -
Update
README.md
to use Intrepid README template -
Add and commit, then push to
master
-
In project directory, run:
pod init pod install
Use
.xcworkspace
instead of.xcodeproj
for this project from now on -
Decide whether Pods should be checked in or not. The automatically generated Podfile is set up to check them in. If they shouldn't be checked in, uncomment the
Pods
line in the Podfile.# Pods/
-- Pods checked inPods/
-- Pods not checked in -
Add, commit and push Pod files
-
Add Intrepid's
.swiftlint.yml
file to the project directory -
To see warnings and errors in Xcode, add a new "Run Script Phase" to the project containing the script below:
if which swiftlint >/dev/null; then swiftlint else echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" fi
-
In Xcode, click on the project target icon next to the play button, then click "Manage Schemes...". Click the checkbox to set your project scheme to
Shared
. This is required for Jenkins -
Follow the instructions in the iOS Jenkins Pipeline Integration Guide to set up your Jenkinsfile in your repo.
-
Add, commit and push the changes.
-
At this point you should see your project building on Jenkins.
- Pushing to Github/putting up a PR doesn't trigger a new Jenkins build
This only applies to legacy style Jenkins projects. Jenkins should handle adding and updating the necessary webhooks for your project automatically. To check that the webhooks on your repo are properly configured: Go to your repo settings and confirm that you can see the following under "Webhooks"
-
For pull requests
https://ci.intrepid.io/ghprbhook/
-
For build deployment
https://ci.intrepid.io/git/notifyCommit
-
- Jenkins can't find your project scheme Check your project scheme in Xcode and make sure the "Shared" box is clicked