making a fully fledged online syncronized star rating system - iphone

does anyone know how its possible to make a rating system that updates across all application downloads based on other users input. i would preferably like to use this framwork if possible
http://code.google.com/p/agautam-code/source/browse/trunk/iPhone/?r=7#iPhone/RatingView.
is this even possible in objective c?
thank you

If you're asking someone to just give you the code, you're out of luck - it's too big a question for that ;)
To communicate between downloaded apps you will need some sort of sever holding the rating. Then, when a user changes a rating on their app it will pass the rating back to the server and store it there.
Then, while each app is running it will check the server for new ratings and download them. When it's got the latest ratings from the server it will update the UI (using the RatingView you mentioned in your question if you want).
Personally, I'd use the ASI libraries for the iPhone communication and Ruby on Rails for the server part. Both ASI and RoR are very easy to use and there are lots of ruby on rails webhosts out there to host your server for you.
However, you can use whatever you like really, it's up to you.
Sam

Related

Connecting to SQL Server in Xcode

I have been researching this all day, its more of a question to see if anybody can help.
I have already set up the push notifications on my iPhone app which i had a nightmare with but I've managed to do so.
I'm only a internship and have been developing apps for 4 months, its not my strongest subject as I haven't learned anything like this at uni.
My boss has asked me to add a view to the application so that you can view the most recent push notification that the app has received.
I know this is possible but I'm not sure how it's done, I have spoken to the developer who dealt with all of the server side of things (he doesn't have any knowledge of app development).
He said I would need a page that will read directly from the SQL Server database which he has written the code for that stores all of the pushed notifications.
I have mentioned that it wouldn't be a good idea as it can be prone to hacking etc. He disagrees.
Can any one help with what I need to do? Or does any one know of any tutorials I can follow to help me with this.
One route to take is to make a copy of that Database and put it on the phone as an SQLite Database and have a PHP script that gets the newest additions and adds them to the SQLite database.
A second route you could take, is you could ask him to put it JSON format and you would have a dictionary on the phone that held all of the JSON, and then parse the JSON using apples built in parser, NSJSONSerialization or any of the other JSON parsers out there. Using the parsed JSON, you could then do as you please with the list of notifications
Another method will be for that guy to write a PHP script for you to access all the notifications and you run that in a for loop and populate a table, or whatever, on the phone of the latest push notifications that way. This while take a few seconds longer than needed, depending on how many entries there are.
Ordered according to my preference of options
Since you fairly new to mobile app development I would recommend option 2 for you. It will be a bit more work than choosing option 3, learning curve wise, but it will run faster and be better for you to learn how to parse JSON, as a lot of API's that you come across use that format.

Webservicex.net allowed use of services

I have been playing around with the currency converter web service offered by http://webservicex.net as a way of learning how to interact with a web service from an iPhone application and I have managed to get the currency converter working perfectly.
I have since expanded my application to include other features to make it something a little 'different' from what is currently available on the App Store.
The question that I have is if I release an app on the App Store and that is ad-supported am I allowed to use this web service that someone has obviously put time and effort into making? Up until a month ago I did not even know what a web service was or how it existed so I am not sure if there is any etiquette (eg, give them a mention in the About page of your app) or if these things are generally out there and free to use?
I have tried contacting Webservice X via email but every time I get a bouceback because their mailbox is full, which has helped get me closer to an answer. Has anyone else used their services or know of the standard allowed use of someone elses web service in an ad-supported application?
Thanks guys!
Using their web-service is not going to get you rejected. That being said, relying on someone else's equipment (of which you have no control and are not paying for usage) is not a good idea for a production app. I would do some research into finding a service that you feel is going to be more reliable or can pay (a minimal amount) to use.
The other piece of advice I would give is to build the application so that it gets the data from your own web-service and let all the base data come from you. In other words, get your own web-site (from as little as $7 a month from GoDaddy or other services), and do the currency lookups there. Build your server-side processes to be easy to swap from one service to another and that way if for some reason you lose access to the currency converter service you have been using, it is a quick amount of work to switch to a different one without having to release a whole new version of the application (and wait 7+ days for the app review process).
In other words, your web-service you build supplies all the data for the iOS app and you get the currency data on your web-server.
That is how I would do it to make sure it is the most reliable and easiest to change without affecting the installed iOS app.

Iphone multiple users application

I'm trying to figure out how to make an iPhone application allow multiple users (that have it installed) share data among them. Now, the tricky part is that I don't want to host a server at my place (very poor ISP services), so I would opt for an online hosting solution. Next, by data I understand them to be able to, let's say, post a comment that would become readable to all the other users and to see what other users have said.
So, in my mind, I'm thinking of either having a file remotely hosted that could be accessed by multiple users at the same time, or a database of some sort or anything like that.
You haven't given us much to go on -- it's not even clear what your question is. If you're just asking how to go about this, I'd suggest the following steps:
Figure out what, specifically, you want the app to do, what data it will share, and who the data will be shared with. Is this an app that you're going to distribute publicly? Will all users share the same data, or will groups of users share with each other but not outside the group? How big is the data, and how is it structured? Can any part of the data change at any time (like a shared document) or will the data just be updated (like a SMS conversation)?
Decide how you want to host the data. If you'll need to serve a lot of users, you'll want some sort of database. If you'll need to serve a LOT of users, you'll want to make sure that your solution will scale easily. There are lots of hosting companies that provide access to databases like Oracle or MySQL, and that may be enough for your purposes. Or, you might want to look into some of the web services options, such as those offered by Google and Amazon. These can be fairly easy to use and have the advantage that they'll scale very well.
Get to work. You'll probably want to build a very basic version of your app around the same time that you're getting the server side working, so that it's easier to test. Once the server side is working and reliable, you can shift the focus back to building out the rest of your app.

sending files from iphone app to a local server?

Need some help please with web related matters since I don't know much about web (more on the software side of things).
Basically, I am developing an iphone app and would like to send data to a local server once in a while (for simplicity, let's just say I want to send this info to my personal computer which will act as the server). This is just some simple data, and I dont care about the format (actually .txt is the best, but I am open to any format which will make it easier - I am just transferring numbers).
What would be the best way to go about this process? A quick step by step explanation would be highly appreciated. From my very basic knowledge I assume that I will need to:
setup my Mac as a server (which I think should be done from settings?)
Create a URL connection on my app and send the file?
I am probably missing 50 other steps here...
Thanks!
One path is to set up a webDAV server -- you'll have to Google that up, it's far too big a topic to cover here.
To the specific questions you asked:
1) Your mac can become a web server by turning on the WebSharing in preferences, or a file server by turing on fileSharing. Be sure to set permissions the way you want them.
2) If your mac is a web server, you could write a simple CGI script (perl, ruby, or the like -- this is simple tutorial stuff that's all over the www) that accepts your text as a parameter. From your iPhone app, you'd make an NSURLRequest to a URL similar to:
http://192.168.10.1/webPage.html?this+is+the+text+I+want+to+send
Of course, you can get fancier ans use POST requests (the above example is a GET request), but that's going to require more reading.
If you want to transfer files via file sharing, that's a bit more complicted.
What would REALLY help us answer is if you could specify the question a bit more tightly. As it is, you've asked about a very broad area that covers quite a bit of ground.

Phone App + Online Database?

Idea: Create an database that I can integrate with an iPhone app.
As I have never worked very in-depth with online databases, I need advice on what methods are best for creating a database. The database would need to contain a list of usernames and passwords to login.
P.S. - I have my own website server.
The easiest thing would be to just use MySQL probably. Then you would define web services that expose basic access to the entities in the database. Best to do those with REST. That might be more than you are up for.
The problem with lesser solutions is that you can't have users just connecting directly to a db from the mobile app. So you have to have something talking to the db.
The other option would be to try to implement the whole thing using Game Center, since that has support for players and scores, etc. Not sure if that would be sufficient. I have looked at it but not in a lot of depth and there are changes coming in iOS 5.
In my opinion there is no need to bother with the iPhone app, just make a mobile version of the website. At the end of the day, you'll have to write the website infrastructure anyway, and with a website there is no need to worry about distribution. You'll even be able to support those using other devices.
If you are still looking for ideas, I learned a lot of what I know of web-based databases from a book called Head First PHP & MySQL (ISBN 978-0-596-00630-3). I already knew SQL and C++ (C++ is similar in many ways to PHP), but you really don't need it with book. It will teach you the very basics of both languages and how to tie them together. It will also give you a good frame of reference to Google solutions or ask informed questions.