-
Notifications
You must be signed in to change notification settings - Fork 844
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
_SwiftValue appears in objective-c projects #1147
Comments
@webMing Can you not cast the first argument to NSString? |
Also, can you post logs of the initial socket connection? It might shed some light on why it's not connecting. |
|
I will post logs, and it can connect success, but when i Implement [socket on:@"connecting" callback:^{}] method, which para may connecting or connected or other connect status event ,i |
Ah right, |
###This is test demo in my OC project ,you may have a try .
###logs
When [self.socket on:@"statusChange" callback:^{ NSInteger status = [[data firstObject] integerValue];}] is called , crashed. because [data firstObject] is a _SwiftValue. and [self.socket on:@"connecting" callback:^(NSArray* data, SocketAckEmitter* ack) {}] is not called when connect status is connecting; env : pod 'Socket.IO-Client-Swift','~> 13.3.0' |
Hm, this "statusChange" issue may be an issue with the bridged API. I'm going to need to investigate further. |
Okay, I think I see how to fix this. It will require a minor version bump. Basically it looks like if, in Swift, you pass an @objc enum to Objective-C, you must pass the |
En,Solving is really fast And another thing that confuses me is why I focus on 'connecting ,connect, disconect ...' those events but those method not call when socket`s connect status did change. What i think is that the socket`s connect status change and if you you implement socket on "connenting" method it should call. |
When will you release the new version ? 😁 |
@webMing I plan on releasing a new version this week. |
* development: update readme and changelog for new version add changelog entry for exponential backoff config setting and test updates for reconnectWaitMax and randomizationFactor add configurable exponential backoff Fix #1147 Bump Starscream to 3.0.6 Update to Swift 4.2
Hi nuclearace,I find this problem still exists. I`m sure my new version is v14.0.0 The _SwiftValue type still not convert any OC type. @nuclearace |
Return _SwiftValue Type In OC
My project language is OC, when I implement this method as bellow, I find ret is a _SwiftValue type and can`t use isEqualToString method. My doubt is that this lib support OC, but why i get a _SwiftValue type value in callback block? Please provide some ideas or reference links.
Connecting,connect ....and other connect event not trigger
I find that connecting, connected... and other connect status event not trigger, but statusChange event is trriger. this doubt me. and this is my code as bellow
I Integrate this lib use Pod. Thank you in advance..
The text was updated successfully, but these errors were encountered: