Yubico / yubikit-ios

Yubico Mobile iOS SDK - YubiKit
Apache License 2.0
194 stars 43 forks source link

iPhone 15 Pro #135

Closed joeblau closed 9 months ago

joeblau commented 9 months ago

I plugged my 5C into my iPhone 15 Pro's USB-C port then ran a sample project and this command returns false.

YubiKitDeviceCapabilities.supportsSmartCardOverUSB

Sample iOS project: https://github.com/joeblau/yubi3 Code that fails: https://github.com/joeblau/yubi3/blob/main/Yubi3/SmartCard.swift#L16-L27

Screenshot 2023-09-23 at 7 21 40 PM
WWSellers commented 9 months ago

The code for supportsSmartCardOverUSBC (YubiKitDeviceCapabilities.m:127) maintains a table of known devices with USB-C, which has not yet been updated yet.

Device model strings are mapped to yubikit constants in ykf_setupDeviceModel (UIDeviceAdditions.m:22).

For a short-term patch to allow testing on your devices, you might want to add your device to the code.

To help with updating the tables, I suggest posting your iPhone's model ID string to this issue. (Example: iPhone14,7).

joeblau commented 9 months ago

Thanks @WWSellers!

I submitted a PR with the fixes: https://github.com/Yubico/yubikit-ios/pull/136