Skip to content

CarPlay documentation#1714

Merged
1ec5 merged 7 commits into
carplayfrom
1ec5-carplay-docs
Sep 17, 2018
Merged

CarPlay documentation#1714
1ec5 merged 7 commits into
carplayfrom
1ec5-carplay-docs

Conversation

@1ec5
Copy link
Copy Markdown
Contributor

@1ec5 1ec5 commented Sep 17, 2018

Classes and methods available only in certain iOS versions are now visible in the jazzy-generated docset. This includes all CarPlay-related symbols, which depend on iOS 12, as well as some symbols related to AVSpeechSynthesizer and Measurement that depend on iOS 10. To make this work, I had to strip out @available attributes. I haven’t fully investigated the root cause of the problem, but it seems to lie somewhere deep in a jazzy improvisation.

Fleshed out documentation of public CarPlay-related symbols and refined their presentation in the docset’s table of contents and cover page. Deleted an old draft of a CarPlay getting started guide.

Added @objc attributes to a number of CarPlay-related symbols to ensure compatibility with Objective-C code.

starting points
custom category

Fixes #1682.

/cc @mapbox/navigation-ios @mapbox/docs

@1ec5 1ec5 added bug Something isn’t working topic: documentation build Issues related to builds and dependency management. documentation CocoaPods CarPlay Bugs, improvements and feature requests on Apple CarPlay labels Sep 17, 2018
@1ec5 1ec5 added this to the v0.21.0 milestone Sep 17, 2018
@1ec5 1ec5 self-assigned this Sep 17, 2018
@1ec5 1ec5 requested review from akitchen and frederoni September 17, 2018 14:21
@1ec5
Copy link
Copy Markdown
Contributor Author

1ec5 commented Sep 17, 2018

For the time being, to get the full docset, you need to:

  1. Check out Update last known SDKs to iOS 12 etc. CocoaPods/Xcodeproj#609.
  2. Check out Fix error compiling Swift podspec in Xcode 10 realm/jazzy#1004.
  3. Point jazzy to your clone of xcodeproj using bundle:
    diff --git a/Gemfile b/Gemfile
    index 9ed00c9..f419f26 100644
    --- a/Gemfile
    +++ b/Gemfile
    @@ -1,5 +1,6 @@
     source 'https://rubygems.org'
     
    +gem "xcodeproj", github: "1ec5/Xcodeproj", branch: "ios12"
     gemspec
     
     group :development do
    bundle config local.xcodeproj /path/to/xcodeproj
    bundle install
  4. Point document.sh to your clone of jazzy, as described in Failure generating documentation — Could not parse version component #1682 (comment).
  5. Run document.sh like normal. (As of this PR, it requires Bash 4.)

Make the documentation podspec maximally compatible with the codebase by adding the CarPlay and MapboxGeocoder frameworks as dependencies and increasing the minimum deployment target to iOS 12.

When generating documentation, delete @available(iOS) attributes to prevent either jazzy or CocoaPods from eliding the associated symbols.
For better or worse, this codebase doesn’t use walls of asterisks.
More public CarPlay-related symbols are documented and refined for Objective-C.
@1ec5 1ec5 force-pushed the 1ec5-carplay-docs branch from 5da6961 to 689cc32 Compare September 17, 2018 14:30
@1ec5 1ec5 merged commit 5e166b5 into carplay Sep 17, 2018
@1ec5 1ec5 deleted the 1ec5-carplay-docs branch September 17, 2018 17:03
@1ec5 1ec5 modified the milestone: v0.21.0 Sep 17, 2018
Comment thread scripts/document.sh
find Mapbox{Core,}Navigation/ -name *.swift -exec \
perl -pi -e 's/\@available\s*\(\s*iOS \d+.\d,.*?\)//' {} \;

../jazzy/bin/jazzy \
Copy link
Copy Markdown
Contributor Author

@1ec5 1ec5 Sep 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh, didn’t mean to commit this line. Fixed in cecb46e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn’t working build Issues related to builds and dependency management. CarPlay Bugs, improvements and feature requests on Apple CarPlay documentation topic: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants