The following convention defines a file system structure for a shared Objective-C library.
LibraryName/
.clang-format <- Libraries are expected to use clang-format.
.jazzy.yaml <- Libraries should support the Jazzy documentation generator.
.travis.yml <- Libraries should support Travis CI.
CHANGELOG.md <- Release notes and history.
README.md <- Essential installation and usage guide.
LibraryName.podspec <- The podspec for the library.
docs/ <- In-depth technical documentation.
TechnicalDoc1.md <- Docs are written in Markdown.
assets/ <- All documentation assets live here.
image.png <- Pngs, movs, gifs, etc...
examples/
Example.swift <- Examples can be Swift,
Example.h <- or
Example.m <- Objective-C.
supplemental/ <- Non-educational code used by the examples.
SomeView.swift <- Supplemental code can be Swift
SomeView.h <- or
SomeView.m <- Objective-C.
apps/ <- Example applications live in this sub-directory.
ExampleApp/ <- Example application.
AnotherApp/ <- Another example application.
resources/ <- Resources required by the examples.
src/ <- All library source lives here.
LibraryName.h <- Umbrella header.
GOSObject.h <- Library source must be written in Objective-C.
GOSObject.m
private/ <- Private APIs live in a sub-directory
GOSPrivateAPI.h
GOSPrivateAPI.m
LibraryName.bundle/ <- All assets required by the source.
tests/
interaction/ <- User interaction tests.
SomeTest.swift <- Tests can be Swift,
AnotherTest.m <- or Objective-C.
unit/ <- Unit tests.
SomeTest.swift <- Tests can be Swift,
AnotherTest.m <- or Objective-C.
Style conventions
GOS libraries use clang-format to automatically clean up stylistic aspects of the source. Place a
copy of .clang-format at the root of the library tree.
There is a soft (aka: human-enforced) 100 character line length limit.
Jazzy
Your .jazzy.yaml file should contain the following information:
A convention for Objective-C libraries
The following convention defines a file system structure for a shared Objective-C library.
Style conventions
GOS libraries use clang-format to automatically clean up stylistic aspects of the source. Place a copy of .clang-format at the root of the library tree.
There is a soft (aka: human-enforced) 100 character line length limit.
Jazzy
Your
.jazzy.yamlfile should contain the following information:Travis CI
Your
.travis.ymlfile should contain the following information:Replace “Example” in the
xcodebuildstep with the name of an example app. Add one xcodebuild step for each example app.Bootstrap script
The bootstrap script creates the skeletal directory structure for a GOS repo. This script must be provided a library name and a path.
Example usage: