react-native-amap3d icon indicating copy to clipboard operation
react-native-amap3d copied to clipboard

cocoapod的pod install 时出现静态statically linked binaries

Open asagcs opened this issue 5 years ago • 10 comments

react-native 0.59.3 react-native-cli 2.0.1 react-native-amap3d 1.1.1 平台: mac ios 因为开发需要同时开发Android 所以link过 报错:The 'Pods-sandmall' target has transitive dependencies that include statically linked binaries: (/Users/xxhuashui/sand-shop/ios/Pods/AMap3DMap/MAMapKit.framework) 如果不尝试注释user_frameworks!,该怎么解决。如果尝试,user_frameworks在哪? 以下是podfile:

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target ' ' do

Comment the next line if you don't want to use dynamic frameworks

use_frameworks!

Pods for

end

target 'sandmall' do

Comment the next line if you don't want to use dynamic frameworks

use_frameworks!

Pods for sandmall

pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'CxxBridge', # Include this for RN >= 0.47 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging # Add any other subspecs you want to use in your project ]

Explicitly include Yoga if you are using RN >= 0.42.0

pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

Third party deps podspec link

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'react-native-amap3d', path: '../node_modules/react-native-amap3d/lib/ios'

end

post_install do |installer| installer.pods_project.targets.each do |target| if target.name == "React" target.remove_from_project end end end

asagcs avatar Oct 12 '19 05:10 asagcs

我也是这个情况 老哥有思路吗

Ekhui avatar Oct 30 '19 08:10 Ekhui

我也是这个情况 老哥有思路吗

现有的仅有的思路是podfile文件中注释掉use_frameworks!

asagcs avatar Oct 30 '19 08:10 asagcs

use_frameworks

我引用了另外的第三方react-native-file-selector文件选择器 它里面有一个依赖FileBrowser 需要use_frameworks! 我现在就是这两个东西冲突了 欲哭无泪

Ekhui avatar Oct 30 '19 10:10 Ekhui

@qiuxiang 请问作者大哥有没有解决思路呢 因为这个加班好多天了。。

Ekhui avatar Oct 30 '19 10:10 Ekhui

不好意思啊   我也没其他办法

---原始邮件--- 发件人: "Ekhui"<[email protected]> 发送时间: 2019年10月30日(星期三) 晚上6:19 收件人: "qiuxiang/react-native-amap3d"<[email protected]>; 抄送: "asagcs"<[email protected]>;"Author"<[email protected]>; 主题: Re: [qiuxiang/react-native-amap3d] cocoapod的pod install 时出现静态statically linked binaries (#561)

use_frameworks

我引用了另外的第三方react-native-file-selector文件选择器 它里面有一个依赖FileBrowser 需要use_frameworks! 我现在就是这两个东西冲突了 欲哭无泪

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

asagcs avatar Oct 30 '19 10:10 asagcs

我也是这个情况 老哥有思路吗

请问有解决办法了吗?

miaoyumeng avatar Dec 03 '19 06:12 miaoyumeng

除了注释掉use_frameworks!暂时没有

---原始邮件--- 发件人: "wuhaha"<[email protected]> 发送时间: 2019年12月3日(周二) 下午2:58 收件人: "qiuxiang/react-native-amap3d"<[email protected]>; 抄送: "asagcs"<[email protected]>;"Author"<[email protected]>; 主题: Re: [qiuxiang/react-native-amap3d] cocoapod的pod install 时出现静态statically linked binaries (#561)

我也是这个情况 老哥有思路吗

请问有解决办法了吗?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

asagcs avatar Dec 03 '19 07:12 asagcs

不用注释掉use_frameworks! 在../node_modules/react-native-amap3d/ios/react-native-amap3d.podspec文件中增加一行代码搞定 s.static_framework = true

/**位置 */ s.dependency 'React' s.dependency 'AMap3DMap', "~> 7.2.0" s.static_framework = true

Lenlyl avatar Jul 31 '20 03:07 Lenlyl

不用注释掉use_frameworks! 在../node_modules/react-native-amap3d/ios/react-native-amap3d.podspec文件中增加一行代码搞定 s.static_framework = true

/**位置 */ s.dependency 'React' s.dependency 'AMap3DMap', "~> 7.2.0" s.static_framework = true

真实有效,给你点赞

hbolin avatar Jan 22 '21 15:01 hbolin

折腾了好几天,终于找到一个东西cocoapods-user-defined-build-types,可以替代use_frameworks! 用法是这样 `plugin 'cocoapods-user-defined-build-types'

enable_user_defined_build_types!

target "CoffeeApp" do pod 'Alamofire' pod "SwiftyJSON", :build_type => :dynamic_framework`

karte796 avatar Dec 30 '21 03:12 karte796