![]() uses_remaining: You’ll set things up so that codes can be used more than once – this way you can give out the same code to all of our friends on Twitter, for example.unlock_code: Alphanumeric string you’ll pass back to the app so it can know what to unlock.code: Alphanumeric code that the user types in to unlock something.rw_app_id: The app id this code is for (from rw_app).rw_promo_code: A table to keep track of what promo codes are available.app_id: Unique string identifying the app (mainly for your own purposes).This way, you can use the same database tables for multiple apps. ![]() rw_app: A table to keep track of the apps we’re using the promo code system for.For the purposes of this tutorial, you’ll need three database tables: The first step of this project is to create the database tables you’ll need. If it’s valid, the app will then “unlock” some content.ĭon’t worry if you have no plans on adding this particular system into your app – you’ll learn the general technique of developing a web service and integrating it with an iPhone app as well! Creating the Database So in this tutorial, we’re going to build a system where you can enter a code into your app, and it will connect to a web service to see if the code is valid or not. Finally, if you build your system right, it also provides a great way to track out which of your marketing vectors pay off (and which don’t) – more on this in the second part of the series!.Second, it’s also nice to be able to give out promo codes to your friends so they can check out your app.First, it’s great to be able to give out promo codes for in-app purchase content to professional app reviewers.However, it can be extremely helpful to build your own promo code system for your in-app purchases, for several reasons: What You’ll MakeĪs you might know already if you’ve added In-App Purchases into your app, there is no built-in system provided by Apple to give out promo codes for your in-app purchases. You don’t necessarily need to know PHP or MySQL to go through this tutorial (although it will be helpful!), as the tutorial includes all of the code you’ll need. And if you’re just too lazy to do either of the above, you can just read through the steps below, and use the web service I’ve already made in part 2 of series :].If you want to rent a web server online (usually for $$), there are many good choices out there, but the one I personally use (and enjoy) is Linode – check this tutorial for more information.If you want to enable Apache/MySQL/PHP directly on your Mac (for free), there are lots of good guides out there, here’s one I found with a quick Google search.If you do not have a web server already, you have three options: To run through all of the steps on this tutorial, you’ll need a web server with MySQL and PHP. In the next part of this series, you’ll write an iOS app that integrates with this web service! In this first tutorial in this two-part series, you’ll go step-by-step through the process of creating a simple web service, based on a promo code system I included in my latest app, Wild Fables. ![]() Or perhaps store some user data “in the cloud”. As an iPhone/iPad developer, it can be really useful to be able to write your own simple web services that integrate with your apps.įor example, you may wish to display some news updates that come from your web server, and display it on startup.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |