diff --git a/Documentation/Installation.md b/Documentation/Installation.md index 19d8ab7ff..6d3b0bf93 100644 --- a/Documentation/Installation.md +++ b/Documentation/Installation.md @@ -6,13 +6,16 @@ We recommend Carthage over CocoaPods, but both installation methods are supporte ```ruby use_frameworks! -pod "PromiseKit", "~> 6.0" -# This prevents Xcode warning you that PromiseKit needs -# upgrading to Swift 4.2 *we don’t*, this is a CocoaPods -# issue that hopefully they will eventually fix -# Replace 4.2 with 4.0 as per your needs, or if you are -# targeting 3.x, don’t add the following. +target "Change Me!" do + pod "PromiseKit", "~> 6.0" +end +``` + +If the generated Xcode project gives you a warning that PromiseKit needs to be upgraded to +Swift 4.0 or Swift 4.2, then add the following: + +```ruby post_install do |installer| installer.pods_project.targets.each do |target| if target.name == 'PromiseKit' @@ -24,16 +27,9 @@ post_install do |installer| end ``` -After CocoaPods 1.0, you will (probably) need to add the `pod` line to a `target`, -e.g.: +Adjust the value for `SWIFT_VERSION` as needed. -```ruby -use_frameworks! - -target "Change Me!" do - pod "PromiseKit", "~> 6.0" -end -``` +CocoaPods are aware of this [issue](https://github.com/CocoaPods/CocoaPods/issues/7134). ## Carthage diff --git a/README.md b/README.md index 5e6128fc7..78f555fc6 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,14 @@ target "Change Me!" do end ``` +> The above gives an Xcode warning? See our [Installation Guide]. + PromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1, 3.2, 3.3, 3.4, 4.0, 4.1 and 4.2; iOS, macOS, tvOS, watchOS, Linux and Android; CocoaPods, Carthage and SwiftPM; ([CI Matrix](https://travis-ci.org/mxcl/PromiseKit)). For Carthage, SwiftPM, etc., or for instructions when using older Swifts or -Xcodes, see our [Installation Guide](Documentation/Installation.md). We +Xcodes, see our [Installation Guide]. We recommend [Carthage](https://github.com/Carthage/Carthage). # Documentation @@ -169,3 +171,4 @@ if after that you still have a question, ask at our [Gitter chat channel] or on [our bug tracker]: https://github.com/mxcl/PromiseKit/issues/new [Podfile]: https://guides.cocoapods.org/syntax/podfile.html [PMK6]: http://promisekit.org/news/2018/02/PromiseKit-6.0-Released/ +[Installation Guide]: Documentation/Installation.md