To create a skeleton project named MyApp, do the following steps.
Note: This tutorial applies to Xcode 11.5
Open Xcode and create a new project using Single View App template, choose Storyboard and Include Unit Tests.
Delete AppDelegate.swift
, SceneDelete.swift
, ViewController.swift
Remove Scene Configuration in Info.plist
.
Install igen (v2.2.0 and above)
Run command:
$ igen template skeleton MyApp
Result:
Select and drag files and folders from Sources to MyApp project. Choose Create Bridging Header.
Copy other files created in step 5 to the project folder (except Localizable.strings
, MyApp-Bridging-Header.h
).
Copy the content of MyApp-Bridging-Header.h
into the corresponding file in the project
Rename gitignore
to .gitignore
and swiftlint.yml
to .swiftlint.yml
using Terminal:
$ mv gitignore .gitignore
$ mv swiftlint.yml .swiftlint.yml
Run:
$ pod install
Open MyApp.xcworkspace
and add a new Run Script Phase:
if which swiftlint >/dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
Done 🎉
Now you can build or run to see the result.