iPhone Application build copies <Prefix_filename>.pch.gch - iphone

I large (12 mb) Prefix.pch.gch file is being copied to my final iPhone application. It does not exist in the project and only shows up in the build log. It adds quite a bit to my otherwise small application size. Any suggestions for stopping xcode from copying it? Does anyone know what it is? I did a little research, and it looks like a cache file for a precompiled header, but I couldn't find anything as to why its 12 mb.

See my answer here for a possible cause. If that's it, it should be easy to fix.

Related

Xcode won't build to device

This problem has been KILLING me. I've been working on this app for 8 Months, and I am so close to finishing, I just can't seem to build for device. Building for the simulator works fine, but device always gives me the SAME 2 errors.
The 1st Error:
"Instruction requires a CPU feature not currently enabled"
From googling, I've found this probably means I'm not linking a binary I should be, but I'm not sure.
The 2nd Error:
If you can't read it, it says: Generating JWFNS.app.dSYM ... error: unable to open executable '/Users/ajr1188/Library/Developer/Xcode/DerivedData/JWFNS-azshgysfabycfagnebotitpcyaww/Build/Products/Debug-iphoneos/JWFNS.app/JWFNS'
This is the big one. I cannot seem to build the .app.dSYM file properly. I went in and deleted the build folder, I looked at EVERY stackoverflow question I could find and tried changing any random thing mentioned in another question, but all of it is to no avail. I'm so suck right now. AHH. PLEASE. Any help would be so appreciated!
Maybe your project has become hopelessly corrupted. One thing to try is to start a brand new project and copy/import all your sources/assets into the new project to see if that fixes the problem.
Another less nuclear (but perhaps more time consuming) approach is to binary search the build. Exclude absolutely everything except main.m and see if that fixes the problem. If it does, include half your sources, and buid again....repeat, trying to narrow in on the problem spot. Maybe a file or group of files has received special build settings that don't belong there.
I've had very similar problems, I cant remember the exact error message but it was very similar. Are you able to make a new project that will run on your device?
if so (and I know this sounds bad but it's worth a try) Create a new project and simply copy all the code and resources across and see if it still works. If it doesn't then there is something wrong with you code and you can continue trying to isolate the problem from there.
Hope this is helpful.
check the frameworks you link to. there's a chance that you linked a framework (say quartz) of osx, instead of ios.
Answering in detail is probably going to take looking at your target settings. But it looks like you may be building for the wrong architecture. (It doesn't link, so there is no .dSYM symbol file.) For example, if you have only recently built for device, you probably created your project under an older Xcode, and it may not have the arm6/arm7 settings right.
To check, show the Build Settings for your target (not the project), and filter on Architecture.
Make sure that in build settings the architectures are armv6 and armv7. Also make sure that in .plist file, the "Application requires iPhone environment" is TRUE. Delete "Required device capabilities" in the .plist if present.

iphone binary failing to compress

When I try to compress my binary (to upload for app submission), I get a ridiculously small zip file (a 10 meg file turns into 300k). I've done this a dozen times and never had a problem and am uncertain what could be causing this. I tried restarting xcode and doing a clean build. Has anyone seen this happen before?
I just made a minor change to one source file, rebuilt, and it compressed fine. Reverted the change and built, and that compressed fine too. For some reason the 3 times where I built it from scratch resulted in a failed compression.

Xcode iPad or iPhone Build Size Question

Had a question and if anyone has found similar issues. It seems my file size keeps growing. I have had to import existing files and then delete them from the project. It seems that it keeps those files somewhere. From being 40mb and importing a few .WAV files at 30mb each it goes up to 100mb. After I deleted them it seems it doesn't change the file size.
This was a similar issue in Flash IDE - Saving as a new project name would solve this. I'm unsure if it does in Xcode.
Has anyone had any similar issues?
Thanks,
-Andrew
Are you sure you've done a fully clean build since removing the resources? Do a Build->Clean for the target(s) you care about, delete the app binary off the simulator and device for full certainty, and rebuild. If there really isn't a reference to the resource in the project any more, this should ensure it goes away from the resulting bundle.
Which files specifically are causing the problem? Try using the du command to work out where the space is going.

How can I tell the size of my app during development?

My programming decissions are directly related to how much room I have left, or worse perhaps how much I need to shave off in order to get up the 10mb limit. I have read that Apple has quietly increased the 3G & Edge download limit from 10mb up to 20mb in preparation for the iPad in April.
Either way, my real question is how can I gauge a rough estimate of how large my app will end while I'm still in the development phase?
Is the file size of my development folder roughly 1 to 1 ratio? Is the compressed file size of my development a better approximation? My .xcodeproj file is only a couple hundred kB, but the size of my folder is 11.8 MB. I have a .sqlite database, less than 20 small png images and a Settings.Bundle. The rest are unknown Xcode files related to build, build for iphoneOS, simulator etc.... My source code is rather large with around 1000 lines in most of the major controllers, all in all around 48 .h&.m files. But my classes folder inside my development folder is less than 800kb. Digging around inside my Build file, there is lots of iphone simulator files and debugging files which I don't think will contribute to the final product. The Application file states that it is around 2.3 MB. However, this is such a large difference from the 11.8 MB, I have to wonder if this is just another piece of the equation.
I have the app on the my device, I'm in the testing phase. Therefore, I though that I would try to see how large the working version was on the device by checking in iTunes, however my development app is visible on the right-hand the application's iphone screen, but no information about the app most importantly its size.
I also checked in Organizer, I used the lower portion of the screen-(Applications), found my application and selected the drop down arrow which gave my "Application Data" and a download arrow button to the right to save a file on my desktop, named with the unique AppleID. Inside the folder it had three folders-(documents, library, tmp) the documents had a copy of my .sqlite database, the library a few more files but not anything obvious or of size, and the tmp was empty. All in all the entire folder was only 164kb-which tells me that this is not the right place to find the size either.
I understand that the size is considered to be the size of my binary plus all the additional files and images that I have add. Does anyone have a effective way of guaging how large the binary is or the relating the development folder size to what the final App Store application size will end up.
I know that questions have been posted with similar aspects, but I could not find any answered post that really described...what files, or how to determine size specifically. I know that this question looks like a book, but I just wanted to be specific in conveying exactly what I'm looking for and the attempts thus far. *Note all files are unzipped and still in regular working Xcode order of a single app with no brought-in builds or referenced projects.
I'm sure that this is straight forward, I just don't know where to look?
Build Your App using Active Configuration = Release, then right click on the .xcodeproj. Select Reveal in Finder. Then have a look at App Size in the Build Subdirectory.
LocateMe http://img.skitch.com/20100313-8hc87h85c8a4bb6xufhnfg4ciq.preview.jpg
You are correct that the final size can be estimated pretty closely by checking the sizes of the files in the application bundle. However, Apple will encrypt your binary, so in most situations your zipped application will be a bit smaller than the one on App Store.
Take a look at this : http://forum.unity3d.com/viewtopic.php?p=278022&sid=ea6e4878c70379a05c883f7093a4b41c

Can't compress my App for distribution

Compression process for one of my Applications build gets stuck and never finishes the
compression process (eternally stating "2.6 MB of 2.7 MB about 5 sec").
I couldn't find the solution by googling - even though I am not the first one to have this
issue.
Does any body know a fix to this issue?
I've never seen that before. What you could do is try another zip-tool. Maybe on another machine. Or delete some files from the problematic application directory, just to see which one is causing the trouble.
I have found the cause of the trouble-
I dragged the same file twice into the project -
now I have deleted one of the aliases and it zipped with the usual right click + compress.