Transferring images captured by iPhone onto the WebService - iphone

This is what I am trying to accomplish.
Capture images from iPhone
Store them on the web service
Retrieve them when required
I have searched for tutorials on the topic but have found none. Also, there are various threads providing information in bits and pieces which I am finding hard to piece together and deduce something useful from. Please post a sample code that does it.
Thanks in advance.
Sayeed

If your trying to upload to a popular web service like Flickr, you will have to read and understand their API. Whether your using one of those, or your own server, most probably you'd want to use this open-source library ASIHTTPRequest as it will provide you with a nice layer of abstraction with communicating with web services.

To capture images you can use the UIImagePickerController
To up- and download images to/from a web server you can use NSURLConnection and it's companion.
And it's always a good start to look into some apple sample codes. They're on the related classes documentation at the top under "Related sample code".

Related

Generating Dynamically OpenTok Session ID from iOS

I am using OpenTokSDK for iPhone (using it Natively)
I have made the code for calling but just there is one problem.:-
I have to statically Add the SessionID. But i want to generate the ID Dynamically.
How can I do this ?
Please help!
Thanks In Advance
Full disclosure: I am a developer for TokBox.
The only safe way to get session ID and token credentials to the device is by developing an application server that suits the specific needs of your app. We have a number of server-side SDKs available on GitHub (link) that will interface with the OpenTok server API to generate this data.
Note well the server-side SDK is enough to get your credentials generated, but not all devices will be on the same session, so things like user management and application workflows are all considerations that cannot be easily written to an open source library.
That said, we did try to make some of these examples more clear by writing code examples on our blog (link). You can relieve much of the overhead of writing your own application server (no doubt a daunting task, especially the first time around) by leveraging one of the third party signaling services available, like Parse and Pusher, to name two.
Wobbals is correct, and In addition to what Wabbals has mentioned, generating sessions/tokens is very simple, the sample code required for each server language (PHP, NodeJS, C#, Ruby) is located in OpenTok's Github page.
Furthermore, if you choose not to have server side code and use Parse to handle your back-end, there is a wonderful writeup about how to use Parse's cloud code module for OpenTok to generate sessions and tokens.
Good Luck!
I strongly felt that the tokbox tutorial was quite basic but had steeper learning curve. So I ended up wrote out my own app-cum-tutorial.
Though late, I felt compelled to post here:
How To write your first iPhone Video Chat App using parse and opentok(tokbox)

Getting started with parsing (MediaWiki) API

I want to create an iOS App that can parse the MediaWiki API so I can display articles etc.
I found ASIHTTPRequest but the developer is no longer working on it.
What should I use instead of this?
Or what documentations should I read to get started with this topic?
If you haven't worked with writing async networking code on iOS, then I would start with the URL Loading System Programming Guide from Apple first. You can use another wrapper library like AFNetworking if you prefer another level of abstraction, though I would still suggestion learning the URL Loading System as a first step.

Getting data from remote sql table on iphone

I am a beginner at both iPhone programming and SQL, yet I have basic knowledge of them.
I am planning to do an application that would plot a graph from data taken from a database of the server of my company. I know how to plot, I know how to extract data from an sql table, but what I don't know is how to access the server.
So do I have to go through some kind of oracle-like application ?
This may seem like a very stupid question because it might not even be possible but any answer will be appreciated.
Thanks !
Go through a web service for example a PHP page that returns JSON (or XML, but JSON is easier to parse).
I can highly recommend this tutorial
Once you have your web service, you can use NSURLRequest/NSURLConnection to download the data and use a JSON framework to parse it. Or, if you're using XML you can use NSXMLParser.
See this apple code for more info on downloading using NSURLConnection.
The best way for this will be, using APIs at server end that handle the client request and perform database interaction, so transfer of data among device and server, take place through XMLs that will be secure as well as fast.
It is definitely possible to contact a server (I can't imagine what would happen without that!). What you are looking for is NSURLConnection. Have a look at the example provided by Apple.

How to write a server for an iPhone app

I'm writing a very simple iPhone app, basically a dropbox where people can submit ideas and then view what's in the dropbox. I need to write a server that will respond to my iPhone's (HTTP?) requests. Are there any good tutorials on the web that will show me how to do this? Thanks.
Well it really depends on what kind of platform are you trying to write your server.
If it's going to be linux, apache, mysql and PHP (LAPM) then probably this question would answer some of your questions: Serving a json file for IPHONE app
Also this one might be helpful: http://www.sencha.com/learn/Tutorial:Creating_JSON_Data_in_PHP
You could server your data in various formats: binary, XML, JSON, etc. However if I were you i would definitely choose JSON ...
You also can use ruby, .net or anything else for building your web server, however probably php is going to be the one with the most examples.
Hope this helps.
For communicating with the server take a look at ASIHttpRequest, which has some good documentation and example code included http://allseeing-i.com/ASIHTTPRequest/How-to-use
i recomment using the ASIHttpRequest Classes.
On the serverside just use a simple JSON API and probably oAuth or HTTP Authentication to submit and receive Data from a Database.

iPhone programming: how to use URL's API (e.g. BLAST)

I am new to iPhone programming and would like to be able to use the BLAST (is a bioinformatics server) URL's API from the iPhone. I would like to write a very simple application that queries the BLAST server and make some query. I have found the following
I have found the following documentation on BLAST (http://www.ncbi.nlm.nih.gov/BLAST/Doc/urlapi.pdf).
I am not sure from where I should start.. I checked out the following on security concepts for Mac OS X and iOS(http://developer.apple.com/iphone/library/documentation/Security/Conceptual/Security_Overview/Concepts/Concepts.html) and then found CFNetwork library (http://developer.apple.com/iphone/library/documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html).
But I don't really know from where to start..
theoretically I would like to query the BLAST url API from a .mm class method (so I can use standard C) and then show the results in a normal view.
Anyone would be able to guide me in these first steps?
Best regards and Many thanks!
The BLAST API is strange. It is a POST-only command-response API, but the commands you POST are things like CMD=Get&..., CMD=Put&..., etc.
The iPhone SDK provides a fairly convenient high level way to invoke URLs. Have a good read of the NSURLRequest documentation. You'll need to set the HTTPMethod property to POST, and populate the HTTPBody with whatever the BLAST API tells you to post.