Estou usando pod chronotruck / FlagPhoneNumber Eu só atualizou a partir High Sierra/Xcode 10.1/Swift 4.2/Cocoapoods v-1.5.3
de Mojave 10.14.15/Xcode 10.2.1/Swift 5/Cocoapoods v-1.7.3
e eu não posso construir porque dentro do NBRegExMatcher.m
arquivo eu recebo o erro
Arquivo 'NBPhoneNumberDesc.h' não encontrado
Tudo funcionava bem antes da atualização e nunca tive nenhum desses erros.
O Podfile.lock contém o seguinte:
- FlagPhoneNumber (0.7.6):
- FlagPhoneNumber/libPhoneNumberiOS (= 0.7.6)
- FlagPhoneNumber/libPhoneNumberiOS (0.7.6)
O curioso é que há vários outros arquivos desse pod que também usam o #import "NBPhoneNumberDesc.h"
módulo, mas todos funcionam bem e não há erros
Tentei esta resposta, mas NBPhoneNumberDesc.h já estava na seção Pública:
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?
Tentei várias respostas sobre como alterar as coisas em Build Settings> Header File e / ou User Header files, mas nenhuma delas funcionou. Eu segui esta resposta e funcionou :)
O que eu tive que fazer foi mudar o #import SomeFile.h
para #import <SomeFile.h>
usando os colchetes.
Aqui está o código de cada arquivo
Dentro do NBRegExMatcher.m
arquivo tive que mudar estes 2 módulos:
//#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>
Depois que os alterei, também obtive o mesmo erro dentro do NBPhoneNumberUtil.m
e tive que fazer o mesmo lá:
//#import "NBRegExMatcher.h" // comment this out and add the brackets below
#import <NBRegExMatcher.h>
Aqui estão as fotos de cada um:
Por outro lado, também tive que adicionar o pod 'libPhoneNumber-iOS', '~> 0.8'
ao meu Podfile porque apareceu um erro diferente porque eu usei a biblioteca fora do pod FlagPhoneNumber
Este artigo é coletado da Internet.
Se houver alguma infração, entre em [email protected] Delete.
deixe-me dizer algumas palavras