I am trying to follow this blog for building push services for iPhone. The blog uses Android as the working platform,but it can be migrated to iPhone too, provided I get an MQTT client in objective C..which I cant find anywhere. The closest I got to this is :
I got a C implementation here - libmosquitto
This post says I can use something like an HTTP bridge.
Can anyone please help me exploit these two options ? I dont know the next step to take :(
Thanks !!
I'm not familiar with Objective C at all, but it seems as though you can compile any C code as Objective C. Would this get round your problem?
If you're using gcc, you can force it to compile as Objective C using "-x objective-c".
The HTTP option would not help you in this case as you're not trying to talk to a JMS app via MQ (well - you haven't said that is your goal). Your best bet would be to compile something like libmosquitto or one of the other MQTT clients (see list at http://mqtt.org) for the iPhone. There's now a good example https://github.com/njh/marquette which uses mosquitto's libraries on iOS
I am currently using MQTTKit in my projects. It's fairly easy and straightforward to use.
For swift you can use the following library : https://github.com/ltg-uic/ios-mqtt-base
Related
I'm a starter in Objective-C and IOS programming, and I'd like to have some recent guidance on how to use SOAP with IOS 5. I saw some tutorials online, but they are quite old (over a year old), and I don't really know if there are some more recent ways to deal with the SOAP webservices.
If anyone could give me some guidance / links about that, I'd be very pleased :)
Thanks !
If you really need to use SOAP I suggest you to try SudzC, you've to pass the wsdl to the service and this returns you a folder that contains the sample demo project with all the methods to call the webservice. In the folder you'll find also the documentation of your poject in html. You can also see the implementation file, so you could adapt some functionality based on your requirements. For me this service was very helpful.
There are also other projects similar to SudzC, like wdsl2objc, but i didn't use this yet.
I have tried, unsuccessfully, to use websockets in objective-c with the following two libraries:
http://code.google.com/p/unitt/wiki/UnittWebSocketClient
https://github.com/zootreeves/iOS-WebSockets
In both cases I was unable to establish even a basic connection to a server (runnning on localhost). I was wondering if someone could please provide or point me in the direction of some code that will just simply connect to a server via a websocket and/or perform a handshake.
Ideally, it would be nice if the code could use one of the above libraries, but at this point I'm open to anything that'd work.
I've posted about some issues with UnitT beore but I haven't received any feedback so I'm not sure exactly what step I'm messing up on. Appreciate any help, thanks!
We just released SocketRocket. It supports the latest standard, RFC 6455, which neither ZTWebSocket, nor Unitt does. No CocoaAsyncSocket needed to boot.
Also, libPusher is experimenting with SocketRocket too.
The libPusher library uses the ZTWebSocket object. And we have a number of clients who've developed iOS applications against our service. So, the ZTWebSocket object works and should be a good starting point. The libPusher library would be a good reference for usage.
The key to making UnitT work is to find out what version of the specification is your server running. Then you use the correct version for the client. The latest (rev17) of the specification FINALLY allows for multiple versions and having the server send back an appropriate response, but none of the prior versions do. Therefore, you may not receive a meaningful error from the server, just a disconnection. Do you know what version your server is running?
I am looking for Objective C example of how to retrieve emails for MacOS and iOS. I find examples on sending email(Mac's SBSendEmail sample) but not retrieving email. If anybody knows... thank you.
Have a look at libEtPan!. I use it in an app, works quite well. It's a POP3/IMAP/more lib with a C interface.
It's not very well documented, but the code of etPanKit helped me a lot.
You should read and understand RFC3501 and RFC1939 too. A telnet client (and/or openssl) and Wireshark will be helpful too.
I would like to know whether if there is any Objective-C MSN API. I have searched for a while and could not really find one.
And if not could somebody tell some good place to look to start the protocol from scratch. Some points on how to start with.
I found this site mentioning details about the protocol. But still not sure how to start with.
http://www.hypothetic.org/docs/msn/index.php
Thank you and Kind Regards,
Tharindu
I think you might be out of luck. MSN is proprietary so APIS are going to be thin on the ground and those that exist will be reverse engineered.
Having said that, Pidgin is an open source IM client that supports MSN. You could use its core library (libpurple) which is written in C and hence compatible with Objective-C.
I do realize this is a duplicate question, however the only other question is quite old, so I would like to know if anyone has had any recent experience with the latest version of wsdl2objc.
I am doing an application that will communicate with SOAP Web services exposed by a third party application (it only exposes them this way unfortunately). As far as I understand all wsdl2objc does is convert the WSDL to something useful in objective C code. I have also done the tutorial icodeblog intro to soap
So has anyone used the latest version of wsdl2objc?, what is your experience with it?, did you run into any problems with it?. Please let me know. Also some code sample would be really great.
Any information available on using SOAP Web Services with iPhone would be appreciated. Thank you.
-Oscar
My most recent experiences with wsdl2objc is that it's on the right road, but not really there yet. It's definitely the kind of program you'd want. It just may or may not be able to handle the WSDLs you actually have.
Short answer: try it and see if it works for your WSDLs. If it does, hooray. If it doesn't, you have two options. For reasonably simple WSDLs, write the SOAP by hand. This often is actually the easiest approach. If the WSDL is complex, then use gSOAP to get to C++ and then wrap the C++ in Objective-C++ (or use the -c option to gSOAP and wrap the resulting C, whichever you're more comfortable with).
I think this gives a good example of how to configure your environment (for noobs like me)
http://blog.futurebytez.com/2010/05/calling-web-services-using-wsdl2objc.html
The official wiki for wsdl2objc (linked in the article) has a code snippet which gives you the basics.