Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Swift 3 #49

Open
plflanagan opened this issue Sep 8, 2016 · 20 comments
Open

Support for Swift 3 #49

plflanagan opened this issue Sep 8, 2016 · 20 comments

Comments

@plflanagan
Copy link

Is there an expected date at which this will be coded in Swift 3?

@veyhong
Copy link

veyhong commented Sep 16, 2016

I need swift 3 support too :(

@gchristov
Copy link

Same here. Any updates on this?

@danlniel
Copy link

im not sure i trying to pod install with ver 1.0.1 but got so many errors

@veyhong
Copy link

veyhong commented Sep 22, 2016

Try to convert the code to Swift 3, it very easy. but need to set Use Swift legacy code to No . be sured u need to update cocoapod too. 1.1.0.rc.2

@thibaultfloquet
Copy link

thibaultfloquet commented Sep 23, 2016

The pod from the CocoaPods website is not this repository but a fork : https://github.com/freemiumdev/FBAnnotationClusteringSwift
https://cocoapods.org/?q=FBAnnotationClusteringSwift

It's why we have some errors.
@freemiumdev Can you do something about that? Thanks :)

@Frohmen
Copy link

Frohmen commented Oct 4, 2016

I also need Swift 3 support, can you please help out

@veyhong
Copy link

veyhong commented Oct 5, 2016

I use Xcode 8, swift 3, I can compiled no error. Maybe u should try to update your cocoapod to 1.1.0.rc.2.:
$ [sudo] gem install cocoapods --pre

@falipate
Copy link

falipate commented Oct 5, 2016

I've updated to Xcode 8, swift 3, updated cocoapod to 1.1.0.rc.2 and set "Use Legacy Swift Language Version" to No, yet I'm still getting errors

@veyhong
Copy link

veyhong commented Oct 5, 2016

What is your error ?

@falipate
Copy link

falipate commented Oct 5, 2016

screen shot 2016-10-05 at 3 38 06 pm

@veyhong
Copy link

veyhong commented Oct 5, 2016

try to set User Swift Legacy to No, and convert this library to Swift 3 by xCode 8: Click Edit->Convert-> To Current swift syntax -> select FBAnnotationClusteringSwift only then wait for converting, I think only few things change u just add accept the change then Clean->Build again

@falipate
Copy link

falipate commented Oct 5, 2016

seemed to fix the issue, thanks!

@Frohmen
Copy link

Frohmen commented Oct 5, 2016

I converted the code to Swift 3 but after that I get the following build error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FBAnnotationClusteringSwift compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64

@veyhong
Copy link

veyhong commented Oct 6, 2016

what is your cocoapod version

@Frohmen
Copy link

Frohmen commented Oct 6, 2016

Never mind I managed to solve it by deleting derived data in Xcode:
http://stackoverflow.com/questions/38016143/how-to-delete-derived-data-in-xcode-8

@jBjerkli
Copy link

jBjerkli commented Oct 8, 2016

My project has been totally messed up ever since Xcode8/Swift 3.0, one of the factors being the annotation clustering. I am loving the functionality of this, but I am unable to convert it to Swift 3.0. Any conversion guides/tutorials out there for those who had this framework installed in Xcode 7.3/Swift 2.2?

@AntonPieter
Copy link

With Swift 3 it didn't work, when I only used the classes (manual install), but it works perfectly when using the pods.

@rjuzaszek
Copy link

manually converting classes files to Swift 3, works for me

@camel113
Copy link

camel113 commented Feb 2, 2017

Same issue
alt text
Try to do what @cvhong said but got this message
target has already been converted to swift 3.0 syntax

I am using it with cocoapod

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'Project' do
	pod 'Alamofire', '~> 4'
	pod 'DeviceGuru', '~> 1.2'
	pod 'CryptoSwift'
	pod 'Charts'
	pod 'Spring', :git => 'https://github.com/MengTo/Spring.git', :branch => 'swift2'
	pod 'ReachabilitySwift', '~> 2.3'
	pod 'XLPagerTabStrip', '~> 4.0'
	pod "SwiftDate", "~> 3.0"
	pod 'FBAnnotationClusteringSwift'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end

@chengsam
Copy link

chengsam commented Feb 7, 2017

@camel113 Just comment out the following method:

required override public init(frame: CGRect) {
    super.init(frame: frame)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests