Skip to content

Commit

Permalink
Document how to remove Xcode warning due to pod
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Oct 8, 2018
1 parent 4bb3cc2 commit 050061a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
26 changes: 11 additions & 15 deletions Documentation/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 050061a

Please sign in to comment.