からに更新したばかりのポッドクロノトラック/ FlagPhoneNumberを使用していますが、ファイル内でエラーが発生するため、ビルドできませんHigh Sierra/Xcode 10.1/Swift 4.2/Cocoapoods v-1.5.3
Mojave 10.14.15/Xcode 10.2.1/Swift 5/Cocoapoods v-1.7.3
NBRegExMatcher.m
「NBPhoneNumberDesc.h」ファイルが見つかりません
アップグレード前はすべて正常に機能し、これらのエラーは発生しませんでした。
Podfile.lockには、次のものが含まれています。
- FlagPhoneNumber (0.7.6):
- FlagPhoneNumber/libPhoneNumberiOS (= 0.7.6)
- FlagPhoneNumber/libPhoneNumberiOS (0.7.6)
奇妙なことに、そのポッドから#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?
[ビルド設定]> [ヘッダーファイル]および/または[ユーザーヘッダーファイル]内の変更について多くの回答を試しましたが、いずれも機能しませんでした。私はこの答えに従いました、そしてそれはうまくいきました:)
私は何をしなければならなかったことに変更した#import SomeFile.h
の#import <SomeFile.h>
代わりにブラケットを使用することによって。
これが各ファイルのコードです
NBRegExMatcher.m
ファイル内で、次の2つのモジュールを変更する必要がありました。
//#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>
それぞれの写真は次のとおりです。
pod 'libPhoneNumber-iOS', '~> 0.8'
ちなみに、FlagPhoneNumberポッドの外部でライブラリを使用したため、別のエラーが表示されたため、ポッドファイルにを追加する必要がありました。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加