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

issue with swift 4 & Xcode 9 #190

Closed
josmanperez opened this issue Oct 25, 2017 · 14 comments
Closed

issue with swift 4 & Xcode 9 #190

josmanperez opened this issue Oct 25, 2017 · 14 comments

Comments

@josmanperez
Copy link

josmanperez commented Oct 25, 2017

Hi!

Thank you for this wonderful library but I am having troubles with the migration to swift 4 from swift 3.

I am using Xcode 9 and Whisper version 5.1.0 that comes with swift 4 support but when trying to run my project I have 16 issues regarding this library. All issues are the same_

Argument of '#selector' refers to instance method 'orientation ... that is not exposed to Objective-C

and

'shared' is unavailable: Use view controller based solutions where appropriate instead

Since I am seeing that this library is working with swift 4 what I am doing wrong?

Thank you!

@onmyway133
Copy link
Contributor

@josmanperez Hi, can you try running the demo that comes with this project? Maybe you forget to set swift version in your Build Settings? Also, you can try pod deintegrate and pod install to install Whisper from fresh state.

@josmanperez
Copy link
Author

Thank you for answering me @onmyway133 I've rechecked and all my targets are set to Swift 3 @objc inference to Default and Swift language version is set to Swift 4.0

I did the pod deintegrate and pod install but still the same... weird..

I've also launched successfully the demo app that comes with the master branch of the repo

@lucasreiners
Copy link

same as #172

@josmanperez
Copy link
Author

I’ll try later thank you @lucasr93

@FreudGit
Copy link

Same error here.

@mecid
Copy link

mecid commented Oct 25, 2017

same error.

@danieltmbr
Copy link

danieltmbr commented Oct 26, 2017

I'm not sure if it has to do anything whit this error (which I'm experiencing as well), but Whisper.podspec has some strange configurations:
s.version = "6.0.0"
s.source = { :git => "https://github.com/hyperoslo/Whisper.git", :tag => s.version.to_s }
But there is no release nor tag with a version number of 6.0.0. Can it be the reason that cocoapods installs Whisper with a code that does not contains the Swift 4 migration code (to be exact: none of the methods called by selectors is marked as @objc method, which is strange because on Github the current master contains the @objc annotations).

But until this issue is solved, referring to the git url and master branch (instead of version number) in the Podfile is a possible workaround:
pod 'Whisper', :git => 'https://github.com/hyperoslo/Whisper.git', :branch => 'master'

@erolando
Copy link

@danieltmbr works! thanks!

@StarWars
Copy link

For those in favour of using versions tag in podfile instead of applying @danieltmbr git path solution, go to Whisper's Build Settings, and change the SWIFT_VERSION to 3.2 even if you're working with Swift 4 within your project.

@onmyway133
Copy link
Contributor

@josmanperez @danieltmbr @StarWars @FreudGit @mecid @erolando Hi, can you check https://github.com/hyperoslo/Whisper/releases/tag/6.0.0 ?

@4brunu
Copy link

4brunu commented Oct 30, 2017

It's working for me.

@erolando
Copy link

It's working for me. , remember first execute pod update

@josmanperez
Copy link
Author

I can’t try it until next week cause I’m out of town. But I’ll check and let you know :) thanks!

@danieltmbr
Copy link

danieltmbr commented Oct 31, 2017

@onmyway133 Yeah it's working fine! Thank you!
@erolando don't you mean pod repo update ? (at least that's what I needed)

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

9 participants