更新到Xcode 10.2,Swift 5后,找不到“ NBPhoneNumberDesc.h”文件

矛撒玛利亚

我正在使用刚刚从更新到的pod chronotruck / FlagPhoneNumber,但无法构建,因为在文件内部出现错误High Sierra/Xcode 10.1/Swift 4.2/Cocoapoods v-1.5.3Mojave 10.14.15/Xcode 10.2.1/Swift 5/Cocoapoods v-1.7.3NBRegExMatcher.m

找不到'NBPhoneNumberDesc.h'文件

在此处输入图片说明

升级前一切正常,我从未遇到任何这些错误。

Podfile.lock包含以下内容:

- FlagPhoneNumber (0.7.6):
- FlagPhoneNumber/libPhoneNumberiOS (= 0.7.6)
- FlagPhoneNumber/libPhoneNumberiOS (0.7.6)

奇怪的是,该Pod中还有其他几个文件也使用了该#import "NBPhoneNumberDesc.h"模块,但它们都可以正常工作,并且没有任何错误

在此处输入图片说明

我尝试了这个答案,但是NBPhoneNumberDesc.h已经在“公共”部分中:

在此处输入图片说明

I also tried this answer to set the SWIFT_OBJC_INTERFACE_HEADER_NAME to match the my project's bridging header but nothing

Inside the NBRegExMatcher.m file (where the error is occurring) I commented out #import NBPhoneNumberDesc.h to see what would happen and then NBPhoneNumberUtil.h got the same error:

在此处输入图片说明

I notice the libPhoneNumber-iOS came bundled inside the FlagPhoneNumber pod and it's version is libPhoneNumberiOS (0.7.6). I then manually added the pod to my project to see what would happen but it also made no difference, the error was still there. The only thing I noticed is when I added the pod manually the Podfile.lock version is - libPhoneNumber-iOS (0.9.15) wherein as the version that FlagPhoneNumber is using is libPhoneNumberiOS (0.7.6)

Any idea how can i fix this error?

Lance Samaria

我尝试了一些有关在“构建设置”>“头文件”和/或“用户头”文件中进行更改的答案,但是没有一个起作用。我按照这个答案,它的工作:)

我所要做的就是改变#import SomeFile.h#import <SomeFile.h>通过使用括号来代替。

这是每个文件中的代码

NBRegExMatcher.m文件中,我必须更改以下两个模块:

//#import "NBPhoneNumberDesc.h" // comment this out and add the brackets below
#import <NBPhoneNumberDesc.h>
//#import "NBPhoneNumberUtil.h" // comment this out and add the brackets below
#import <NBPhoneNumberUtil.h>

在更改了这些内容之后,我在里面也遇到了相同的错误,NBPhoneNumberUtil.m并且必须在该处执行相同的操作:

//#import "NBRegExMatcher.h" // comment this out and add the brackets below
#import <NBRegExMatcher.h>

以下是每个图片:

NBRegExMatcher.m 文件 在此处输入图片说明

NBPhoneNumberUtil.m 文件 在此处输入图片说明

在旁边的注释中,我还必须将pod 'libPhoneNumber-iOS', '~> 0.8'Podfile添加到我的Podfile中,因为出现了另一个错误,因为我在FlagPhoneNumber pod之外使用了库

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

更新到 8.3 Xcode Swift 3.1 后,输入不是 aPCH 文件(swift 编译器错误)

更新到Xcode 10.2后如何修复“总线错误10”

Xcode 10更新后CMake找不到stdc ++ 11

找不到文件.h xcode

Xcode 6:Fabric Crashlytics更新后找不到“ Answers.h”文件

Cocoapods更新后,Xcode项目找不到Bolts / BFTask.h文件

升级到Xcode 10后的问题:找不到构建输入文件

更新到Xcode 10.2 / Swift 5后无法构建macOS项目

由于更新到Xcode 10文件未找到错误/ deriveddata

更新到Xcode 10后,XCUITest的测试目标似乎无法正常工作

将广告连播更新到GoogleAnalytics之后,“找不到Google / Analytics.h文件”

将rspec gem更新到2.14.1后找不到spec帮助程序文件

找不到Project-Swift.h文件

Xcode:找不到“RegisterMonoModules.h”文件

numba / npyufunc / omppool.cpp:5:10:致命错误:找不到“ omp.h”文件

更新到 Xcode 11.4、Swift 5.2 后出现 Swift -Enum 重新声明错误

Ionic 2:更新到RC.0后找不到名称“ Promise”

在xcode8中找不到ModuleName-Swift.h文件

Windows 10 Home v.1809 就地升级错误(旨在更新到 20H2)

更新到Xcode 9 / Swift 4后,AVCapture奇怪的编译错误

更新到Xcode 10.2 beta 3后,启动应用程序时出现Swift错误

使用swift更新到Xcode 6 beta 4后出现dyld_fatal_error

Xcode10:找不到构建输入文件的双重转换

使用Cocoapods更新后找不到parse / Parse.h文件

吊舱“ FirebaseMessaging”更新后找不到“ sqlite3.h”文件

更新到Xcode 9和Swift 4

Xcode 找不到 .h 文件“找不到 ABC.h 文件”

Net :: SSH2 :: Simple在更新到Windows10后失败

更新MacOS和Xcode后的Xcode 8.1“找不到匹配的配置文件”