creating a free version of an app, but having the app separate on debug device - iphone

I was just making a free version of one of my apps. I copied the folder, renamed the project, and changed the icon file, loading screen, interface, and code. BUT YET it still replaces a build on my phone.
1)how do I stop this from happening (i want both the free and paid version on my phone)
2) if you can fix this, will a customer who has the paid, and downloads the free, will that replace it on their phone?
I really need to know these, as I have the app ready to go, and would like to get it before the end of the week.
cheers
Sam

You need to have a different app bundle identifier. I think that's your problem.
Long answer:
Go into your projectname-info.plist file and change the CFBundleIdentifier.
I'd recommend something like:
com.mycompany.mycoolapp for the app store
com.mycompany.mycoolapp-beta for the beta version
You should actually be able to set up the "Debug" build configuration to use a different info.plist file configured with a different CFBundleIdentifier and a different icon filename. That way you'll automaticlly get the beta ID and icon, etc for the Debug build and the real id/icon for the full one.
This should allow users to install and use both the production and test versions of the apps at the same time without confusion.
You might also find this IPA target template helpful if you're doing ad-hoc distribution to Windows users for testing:
http://devblog.appmagination.com/2010/01/target-template-for-building-iphone-ipa.html

Related

How can I test my signed app on an unjailbroken iOS device

As part of our software development life cycle, we want to make sure that the binary we test in house before pushing to iTunes, is the same as the binary that we push to iTunes. I know that sounds really silly, but it's a matter of checks and balances in a mid size company, so that the testers can be sure the coders didn't add in anything after testing occurred.
So is there a way to run a signed/certed app on a device that's not jail broken? Or is there a way to verify that an IPW is the exact identical code in the zip that gets pushed to iTunes?
Or possibly a way to accomplish my goals with a different way?
We have a valid developer account and around 15 different devices that are not jail broken. Would prefer to test with them left stock and not jail broken.
If you compile your app for distribution using an ad-hoc profile you can later take that archive and resign it with the appstore profile and upload it.
You can't however upload an application that was compiled with an development certificate.
A binary signed to go to the App Store cannot be run on devices via the normal ways. You can test the code by having the developers create an Ad Hoc build. This will have the same functionality as the App Store version, but you can test it.
Unfortunately, when the app is recompiled for the App Store, more code can be added.
Do you not have access to the code to test? If you must, you can have them create an adhoc in front of you, test it, and then recompile for the app store all in front of you. Seems a bit overkill, however.
There is with another trick:
first test you code for functionality's, buggs in normal way.
Than push the code to AppStore, but set the release date farther with 3 weeks, while your testers are validating it is that what they tested last time or not. Somewhere here, I have read that possibility forgot where. Never tried!

What do I need to do to configure a new iPhone project so it can be seen as the same as my current iPhone app in the Appstore?

I currently have an app in the Appstore. I need to make changes to the app, but they are significant enough that we've decided it would be easier to create a new Xcode project from scratch rather than modify our existing project. I don't fully understand everything that goes into an iPhone application, just enough to support the code and make basic changes. But I assume that the binary I upload to the Appstore, to replace my existing code there, needs to be similar enough so Apples sees it as the "same" code. What things in the new project do I need to make sure are the same as the old project so Apple knows it's the "same" app?
I've compared the Info.plist file in both projects to make sure they're the same. I only needed to change the bundle identifier in the new project to match the old. Also, the Product Name has been modified to be the same. I don't know if these changes are necessary, but they are the sort of things that I think need to be the same. Are there others? If so, what are they?
The only thing that matters, as far as the app store is concerned, is the app id (Bundle identifier). You can rename the app, change the icon, upload an entirely different program, whatever. As long as the app id matches, the store considers it the same.
Other things I would check are the Build Settings if the defaults are not suitable or the Code is having issues compiling and the Build Phases and Build Rules for all your Targets.
Essentially if your Code compiles fine and you have no issues within the Application then the Bundle Identifier and the name (Basically the Info.plist) needs to be the same to replicate.
Edit: If you have migrated from an older Xcode version then you may have different Build Settings and Build Phases. I would just see if compilation is okay and the App works properly in functionality under all your Targets

Unable to have two versions of the same app on the one iphone

