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

Crash on iOS9 #14

Closed
floriangbh opened this issue Jan 25, 2017 · 6 comments
Closed

Crash on iOS9 #14

floriangbh opened this issue Jan 25, 2017 · 6 comments

Comments

@floriangbh
Copy link

floriangbh commented Jan 25, 2017

Hello and thank you for this library !

I'm trying to implement zeroMQ with this lib but something seem to not work with iOS9 on my iPod touch.

do {
            // Define a TCP endpoint along with the text that we are going to send/recv
            let endpoint     = "tcp://<my_ip>"
            let textToBeSent = "{\"type\":\"connect\",\"apiToken\":\"<token>\"}"
            
            // Request socket
            let context      = try SwiftyZeroMQ.Context()
            let requestor    = try context.socket(.request) // THIS LINE CRASH
            try requestor.connect(endpoint)
            
            // Send it without waiting and check the reply on other socket
            try requestor.send(string: textToBeSent, options: .dontWait)
            let reply = try requestor.recv()
            print(reply)
        } catch {
            print(error)
        }

With this code, all work on iOS10 (with real device and simulator) and on iOS9 on simulator. But on my real device on iOS9 (iPod Touch 9.3.5) I have crash at this line :
let requestor = try context.socket(.request) // THIS LINE CRASH

There is any issue with iOS9 ?
I don't have any other real device for trying it ...

Thank you

@jamessugrue
Copy link

It might be related to #13

@floriangbh
Copy link
Author

Oops ! I had not read the whole issue... Thank you!

@azawawi
Copy link
Owner

azawawi commented Jan 25, 2017

No problem. It is definitely related to #13 as @jamessugrue said. I am working on it with the libzmq team (zeromq/libzmq#2323).

Apple's addition of clock_gettime in macOS 10.12 actually broke a lot of packages. So we are not alone after all :)

On a side note, I hate 13 as a number :)

I am closing this one. Thanks for reporting it.

@azawawi azawawi closed this as completed Jan 25, 2017
@azawawi
Copy link
Owner

azawawi commented Jan 26, 2017

@terflogag Please try db00516. Sorry for the delay.

@floriangbh
Copy link
Author

Hello @azawawi !

Just tried with your last commit db00516 and I did not crash. But I can not really test with our server until Monday. But the issue seems to be fixed!

Thank you a lot for your quickly fix 🥇

@azawawi
Copy link
Owner

azawawi commented Jan 26, 2017

@terflogag Perfect and thanks. I am going to patch 4.2.1 and submit patch to libzmq project. Looking forward for further test results.

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

3 participants