AndyQ / NFCPassportReader

NFCPassportReader for iOS 13
MIT License
739 stars 239 forks source link

1.1.4 does not work on iOS 12 (library not loaded) #104

Closed Jeroenbb94 closed 3 years ago

Jeroenbb94 commented 3 years ago

When running version 1.1.4 on an iOS 12 device you get the following crash message on startup:

dyld: Library not loaded: /System/Library/Frameworks/CryptoTokenKit.framework/CryptoTokenKit
  Referenced from: /private/var/containers/Bundle/Application/80449E41-D4CD-4FA5-936A-A37C043B0487/CMApp.app/Frameworks/NFCPassportReader.framework/NFCPassportReader
  Reason: image not found

Adding the CryptoTokenKit framework to the app won't help either, because the framework is iOS 13 only (https://developer.apple.com/documentation/cryptotokenkit). Could 1.1.4 be resolved to support iOS 12 again or can de pod spec be updated to minimal iOS 13?

This issue is happening from 1.1.2 (1.1.1 still works on iOS 12)

Jeroenbb94 commented 3 years ago

The crash is happing because of the import CryptoTokenKit in Utils.swift / OpenSSLUtils.swift / PACEHandler.swift. I'll try to change it to the following:

#if canImport(CryptoTokenKit)
    import CryptoTokenKit
#endif
Jeroenbb94 commented 3 years ago

Above didn't resolve it, though adding -weak_framework "CryptoTokenKit" to the spec.xconfig in the pod spec did since it is a framework that is being used in the codebase but not specified for cocoapods.

ghost commented 3 years ago

Do you have an eta when you will fix this issue (give support to iOS 12) ?

AndyQ commented 3 years ago

This should be fixed in 1.1.6 (due soon)