in-app purchase best practise: how to use what is downloaded - in-app-purchase

simple example of the problem:
i have an app that can download backgrounds from in-app purchase.
so i download images (or a zipped image).
now that i have it on my iphone...how can my app knows the name of the image and can load as background of the game?
what i have thought is zip of the image+downloaded.plist;
downloaded.plist is a filename that contains the name of what i have downloaded, so my app loads that plist (i know the name because is always equal) and then the rest...
but now i have to save that information in another local plist that contains all add-on downloaded...
this is a very basic example, but i can in future load levels, character...so i'd like to know how to organize work to have it more general as possible...
what is the standard method to make this?
thanks

I am not quite sure I understood your question, but here are some thoughts.
When the user buys something using iap, you know the associated product id. With that, you can map to the actual thing the user has bought (whether it is an image, a level, cash, whatever). So, you should use the product identifier to know that to give to the user.
It seems you are dealing with non-consumable products here. If you ship your app with the products inside the bundle, you can unlock them using the product id (As you said, you need to maintain a list of the unlocked files). If you need to download the products, the same applies here, you need to use the id to know which file to download.
To organize work, I would implement a store object that deals with the store kit, loads the products according to the transactions made, gives them to the user, maintains all the necessary stuff, etc. You can escale this approach to a set of classes if necessary.
On a side note, for non consumable products, you should perform several things on a server, e.g. maintain the list of products the user bought, validations, etc. You can read about this in the in-app purchases programming guide from Apple.
I hope this answers your question.
Cheers

Related

Swift InAppPurchases - give previous customers a free lifetime subscription

So my App was released to the AppStore some months ago and was free to download. I gained like 2k Users. Now I am implementing an auto renewable Subscription model, so future users can use the demo app for free and subscribe to get the full content.
How ever I want to thank my Users "from day one" by giving them free access to all content without paying the subscription.
Is there a "given way" how to implement this because it seems like a common scenario. If not, does someone with IAP experience has a smart workaround how to handle/implement it?
Thanks guys :D
The answer from Paul didnt work for me. Neither did any other solutions.
But i managed to find a solution.
In case you use CoreData as database within your app, you can use the solution i found out for my app.
The idea:
If someone downloads the app from the appstore, he will receive the latest database version in your app.
If someone updates your app, coredata will perform a migration. And this migration updates from bottom to top trough your database versions.
Through this behavior we have the opportunity to dinstinct the two cases.
Solution: We create two new database versions. One will only be updated by the former users. We will set a flag here. The new Users will never get in touch with that.
The first new one will create a new attribut field in any entity (e.g. User) e.g. isFormerUser as a Bool. You can set it per default on true.
Now we create a second new one (the latest one). Trough a Core Data mapper it will take the $source attributes if it migrates.
So by that case, all FormerUser were set on True and will keep that attribute.
Here will the default be False, so if $source didnt exist, set it on false (new Users).
This solution is nice because it gets set once by that migration/update and you dont have to carry hardcoded stuff in your app. Now just create a load/get Function from CoreData for that attribute and set a variable to use in an if-statement.

Best way to offering multiple subscriptions for one user (iOS, Android)

Does anyone have experience implementing multiple subscriptions model for an app? I wasn't able to find proper documentation about this topic. The most common way to create in-app subscription model is one-subscription per one-user. But I want to offer one-subscription per one-item(in my app). This means that users can create multiple subscriptions if they want to subscribe to multiple items. Each item is functionally the same.
For example, If the app is a pet location tracker and wants to track both pet A and B, the user has to subscribe to each A and B respectively. It means a total of 2 subscriptions.
Please explain it to me.
Thanks.
Never thought about such a use case, but for iOS you can create multiple subscriptions. So you could create a subscription PetA, PetB, PetC and so on. But, I think you asked for a more dynamic approach where you create a Pet subscription and the user can buy as much as he likes. As far as I know this isn't possible.
A different approach would be to create a subscription hierarchy: onePet, twoPets, threePets and so one. Your user can then up or down grade between those subs depending on how many pets he wants to track. Could get messy if you also want to offer different durations.
A third approach could be to use consumable IAPs. These can be purchased as often as the user likes, but have the disadvantage that you need to keep track of the validity period on your own and they can't be synced automatically between multiple devices.
For your pet example I would go for the second approach and offer a onePet, twoPet, threePet and a unlimitPet subscription. This is the most maintainable approach as long as you do not offer endless duration variations. Also this gets synced automatically with all devices of the user and if you like you can also support family sharing.

How do I update my iOS app's content with background downloading?

