iOSKit KeychainServices and iOS 10 Simulator

  1. 4 years ago

    Jason T

    10 Oct 2016 Testers, Xojo Pro Sydney, Australia

    My app uses @Jason K 's excellent iOSKit. I use the KeychainServices class to store the username and password for my app. While my app is working fine on iOS 10 devices, the KeychainServices class is either no longer storing, or no longer returning, data in the iOS 10 simulator.

    I was wondering whether anyone else might have come across this issue and whether you found a solution?

  2. Take a look here, it seems like they might have found a solution:

  3. Jason T

    11 Oct 2016 Testers, Xojo Pro Sydney, Australia

    Thank you Jason and I did find this when googling myself. However I don't get an error -34018 or otherwise and adding the share keychain entitlement in Xojo doesn't change the behaviour. Are you experiencing the same issue?

  4. Jason T

    11 Oct 2016 Testers, Xojo Pro Sydney, Australia

    According to the latest Xcode 8.1 beta release notes:

    Keychain APIs may fail to work in the Simulator if your entitlements file doesn’t contain a value for
    the application-identifier entitlement. (28338972)

    Workaround: Add a user-defined build setting to your target named ENTITLEMENTS_REQUIRED and set the value to YES. This will cause Xcode to automatically insert an application-identifier entitlement when building.

    How can I do this in Xojo?

  5. 2 years ago

    Ulrich B

    12 Jun 2018 Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    Any news on this thread? I found different possible solutions, including these ones:
    but no luck so far in getting more than a -50 on Simulator 11 devices.

    Is this bug only present in Simulator devices or does it hinder work on a real device too?

  6. Back when I was testing the class it was iOS7/8 so it’s not been tested (by me) recently. If there are issues with the simulator I would guess it still works on a res device. This was frequently the case, especially with avfoundation classes and some of the picture access/sharing. I always viewed the simulator as a good way to test if my app compiled and that was about it before launching the lengthier compile to target my phone. If it’s a build settings thing then we might need a feedback request to have that work, at which point good luck maybe in 3-4 years.

  7. Jason T

    12 Jun 2018 Testers, Xojo Pro Sydney, Australia

    Yes it’s not an issue on actual devices so I get around it in the simulator by hard-coding values if DebugBuild. Personally, I wouldn’t waste my time on a Feedback case. What’s that oft-quoted (but incorrect) definition of insanity? Doing the same thing over and over and expecting different results.... ;)

  8. Ulrich B

    13 Jun 2018 Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    Thank you, Jasons!
    Well yes: It works on a real device. It still is a bit annoying that you can only run it on a Simulator device <= iOS 9, but anyway: Better this way than the opposite …

or Sign Up to reply!