Storing Notorization Cred

If I attempt to use the NotoryTool to save my creds, I get this

xcrun notarytool store-credentials 'NOTORIZE.NOTORIZE' --apple-id 'rdavids3@cox.net' --team-id '25DYXXXXXF' --password 'xxx-xxx-xxx-xxx'

This process stores your credentials securely in the Keychain. You reference these credentials later using a profile name.

Validating your credentials...
Error: HTTP status code: 403. A required agreement is missing or has expired. This request requires an in-effect agreement that has not been signed or has expired. Ensure your team has signed the necessary legal agreements and that they are not expired.

No idea what it thinks is “expired”… all dates in AppleConnect are 2025 or later

Open Xcode and see if that has an update ?

Mine did this morning

S***t… it was all because there was one of their stupid documents that I had not clicked on…

1 Like

well I can save the creds in keychain, but cannot find a way to verify the creds exist

ok… now I can STORE the creds


xcrun notarytool store-credentials 'NOTORIZE.com' --apple-id 'rdavids3@cox.net' --team-id '25DXXXXX' --password xxxx-xxxx-xxxx-xxxx'

This process stores your credentials securely in the Keychain. You reference these credentials later using a profile name.

Validating your credentials...
Success. Credentials validated.
Credentials saved to Keychain.
To use them, specify `--keychain-profile "NOTORIZE.com"`

however, contrary to everything any AI has told me, I cannot find a way to verify that a given profile exists.

my app needs to verify it exists, and if not then create it

because a generative AI is just a fancy next word is generator, apple’s documentation is overcomplicated, and apple’s implementation is subpar.

If trying to train an LLM/Gen-AI on their documentation, stuffs gonna be wrong.

security find-identity -v

This is what i mean by their implementation sucks: the process gets you used to xcrun over and over and over again, and then seemingly randomly uses a different tool. Would it hurt to just stick a wrapper in for consistency? Or to at least include a mention of the security command in the documentation?

1 Like

pffft you know anyone from apple is saying

we do what we want
when we want
how we want

exactly WHO do you think you are ?

Customer ? hahahaha like you’re important ???

this works

func checkNotarizationProfile(profile: String) {
    let r = execute("xcrun notarytool history --keychain-profile \(profile)")
    hasPROFILE = (InStr(r,"Accepted")>0)
}

InStr??? Swift doesn’t have ‘InStr’… mine does :smiley:

Sure ?

1 Like

yes I am sure that the standard Swift langauge does not contain a function that uses the InStr syntax… What you posted was the same functionality, but not the same syntax.

theres reasons why the syntax isn’t identical, but whatever floats your boat.

and the reason is quite simple actually… I could do it one of 3 ways

  1. duplicate verbose Swift code at every place where the function was needed
  2. create a function and duplicate it in every application I wrote
  3. create a function, in a linkable framework (which is what I did)

FYI… this is the amount of code required (maybe less today, as this was written years ago)

  public func InStr(_ lookfor:String,_ checkcase:Bool=false) -> Int {
        var self_test:String=self
        var othr_test:String=lookfor
        if !checkcase {
            self_test=self_test.uppercased()
            othr_test=othr_test.uppercased()
        }
         
        let myRange: NSRange = (self_test as NSString).range(of: othr_test)
        var loc:Int=myRange.location
        if (loc<0) || (loc>self_test.count) {
            loc=0
        } else {
            loc+=1
        }
        return loc
    }

oh and as to the “years ago”… should I decide to update this code, I only have to do it one place on my entire system…

:rowing_man: so yeah, it floats quite well :slight_smile:

I mean, i’ve done stuff like wrappered functions before to suit my taste, which isn’t far from your InStr conceptually.
but, if swift has string.contains, and also contains string.uppercased or .lowercased, why not just have your InStr wrap string.lowercased.contains(lookfor.lowercased) (or the swift equivalent, I don’t use swift)?

It just seems like the InStr function could be maybe 3 lines of code instead?

not gonna argue… and like I said I wrote the many years ago, so yeah, it could be updated