Distinctive versions of iPhone applications

I like to store the store-bought version of my iPhone apps on my phone so that I can reproduce any customer issues that arise, but I obviously also want to use the latest version for development. I can install both (one from iTunes, one from xCode), but I'm interested in the ways that I can better tell each other. I could just temporarily change the name or icon, but this does not look very reliable, i.e. I can forget and send it with the wrong icon.

Is there a way for a happy funtime developer to do this?

+4
source share
5 answers

I was inspired by Eric's idea of ​​adding a custom parameter to the project, but I did not want to run the script every time I built the project.

We know that by default iPhone searches for icon files named "Icon.png". It turns out that the "Icon File" parameter in the project plist is not needed at all if you correctly named your icon. However, if the project does not have a file named "Icon.png", xCode checks the value of the "Icon File" parameter.

I set a user parameter in "Debug" called "Icon_Name" for the custom icon name "DevIcon.png" and "ReleaseIcon.png" for the "Release" configuration. Now the "Icon file" parameter in the project plist can be set to $ {ICON_NAME} and will take the value of any configuration file that we use. Now, in two different configurations, two different icons are used.

Edit:. For several icons (high res, small, ipad, etc.) I made a slightly different approach. The user parameter is now “IconPrepend,” which is “Dev” for debugging and “Release” for the release version. Now I use the "Icon Files" (and not the "Icon File") in the info plist, which takes an array of strings. Each line is added using $ {ICONPREPEND}, so the debug configurations look for "DevIcon.png" or " DevIcon@2x.png " and the release configurations look for "ReleaseIcon.png" or " ReleaseIcon@2x.png ".

+7
source

Here's the idea - if you set a custom setting in your project build properties for debugging only along the lines USE_DEV_ICON = YES (or something else). Then, using the Run Script option in your build task, you can copy the different icons from which you called Active Configuration.

Something along the lines (pseudo-code):

if ($USE_DEV_ICON == YES) cp DevIcon.png Icon.png else cp RealIcon.png Icon.png 

Then each time you build, depending on the active configuration, it copies the correct icon.

+1
source

Most likely, there is no other way. The version of your application and the version for development are completely different from the OS. If you want to distinguish, you need to change the icon or name. You can also include some debugging mark (for example, version number) in your version, but you can also forget to delete it.

0
source

Perhaps you just bought a second iPhone? Jokes aside. If I were you, I would ask the same question as you, but I will definitely make that decision. If I were an iPhone developer (or some other specific platform), I would probably have more than one.

0
source

Could you create a new target with a different Bundle name in the Info.plist file and use this target whenever you want to create an application to run on your iPhone?

0
source

Source: https://habr.com/ru/post/1315223/


All Articles