You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above script lists all frameworks with "Extension" suffixes marked as weak_framework in frameworks_to_weaklink, you can modify frameworks_to_weaklink to the frameworks you need to mark as needed.
2. Remove unnecessary frameworks through xcode build phase
Through the above screenshot, you can add Run Script to remove unnecessary frameworks, and the following script can be copied directly.
NOTE:Shell needs to specify as /usr/bin/ruby
$stderr.puts "Removing Unnecessary Frameworks"# The value of `frameworks_to_weaklink` should be consistent with step 1
frameworks_to_weaklink=["AgoraAiEchoCancellationExtension", "AgoraAiNoiseSuppressionExtension", "AgoraAudioBeautyExtension", "AgoraClearVisionExtension", "AgoraContentInspectExtension", "AgoraDrmLoaderExtension", "AgoraReplayKitExtension", "AgoraSpatialAudioExtension ", "AgoraSuperResolutionExtension", "AgoraVideoQualityAnalyzerExtension", "AgoraVideoSegmentationExtension"]
forframeworkin frameworks_to_weaklink
framework_path = "#{ENV['BUILT_PRODUCTS_DIR']}/#{ENV['FRAMEWORKS_FOLDER_PATH']}/#{framework}.framework"`rm -Rf "#{framework_path}"`
end
Note:
The value of frameworks_to_weaklink should be consistent with step 1
The script phase should put in the last step
Windows
TBD
The text was updated successfully, but these errors were encountered:
You can remove the unnecessary extension libraries of the Agora native sdk to reduce the APP size
https://docs.agora.io/en/video-calling/reference/downloads?platform=android#remove-unneeded-plugins
https://docs.agora.io/en/video-calling/reference/downloads?platform=ios#remove-unneeded-plugins
Here's how it can do with the
agora_rtc_engine
Android
Use the gradle
packagingOptions.exclude
to exclude unnecessary so files. (wildcards are supported)https://stackoverflow.com/questions/37382057/android-apk-how-to-exclude-a-so-file-from-a-3rd-party-dependency-using-gradle
iOS/macOS
Steps:
1. Mark the unnecessary native sdk framewrok as weak_frameworks through the script
Add the following script to your project
ios/Podfile
to markweak_frameworks
for frameworks that are not needed in 'Pods-Runner', "agora_rtc_engine":The above script lists all frameworks with "Extension" suffixes marked as
weak_framework
inframeworks_to_weaklink
, you can modifyframeworks_to_weaklink
to the frameworks you need to mark as needed.2. Remove unnecessary frameworks through xcode build phase
Through the above screenshot, you can add
Run Script
to remove unnecessary frameworks, and the following script can be copied directly.NOTE:
Shell
needs to specify as/usr/bin/ruby
Note:
frameworks_to_weaklink
should be consistent with step 1Windows
TBD
The text was updated successfully, but these errors were encountered: