Heidelberg Mobil provides HDMMapCore 2.x as a single dynamic framework, including everything that is needed to embed an indoor map into an iOS application.
"Single" means that HDMMapCore.framework includes binaries for all needed platforms:
This approach is convenient and straightforward. However, there’s one drawback - because dynamic framework is linked at runtime, when a dynamic library is compiled separately to the app it ends up in, it’s impossible to tell which architectures will actually be needed. Therefore, Xcode will just copy the whole thing into your application bundle at compile time. Other than the wasted disk space, there’s no real drawback to this. In practice, however, iTunes Connect doesn’t like us adding unused binary slices:
So, how do we work around this?
We could use static framework instead like we did for HDMMapCore 1.x when dynamic libraries were unavailable (before iOS 8). However, this does not work for Swift code, as Swift is not ABI stable. Furthermore, static framework is a step back and will not be supported.
We can provide two types of HDMMapView.framework: develop and appStore. Maintaining two SDK versions inconveniences both the SDK developers and end-users.
In order to try resolving this, try to strip the redundant platform at build-time.
The last option can be implemented by adding the following
script to your build steps. Insert it after your step to embed
frameworks and set it to
The script will look through your built
Frameworks folder and make sure only the
architectures you’re building are present in each
Size of original HDMMapCore.Framework
Size of Stipped HDMMapCore.Framework inside the App.