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

Swift 3.0 compatible branch #216

Closed
mluisbrown opened this issue Jun 14, 2016 · 13 comments
Closed

Swift 3.0 compatible branch #216

mluisbrown opened this issue Jun 14, 2016 · 13 comments

Comments

@mluisbrown
Copy link
Contributor

I know it's very early days, but any idea when a branch migrated to Swift 3 will be available? Anyone depending on this lib (or any other Swift libs) is currently stuck not being able to build their projects with Xcode 8 until all dependent libs are also migrated to Swift 2.3 or 3.0 (preferable).

@solomon23
Copy link
Contributor

I've created this fork that should get you at least to compile:
https://github.com/solomon23/Cartography/tree/3.0

or via pods

pod 'Cartography', :git => 'https://github.com/solomon23/Cartography.git', :branch => '3.0'

@mluisbrown
Copy link
Contributor Author

Thanks @solomon23. It compiles and, at least in my usage of it, also works fine! 👍

@CVertex
Copy link

CVertex commented Jun 21, 2016

@solomon23 nice!

@GP000
Copy link

GP000 commented Sep 20, 2016

1

I have have problem with converting to the latest Swift 3 syntax

I use "pod 'Cartography', :git => 'https://github.com/solomon23/Cartography.git', :branch => '3.0'" to install Cartography

@mluisbrown
Copy link
Contributor Author

Hi @GP000 looks like that fork hasn't been updated to the latest Swift 3.0 syntax. Try my fork instead, which I'm using in a shipping app:

pod 'Cartography', :git => 'https://github.com/mluisbrown/Cartography.git', :branch => 'swift3'

I haven't tried using it with CocoaPods (I use Carthage) but it should be fine.

@mluisbrown
Copy link
Contributor Author

Sorry, closed the issue by mistake 😊 . Re-opened.

@mluisbrown
Copy link
Contributor Author

Just looking at your screenshot more, I can't see the full error but it looks like it's saying Unknown attribute 'discardableResult' . If that's the case then maybe your project is not using Swift 3.0? That is a new attribute introduced in Swift 3.0.

@orta
Copy link
Collaborator

orta commented Sep 20, 2016

There is an active PR for 3.0 #228 would recommend using that instead

@GP000
Copy link

GP000 commented Sep 20, 2016

2

after conversion to the latest syntax passed the following errors appeared

@GP000
Copy link

GP000 commented Sep 20, 2016

it is an empty project with only Cartography imported via pods

@orta
Copy link
Collaborator

orta commented Sep 25, 2016

Swift 3.0 support is now in 1.0 💯

@orta orta closed this as completed Sep 25, 2016
@JesseRubio
Copy link

When I import cartography onto my project I get this error.

Module compiled with Swift 3.0 cannot be imported in Swift 3.0.1: /Carthage/Build/iOS/Cartography.framework/Modules/Cartography.swiftmodule/arm64.swiftmodule

@orta
Copy link
Collaborator

orta commented Oct 28, 2016

Yep - binaries only work on a specific version of Swift. Any minor swift changes requires a new binary.

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

6 participants