I have a simple iOS App with 4 Viewcontrollers and few ressources. The Resources include a video (30mb) and images (10mb). I was expecting an app size of max. 50MB but when I archive it goes up to 107MB.
I have read that when I use Swift libraries or pods Xcode includes Swift core into my app. My question is now what should I do? 107MB is unacceptable. Even 50MB is really big but I was fine with. Is there a way to reduce the size and keep the Swift pods included? At this stage I can't even upload it.
UPDATE
Thanks to #GoRoS I have inspected and found out that libswiftCore.dylib 43MB & libswiftFoundation.dylib 5MB are the files that really increase the size. Still its strange. I have the Swift libraries at two different locations in my IPA.
IPA
iphoneos (contains Swift libs)
payload
Frameworks (contains obj-c libs and Swift)
SaifDeen, I would recommend to inspect your IPA file by yourself and you will discover why your app is that big ;)
For that just remember that an IPA is a simple ZIP file:
unzip -lv /path/to/your/app.ipa
Check this reference
Update:
Disabling bitcode will decrease your IPA size. However, as far as I know, even though you have bitcode enabled once your app is in the store Apple makes some optimizations to the app before the user downloads it. The result of that should be a smaller file size.
I was having a similar issue with my app and the only way that I was able to see the final size of the app is not when archiving, is once the app is on Apple servers. The best way to test this is archiving and upload it to iTunes Connect and then installing it with TestFlight.
In my case, at first was around 90 MB and then when installing with TestFlight was only 39 MB.
Hope this helps
bitcode and swift libraries DID NOT have anything to do with my issue.... i basically simply clicked and dragged a folder into my xcode project, which automatically added everything in that folder as 'targets'.
However, these files did not come up when searching through my target dependencies within xcode.... but they DID INDEED show up when unzipping the .ipa as #GoRoS had suggested previously in this thread.
This was a dumb mistake that i probably should have caught sooner.... but that also means someone else will make the same mistake too : )
screen shots...
i clicked and dragged this folder (ios_alpha) from finder into xcode...
and then everything inside that folder was set as a target membership like this....
hope this helps someone!
glhf!
Related
i am using Unity 5.3.1f1 and make game for iOS, after my game is done i build it to XCode. The binary archived from XCode, and generate ~65MB IPA file. Terrifically, after i upload that IPA file to the app store, it becomes larger ~150MB.
I have read this thread:
http://answers.unity3d.com/questions/1149641/very-large-ios-build-size-unity-5.html. But in those case, their IPA file itself is large, and i already disable bitcode
Do you guys have any suggestion?
By assuming you're ok with ~65MB file, i can say there is nothing you can do about it. App store shows install size of your game which is a lot larger than size of compressed IPA file.
For instance, while my game's IPA file size is ~95MB its size on app store appears as ~300MB. In case it helps, please see my earlier question.
Previously I was using Xcode7.0.1 but now I am using Xcode7.2 , previously size of ipa file of my project was around 44mb. Now I have deleted 22mb of unused images from my project, Size of overall project is decreased by 22mb and then i generated ipa file its size increased instead of decreasing. Now its size is 53mb. Any ideas what could be the possible reason for this kind of peculiar behaviour?
I also followed similar discussion on GitHub but nothing get out of it.
For generating ipa file I followed following steps:
Xcode -> Product -> Archive
Try disabling the Bitcode feature of app. It is enabled by default.
For disabling this feature Use this link
After disabling it, make sure the app is working fine.. also make sure you clean your project before creating ipa file.
I have been working on an iOS project solely in Xcode. Deployment target is iOS 8.0. After updating to Xcode 6.x, building and testing on my iPhone 5s and iPhone 6 as well as the simulators works fine. However, when I create an archive and want to validate it, I get the following error:
Archive validation failed due to the issues listed below.
iTunes Store operation failed.
Invalid Segment Alignment. This app does not have proper segment alignment and should be rebuilt with the latest version of Xcode. Please contact Developer Technical Support if you need further assistance.
I have googled for the past couple of days and it seems that this problem mostly occurs in connection with other development tools, especially from Adobe. However, I have only used Xcode for development.
This is what I have tried so far:
Reinstalling Xcode 6.01
Turning Autolayout on and off
Set target from 8.0 to 7.1
Just submit the archive (no error message, but new version is not found in Testflight)
Unfortunately, none of this has worked. My questions:
What does the error message want to tell me?
Has anyone any idea how to solve this problem?
Thanks a lot!
I found the solution. XCode seems to have lost track of two of my files (XX.h and XX.c) This file name (with a .o extension) was in the summary of the 1st step of the validation.
I removed the references to both files, added them again and everything works fine. Hope that helps someone!
(Edit: sorry, cannot flag this answer as the right answer, will do so in two days when stackoverflow lets me)
More detailed instructions:
When pressing "Validate" in the Organizer, look at the "Summary" dialog that pops up
If there are any .o files listed in addition to your app, go back to Xcode and remove the corresponding .h AND .m files from your project (removing the reference is sufficient)
Re-add them by dragging and dropping them back into your project
Recompile and it should work (assuming you're not using Adobe Air components in your app)
(thanks a million for this post Fynh, your fix made it finally work for me!)
In my case I was submitting an app that include a framework I had built that was a universal framework - created using lipo (for use with both device and simulator).
After replacing the universal compiled framework with device compiled framework, validation was successful.
To fix this bug I had to go Targets / Build Phases / Expand Copy Bundle Resources and remove the empty.cpp file (my error was about a empty.o file)
Hope this helps someone
Im getting this awful and weird error when having selected an ad hoc distribution certificiate in Xcode in the Distribute for Ad Hoc section. Anyone know how to fix this error? :-)
Thanks!
I just fixed the same error in my project. I'll explain the fix, and I'd love to know if it helps.
I had just added the YAJL library to my iOS project. The problem was that I had followed the Mac OS X instructions, rather than the iOS. The Mac OS X instructions include the creation of a Copy Files Build Phase, that copies the YAJL.framework/ folder to the .app bundle.
This is a huge mistake.
Now, what does a framework folder look like inside? It looks like this:
See those symbolic links? (The files with the curvy arrows) They are the culprits. Delete all of those out of the .app folder, and I was able to save the .ipa file with no trouble at all. Actually, you don't need the .framework/ folder in the app bundle at all. That should be compiled into the binary.
So, check your .app file. Are there any weird folders that don't need to be there? Are there any symbolic links hanging around?
I had the same issue, but in the Mac world. It turns out that removing the symbolic links is only tricking the archive tool, and it doesn't really produce a valid result. This error usually happens if one of your embedded frameworks has a bad Info.plist file.
But yes, in an iOS app you can't have embedded frameworks so you should be linking against a static library.
I have trouble uploading my application to app store. When I try to archive my project for validation i get an error:
warning: iPhone/iPod Touch: BMELogo.png: icon dimensions (0 x 0) don't
meet the size requirements. The icon file must be 57x57 pixels, in
.png format (-19014) Unable to validate your application. - (null)
I have checked and re-checked my icon for both size and type. My icon is 57x57 and a PNG.
Do any of you know what to do?
in advance thanks :)
This is a weird error, but it could be similar to what happens when apps on the phone don't match what you see in the simulator. Here's a few things to try:
As Damo mentioned, this is most likely a capitalization issue. Make sure that the filename as specified in the plist matches the case of what's on disk. Devices (and the app store) are case-sensitive, but your Mac is not. If it works in the simulator but not on device, you probably have a capitalization problem.
You might need to Clean (from the Build menu) the project and rebuild. Sometimes XCode just gets confused, especially if you've been moving or renaming images. Quitting & restarting XCode might help, too.
Nuke the site from orbit -- manually delete all of the project's output files. Sometimes XCode keeps old versions of image files around packaged somewhere hidden that cleaning doesn't get rid of.
Start over from scratch. Choose a different name, one where you're sure there's no legacy object file lingering about.
Also, you might want to make sure that you are using the latest version of the Application Loader, you can download the latest by logging into iTunes Connect and clicking on Manage Your Applications, the download is at the bottom of the page.
After you download the installer, close down Xcode, then run the Application Loader installer, then relaunch Xcode, load your project, do a clean on the project, and then archive and try the validation.
I had this error too. You need to reinstall Application Loader which you can get from here https://itunesconnect.apple.com/apploader/ApplicationLoader_2.5.1.dmg