apple / password-manager-resources

A place for creators and users of password managers to collaborate on resources to make password management better.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential Bug - Autofill Target - prepareInterfaceForExtensionConfiguration not called by the system on IOS version lower than IOS 17

baptiste-veyrard opened this issue · comments

Hello everyone,

First of all, I am not an experienced developer. I am creating a Password Manager as a personal project to challenge myself on app development.
I just found this community, feel free to redirect me to another place if this github repo is not appropriated.
I sent a feedback to Apple via the feedback assistant, but I am not sure it is the appropriate place as well.

This issue:
When the device (real or simulator) is on an IOS version lower than IOS 17, the system does not call the prepareInterfaceForExtensionConfiguration function (in the CredentialProviderViewController).

Issue tested on:

  • Simulator Iphone 6s with IOS 15.5
  • Simulator Iphone 12 with IOS 15.5
  • Simulator Iphone 13pro with IOS 16.4
  • Simulator Iphone 8plus with IOS 16.4
  • Real device Iphone X with IOS 16.7

It works well on all IOS 17 version for all simulators and devices I tested.

How to reproduce the issue:

  • Create a new project on Xcode
  • Add a Credential Provider Extension target to your project
  • Add the AutoFill Credential Provider Entitlement to both the extension and its containing app
  • Specify the ShowsConfigurationUI key with a value of YES in the ASCredentialProviderExtensionCapabilities dictionary, within the NSExtensionAttributes dictionary in the extension’s Information Property List
  • Set IOS minimum deployment to 15 to both the extension and its containing app
  • Start the main target (containing the extension)
  • Go to the "Password Settings" > "Password Options"
  • Select your app as Password Provider in the "ALLOW FILLING FROM" section

From here you can notice that nothing happen if the IOS version of the device is lower than IOS 17.

I already created the same kind of app some months ago and it was working.
Did I miss something? Or is it a real bug?

Unfortunately I do not succeed to get logs on Xcode even when the function is well triggered, so I do not have logs/analysis file to provide (if you can indicate how to get logs for that, it would be really useful).

The Apple documentation about Password Provider is not really explicit.

Xcode version: 15.2 (on a Macbook Air M2 2022)

Thank you in advance for your help

Hi!
The Info.plist key you're using (ASCredentialProviderExtensionCapabilities) is indeed the right one for iOS 17 and above, but it was a new addition to the API in that release. Prior versions need to have the key ASCredentialProviderExtensionShowsConfigurationUI with a boolean value of YES at the same level as ASCredentialProviderExtensionCapabilities. It is fine to specify both keys as iOS will use the right one depending on the version.

For future reference, while it's great to file feedback about potential OS bugs you're facing, this is actually not the right channel for filing iOS bugs. For that you want https://feedbackassistant.apple.com

Thanks a lot for your feedback