Creating a Lite version of an App using Targets - iphone

I would like to create a Lite version of an app, I'm not entirely sure on the process of doing so however. I duplicate the target. Then what? For instance, I changed the name of the duplicated target from AppName Copy, to AppName Lite, and also changed the name of the newly generated plist, however, in products the .app file is still incorrectly named and I can't change it. Is there some sort of official procedure that I could follow?

You need to change product name for target from Build Settings. Follow this blog

Related

Unity Asset Bundles - Which Files Do I Deploy?

I have created some asset bundles from my Unity assets using the directions given in the Unity documentation section on AssetBundle Workflow. After running the "Build AssetBundles" command, each asset bundle results in four files: myasset, myasset.meta, myasset.manifest, myasset.manifest.meta.
Now I am ready to deploy these bundles to a web server and implement downloading/caching in my Unity project. I have found numerous examples such as this that show the download URL to be a single file with a .unity3d extension. This is leading me to conclude that I am missing a step - I assume that all four of my files will be required by the app and that I have to do something to combine them into a .unity3d file first.
What file(s) do I need to deploy? Are there any additional steps that I need to take before my file(s) are ready to upload? Thanks in advance for any advice!
Just myasset will suffice.
Sometimes people optionally add .unity3d as a filename extension to their Asset Bundles. It is just a community convention, and is completely optional. Source (copied below)
Vincent-Zhang
Unity Technologies
Just a reminder, we don't have an official file extension ".unity3d" for asset bundle, it's not mandatory. You can use whatever file extension as you want, or without file extension.
But usually people use ".unity3d" as the file extension just because we used it in the official sample code at first time...
Unity creates the .meta files for all assets- you don't have to worry about those. In short, your myasset file is enough. I do not add file extensions to mine. Do note that if you use the strategy shown in the example that you shared that the client will re-download the bundle from the server every time. You need to additionally provide a version number if you want to take advantage of caching. You can see this in some of the method overloads here, the ones that have a Hash128 or uint "version" parameter. Caching is great because you can use the bundle that is already saved on the device next time instead of downloading from the server when no changes have occurred. The version/hash number you provide essentially gets mapped to the file name. Whenever a matching version is found, the file on disk is used. Update the version number to something else when the content changes to force the client to download anew.
You may want to reference the .manifest file for the CRC value listed there. You may have noticed a crc parameter in the link I shared as well. This can be used to ensure data integrity during transmission of the bundle data. You can make sure the downloaded content's CRC matches that of the bundle when you created it.

Creating an IPA, "contains multiple products"

I am working on an email client based on ReMail. Basically, I reused the ReMail project so that the MailCore etc dependencies would be all set up out of the box so I could build a new app on top of them. I'm trying to give the app to some beta testers via ad hoc, but when I try to create an IPA, I receive this error:
xxxx does not contain a single–bundle application or contains multiple products. Please select another archive, or adjust your scheme to create a single–bundle application.
I have set Skip Install to YES for all dependencies, and moved all files under Copy Header to the "project" section, but I am still unable to build a single APP file.
I don't know if this is significant, but when I open up the xcarchive file, within the products directory, I find a the APP file under Applications, and then a file structure mirroring the absolute path to the header files for MailCore.
Any ideas as to what might be going on? I'm very near the tearing-out-chunks-of-hair-in-frustration stage, and I don't think the unnaturally bald crazy person look would suit me.
Thanks!
Try removing the “Copy Headers” phase entirely. It's only supposed to be used for frameworks, not static libraries. The Xcode static library template that includes a “Copy Headers” phase is wrong.
Check out the “Working with Schemes and Projects in Xcode” video from WWDC 2012, starting at 45m10s.

iPhone: Sequencing issue with creating file with "do not back-up" flag in Documents folder?

