How would I add code that would update an online "counter" so I know how many times an iPhone app is being opened? - iphone

So I have searched for this but not finding anything about it and if I missed it sorry about that. What I am trying to do is see how to go about adding some code to my iphone app that will connect to a php script (if connection available) and update a counter so that I can let my clients know that their app is constantly being used? Also, would apple allow that? Or would my app be denied for doing such a thing? Any help would be great! Thanks in advance.

There's a bit of network plumbing to implement this. It's not hard, but a much easier route would be to integrate something like Flurry analytics into your app. They you can make one function call, and have it track and upload the information to Flurry's servers. You can view those stats and get an idea of how people are using your app.
Note: I don't work for Flurry, but I use (and like) their service.

Related

How to establish app to app communicaiton using socket on same device in iPhone without any server component?

I want my app to intercommunicate with my service,send and receive data to and from service
Check this:
How can I transfer files from one application to another in the same iOS device?
UIDocumentInteractionController class reference
Hope this might help to achieve your goal
There's plenty of references about that'll help you with what you're trying to achieve, I'd recommend doing a little research and attempting to get something basic working.
To get any help, you'll need to provide a bit more information - what protocol does your service operate on? what is the function of the app? what have you tried?
This place is an invaluable resource to programmers who ask for help, rather than an entire solution. :)
Good Luck!

Fake Call using PhoneGap

I have a client that would like me to build them a "Phoney Phone Call" program on the iPhone.
I need the ability to fake a phone call and have the call come from someone in the contacts and the ability to choose the ring tone.
Is this possible using PhoneGap? Anyone have any info on this?
Thanks!
Mike
Sounds like this is not possible. Haven't used PhoneGap but don't believe PhoneGap gives access to the Address Book APIs. So the "have the call come from someone in contacts" is not possible. The other stuff should be.
FYI, fake call apps do already exist. It might be wise to notify your client of this.

Logging into and communicating with a server from an iOS app...help!

Hey everyone. I have a fair amount of experience developing iOS apps, but nothing much with web/server interacting apps. For a project at work, I am making an app that will let you login, and get pictures off from a server that will then be downloaded for display and review on the local device.
I need to get some pointers on the correct approach to take. Are there built-in classes that make doing something like this easy? Once the cogent is downloaded from the server, it will be viewed locally, so all I need is to get a point in the right direction for logging in and communicating with a server…from an iPhone.
Can anybody point me in the right direction?
Me, I'm using ASIHTTPRequest Librayry to communicate / download with Internet.
For example, for an news app I download latest news in JSON (with a PHP script on a web server) and store datas with SQLite. If you need a little explanation of JSON with iPhone, check here (in french, but source codes are in english ^^)
When I need to download an image, I use ASIHTTPRequest and a queue to avoid downloading to much files at the same time.
If you want more information about a step, just say it.
Good Luck !
NURLConnection is your friend, along with its delegate methods.
Don't be lured by the temptation to use the -sendSynchronous method (which, now that I think about it, if you require authentication, you probably can't use anyway).

Best options to integrate my application with the Nike+ features of the iPhone 4G

How can I integrate my application with the Nike+ features of the iPhone 4G. I want to access the data captured and send that to my own applications. There seems to be limited information available on this topic. Any help is greatly appreciated.
I actually created a PHP class that extracts data from the Nike+ service. It might be of use to you. You can find the download and documentation at http://nikeplusphp.org
Not sure how you would save authentication in your app, but this class would definitely give you access to literally everything Nike return back to their own apps and website. Well, everything I could find!
If you do have any issues with the class or anything is missing, please feel free to get in touch or contribute!

How to show related city name according to the incoming call on iPhone?

I want to add something (eg. the related city name) into the UI view when I make a phone call or received a phone call on iPhone. However, I can't figure out a good solution for this idea. Could anyone who has experience on this subject gives me some suggestions?
My currently solution is, try to write an extension based on mobile substrate and hook functions in SpringBoard. So many difficulties existed and following are my current big questions,
How to develop such a extension? I downloaded some examples from google, unfortunately they cann't even be compiled on my toolchain.
I can't figure out which ui view for the related screen I should use to insert my own component. I get header files of SpringBoard via class-dump, but no docs and no comments about its usage. Could someone share his discoveries with me?
How to build a trusted cross-compiling enviroment on leopard? All kinds of confusing errors pop up when I try to build others's codes. I've tried Zdziarski's instrunctions in his book, it works with iPhone OS 1 and can compile common projects with open sdk, but how should I do to make it works when comipiling ms plugins?
Also, is there any other solution to translate my ideas to codes? I start iPhone development one month ago, no experience with cocoa/Obj-C before. So your suggestions are very appriciated.
~ Link Bian (卞林扣)
Email/MSN: linkou.bian#gmail.com
I think you are asking for too much. It wont be possible to manipulate incoming/outgoing call screens. Ethically, that is.
Zdziarski is a hacker and from his book, you will get many undocumented API calls which will make Apple reject your app. Same goes for Erica Sadun's iPhone Developer's Cookbook.
Something that really helped me get dylibs compiled was using SkylarEC's Xcode template and just appended an extension of '.dylib' onto the binary and sshing it into /Library/MobileSubstrate/DynamicLibraries. I suggest hooking SBCallAlert or SBCallAlertDisplay to get the id of the caller which is usually just an NSString. Play around with it a little bit, those are all the visualizing methods of a call. If you put in an nslog in your custom override method, you can view the output in iPhoneConfgurationUtilitie (windows) or the console in Xcode. From there you would most likley need an index of area codes to comare the callers to. I don't believe you can add subviews to the call, on I intercept and reissue the strings for the views already there.
But you know, apple doesn't like this :P
lemme know if this helps