Code Monkey home page Code Monkey logo

Comments (6)

dfed avatar dfed commented on May 19, 2024

Seems sounds like a duplicate of #10 (see the Debugging section of the README), and possibly related to #33. Keychain is notoriously unreliable when running on device through Xcode. I strongly recommend making signed builds to test keychain. Am I right to assume you haven't seen this issue in a signed build?

When you hit this issue in debug, just cancel the run and hit Run once more. It'll likely work the second time (thanks, Xcode).

Closing this out for now. Happy to re-open if you need more help or if you uncover more information (or possible incompatibility issues).

from valet.

ksm avatar ksm commented on May 19, 2024

You're right, rerunning does make it go away.

Are all debug builds unsigned then? I've got my certificate and provisioning profile explicitly setup for debug builds too. I'm following Jared Sinclair's guide for setting them up, so you could say I'm being pretty pedantic here.

from valet.

dfed avatar dfed commented on May 19, 2024

My understanding is debug builds are either unsigned or signed differently – not using a provisioning profile, for example – than non-debug builds. I'm not an expert on signing, however (cc @justinseanmartin and @mtauraso who are).

Running debug builds on device from Xcode is a recipe for signing sadness. Keychain issues in debug builds are usually red herrings (unless you can repro them in a properly signed build). I have a NSAssert([loginValet canAccessKeychain]) at the beginning of applicationDidFinishLaunching:, which alerts me that Xcode screwed up quite quickly.

from valet.

justinseanmartin avatar justinseanmartin commented on May 19, 2024

All builds that are built for iOS devices need to be code signed, but they can be signed for development, enterprise distribution, or app store distribution. I believe you should be able to sign Debug builds with any of the above identities, but it is standard to sign Debug builds with your developer identity and sign Release builds with the app store identity.

I wouldn't expect that it is code signing that is causing problems, but more likely an issue with how xcode installs developer apps or the black magic of how Xcode is picking a certificate/provisioning profile/code signing identity/teamID is messing something up.

@dfed - Would it make sense to move the NSAssert with a helpful error message for canAccessKeychain into Valet initialization for debug builds on real devices with a helpful failure message?

from valet.

dfed avatar dfed commented on May 19, 2024

I don't believe that consumable projects should assert if it can be avoided. That's why we wrote the Debugging section in the README.

Moreover, different Valet configurations might be inaccessible under different configurations, so any NSAssert we put into the code might not be looking at a helpful configuration.

from valet.

ksm avatar ksm commented on May 19, 2024

@dfed @justinseanmartin Thank you for the in-depth explanation. Happy I'm not the only one on the flaky code signing while developing boat.

Happy to report the issue did not reappear since the start of this thread.

Will use the NSAssert([loginValet canAccessKeychain]) assertion to aid in my development. Thanks for the protip.

from valet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.