iPad: Force iPad Updates - iphone

I've been developing an application for our client and they are requesting that we add in compulsory updates for their application. The app allows sales-team members to showcase their product and they are worried that if a product gets re-called then the sales-team must reflect this in the app immediately or else there could be legal implications for the company. How feasible is this to implement? Are there any examples of this in use?
Cheers for the help guys,
Dan

The way you could do this is to get the app to call the server and ask for the latest version number. If it's different then stop the app and tell the user to upgrade. However, this won't work if they start the app without a network connection :)
I also don't know if this will be allowed by Apple?
A better way to do it is for the app to download a list of products each time it runs (cahcing it incse it starts with no connection of course!) so that the products in the app are always up to date and the users never need to upgrade at all.

Related

Event While deleting the app from iPhone [duplicate]

This question already has answers here:
How to catch application uninstalling on device and let server know about this (iOS/Android)
(2 answers)
Closed 9 years ago.
I wish to hit a web service, whenever a user deletes the app from his/her device. Its just to delete that user from Db. Can anybody here help me?? Thanks In Advance..
Generally speaking, what you are attempting is probably not advisable. Even if it were possible to know when a user has deleted the app, how would you handle the situation where the user then re-installed the application and launched it? You also do not know why the user has deleted the app (perhaps they only wish to do so temporarily to free up space on their device? Perhaps their device was stolen and they are re-installing into a new, or upgraded device?)
If you separate your concerns (client has/does not have mobile app, vs client has/does not have active account) you can manage all these scenarios in a much more robust way.
Using an in-app analytics package (like Google Analytics, Parse or Flurry to name just a few) will give you insight as to your user behavior, and perhaps based on this usage data you can trigger handlers. For example, if you see a user has not used your app in a certain period you can email them or send a push notification to remind them? Perhaps you could email them to notify them "You have not logged in in 60 days, if you do not use your account within the next 30 days it will be deleted. Click here to re-activate your account."
No, can't do. There is no defined notification when an application is deleted. If you must talk to a server, suspend inactive accounts after a predefined time limit.
One other thing you can try is check for the UIApplicationWillTerminateNotification notification. Save the state of your app on your servers when it's transitioning to the background and cross your fingers your user will not delete your app when it's not running. Because once your app closed, you don't have any control anymore. Thats the iOS behavior till iOS 6.
There is no way you could know whether the app is deleted from device or not because no delegate method fires when the app is deleted.
Hope it helps you.

iOS give users default downloadable content

I'm facing this problem while designing my iOS app. Suppose that a user purchases an app and downloads it to the iPhone. I would like to provide him with a default consumable item the first time he runs the app to use whenever he wants , however I would also like to track if the user has already consumed the item. This way if he decides to reinstall the app we can restore the transactions (if he used the item) or we can avoid possible intents to download different kind of content by reinstalling app and consuming default items each time. (Guess NSUserDefaults is not an option here).
One approach that came to my mind was using UDID(or any iOS 6 alternatives) to keep a record on server of the user's device the moment he uses the default item. But this will limit items just to the device from which they consumed content.
It would be great to support all the user's devices (like inAppPurchases), but I can't figure out a way to implement this.
Any suggestions or help would be great.
Thanks a lot.
In order to tie information to a user (not just a device she used at one time), you'll need to ask the user to identify herself and save it someplace other than the device. In other words, a backend that implements registration and login.
From scratch, this can be a lot of effort that an iOS developer didn't count on. Fortunately, there are several services in the world that provide a substantial head start. Here's a nice round-up. I've had direct experience only with Parse.com, and think it's excellent.

Monitoring the other Apps from one app in iPhone

I need to create and App that will run in the background and will monitor the user's behavior in term of applications installed, opened and deleted.
i.e Application will save the information in the database that at what time user has installed/opened/deleted an application in iphone.
I wonder if its possible and Apple will allow this??
I tried to google on it but did not get anything, i know if its possible then it would be possible by multiasking only??
Can any one please help me on the same.
Brn
Not possible. Your app can only run when the user chooses to (except for a limited sub-set of tasks like VoIP, etc).
Your app can know nothing about other apps.
iOS apps are sandboxed. I wouldn't say impossible but certainly not allowed. You'd have to find a security hole to give you root access first. Oh, and notify us when you do ;).
Edit:
Maybe it wasn't clear in my post but I was at least half joking. Not sure why you want to do what you want to do. I can imagine the following scenarios:
1) Your company wants to monitor everything their users do on their phones. In that case I would either
a) lock them down and only allow app installation through a company portal (enterprise distribution is possible in iOS) OR
b) forget about iOS alltogether. Blackberry would probably be closer to what you want, although I don't really have experience with that platform. Also, its future is not sure.
2) You're trying to do something illegitimate. Because of iOS's locked down nature it won't be easy. See how few successful attacks there have been in the last years - and that's for a highly successful platform where an attack could be high paying both in terms of money and reputation.

iPhone trial period for app

I need to implement trail period in my app. How to do it? Store day count in NSDefault? or some other?
You could store a counter in the preferences as you mention, although that counter would disappear if the user reset their phone.
However, I think it's all slightly besides the point. In general, Apple frowns upon apps that have this kind of functionality, so don't be surprised if your app gets rejected. Consider launching two different versions of your app instead, a "Lite" app and a "Full" app. The Lite app should have a reduced feature set, but it should never stop working.
Apple is against the idea of you disabling features to prompt people to pay money for something. Your app needs to be fully functional and a 'lite' version and a paid version seems to be how things work at the moment.
That being said - if you implemented it properly you could add in app purchase items to enhance your app. Your original 'lite' app could be $0 and additional features can be added for a fee.
The most bullet-proof method would be to send and maintain a copy of the iPhone's UUID in a database.
Then if the App is not "unlocked" it requires a "key" form the database every time it launches. You can then implement the trial period on the server side.
However, if you decide to use some type of encryption to store or transmit keys etc you will need a licence to distribute the App.
You make a light version of your app. There is no official way to have a trial version at this time. Hopefully Apple will eventually address the need, but I can't say I would hold my breath...

how to get Iphone UDID of device while installing the application from app store?

In my Iphone application , i am able to get the UDID of the device and have display it on alertview.
my query is that while any user go to the apple appstore and try to istall the application, at that same time how to get the UDID of the device and store it to the Database and also want the UDID of application at the time of uninstallation.
Whether is it possible or not?
If possible please provide any code or any useful link or any other info,which would be appreciated.
Thanks,
Mishal Shah
You can't run any process when your application is not actually running - this includes at download time and at uninstallation.
Instead, you should try to find other ways to measure what you want. You can, for example, have your application keep track (in NSUserDefaults or similar) of whether or not this is the first time the user has launched your app, and if it is submit the UDID to your server.
Tracking uninstallation is a lot harder - the best you may be able to do is to keep track of how long it's been since the user last launched your app (if you have the app submit a launch time every time the user opens it).
Keep in mind that a lot of tech-savvy users will object to your gathering the UDID or usage patterns within your app without their express permission (or at all).