I have two versions of my app. I'm trying to keep a copy of each on my iPhone for testing purposes.
In my build settings, my bundle display name is ${PRODUCT_NAME} and I've given each version of my app a different product name (eg "v92" and "v10"). When I install each version to my iPhone, they both appear side by side with different names, however one will work normally, and the other will immediately close the moment it's opened. If I delete the version that works normally, the other will start working.
Does anyone know what's going on?
I think the apps are distinguished on the device by the App Id and not the product name. I dont know how you were able to install two apps only by changing the product name. When i mistakenly installed a different app with same app id but different product name the original app was overwritten.
Try creating a separate app id for the new version only for testing. That might solve your problem but make sure you use the correct app id when you submit your app.
EDIT: It might not be the right solution if you are doing some app id specific stuff (like APNS) in you app.
I ran into this one too and eventually solved it. I know the solution had to do with changing something in the information property list, but I'm not sure exactly what. I would suggest making sure that all of the following are different for your two versions:
bundle display name
executable file
bundle identifier
bundle name
At least you can create two app id's and two provisioning profiles in your developers account. Then you'll be able to install your 2 versions like a two different apps. It's an ugly solution, but it definitely works.

What files to keep under version control on iPhone projects?

I found this previous question about Cocoa projects, but I wanted to know if it's the same for iPhone projects.
As far as I know, the same responses there apply to iPhone development as well. In my projects, the only files I keep under SVN's control are the source files, any resources (images, .XIBs, audio, etc.), and the .xcodeproj file.
It may be a good idea to version control provisioning profiles. Especially for an ad-hoc beta test profile, you'll need to update it every time you add a new beta tester, and having a history of that seems like a good idea.
Actually there is something I would say you should version control that you would normally not - the final application bundle and dsym file, both under build. However, you only need to archive these when you release either an ad-hoc or distribution build for the store - so I'd leave build in the ignore file, but have somewhere you can copy these files to check them in for a distribution and tag them along with the source.
You'll probably want to compress the app bundle before placing it in this save directory
You need these two files in order to be able to symbolicate crash logs sent to you by either beta testers, or users of the app from the app store. A meaningful stack trace of a crash is priceless!
If you're planning on updating the app over time in addition to project sources and media you may also want to put the following under version control:
Signing certificates for app (and/or mobileprovision files).
The final version of the binary app (zipped) submitted to Appstore.
Binary.dSYM file for each revision (for post-release crash symbolicating).
Screenshots/icons/text file of description for app as submitted to Appstore.
Before beta releases you may also want to put mobileprovision files as well as a snapshot of the device list from the Developer portal for that version just so you can go back in time and figure out who got what release. If you're really hardcore you can also keep emails submitted by beta testers so you can keep it all in one place and go back and double-check against bug reports.
Yes. I use the exact same .gitignore file for iPhone OS projects as I do for Mac OS projects.

Whats the best workflow for adding a new device to an adhoc provision?

So we all need to deploy our applications to real iPhones for testing purposes. I'm sure you much like me have found a group of sucke^H^H^H^H^H testers to help you out with this process. Whenever you want to send a build out to a new person this requires adding the new device id to your ad hoc provision. This part is fairly painless. The trouble starts when trying to get Xcode to use the new provision file.
Whats the best way to get Xcode to pickup and use the new provision first time? Ideally I would like to do this without changing the .xcodeproj file.
I've done this as follows, with good success:
Send out call for beta testers.
Respond to each with "in order to beta test, I need your UDID. You can send it to my by following these instructions..."
Folks incapable of sending UDID are told "thank you for your time, but beta is no longer taking applications."
If too many people can't figure it out, review your instructions.
After several days, make a batch provision file with all the people in beta.
I name the devices after the person's email address, i.e., mikeATexampleDOTcom.
I name the provision after the beta program, i.e., Neko-beta-1.
Build the app, provision & deliver (with non-technical installation instructions!)
For stragglers, you can either build another provision, or add them to the existing one, or tell them "beta's full."
Then...
After a few days, send email asking how its going, if they have any difficulties, etc.
~3 days before end of Beta, email saying "beta is coming to a close, please be sure to return your questionaires."
After close of beta, be sure to thank everyone, even those who did not reply.
How to automatically build an IPA file from XCode: http://www.idotcom.us/2009/05/how-to-build-a-ipa-file-from-xcode/
Step-by-step explanation of how to build an IPA file to send out via ad-hoc. You do have to change your XCode project but this way you create a separate target so it doesn't affect your main project.
What I do now is create a new provisioning profile if the devices change. Even if you modify an existing one, it is essentially a new profile with a different ID, but a new name. Then testers' iPhone fill up with provisioning profiles with the same name :)
Yes, it means changing your Xcode project file each time, but in my experience it's more reliable.
If you do keep the same name, beware of Xcode's cache of provisioning profiles, which can create a mess with builds. Your best bet is to remove of all the provisioning profiles from the Organizer window, as well as deleting the files in ~/Library/MobileDevice/Provisioning Profiles. Then restart Xcode and reimport the provision profile.
I haven't been able to do this without changing the .xcodeproj file, but that's probably because I've had terrible luck getting things to work without going through the whole "build clean, deselect the provisioning profile, reselect the provisioning profile" process.