How do I control the creation of the Lite vs Paid version of the application for the iPhone?

I'm starting to get to the point that I want to consider creating a lite version of my iPhone application. I found several things on the Internet that say a little about the process, namely:

http://developer.apple.com/tools/XCode/XCodeprojects.html

http://www.pacificspirit.com/blog/2009/01/27/building_for_multiple_iphone_targets_in_xcode

What I'm interested in in particular, simplifies the process of managing which files are included in different versions of my application, since I constantly change and improve my paid version.

+62
ios release
Feb 14 '09 at 18:03
source share
7 answers

The original answer is from previous days when purchasing the application. The correct answer now is to send one binary file and offer your paid version through in application updates . This is a bit more code, but this is one batch, and your conversion rate is likely to be better.

However, if you still want to use versions of your application:

Xcode has good support for several purposes.

From the project menu, select "New Goal ...". Add another iPhone executable file (Cocoa Touch Application), then you can specify on the resource by resources which elements are included in your target. This may only include compiling certain code into your paid version.

You can quickly get visual feedback about what is and is not included in the current goal by right-clicking on the heading of the "Groups and Files" list (top sheets) and enabling the target membership.

You switch between building different goals just like you switch between a building for a simulator or iPhone.

To indicate how a particular class behaves during assembly, you can do two things: enable two versions of the class, each of which is created for its own purpose, or you can set the build time flag for the pre-processor. Select Target from the "Groups and Files" list, then "get information" for this purpose. Go to the assembly tab and search for "preprocess". You should see an element n called "Preprocessor Macros", add LITE to your simple target and add PAID to your paid target in the same way.

Thein in the source files that you can determine at compile time, which version you compile to use #ifdef LITE , etc.

Going further, you can set a global flag or AppDelegate member variable based on #ifdef LITE and change the runtime behavior for Lite and paid applications. I’m not sure I see the value in this.

+81
Feb 14 '09 at 18:59
source share

As a developer, you want to write the smallest possible code (fewer errors, less time). As build versions diverge, you will have to invest more work and separate tests.

If you are not making an expensive hacker tool, you might consider making the difference as simple as possible - just use hidden options or settings. Thus, most checks and tests will do the same job in both assemblies, very small code will be different. The key issue is not to burden yourself as a developer.

The reason for having divergent builds is that Free cannot be hacked into the "Paid" version. People who will try to circumvent such a simple restriction are primarily a subset of those who will jailbreak their phones. No matter what you do, you will not receive your money in any condition, except that they are so struck that they buy it just to express appreciation.

+24
Feb 14 '09 at 21:30
source share

The creator of the "Flower Garden" describes in detail the pros and cons of various approaches to creating a light version:

http://gamesfromwithin.com/from-full-to-lite-in-under-an-hour

+7
Feb 18 '09 at 0:09
source share

I found success:

Tutorial - Same Xcode Project Create some iPhone products http://adeem.me/blog/2009/04/18/tutorial-same-xcode-project-create-multiple-products-for-iphone/

It covers much of what Roger Nolan mentioned in his answer to the question, but step by step with screen shots.

It allows you to use C # ifdef to include or exclude functions in your application.

Some of the details were not entirely correct - due to differences in Xcode, I am sure - but it was not so difficult to find the right / new way to take each step.

NOTE. You will need to go to Apple and get a new application identifier for the Lite version of your application. The steps described in the tutorial will create a copy of the info.plist file, which you will probably rename to something like infoLite.plist - in this file you will need to change the "Bundle Identifier" to match this new appID.

+3
Sep 14 '09 at 4:35
source share

With iPhone 3.0, you can instead use in-app purchases and enable it to unlock full functionality without making more than one application. I also think that this will allow people to get it for free, but I'm not sure about that.

+2
Nov 13 '09 at 22:28
source share

I used the git branch. I forked my main application and made some settings to disable a bunch of content. Now I work mainly in the master branch and switch to lite and merge recently when major events occur. It works very well.

+1
Feb 14 '09 at 19:38
source share

The best approach is to have only one project with several goals - one for each version of your application. So what are the goals: Several goals

0
Jun 03 '15 at 9:56
source share



All Articles