Comments (7)
The size of the Framework
folder on your Mac is not the same as the size of the SDK in an app. Xcode is pretty smart about how it bundles and distributes binary libraries; it only includes the functions that are actually called. The last time I checked, with the minimum recommended implementation, the Tune SDK for iOS only added about 180 kB to the size of an application bundle, including all the other framework dependencies. Are you seeing something different than that?
from sdk-release.
Our issue is that we haven't enabled bitcode yet for our application because of some other dependencies that we use that haven't enabled that. I assuming the size of the framework itself (Tune.framework) is large because its building pre-compiled headers for all of the Valid Architectures (arm64 armv7 armv7s x86_64 i386). I guess until we can enable bitcode in our project we can't take advantage of just compiling just for the architecture required per device. I'm currently verifying the size difference you mentioned, and i'll get back to you on that.
from sdk-release.
I can verify that the framework in 40mb.. for each architecture it comes down to around 10mb.
lipo -detailed_info Dependencies/Tune/Tune.framework/Tune
Fat header in: Dependencies/Tune/Tune.framework/Tune
fat_magic 0xcafebabe
nfat_arch 4
architecture i386
cputype CPU_TYPE_I386
cpusubtype CPU_SUBTYPE_I386_ALL
offset 88
size 9486544
align 2^2 (4)
architecture armv7
cputype CPU_TYPE_ARM
cpusubtype CPU_SUBTYPE_ARM_V7
offset 9486632
size 9503496
align 2^2 (4)
architecture x86_64
cputype CPU_TYPE_X86_64
cpusubtype CPU_SUBTYPE_X86_64_ALL
offset 18990128
size 9712056
align 2^3 (8)
architecture arm64
cputype CPU_TYPE_ARM64
cpusubtype CPU_SUBTYPE_ARM64_ALL
offset 28702184
size 10461992
align 2^3 (8)
from sdk-release.
So here is what i've done.. for the universal Tune target i changed these build options
Generate Debug Symbols: NO
Precompile Prefix Header: NO
Link With Standard Libraries: NO
that shrunk it to about half the size..
working on enabling bitcode now or embedding the framework a different way.
from sdk-release.
With the disclaimer that I haven't tried this in a couple of years (Xcode/iOS versions), I think the size of the library on disk is not correlated to the size that the SDK contributes to the application binary.
I'd recommend building an application without the SDK (possibly a new, empty app), then exporting it as an .ipa
file and measuring the size of the archive. Then add the Tune SDK and dependencies to the app and look at how big the archive is. Note that if you don't call any functions from the Tune SDK, the archive size won't change (you can verify this), so you also have to add at least the initialization stuff to your app's code. This is how I arrived at the 180 kB number.
from sdk-release.
Hi Mark, John is right that the size of the framework you copy into xcode doesn't all get added to the size of your app download because the compiled code is both thinned per architecture and compressed. The Tune framework is all code, so it compresses very well. There are more details on https://developer.apple.com/library/content/qa/qa1795/_index.html including the recommended way to measure your app download size.
I recommend following John's advice and examining an ad-hoc release archive of your app for seeing Tune's impact. There are instructions in the link above.
You can examine the compressed size of each item in the .ipa by opening Terminal and executing the following command:
unzip -lv /path/to/your/thinned_app.ipa
The size column has the compressed size of each file within your .ipa file. You should evaluate this size as you work to reduce the size of resources in your app. You may reduce the size of a resource by a lot, but after producing an .ipa file, you may discover the compressed size of that resource has not changed as dramatically. The most effective technique for reducing the size of an .ipa file is to remove unnecessary resources.
Of course, I'm not suggesting that you remove the Tune, framework :) rather, that the compressed size of the added Tune code will be significantly less than the size of the original framework package we provide.
from sdk-release.
Yup, I did my build and the results were correct..
Size..
193,642,968 - With Tune
192,104,987 - Without Tune
1,537,981 difference, which is about 1/4 what i expected it to be.
Thanks for your help everyone.
from sdk-release.
Related Issues (20)
- No LICENSE HOT 2
- Add nullability qualifiers for swift integration HOT 4
- iOS SDK notifyDelegateRequestEnqueuedWithRefId Crash HOT 5
- Errors with Xcode 8.3 HOT 1
- SDK Obj-C headers lack Swift annotations HOT 1
- Cant' build android sdk HOT 4
- SDK 4.10.0: java.lang.IllegalStateException: Timer was canceled HOT 1
- Tune doesn't compile for iOS devices in Xcode 9b3 HOT 2
- The class name and file name are not the same case, and a build error occurs. HOT 2
- Why not call conn.disconnect() after using HttpURLConnection?
- SDK IOS 4.14.1 : Cannot convert value of type '[UIApplicationOpenURLOptionsKey : Any]' to expected argument type '[String : Any]!' HOT 3
- SDK iOS 4.14.1 : func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any)
- Click Injection Issue HOT 3
- Cannot set custom permission for receiver? HOT 1
- [iOS] `setAge: null / 0` leads to a coppa-protected account. HOT 1
- Crashing in iOS 12.1.2 | TuneUtils.m line 175 +[TuneUtils checkJailBreak] |
- Android SDK 6.1.1: App version is 0 when using custom package name
- Latest Tunes tvos sdk is missing key 'CFBundleShortVersionString' in info.plist HOT 2
- iOS: site_id not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk-release.