升级到Xcode 10.2时遇到问题 [英] getting an issue with upgrade to Xcode 10.2

查看:53
本文介绍了升级到Xcode 10.2时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到最新的Xcode后,我遇到了一系列错误.

I have a series of errors after upgrading to the newest Xcode.

MyApp/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.m:17:10: Non-portable path to file '<protobuf/Any.pbobjc.h>'; specified path differs in case from file name on disk

当我看代码时,我发现路径确实是大写的.

When I look at the code I see the path is indeed capitalised.

#import <Protobuf/Any.pbobjc.h>

有什么建议可以解决这个问题吗?

Are there any suggestions how to deal with this issue?

我的pod文件如下:

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

target 'MyApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for MyApp
  pod 'Firebase/Core'
  pod 'Firebase/Storage'
  pod 'Firebase/Database'
  pod 'Firebase/Firestore'
  pod 'Firebase/Auth'
  pod 'Firebase/AdMob'

  # Pods for PodTest
  pod 'Fabric'
  pod 'Crashlytics'


  target 'MyAppTests' do
      inherit! :search_paths
      # Pods for testing
  end

  target 'MyAppUITests' do
      # inherit! :search_paths
      # Pods for testing
  end
end

到目前为止,我已经尝试取消集成并重新安装所有pod文件,但是错误仍然存​​在.

So far, I've tried deintegrating and reinstalling all pod files but the errors stick.

推荐答案

这是由于在不区分大小写的文件系统上编译代码所致,其中有两个文件:

This is caused by the code being compiled on a case-insensitive filesystem, where the two files:

在源代码文件Protobuf/objectivec/google/protobuf/Any.pbobjc.m中-

In the source code file Protobuf/objectivec/google/protobuf/Any.pbobjc.m -

计算机上的目录和文件:

Directory and file on your machine:

这两个都指向对洞穴不敏感的文件系统上的同一文件.也就是说,在将目录Protobuf和protobuf视为相同的文件系统上.

Both of these point to the same file on a cave-insensitive filesystem. That is, on a filesystem that treats the directories Protobuf and protobuf as the same.

但是,如果将相同的目录结构复制到区分大小写的文件系统,则源代码将查找与在不区分大小写的文件系统上实际创建的目录不同的目录.

BUT, if you copy that same directory structure to a case-sensitive filesystem, then the source code will be looking for a directory different from the one actually created on the case-insensitive filesystem.

此警告基本上是在提醒您,有一个陷阱"正在等待发生.

This warning is basically a reminder that there is a "gotcha" just waiting to happen.

最终的答案是让protobuf CocoaPod通过更改其协议缓冲区编译器来修复当前的17条警告.

The ultimate answer is to have the protobuf CocoaPod fix the currently-17 warnings by changing their protocol buffer compiler.

在此之前,您可以通过将C ++编译器选项"-Wno-nonportable-include-path"添加到每个有此问题的文件或整个项目中来禁用"此警告.此C ++编译器选项进入其他警告标志"行的"Apple Clang-自定义编译器标志"部分.

Until then, you can "disable" this warning by adding the C++ compiler option "-Wno-nonportable-include-path" to either every file with this issue, or The project as a whole. This C++ Compiler option goes into the "Apple Clang - Custom Compiler Flags" section, in the "Other Warning Flags" line.

这篇关于升级到Xcode 10.2时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