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

Unable to compile on XCode12 #805

Closed
varyP opened this issue Jul 3, 2020 · 8 comments
Closed

Unable to compile on XCode12 #805

varyP opened this issue Jul 3, 2020 · 8 comments

Comments

@varyP
Copy link

varyP commented Jul 3, 2020

Screenshot here

Starscream (4.0.3)
XCode12

Unable to compile.

FoundationHTTPServerHandler.swift

//Type of expression is ambiguous without more context for method != getVerb {

if let method = CFHTTPMessageCopyRequestMethod(response)?.takeRetainedValue() {
            if method != getVerb { 
                delegate?.didReceive(event: .failure(HTTPUpgradeError.invalidData))
                return true
            }
        }
@ngingric
Copy link

ngingric commented Jul 3, 2020

Try replacing:
method != getVerb
with
self.getVerb.isEqual(to: method as String)

This worked for me!

@GoranLilja
Copy link

There is a PR by @amayers fixing this issue here.

@ethancwb
Copy link

ethancwb commented Jul 9, 2020

I've created a fork with the fix since the PR is not merged yet. If you are using cocoapods, then try:
pod 'Starscream', :git => 'https://github.com/ethancwb/Starscream.git', :branch => 'xcode-12-hotfix'
However, I highly suggest you to only apply the change on an experimental branch, not on your master. This is only a temporary workaround.

@amayers
Copy link
Contributor

amayers commented Jul 9, 2020

@ethancwb you didn't need to create a new fork to get the fix. You could have just pointed your pod at the repo/branch that my #799 is on.

@ethancwb
Copy link

@amayers Thanks for the response. Actually, after searching, I found that I just need to update the deploy target to above iOS 11.0. Then this issue is gone.

@22Round
Copy link

22Round commented Jul 31, 2020

I am testing my app with new SwiftUI, Swift Package Manager and Xcode 12 Beta and have same issue, please fix it!

@amayers
Copy link
Contributor

amayers commented Jul 31, 2020

I am testing my app with new SwiftUI, Swift Package Manager and Xcode 12 Beta and have same issue, please fix it!

@22Round the fix has been merged to master, but a new version hasn't been released. So you could just point SPM to use master instead of a fixed version number, and everything should work.

@daltoniam
Copy link
Owner

4.0.4 released!

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

7 participants