In app purchase of 'packs' with large amounts of data. Optimizing the user experience - iphone

I'm developing an app with the option of in-app purchasing of audio packs, probably around 30 MB per pack, around 500 files. I want to start with say 10 packs available, and add new packs over time, maybe 4-5 per month. A given user is expected to have no more than 10 packs in use at any time. Here are a few considerations I would greatly appreciate advice / suggestions on:
Can I set the app up so that it downloads the audio files for a
pack only once the pack has been purchased? Or do they need to be included in the main bundle, with an 'unlock' feature being the way to get access to them?
Can I give the user the option of deleting the audio files contained in a pack which has been 'finished', of course with the option of re-downloading it later - it has been paid for, after all.
Can I set up the app, so that the list of packs available is updated without having to re-submit through the app store every time?
If I need to replace a single file in one of the packs - how do I push this update out to the end user who has already installed the pack?
If I go with the option of including all the words in the main bundle - and I want to add more packs later, can the iPhone retain the original content so users with the original version only need to download the new content?
Thankyou.

To answer your questions:
You can set it up so that content is downloadable from your own servers.
Yes, but you will have to keep track of which users have downloaded what. I believe there are API's the can assist you with this, such as MKStoreKit which you can find on git.
If the content is on your own servers, then you can just update that without having to resubmit the app. But you will have set this up intelligently so you can dynamically update the UI of the app based on info pinged from your server.
Not sure, but there probably is a way.
Not sure, but that does not seem like a logical approach, especially since you will be storing data on your own servers.
iOS5 Programming Pushing The Limits by Napier and Kumar provide a pretty good high level explanation on how this all works. You probably do need to do a bit of reading on it.
I hope this gets you on your way.

Related

Connecting to SQL Server in Xcode

