From 341ece5cae1f695993bfc41825329daaaff10095 Mon Sep 17 00:00:00 2001 From: Azure Chen Date: Tue, 17 Oct 2017 16:07:46 -0500 Subject: [PATCH] Update the README.md for using swift 3 If the project still use swift 3. The config in `MessageKit.podspec` will not work. ``` s.pod_target_xcconfig = { "SWIFT_VERSION" => "4.0", } ``` Add the extra `post_install` in Podfile will fix this issue. --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index bf8874a7..cb65a2a5 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,24 @@ See [VISION.md](https://github.com/MessageKit/MessageKit/blob/master/VISION.md) pod 'MessageKit' ```` +If your project is still using Swift 3. Add the following code in your Podfile. + +````ruby +target 'TARGET_NAME' do + pod 'MessageKit' + ... + post_install do |installer| + installer.pods_project.targets.each do |target| + if target.name == 'MessageKit' + target.build_configurations.each do |config| + config.build_settings['SWIFT_VERSION'] = '4.0' + end + end + end + end +end +```` + ### [Carthage](https://github.com/Carthage/Carthage) To integrate MessageKit using Carthage, add the following to your `Cartfile`: