Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting an issue with upgrade to Xcode 10.2

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?

My pod file looks like this:

# 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

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

like image 869
Shane O'Seasnain Avatar asked Mar 26 '19 22:03

Shane O'Seasnain


2 Answers

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

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

Directory and file on your machine:

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.

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

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.

like image 175
John Wolfe Avatar answered Oct 01 '22 11:10

John Wolfe


Please delete Derived Data,

You can go to File > Workspace Settings if you are in a workspace environment or File > Project Settings for a regular project environment. Then click over the little grey arrow under Derived data section and select your project folder to delete it.

Than deintegrate and reinstalling all pod files again.

Hope this works for you!

like image 32
Vijay Kahar Avatar answered Oct 01 '22 11:10

Vijay Kahar