I have been researching this all day, its more of a question to see if anybody can help.
I have already set up the push notifications on my iPhone app which i had a nightmare with but I've managed to do so.
I'm only a internship and have been developing apps for 4 months, its not my strongest subject as I haven't learned anything like this at uni.
My boss has asked me to add a view to the application so that you can view the most recent push notification that the app has received.
I know this is possible but I'm not sure how it's done, I have spoken to the developer who dealt with all of the server side of things (he doesn't have any knowledge of app development).
He said I would need a page that will read directly from the SQL Server database which he has written the code for that stores all of the pushed notifications.
I have mentioned that it wouldn't be a good idea as it can be prone to hacking etc. He disagrees.
Can any one help with what I need to do? Or does any one know of any tutorials I can follow to help me with this.
One route to take is to make a copy of that Database and put it on the phone as an SQLite Database and have a PHP script that gets the newest additions and adds them to the SQLite database.
A second route you could take, is you could ask him to put it JSON format and you would have a dictionary on the phone that held all of the JSON, and then parse the JSON using apples built in parser, NSJSONSerialization or any of the other JSON parsers out there. Using the parsed JSON, you could then do as you please with the list of notifications
Another method will be for that guy to write a PHP script for you to access all the notifications and you run that in a for loop and populate a table, or whatever, on the phone of the latest push notifications that way. This while take a few seconds longer than needed, depending on how many entries there are.
Ordered according to my preference of options
Since you fairly new to mobile app development I would recommend option 2 for you. It will be a bit more work than choosing option 3, learning curve wise, but it will run faster and be better for you to learn how to parse JSON, as a lot of API's that you come across use that format.

iOS In-App Purchases - Download or unlock new content?

In my game, I'm planning to add IAPs for different level packs that the player will be able to buy and play in the game. But after reading documentations on IAPs, there's still one question I'm wondering : Is it better to download the new content from Apple's server, or unlock it in the game with NSUserDefaults?
The problem is that if I chose option 2, the content will be easily hackable, and the app will need an update for each DLC I'm adding.
And the problem with option 1 is that the new content will be downloaded in the Documents folder, but my app search the list of levels in the resource folders (I know it's not hard to implement, but I'm just saying the pros and cons)
Anyone can tell me which one is the best practice, and why?
Thanks in advance!
Well, I think both options are good. Whats the size of these packs? If you have numerous iaps all consisting of new levels, id recommend to have them downloadable, imagine shipping the app without the extra levels, quite a network-loadoff.
As you are stating, option nr 1 gives you the ability to add levels dynamically. This is convenient since apple are quite slow when it comes to uploading of new builds. Come to think of it, they are not super fast when it comes to revising your DLC either.
Due to the hacking risk and initial reduction of app-filesize, I would definately go with option one but if possible, i'd provide the actual content from a private FTP server. That way, the new content is available directly.

How to make a dynamic server based in-app/in-game store for an iPhone game (like Contract Killer 2)?

I see that many iOS games nowadays don't hardcode their store, and items, description, price etc. are loaded from an external server.
What would be the easiest way to implement this? I am a game programmer with very little experience in server side programming. (Have done hobby PHP scripts a long time ago)
Please let me know what libraries can ease the effort on server side / client side. I would like something that is easy to manage. How do they announce offers like 50% off on certain items etc. whenever they want? Doesn't every in-app purchase manipulation need to get approval from Apple?
Also I would want to maximize security, and prevent the game store getting hacked as much as possible.
You are correct that this has to go through Apple's IAP. You'll want to read about this at https://developer.apple.com/appstore/in-app-purchase/index.html. You setup the IAP items in iTunesConnect (iTC). Your in-app store lists only items that you've setup in iTC, though you can choose not to list every item in ITC. To make your store dynamic, the easiest way is probably to use a UIWebView and then have your store be a series of webpages. This lets you update it on your server easily.
You might check out http://stackmob.com which makes it relatively easy to do just the store part of your in-game store without having all the server admin aspect of it (and associated security). Also, http://urbanairship.com provides hosting for IAP items.

Using a UIWebView as a way to update our business app quickly

We are looking at building a b2b application for the iPhone. A major concern is the possible delay in publishing updates to the applications. I would like to believe that all updates will be orderly, but the reality of a newly found bug for a client or an upcoming trade show could mean that updating the application NOW is critical. Even an "expedited" day wait would not be acceptable.
One option I have thought of is having a flag for each page that we send down when the user logs into our server. If the flag is set, then instead of the native screen for a given page, there would be a page with a UIWebView that would get the latest HTML from the web or stored HTML loaded at the time of login.
I would prefer storing the HTML and using it "offline" because a data connection cannot be guaranteed.
The questions are:
1) Does this violate any of Apple's licensing?
2) Is this feasible or is there a hole I am not thinking of?
It doesnt violate Apple's guidelines and as far as I know you are not missing anything here...in fact, we have the exact same problem in my company (which on top of the issue that you have, we have customers that would like to "brand" the app for their users, and thats how we accomplish that) and there are no issues with apple (for now...:)). Obviously, you need to think of user experience implications...hope that helps.

Developing Geo-location apps for the iPhone

How does one build a directory of 'Spots' for users to check-in to in a native iPhone app? Or, does the developer borrow data from, let's say, Google Maps?
When you Use data obtained from another network or source, you take a risk that the data may change and or may not be accurate, The data may cease to exist, (more so with google, LOL, one minute they are there like gangbusters, the next they are like "Gone" no explanation no apologies, just missing in action, if your developing an application for a business its always best to use your own data sources.
That may be more expensive but its the only way you will have any kind of control over your application resources,.
You can go both ways, it depends on what you want to do and how you designed it to do it. You can have a prerecorded and static database of spots, or you can update it sometimes connecting to some server or you can do it all dynamically by loading each time data from the internet.
Which one to choose? first you shall design your app having in mind something like:
How many times will these datas change
How frequently will these changes happen
How much will it cost to do an update
and so on
Developing your own database of places is likely to be quite an undertaking (and your competitors have a big head start). Google is beginning to provide their Places API for "check-in" style applications, so you may be able to get in on their beta.