Finder information, or similar detritus not allowed

Here’s a Build Script I use, after the build. to clear out the detritus before code-signing. I have never tested this with ARM builds.

  // build script to clean out detritus before signing 
    Sub DoShell(cmd as string)
      dim errCode as integer
      dim timeOut as integer = 30000 ' 30 seconds
      dim err as string =  doshellcommand (cmd,timeOut,errCode)
      if errCode <> 0 then
        print "Error " + str(errCode)  + endOfLine + err
      end if
    end Sub

    dim app as string
    app = CurrentBuildLocation +"/" + chr(34) + CurrentBuildAppName + ".app" + chr(34)

    // clean out detritus
    dim cmd as string
    cmd = "xattr -rc " + app
    DoShell cmd
1 Like

Sadly that is understandable as the error is saying the app cannot be code signed. And it needs to be code signed to be run… So at this point you have to use something like App Wrapper to process the application, in order to “Run” it.

In my earlier tests, I got the impression that it was code signing BEFORE the script was called. With an AW4 script installed, it then does the job, but the Xojo failure dialog still popped-up and required dismissal before the debug could be run.

Didn’t we find out during testing this was usually because of files copied in with a Copy Files step? If not that, I second the possible scripting error due to the apostrophe.

Thank you Mike.

It works to alleviate the issue, and now the run proceeds as expected :slight_smile:

1 Like

Is it really from the Xojo app and framework or from something you’re including in the resources folder or otherwise copying into the app? I’ve had to do that for things that were being copied in but haven’t had the trouble with app itself.

There is no information about which files are concerned. I do copy stuff in the Resources folder, but as far as I know, there are no files containing any resource fork.

At any rate, Mike’s script solved the issue.