gematik / ref-OpenHealthCardKit

Controlling/Use-case framework for accessing smart cards of the telematic infrastructure. API Documentation: https://swiftpackageindex.com/gematik/ref-OpenHealthCardKit/main/documentation/healthcardaccess
Apache License 2.0
16 stars 6 forks source link

NFCDemo crashed on device but ok with Simulator #8

Closed caijunjieNick closed 1 year ago

caijunjieNick commented 1 year ago

I integrated the library into my application using Carthage, and I want to use NFCDemo in my app. It runs fine on the simulator, but it throws an error on a real device. I have tried to set ASN1Kit in Link Binary with Library as Optional,but it still didn't work. Error: dyld[92622]: Symbol not found: (_$s7ASN1Kit16ObjectIdentifierV2eeoiySbAC_ACtFZ) Referenced from: '/private/var/containers/Bundle/Application/C0ACE973-2220-4174-81F4-D715537E1332/Apotheke.app/Frameworks/HealthCardAccess.framework/HealthCardAccess' Expected in: '/private/var/containers/Bundle/Application/C0ACE973-2220-4174-81F4-D715537E1332/Apotheke.app/Frameworks/ASN1Kit.framework/ASN1Kit'

sigabrtz commented 1 year ago

It might be a caching problem of some sort. Can you provide a (minimal) project on GitHub that reproduces the bug?

In any case we plan to provide a Package.swift file for this project within this or next week. That will eliminate the need for Carthage as well

caijunjieNick commented 1 year ago

It might be a caching problem of some sort. Can you provide a (minimal) project on GitHub that reproduces the bug?

In any case we plan to provide a Package.swift file for this project within this or next week. That will eliminate the need for Carthage as well

Thanks for reply. I just created a hello world project and by using Carthage with "github "gematik/ref-openHealthCardKit" ~> 5.0" to drag xcframeworks into this project. Here is the link https://github.com/caijunjieNick/OpenHealthCardFrameworkTest.git of project for clone. It still crashed on real device.

sigabrtz commented 1 year ago

Thank you.

We could reproduce the problem but weren't able to figure out, what's causing the bug exactly. We include the framework into our own app (see https://github.com/gematik/E-Rezept-App-iOS/blob/6c7a7b752f96715c96f985c1e3a1384ca82cb494/Cartfile), and it has been working for us thus far.

As announced, we will add a Package.swift file to this project that should resolve the problem. (We were not able to reproduce the bug when we included the framework via SPM.)

We opt publish the Package.swift within this week.

caijunjieNick commented 1 year ago

Thank you.

We could reproduce the problem but weren't able to figure out, what's causing the bug exactly. We include the framework into our own app (see https://github.com/gematik/E-Rezept-App-iOS/blob/6c7a7b752f96715c96f985c1e3a1384ca82cb494/Cartfile), and it has been working for us thus far.

As announced, we will add a Package.swift file to this project that should resolve the problem. (We were not able to reproduce the bug when we included the framework via SPM.)

We opt publish the Package.swift within this week.

Hello, it works finally. I really appreciate it:)

sigabrtz commented 1 year ago

Good to hear that.