Calling cards iPhone application - iphone

I am newbie to iPhone development, I want to do a kind of POC which fulfill the following requirement.
It will be basically a calling card application where user will enter a toll free number followed by pin number. After entering a pin no. it will show the available contacts from the iPhone itself, user will select a desired destination number and call it.
I know this is a whole new native application, but can anyone guide me how I can start working on the same. I have collected a few information about what calling card is and how it works. I'm a bit confused about how can I get the information from calling cards service provider?. Do i need to call there API and how to do a code in the XCODE tool?
Please help me in this regard.

A quick google of calling card api's shows that most card companies have them, but they also don't publish them. Looks like you'll have to talk directly with them and get api specs. It may cost you? I'm guessing the actual API won't be very complicated... a couple of HTTP requests and a little bit of response parsing. You might want to look into asi-http-request for building the requests, and you can probably do most of the response parsing with NSStrings or NSXMLParser if they use XML.

Related

How to connect sensor devices to IOTF using API KEYS

I am doing an android application, I'd like to know how to connect sensor devices/applications to Bluemix IoTF using API keys, by saying that I just want to minimize the registration task from client side(sensor devices)as much as possible. I know how to register devices with deivce Id,token and authentication manually. but I just like to know that is there any other easy way around to do it. It would be great If I got some one shed light on this from scratch. Thanks in advance.
There is a rich set of REST based APIs available at:
https://docs.internetofthings.ibmcloud.com/devices/api.html
and fully documented here:
https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#/
One can use excellent REST based testing tools such as Postman for REST testing.
The reason I mention the REST APIs is that they provide a way for scripting or automating the registration of devices. There is an API called "Add device" that, when called, will register a new device instance of a specific device type against your IoT Foundation instance.
I could imagine a new device that knows it is not registered executing a self registration request to define itself as a new device type. What I would next suggest is that you read the links above and see if they make sense. If they answer your question fully, great. If not, simply post a new question that is specifically targeted at a specific areas and we'll be watching this set of tags and respond back as quickly as we can.

Sending Data to Website From iPhone

I'm creating an iPhone Game where I want the user to get a unique numeric code when they first launch the app, that way when a friend of that user opens it, he/she can input that code and both users can get rewarded. I haven't encountered any issues regarding that, however what I want to do is make it to where the app registers the code given to every user and saves it to a website of some sort. That way when the other user enters the code, it will load the data from that website and check if it's registered. How would I manage to save the data onto a website? and also What free website could I use for this without having a character limit on the body page?
-Thanks in advance
Your thinking is correct, in that you need to save your data somewhere online, but you don't really "save data onto a website" in the way that you're describing. "Free Website" services usually serve a different purpose entirely - that of serving up public html pages. Sure, they can take the form of a CMS (like wordpress.com or tumblr accounts), but using that as an interface for storing your application's data is not something they're typically designed to do.
For something like this, where you have a public iPhone app that requires secure access to custom strings, you really want to have control over your own web server (different than a domain name, btw), and interface with a database on that server. This will come at a cost, and will involve more code than you're likely to find someone to write for you on here. Sorry to say it, but hey if someone wants to prove me wrong I'd love to see it.
Because all you need to store & retrieve are random strings (basically referral codes... if I'm understanding correctly), your database needs are pretty simple. If you're not familiar with things like PHP / MySQL, and you don't want to learn, it might be worth reaching out to some server-side developers for help. Unless there's more to it than you describe, you can probably find someone to help you for relatively cheap.
Good luck - and I'm sorry there isn't a simpler answer for ya.
You can send data using NSURLConnection. Just create an NSMutableURLRequest and call its -setHTTPMethod: method with “POST” as the HTTP method. Then, set its body and header fields appropriately, and you can use NSURLConnection to send the data.

Transferring images captured by iPhone onto the WebService

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".

Obtaining information from Webpage - displaying it in an Iphone app

Is it possible to pull information from a website and display it in an iphone application?
I am looking to pull the current temperature and barometric pressure for an airport from the http://adds.aviationweather.noaa.gov website and display those two pieces of information in an app.
This sounds like a common task that programs do all the time but I'm not sure how it's incorporated into an app.. (what is the process of pulling webdata called?)
What methods or tools are available to do this? I am unfamiliar with handling web data for iphone at this time.
If they have an actual feed for the data, you could access it using NSHTTPRequest and parse the results.
If you need to screen-scrape the data off the page itself, then I would highly suggest creating your own web service to do the parsing and have your iPhone app talk to your web service. The reason being that if they update the page in a way that breaks your screen scraping you would only have to update your web service instead of deploying an update out to who-knows-how-many iPhones.
Just use an NSHTTPRequest and all the related classes to assemble a standard HTTP GET request for the site with the data you need. If there's a data feed (XML, JSON, etc.), you should find out what that URL is and use it instead of parsing the actual HTML of the web page. If not, the method is called "screen scraping" and it basically involves you writing a regular expression to parse the HTML of the web page returned from the server. Again, don't do this unless there is no alternative data feed you can use.
If you need to parse XML, see NSXMLParser. There are open-source solutions for parsing JSON in Objective-C. Just Google around for them.

Perform reverse geolocation lookup

I'm pretty new to iPhone SDK and Cocoa development. I'd like to know how to call a web service which will take the lat and long values from my iPhone and feed them to a webservice so I can retrieve the City,State. I already have the phone location stuff squared away. I'm only looking for where I should pass this info to and how I can parse this data back into my app.
Essentially, I only want "City,State" to be visible in a label on one of my views.
The first time I tried this was with geonames.org and it put my returned lat/lng location in the middle of nowhere many many many miles from where I actually was. I tried the same lat/lng values with google maps api and it was in the right place. The only problem I've had is parsing the JSON data back into my app. The returned info seems to have multiple versions of the same info which I can't seem to understand how that works.
So once again. Just looking for a simple HTTP style string I can pass somewhere with my lat/lng values and it returns "City,State". If the example you mention involves parsing data. Please refer to an example I can dissect - I'm a noob.
Oh and one last thing, I know this was made possibly easier with the iPhone 3.0 SDK but I'm currently building this project on 2.2.1 - and for more than enough reason HAVE to do it this way until the rest of the app is ported to 3.0.
Look at the replies here and here