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

It can't work in the Xcode8 version. #492

Closed
wy358688217 opened this issue Sep 14, 2016 · 20 comments
Closed

It can't work in the Xcode8 version. #492

wy358688217 opened this issue Sep 14, 2016 · 20 comments

Comments

@wy358688217
Copy link

It can't work in the Xcode8 version.

@nuclearace
Copy link
Member

Is your project a Swift 3 project, and are you using the current version?

@San-Jeevan
Copy link

Yeah, alot of errors. But it appears your library is not the only one struggling to adapt to Swift3.
I really cannot afford to lose time so I am currently downgrading both to iOS9 and Xcode7

@nuclearace
Copy link
Member

I mean, it's been updated to Swift 3. How are you including the library?

@San-Jeevan
Copy link

CocoaPods.
I did pod install.
Look it may just be me and it all works for everyone else. I am now back in xcode7 so I can debug the swift3 issues.

All I did was launch xcode8. select stay with swift 2.3.
Go to this library and chose SWIFT_LEGACY YES in build settings. (otherwise it gave build errors)

@nuclearace
Copy link
Member

nuclearace commented Sep 14, 2016

Ah, that's why. You'll have to use the swift2.3 branch. v8.0.0 is Swift 3.0. 2.3 is only meant to be jumping point to Swift 3.

@LamourBt
Copy link

@nuclearace is socket.io is fully ready for swift 3.0 ios 10.0 ?

@vikmis007
Copy link

vikmis007 commented Sep 15, 2016

screen shot 2016-09-15 at 9 24 06 am
@nuclearace Still unable to install Socket 8.0.0 . See the attached screenshot

@nuclearace
Copy link
Member

There is no swift3 branch now. Master is swift3 ready

@vikmis007
Copy link

will it work with 1.1.0.rc.2 pod version??

@nuclearace
Copy link
Member

That's what I used to push the update. It messed with my remotes though.

@HaraldBregu
Copy link

I have the same problem, i updated Xcode to 8 and socket.io-client-swift do not work anymore.
How can i use it now? It is any solution?

@nuclearace
Copy link
Member

@HaraldBregu What Swift version is your project. v8.0.0 of the client is for Swift 3. Check the README for other versions of Swift.

@HaraldBregu
Copy link

@nuclearace
I used "pod 'Socket.IO-Client-Swift', '~> 8.0.0'" to support swift 3 and xcode 8.x and now seams that there are no issues.
But to use it if i add this class @import SocketIO; i cant use SocketIOClient with issue "no visible @interface for SocketIOClient"

@EddieLukeAtmey
Copy link

EddieLukeAtmey commented Sep 15, 2016

I'm just here to verify that it CAN work with xcode 8. I've imported this to my project, using cocoapod of course. At first, I also struggle with the module not found. I did a clean up:

  1. Close project.
  2. Delete pod files, delivered files, pod frameworks, workspace file
  3. pod install
  4. Reopen workspace, upgrade swift syntax if xcode ask for, build a few times.

After that, the "module not found" goes away. Not sure if I did anything more than that.

In pod, I just declare pod 'Socket.IO-Client-Swift

Edit: Alright, I just remembered that I've updated pod repo to the newest (using git, not pod command)

@wy358688217
Copy link
Author

990342a7-070d-4ea1-a234-3f3638161796
cd0bc274-b933-4613-a7f2-fc69bd49ee3a
I was the OC project, tried a variety of methods finally compiled successfully, but failed to run

@nuclearace
Copy link
Member

@wy358688217 I've seen that happen when you try and use Swift frameworks in command-line applications. It has to do with Swift frameworks aren't static, they have to be bundled with the app.

@wy358688217
Copy link
Author

@nuclearace But mine not command-line applications. So ,how to fixed?

@nuclearace
Copy link
Member

Make sure you're including the Framework properly.

@wy358688217
Copy link
Author

e9accb38-4ecb-410d-bc0d-280608228419
@nuclearace My solution is to select YES, and then it can work.

@leewaycn
Copy link

but now ,there comes a new problem . In swift 3 and Xcode 8.all these steps can't work.
while I add the files (in swift3 version8) into my project written in OC, the bridge file won't auto be generated .
as I thought for more than two weeks , I did as the Carthage ways or I want to build a framework of Socket.IO ,but finally all this works can't do as I thought.

Now ,can somebody figure what is the point to fix my problem? thx.

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

8 participants