Reduce ipa file size - ios

Lets say I have 3rd part universal(contains symbols for both iPhone and Simulator) iOS framework: A.framewwork.
How Can I reduce final ipa file(for physical device) by removing unnecessary Simulator symbols from framework? Is XCode have such settings for linker?
Any help will be appreciated.

Ask third party vender to get only amrv7s/armv_64 framework

Related

What is downloaded as app from AppStore?

I am developing with Xamarin IOS. Recently I have faced the problem of too large APP size of my iOS application. I have enabled all things from iOS build menu that can help reduce app size such as Linker, LLVM optimizer and so on.
Unfortunatelly it has reduced app size not enough. In App Store it has something around 86Mb, what is over the top.
Than I have noticed such thing in build menu as Supported Architectures.
In configuration of two architectures (ARMv7 + ARM64) it produces two app files in app archive.
whereas if target only ARM64 it would be only one: .
So, my questions:
What does AppStore sends to user device when the one downloads the Application? Does it sends only necessary files ore all at once? How can I check estimated AppStore sizes of output apps for each CPU Architecture? Thanks in advance.

Profiling app with Cocoa Touch Framework in Instruments does not show any symbols

I have an Xcode Cocoa Touch Framework project (written in
Objective-C) that produces a .framework directory as well as the
corresponding .dSYM file. Its using iOS 10.1 as its Base SDK
with a deployment target of 8.0. All built using Xcode 8.1.
I would like to profile my framework using Instruments so I've added
my framework into a separate Xcode project (written in Swift). It
builds and runs fine. However in Instruments, the symbols from my
framework are not showing.
In the Instruments menu: File -> Symbols, it shows that there are
Missing symbols but they are all from System Frameworks
(/usr/lib/dyld)
When I try to set the dSYM path to the dSYM file of my framework, it says that:
No new libraries to symbolicate. The specified path didn't locate a dSYM for any of the selected libraries.
Am I profiling my framework the wrong way? Or am I missing other settings in my framework's build settings?
Any help is appreciated. Thanks!
The problem went away once I profiled the app in an actual device instead of the simulator.

Why can't I build for some specific iOS simulators?

I have an app working with my own framework. I made the framework build for i386 as well as arm and everything is fine. My app used to run on every simulators and is available on the store.
Now, for some reason, i can't run my app on some simulators.
The simulators that work :
iPhone 4s
iPhone 5
iPad 2
iPad Retina
The simulators that doesn't work :
iPhone 5S
iPhone 6
iPhone 6S
iPad Air
Resizable iPhone
Resizable iPad
The error is that a *.h file from my framework in not found.
I'd like to know what can prevent this file from being found, or rather what search path is not used with some simulators. There must be some project/target property that screws with those simulator types, except that i can't find any that would make a difference.
In my code i've searched for any kind of difference i would make, but they are just about iOS version regarding UI components. I also use TARGET_IPHONE_SIMULATOR but it should not make any difference between simulators.
FYI, my app version nows include Watch Kit. It's working on the Apple Watch as well as on the Apple Watch simulator attached to the iPhone 5 (external display). It may be related...
Any help much appreciated!
Edit: The full error description:
/Users/me/sources/myApp/iOS/trunk/include/someFile.h:18:10: 'dir/someOtherFile.h' file not found
Edit: Header files in all targets:
My framework and every files that include any .h of my framework are only part of the myApp, i took care not adding any reference in myApp.watchkit or myApp.watchkitextension
Edit: Solutions tried:
Xcode restart
Reboot
+Alt+Shift+K
Delete derived data
Edit: 64-bits:
I use some paths like that in the project file:
$(FRAMEWORK_SEARCH_PATHS)frameworkName_$(CURRENT_ARCH).framework/Versions/A/Headers
For example, it refers to '/searchPathFolder/frameworkName_i386.framework/...' when i build for simulators.
Solved. The issue came from my framework that for some reason wasn't build for 64 bits simulator versions.
For everything to work fine, the project needs 4 versions of the framework: x86 (32 bits simulator), x64 (64 bits simulator), armv7 (32 bits device) and arm64 (64 bits device).
Then with project properties, unnecessary frameworks are simply ignored at build time:
ignoring file myFramework_i386.framework/myFramework_i386, file was built for archive which is not the architecture being linked (arm64)

Can I release an iOS app without Simulator (i386) support?

I have noticed that, due to a load of libraries, I could reduce my app size a lot by removing the i386 symbols. However I am unsure if this is acceptable from an Apple review point of view as I heard they test in the simulator.
Am I crazy for thinking about removing this support to make my apps smaller?
A device build does not include i386 support. If you have libraries that are compiled for i386 exlude them from the final build process (remove them from the target, so they wont be copied to the app bundle)
Your final build shouldn't be including that stuff. They don't test in the simulator. Lots of applications won't work in the simulator, such as anything requiring in-app purchases or Game Center integration.

Distribute iOS static Library

I have compiled 2 static libs of same code-base, one for simulator and one for device. I would like to know, whether should i submitted both libs to Apple.
Or can I create a universal static lib, which can run on both Simulator as well on Device. Is it recommended by Apple to submit only universal library ? How can I produce that ?
Apples don't care about code for iOS simulator and thats shy when you build application for submit, binary for i386 architecture won't be compiled by default and that's correct behavior. Just build for device and submit it, everything will be OK.

Resources