Quantcast
Channel: Active questions tagged cocoapods - Stack Overflow
Viewing all articles
Browse latest Browse all 1016

How to reduce the size of my wrapper iOS framework?

$
0
0

I’ve created a custom dynamic framework in Objective-C for iOS (targeting arm64). It includes one header (.h) and one implementation file (.m). My framework has a static xcframework dependency (AppsFlyerFramework) which is integrated via CocoaPods with use_frameworks!.

The issue is that the output .framework file is unexpectedly large (around 600KB), and it seems that the AppsFlyerFramework is being linked statically with my framework.

Example: I have a Podfile with one of 2 case following:

// Podfileplatform :ios, '12.0'use_frameworks!# case 1target 'MyAppsFlyerWrapper' do    pod 'AppsFlyerFramework', '~> 6.14.3'end# case 2target 'MyAppsFlyerWrapper' do    pod 'AppsFlyerFramework/Dynamic', '~> 6.14.3'end

Then I build an ios framework with architecture arm64

With case 1. My framework binary size is 500KB

With case 2. My framework binary size is 87KB

What is different? Because some reasons, I cannot use AppsFlyerFramework/Dynamic instead of AppsFlyerFramework

How can I:

Dynamically link the AppsFlyerFramework to MyAppsFlyerWrapper without using AppsFlyerFramework/Dynamic?Reduce the size of MyAppsFlyerWrapper to around 100KB?Any guidance on optimizing this would be appreciated!


Viewing all articles
Browse latest Browse all 1016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>