Swiftmessages: Swift 3 Support

Created on 21 Aug 2016  路  4Comments  路  Source: SwiftKickMobile/SwiftMessages

馃憤

Most helpful comment

The swift3 and swift2.3 have been updated with the latest changes from master. The releases are being held up by CocoaPods. To use either of these branches with CocoaPods requires version 1.1.0, which hasn't been released yet. The release candidate, however, can be installed with:

sudo gem install cocoapods --pre

Then add the following to the podfile (for the swift3 branch):

pod 'SwiftMessages', :git => 'https://github.com/SwiftKickMobile/SwiftMessages.git', :branch => 'swift3'

All 4 comments

Added swift3 and swift2.3 branches.

However, the demo app hangs the Auto Layout engine in certain scenarios. I've filed the following radar:

Summary:
In Xcode 8 beta 6, calling UIView.layoutIfNeeded() hangs main queue with high CPU utilization in certain circumstances. The hang appears to be in a private method layoutBelowIfNeeded().

Steps to Reproduce:

  1. Open the attached Demo application in Xcode 8 beta 6. Demo app can be found in SwiftMessages.zip in Demo/Demo.xcworkspace.
  2. Run app in Simulator or on device.
  3. Select the "Explore" row.
  4. Select Presentation Style "Bottom"
  5. Select Layout "Tab"
  6. Tap "Show"

Expected Results:
Message view animates up from behind the status bar.

Actual Results:
Main queue hangs with high CPU utilization in the function UIView.layoutIfNeeded().

Version:
iOS 10 beta 7

Notes:
Hangs under Xcode 8 beta 6 in Simulator or on device running iOS 10 beta 7.

Configuration:
iPhone 6s

Attachments:
'SwiftMessages.zip' was successfully uploaded.

A workaround has been promoted to swift3 and swift2.3. Description of the workaround added to Radar:

Workaround found:

  1. Open TabView.xib in Xcode 8.
  2. Select iPhone 6s as initial device view.
  3. Perform reproduction steps.

The swift3 and swift2.3 have been updated with the latest changes from master. The releases are being held up by CocoaPods. To use either of these branches with CocoaPods requires version 1.1.0, which hasn't been released yet. The release candidate, however, can be installed with:

sudo gem install cocoapods --pre

Then add the following to the podfile (for the swift3 branch):

pod 'SwiftMessages', :git => 'https://github.com/SwiftKickMobile/SwiftMessages.git', :branch => 'swift3'

From the readme:

Installation

CocoaPods

Add one of the following lines to your Podfile depending on your Swift version:

# Swift 3.0 & Xcode 8
pod 'SwiftMessages'

# Swift 2.3 & Xcode 8
pod 'SwiftMessages', '~> 2.0.0'

# Swift 2.2 & Xcode 7.3.1
pod 'SwiftMessages', '~> 1.1.4'

Note that Swift 2.3 and Swift 3.0 require CocoaPods 1.1.0, which is in beta as of September 20, 2016. CocoaPods 1.1.0 beta can be installed with the following command:

sudo gem install cocoapods --pre

Carthage

Add one of the following lines to your Cartfile depending on your Swift version:

# Swift 3.0 & Xcode 8
github "SwiftKickMobile/SwiftMessages"

# Swift 2.3 & Xcode 8
github "SwiftKickMobile/SwiftMessages" ~> 2.0.0

# Swift 2.2 & Xcode 7.3.1
github "SwiftKickMobile/SwiftMessages" ~> 1.1.4
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattem86 picture mattem86  路  4Comments

andrey-zelenin picture andrey-zelenin  路  4Comments

JanBrinker picture JanBrinker  路  6Comments

fruitcoder picture fruitcoder  路  6Comments

CallMeSH picture CallMeSH  路  4Comments