首页 > 解决方案 > 手动管理/删除每个目标自动链接的 pod

问题描述

我正在为我的主应用程序开发一个 AppClip,但我在主项目中使用了很多沉重的 cocoapods,这些对于剪辑来说是不必要的,实际上我的应用程序剪辑的大小超过了 10mb 的限制,如果我手动删除这些AppClip 确实构建的项目低于大小限制,但会破坏主应用程序中的功能。

所以我的问题是,有没有办法删除在 podfile 中的不同目标之间自动链接的 pod?

Podfile 供参考:

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'

platform :ios, '11.0'
target 'MainProject' do
use_unimodules!
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'MainProjectTests' do
inherit! :complete
# Pods for testing
end
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'MainProjectClip' do
use_react_native!
end```

标签: react-nativecocoapodsapple-appclips

解决方案


推荐阅读