TL;DR: I want to add images to the app over the internet through background downloading of some sort, but don't know where to start, or what the best method is.
My app displays images to the users which can be filtered etc. I have a "Cards" class that has fields for name, image, etc. I then have a huge area directly in my code where I create instances of the Cards class for each image. There is then an array of these class instances, which helps with displaying them.
My issue is that now I want to be able to update this block of class instances without having to push another build to the iTunes store. Essentially, I want to add "Cards" to the app (images with appropriate names and keywords associated with them). I need to be able to update the app every month (sometimes less) with new cards as quickly as possible.
I have heard suggestions here and there about JSON files and background downloading, but can't figure out which method I need for my situation.
As per my understanding you just want to update your app content in future without uploading a new build to App Store. Right ?
If you want to do so, make your app so flexible that you can show updated contents in your app.
Here is a short instruction which you can follow...
Develop an admin panel if you are aware of any backend scripting language like php. And you can add contents from this panel into your database.
Create an API which will fetch the content from your database
Make your app flexible so that it can show all the updated content getting from the API. If you have a list of content then you can use TableView/CollectionView with pagination.
If you still face any problem then let me know. I will see deep into your problem.

Checking if app name is available

I'm trying to check if a certain app name is available on app store. I've tried it before and used this procedure: Related post
But it seems that they have made some changes to iTunes Connect (iCloud style), and now I'm not able to press "Create", without a bundle ID or SKU...
Has anyone found a workaround?
In terms of the specific name of the app, you can just search for the name on the store and see what comes up. Creating a unique name on the store is usually not difficult. Coming up with a unique name that does not violate anyone's trademark is the real challenge.
There is actually a benefit in making your app name detailed. For example, say you created an app for a concert hall called John's Concert Hall. The app could be named "John's Concert Hall - Tickets for Live Shows in Los Angeles". Your logo on the store and your in-app branding might just say "John's" but you choose the longer name for the store to make your app more searchable on the store. If you have a very strong brand like facebook, you might just name it "facebook" without any additional words. Just to be clear, your logo and branding might be different from what your app is actually called on the store.
You need to have a unique bundle identifier when submitting which is typically uses the app's name.
Just because your app's name is unique on the store does not necessarily mean it is legal for you to use. Your business' name needs to be unique in the business class that it is in per trademark law. So if there is another app named "John's Concerts," one could argue that your app's name creates confusion in the market place (i.e. someone looking for John's Concerts might stumble upon your app instead thinking it was the other app). Even if the owner of the other app does not have a formal trademark, if his app was on the store first he has a common law trademark by default, meaning you could receive a cease and desist letter. Say there was another app out there called "John's" involving music but not live performances. This could be a problem, but it is an unclear area of the law. The more general the class that you share with another app, the more murky it is, so the recommendation is always to make the core brand of the app (regardless of how it is named on the store) as unique as possible to avoid being sued later on. If you share any class with a similarly named app, you run the risk of being sued. A judge might rule in your favor, but you still run the risk of incurring a ton of legal fees.
To ensure your app is unique, the best advice is to run a ton of searches on google and at uspto.gov. A lawyer could charge you $500-$1,000 to do these searches for you and provide you with a book that informs you with all the potential problems for your name out there. No lawyer though will guarantee that your name is safe to use. What you are paying for is their expert opinion on how likely you are to being sued. Leave it to a lawyer to give you a non-answer ;-)
I did some poking at this, and found that the server will still tell you whether an app name is in use. You just have to work a little bit at it.
Go to iTunes Connect's create-an-app page/modal as normal.
Put the name you want to check in the name box, and select any of the language options:
Open Chrome's inspector (or whatever way your browser has to manipulate HTML).
Click the magnifying class icon (top left) and click the greyed-out 'submit' button, or find it manually (inside div.right-buttons). Remove the 'disabled' attribute:
Now click the submit button and find out whether the name is available - it'll be highlighted red (and show a tooltip when editing) if it isn't:

Ruby on Rails shopping cart: download and print options

I am building an online poster maker store with Ruby on Rails that gives the customer the option to either download a digital file for a generated poster or to have us print it for them and ship it to them. I am having troubles deciding where in my application to put this functionality. I am using a basic products, line_item, and cart structure.
Do I:
1) Make an option on the checkout that creates an Order if they decide to have us print the poster. If they just want the digital file it would just give them access on their user page after checkout.
2) Make a attribute on my line_item model that saves weather they want to download or print the file.
3) Something else entirely?
Thanks in advance for your help!
I believe I have found a solution! After talking to another developer friend, it hit me that the best solution might be to put all of the attributes for both printed and downloadable posters in the same products model and then expose only the information needed for each particular order.
For example,
If the order is to be printed by us, the user will be asked to fill out a shipping address form and asked what paper they want us to use. If they customer is just going to download the generated poster design these fields in the form will be hidden.
I believe that this is a much simpler solution then the two that I described above and will be the easiest to implement.

Resources