IPhone sync/app backup - can an app do something at that time? - iphone

I was wondering if there is a hook in the iphone sdk that allows an app to know when its being sync'd / backed up - so that it could do something, eg connect to a website to also backup data.
I am assuming not... but I could be wrong.
Thanks,
Chris

Chris, alas, your assumption is correct. Currently, there is no support for this, but you should file a bug report with Apple requesting it!

Related

iPhone how to debug customers phones

I've gotten a couple of bug reports from customers that I am unable to duplicate with my devices. These aren't crashes hence no crash reports. I'm trying to figure out what options I have to solve these bugs. Keep in mind that these customers vary widely in their technological prowess and willingness to help out.
The best I can think of is making an ad-hoc build with logging enabled to a file in their documents directory, but then I need a way to get that file off their phone.
Specifically, Short of remote debugging (that would be great) I want to get a log file or some other diagnostics to see what is going on.
What options do I have?
EDIT: Great information already given, but I am looking for something like 'writing log statements to a remote server', probably just for an ad-hoc (for debugging) build. So, basically, by looking at their log, hopefully, I can deduce where things go wrong. I could build such a system, but wondering what is already out there.
Once you have the ad-hoc build, you can send the app to your customers, so that they can install it in iTunes and from there on to their iPhones.
Dragging/dropping on iTunes your app will place it in the App folder.
As to retrieving your log file, you could implement copying of your log file back to itunes (like many apps do), so the customer could get it from there and send it back to you... or you could simply post the file through HTTP to a server of yours under the customer's control.
AdHoc + TestFlightApp.com - extremely easy, powerful.
Flurry is an option.

How to automatically update an iPhone app from within the app itself?

This link shows a video where an app upgrade is "forced" from within the app itself:
http://buzzworks.de/blog/update-ios-beta-apps-from-within-the-app
The App Store is not called in and it's said to work only for AdHoc
apps.
Anyone knows how is this possible?
edit: please give a look to the video before answering. AdHoc apps are signed by the developer and they do not come from the App Store. This sort of forced update is useful when doing beta testing and in enterprise applications.
I've found that it's all explained here:
http://developer.apple.com/iphone/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html
The developer should create an .ipa with the app and a manifest in plist format with the URL to the .ipa and a few other things.
The app can optionally implement its own way to find if an update is available and open
the URL to the manifest.
I didn't it's really possible because the app has to somehow sign itself. The best I can think of right now is that the app is not signed?
You can always force people to go to the app store when a new version is out. Simply make the app connect to a webservice first. Other solutions are not accepted by Apple, or will quite simply not work because of other issues (signing is one of many).
You could also design your app in such a way that forced updates are never a requirement. You can load your user interfaces from the web (Apple has presented some valuable information about that during the previous WWDC), your data can come from the web, and if there is any other correction to do just ensure your app is backwards compatible.
That's how the app store works. And it never requires a 'forced update' ... Well, almost never ;-)

How do I launch an iOS app upon startup?

I am working on a project where the iPad will be used for a specific purpose, and only run one app. When the device starts up, I want my app to run, and I want to override the home button so that it does not quit the app (like the iPhone/ iPod demos in the store).
I have seen bits and pieces of this functionality, but am unsure how to implement it. I realize that it would have to be on a jailbroken device, and the client is fine with that.
Any ideas?
Thanks!
Thomas
Edit 1: I found this site, which explains some iOS daemons. I'm still researching, so I'll just keep posting what I find.
Edit 2: I found Saurik's IRC channel and asked around in there. One of the participants told me that it is possible, but probably not as simple as I thought. I am still doing some digging around in the iPhone 3G filesystem now just to get the feel of what certain things do.
The project has been scrapped, but I'm still looking for help on this though....just cuz I'm interested lol.
Here's my progress on the issue. Question's still not completely answered, but I'm making some headway :-)
I've been researching Jailbreak and the iOS filesystem as well. That has helped my understanding of the issue some.
Without jailbreaking this would not be possible.
There has to be something in /etc somewhere that runs through all the things that start up, just like on Linux.
It so happens that my current ipod touch has a WALD screen after me manually deleting a few mp3 files. Some anti mp3 mocking code policing it, and not liking me touching the mp3 file structures... otherwise I'd look for you right now.
Do you know how to ssh into your ipod/iphone?
Well, I believe Apple itself uses this on the iPads running at the Apple Stores (those showing animations about the products where you can ask to talk with a blue shirt).
I would look for something on the official IPCU (iPhone Configuration Utility) to check if there is an option for auto-loading apps on boot time.
If not, try to get friends with someone working on an Apple Store and get some hints on how they run their app on those iPads.
you can add the "voip" key in the information plist.
This is backed up by Apple:
You can also see this sample project:
https://github.com/lithium3141/BootLaunch
PB.

Iphone - how to programmatically answer a call

I saw this application on Cydia ( forgot the name) that will answer/ reject a call when you shake the phone.
Any ideea how is it done ? Couldn't find anything in SDK.
Thanks
I don't think it'll be in the SDK for sure. Apple wouldn't include it.
It's not somethhing that you can do using the official SDK. If you want to do this, it'll be using an undocumented/private API that Apple will not allow through their review.
If you want to be able to sell your application on the App Store, then you're going to have to let go of this idea. Else, you're going to have to resort to other means to find out how to do it.
Nothing personal, but I'm against jailbreaking, so I can't help you.

iPhone sdk - owners name?

Is there a way in the iPhone sdk to get the name of the contact who own's the phone?
I see that my app has been cracked, and I would like to update a release which checks to see if it a cracked version and then display the following:
Hello (Persons name). I see you are using a cracked version of (Application Name). If you like this application, please support the me by purchasing it.
StackOverflow: Reducing Piracy of iPhone Applications
Like previous poster mentioned, you can't get the user's name. You can, however, get the phone number by doing
[[NSUserDefaults standardUserDefaults] objectForKey: #"SBFormattedPhoneNumber"]
Taken from here
Also regarding copy-protection: problem with iPhone app copy-protection is that Apple does not provide public docs for distribution format or anything even remotely related. So if you base your checks around those undocumented things, you are really juggling on a mine field. Ultimately Apple should really fix this broken system.
That's not available because that's a privacy issue.
(I know, there's some irony there, considering your user just cracked your app, but I digress...)
There's lots of discussion about anti-cracking measures. ArsTechnica has a story about one developer. Try Google or Apple's Dev Forums (thread).