English 中文(简体)
如何纠正谷歌公用事业的重复错误?
原标题:How to fix duplication error of GoogleUtilities Swift?

我正在利用消防基地追踪我的项目中坠毁事件,我正在使用以下电线。

 pod  FirebaseCore ,  6.6.4 
 pod  FirebaseMessaging ,  4.3.0 
 pod  FirebaseAnalytics , 6.3.1 

在完成这个项目以建立试验飞行大楼的同时,在 go角公用事业部门出现重复错误:

 Multiple commands produce  /Path/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework :
 1) Target  GoogleUtilities-00567490  has create directory command with output  /Path//IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework 
 2) Target  GoogleUtilities-54e75ca4  has create directory command with output  /Path//IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework 

当我在建筑环境中检查我的波德环境时,我看到奥古格尔公用事业在项目中增加了两倍。 我已经删除了它留下错误的谷歌用途之一。

Note: I can able to run the build and I can t able to archive it. Is there any fix for achieving this build, without changing the legacy build system?

由于我已使我的SDK图书馆得以分发,因此,当我改变遗产时,就会发现错误。

最佳回答

更新波德文件,明确要求所有必要的谷歌用途子。 Examine the Podfile. 找到名单。

https://github.com/CocoaPods/CocoaPods/issues/8206“rel=“noreferer” Pods issue。

问题回答

Adding pod GoogleUtilities , ~> 7.7.0 to all the targets that use Firebase pods will make it work. In my case, this included 3 targets: iOS app, iMessage Extension and UnitTests.

No need to add this part explicitly:

def google_utilites
  pod  GoogleUtilities/AppDelegateSwizzler 
  pod  GoogleUtilities/Environment 
  pod  GoogleUtilities/Logger 
  pod  GoogleUtilities/MethodSwizzler 
  pod  GoogleUtilities/NSData+zlib 
  pod  GoogleUtilities/Network 
  pod  GoogleUtilities/Reachability 
  pod  GoogleUtilities/UserDefaults 
end

概述步骤

  1. Add pod GoogleUtilities so they don t clash from different targets enter image description here
  2. Clean install your pods (pod deintegrate and pod install)
  3. Might need pod repo update.
  4. Reopen xcode and archive, you would see single GoogleUtilities now enter image description here

这个问题在我身上出现,当时我用非常相似但并非同等的消防基地对我的项目增加了一个新的目标,因此谷歌用途被重复使用,因为我的另一项目标需要公用事业的高度依赖,基本(在Paul Beusterien的答复的帮助下)去波德斯项目,看两个目标(谷歌Utilities-xxx)-> 建设阶段-> 互补来源,看所增加的文档差异,而新目标基本上没有谷歌-Utilities/User iaults 和Utilities/MethodSzzler,但这个案例是一样的。

platform :ios,  13.0 

def google_utilites
  pod  GoogleUtilities/AppDelegateSwizzler 
  pod  GoogleUtilities/Environment 
  pod  GoogleUtilities/Logger 
  pod  GoogleUtilities/MethodSwizzler 
  pod  GoogleUtilities/NSData+zlib 
  pod  GoogleUtilities/Network 
  pod  GoogleUtilities/Reachability 
  pod  GoogleUtilities/UserDefaults 
end

abstract_target  AggregatedPodsTarget  do
  use_frameworks!

  google_utilites
  
  pod  FirebaseCore 
  pod  FirebaseAuth 
  pod  FirebaseFirestore 
  pod  FirebaseStorage 
  pod  FirebaseFunctions 
  pod  FirebaseAnalytics 
  pod  FirebaseMessaging 
  pod  Firebase/Crashlytics 
  
  pod  Google-Mobile-Ads-SDK 


  
  target  MainApp  do
  end
  
  target  MainApp Dev  do
  end
  
end

abstract_target  ExtensionPodsTarget  do
  use_frameworks!
  
  google_utilites
  
  pod  FirebaseAuth 
  pod  FirebaseFunctions 
  
  target  Extension  do
  end
  
  target  Extension Dev  do
  end
end

在此之前,只是安装了正文,一回头只安装了一台谷歌公共事业设施。

我们在使用消防基地——核心和消防基地——分析依赖者——的液压项目上也存在同样的问题。 在Podfile公司(OS)下的所有目标中添加pod ValleyUtilities , ~> 7.7.0

target  Runner  do
  use_frameworks!
  use_modular_headers!

  pod  GoogleUtilities ,  7.7.0 
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

target  customnotificationext  do
  use_frameworks!

  pod  GoogleUtilities ,  7.7.0 
end

我在尝试把我的一个项目归档时看到了这一错误,我最近又提出了另一个新目标。

在进入这一新目标的良好环境时,我注意到,在主要Runner目标(12)中,SiOS部署版本不同于(14.4),我最初将这一新的推广目标混为一谈时就错了。

The only difference between the iOS deployment versions I saw was that 14.4 had App Extensions enabled. Since that was something inconsequential to my project, I was happy matching the iOS deployment versions for both my targets so they could refer to only one set of dependencies. After that, I just removed the duplicate pods for the version that I had removed. And I could archive again.


For each of your Targets, got to Build Settings -> check the iOS Deployment Target -> change the version so that they match.

在大多数情况下,没有理由加以区别。 但是,如果出于某种原因,你认为他们应当不同,那么检查Paul Beusterien的回答就是这样。





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签