I will make one of my app one day free.
Is there an api or any parameter that can know if the user's app is the purchased copy or the copy with free charge?
Welcome any comment
No, there is no way of knowing the price at which the user has purchased the app. So, answering your question, you have no way of knowing if an application has been purchased or downloaded for free.
do you want the app to behave differently if downloaded on the free day? Maybe you could store the date of first launch, and compare that to some web service you develop that returns an array of those days you made the app free. If the users first use date was among those, assume it was a free download (obviously it's not exact because they could have downloaded and not used until a future date)...
if you just want to know, you could add a call to your server on first use and store that data so you'd have a record...but it's still dependent on date, not literally price
You could do it like this:
You could do it like this: eg. store off a NSUserDefault with the version.
Then make the next version for free, dont forget to increment version.
If no previous entry of a version is in NSUserDefault then you could flag another NSUserDefault, eg. FreeApp with 1.
Then in the next version you put on you will put the price active again. Now you can check if FreeApp was 0 or 1 when reding the NSUserDefault, if it was 1 then those are the ones that updated that got the version for free.
Unfortunately when the app gets deleted so does the NSUserDefault of it and a redownload of it, even when being paid would be free but your app will store it off as paid.
Hope this makes sense.
Related
I am currently developing an app for a company that is in a very competitive field. I have finished all of the features of the app that they requested except for one, making it somehow protected from their competing companies to download and use. I thought that I could set up a UIViewController with a password field that would check against some kind of database, but I'm not sure how to do the checking against a database part nor the practicality of it, and was hoping I could get some ideas on how to do this so that other companies couldn't steal and use this app without a password or something that changes like every 30 days or something and is kind of like an activation code.
Review the WWDC 2012 video "Building and Distributing Custom B2B Apps for iOS". I'm unsure if your app is in this B2B classification, it seems that it might be from your description.
What I ended up doing (if everyone needs a reference) was setting up a server with an SQL table that has pass codes in it. Since apple does not allow for any sort of system that requires you to "buy the app from outside the app store" I made a dumby username field (shame on me) that takes any value you like and then requires to have a pass code that fits. Once the pass code gets authenticated with the web server in a json sql request (there are plenty of api's to do this with) it comes back and sends the user to the first screen and sets a value in a plist with how many days of use the user has left. Whenever the user opens up the app it checks to see if the date is different from the last date logged in (saved in the same plist file) and if it is different then it calculates the difference and deducts that many. When the count reaches 0 it sends the user to the pass code authentication screen again. A bit complicated but an effective method of getting around Apple's restriction on not having a sort of pass code system like this. Thanks for the answers, unfortunately enterprise did not work for this company since they needed to be able to distribute the app to as many 3rd party members as they wanted to without having to worry about them leaving the company for other suppliers and remote management of the app (I.e ability to remote uninstall) was also not an option. Hope this helps someone someday!
I'm exploring a business model that specifies how many times a (costly) function may be invoked per user in an application.
Right now whatever I save, e.g. user defaults, gets deleted when the app is deleted. When the app is reinstalled, the counter is back to zero.
What I need is a way to save information such that deleting the app still leaves the information intact.
I've seen examples that mimic the deprecated unique identifier, but that's per device, which is not what I'm looking for.
KeyChains appear to be the right way to go. I can store a unique ID there specific to the user as well as in the user defaults and that way can track also if the app was reinstalled.
I want to integrate in-app purchases into my application, and so I'd like to download .plist files whenever users buy new level sets. How can I download a file from a server and save it so that it stays in my iPhone app forever ?
EDIT
I want to achieve something like that:
As there are not many of these plists (never more than 20) I could just include them into the app and set a boolean value with isPurchased or so, right ?
If the user purchased the category, the boolean is set to YES.
Whenever new categories are added by me, I'll just have a whole new update like "Cut the rope" for instance do it. Is that a good approach ?
First: Why don't you use Apple's services for In-App purchases? Why using your very own implementation? I am not sure but...do you think you will get Apple's approval? As far as I remember, Amazon did something similar in the past and they didn't get it.
Second: I wouldn't use NSData for this purpose. If you have a valid property list, then it is the best solution to use
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfURL:[NSURL URLWithString:#"foobar.com/plistfile.plist"]];
You could then store this dictionary. To be honest, I wouldn't recommend using your solution. If I understood you correctly, you would have thousands of plists after some time. My suggestion: Use a "global" mutable dictionary as ivar of your App Delegate for example. This should be empty at the beginning. Then download your helper dictionaries as mentioned above and populate your global dictionary with
[[delegateInstance globalDictionary] addEntriesFromDictionary:dict];
each time you get new data.
Save it with
[[delegateInstance globalDictionary] writeToFile:#"path" atomically:YES];
and recover it each time your app starts up.
EDIT:
Of course you can do it that way. If these plists really store information, that's fine. For example you could store billing information there, so that they are not interchangeable for other users (or shouldn't be at least). BUT: If you only want to get information about the question if a users bought a specific level or not consider combining your information within one plist (as described above). Anyway: Consider a possibility for your users to get back their data. Think of somebody deleting your app accidentally. How do you want to explain to him all his purchases are lost? In-App purchases are safer.
Or at least: Store a copy of the receipts on your server and let the users login to gather what they paid for in the past ;-)
Have fun and good luck! :-)
Quick and dirty one-liner:
[[NSData dataWithContentsOfURL:#"http://<yourfile>.plist"] writeToFile:#"pathforthefile.plist" atomically:YES];
Let's say that I have an application that helps people "manage" a certain number of "items". Normally they'd have to manage information about these items on paper, but my application will let them do it on the phone.
I want to sell my application by the number of items it supports. For example, I might charge $10 for the version that has a limit of 20 items, and $15 for the version that lets you manage 40 items.
What's the best way to do this? Ideally I'd like to let users download the application for free as a sort of trial that only supports a very small number of items like 2 or 3, then they'd have to use in-app purchases or something to buy additional capacity.
I also need them to be able to "re-download" their license from the app store if they wipe their phone or it gets destroyed.
I also want people to be able to buy upgrades as they go along. So once they find they need to manage more than 20 items or whatever, I want them to be able to buy an upgrade for 40 without having to reinstall the app or something.
Installing extra application bundles for each license or license upgrade seems like a bad way to do things, though I'm sure I could have them all use the same bundle seed ID and have them insert license info into the keychain or something.
Anyway, ideas?
You could use in-app purchase to add extra “items” to the user’s list. That will survive a phone restore and you could support adding as many “items” as possible.
I think the best way is to manage this via some sort of subscription where the 'items' are stored on your server rather than the phone. Then you can control the number of them and use the app to access each item.
So, you run the app, it manages these 'items' and each item is stored on your backend database. Depending on their subscription, you can allow/deny attempts to add items.
Alternatively, I guess you could do a similar thing on the iPhone using the built in database but you'll still need a backend somewhere to keep control of the number of items they can manage, whether that's via some sort of certificate or whatever.
I just finished my first iPhone app. It's a little game and I want to launch it for 99 cents.
So my concerns is, how long usually does an app stay on the new released list. ALso, is there any launching tips on timing etc?
Thank you
These days apps stay on the new app list for hours rather than days. It used to be that updates gave you better visibility but but my last update caused barely a blip in sales so I don't think it is true anymore. This will probably depend on the categories you are in though.
The goldrush is sadly over. It used to be that merely being in the app store generated hundreds or thousands of sales. That is definitely not true any more. Now you need either luck or marketing.
Things you can do:
Provide review copies to as many
sites as you can find. Most will
have limited visibility but if you
can get onto a bigger site you may
get some sales out of it.
Provide a free limited version.
Build a mailing list on your website
Pimp it everywhere. In your sig, on your website
Start writing the second game
ASAP - why wait, right? In reality, your true launch date is going to be determined by Apple anyways depending on how long it takes them to review and approve your app.
One tip I've heard is to update reasonably often.
When you update, your app may reappear on some of the category lists as being recently added/updated. This can give you some extra visibility which might just be what gets you ahead.