Our applications set the "do not back-up" flag as per Apple's requirements. Or at least we thought so. A recent submission has been rejected because the reviewer found a file without the flag set. We tested, re-tested and tested again and see that all of our files are created with the "do not back-up" flag. Hmmm!
This is not our first application using the same code base. We've had many others pass through with no issues even some quite recently.
So could it be a sequencing problem? We are copying a database file out of the download bundle that is used as the application's starting content; this content is then updated as the user gets more data. The initial database file can be large - as big as 2MB - depending on the application. We open a new file in the Documents folder, copy the database contents to the new file, close it, and then set the "do not back-up" flag.
Instead should we create an empty file and then immediately set the "do not back-up" flag, prior to opening it to overwrite the empty file with the database contents from the bundle?
I've asked the Apple reviewers this question but have not received an answer yet. I could simply try the different sequence and see what happens in the re-review, but I'd prefer to know what I should be doing and do it, rather than guess what the problem is and shoot in the dark.
So does anyone know of a sure-fire "Apple approved" way to copy out a (database) file from the bundle into the Documents directory and set the "do not back-up" flag? Can anyone shed light on any similar rejections and what they did to please the reviewers?
Having earned the Tumbleweed badge (= its a boring question) here is some information to answer it....
The way to set the "do not back-up" flag has changed between 5.0.1 and 5.1. The release notes for iOS 5.1 SDK has the following entry under "Backup"
iOS 5.1 introduces a new API to mark files or directories that should not be backed up. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCFURLIsExcludedFromBackupKey attribute.
Apps running on iOS 5.1 and later must use the newer attributes and not add the com.apple.MobileBackup extended attribute directly, as previously documented. The com.apple.MobileBackup extended attribute is deprecated and support for it may be removed in a future release.
Note that iCloud was introduced in iOS 5.01, and this change was introduced in 5.1, which means that the app must adapt to the iOS specific version running on the device. One of our developers found the following Gist for code that handles pre- and post- iOS 5.1 devices.

Do Objective-C unit test resources add to overall file size

I'm quite new to unit testing and I was wondering whether resources specific to the unit test add the the overall size of the app once it is built for the app store?
For example, I'm using set images for testing image manipulation. Will these add to the size of the built app?
They will not if you do not add them to the to the applications main target but the test target.
I assume you are using two targets.
Explanation:
When an application is build, all sources are compiled to objects and linked to each other to form an executable. Parameters are passed to make the application work on the correct platform.
Resources are not part of that. They are added to a folder in the application.
(A .app file is actually a directory, you can see this by right clicking it and select 'Show Package Content')
Files which are not added to your applications target will not be placed in this folder.
So your safe.
Hope this helps you.
I was wondering whether resources specific to the unit test add the
the overall size of the app
They won't if you don't include them in the app target. You'll generally have a separate target for your unit tests, and any resources needed for the tests but not for the app itself, such as test data, should be part of the test target and not part of the app target. You can use the Target Membership pane in Xcode's file inspector (in the Utilities) to set which targets a given file belongs to.

Rename the app in iphone

I have almost finished my iPhone app, but want to rename it as I don't like the name I chose in the beginning. Is this easy to do, and if so, how do I do it?
Go to target-> yourApplicationName(double click/get Info)->Build->ProductNAme
Set your new name for that application there
hAPPY cODING...
I don't know what rename does, but there are a possible 5 names to deal with. There's the name of your .xcodeproj file directory, the name of your target within that project, the Product Name under Packaging in the Build Settings, and the Bundle Display name in the Info.plist, and the name you provide for the app in iTunes Connect. None of these 5 names needs to be the same, and you can name them all slightly differently. In fact this is common.
For instance, you might want the Bundle Display Name to be short so that it will fit under the icon, and it can have spaces in it. The Product Name can be much longer and more descriptive, but can't have spaces. You iTunes Connect name might be longer still, with spaces, and you may have change the spelling, etc. slightly if your preferred spelling is already taken, etc.
In the latest version of xcode.
Project > rename.
Choose new name.
I had the same problem recently and tried Project -> Rename, as well as Target -> application name -> Build -> ProductName
Then, I remembered the .plist file. If you double click the .plist file in your app's resources folder, you'll see "Bundle Name". Changing this did the trick for me!
Change your bundle display name in info.plist file