I'm using pod chronotruck/FlagPhoneNumber I just updated from High Sierra/Xcode 10.1/Swift 4.2/Cocoapoods v-1.5.3
to Mojave 10.14.15/Xcode 10.2.1/Swift 5/Cocoapoods v-1.7.3
and I can't build because inside the NBRegExMatcher.m
file I get the error
'NBPhoneNumberDesc.h' file not found
Everything worked fine before the upgrade and I never had any of these errors.
The Podfile.lock has this inside of it:
- FlagPhoneNumber (0.7.6):
- FlagPhoneNumber/libPhoneNumberiOS (= 0.7.6)
- FlagPhoneNumber/libPhoneNumberiOS (0.7.6)
The odd thing is there are several other files from that pod that also use the #import "NBPhoneNumberDesc.h"
module but they all work fine and there aren't any errors
I tried this answer but NBPhoneNumberDesc.h was already in the Public section:
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?