carthage update --platform iOS
-
Add the R.swift.Library to your project
-
Download a R.swift release, unzip it and put it into your source root directory
-
In Xcode: Click on your project in the file list, choose your target under
TARGETS
, click theBuild Phases
tab and add aNew Run Script Phase
by clicking the little plus icon in the top left -
Drag the new
Run Script
phase above theCompile Sources
phase, expand it and paste the following script:"$SRCROOT/rswift" generate "$SRCROOT/R.generated.swift"
-
Add
$TEMP_DIR/rswift-lastrun
to the "Input Files" and$SRCROOT/R.generated.swift
to the "Output Files" of the Build Phase -
Build your project, in Finder you will now see a
R.generated.swift
in the$SRCROOT
-folder, drag theR.generated.swift
files into your project and uncheckCopy items if needed
Screenshot of the Build Phase can be found here