Build warning 2021r2.1

image

When building I get this warning, the app seems to build ok

Any idea about it?

Recent thread about this:

Yeah, there’s a file in there with some meta data (most likely meta data created by Apple) that Apple’s code sign doesn’t like.

If you use App Wrapper 4 , it will strip all of that meta data (and hidden files) when it code signs the application.

If you don’t want to use App Wrapper 4 for whatever reason, I also made a freeware application Permissions Reset 2 which you can drop the containing folder of your project and related files into, and then blast the permissions and meta data. *1

*1 Permissions Reset 2 doesn’t currently remove the new “com.apple.macl” meta data added by Big Sur as Apple have worked hard to prevent it from being removed.

I tried with the terminal
xattr -rc stall.app

on de cd of the build app, but get an error:
File “/usr/bin/xattr-2.7”, line 7, in
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

I’ve buid dozens times this app and that has begin with r2.1, no one is having a similar problem?

You must do xattr before codsign. And everybody already has that in the codesign/notarise process:

result = doShellCommand("xattr -rc " + appPath)

Please what/where is the “codesign/notarise process”?

1 Like

The 2021r2.1 IDE currently does an ad-hoc codesign after all of the build steps have been completed (assuming you haven’t signed it yourself in one of your post-build steps). It should also have removed the things that would have caused that error however.

@Enric_Herrera Could you verify what version of the IDE you are using?

image

Using 2021 r2.1
MacOS 10.14.6

I tried (if I understood well) what Beatrix suggested:
image

Script1:

Var result As String
Var appPath As String = App.ExecutableFile.NativePath

result = doShellCommand("xattr -rc " + appPath)

But get the error:

image

what do you mean ???

Just reported again

image

Your appPath is not correct:

dim appPath as string = currentBuildLocation + "/" + shellEncode(currentBuildAppName)
if right(appPath, 4) <> ".app" then appPath = appPath + ".app"

result = doShellCommand("/usr/bin/touch -acm " + appPath)
result = doShellCommand("xattr -rc " + appPath)
If result <> "" then print result

Function shellEncode( inValue as string ) as string
  Dim rvalue as string = replaceAll( inValue, " ", "\ " )
  rvalue = replaceAll( rvalue, "&", "\&" )
  rvalue = replaceAll( rvalue, "-", "\-" )
  rvalue = replaceAll( rvalue, "(", "\(" )
  rvalue = replaceAll( rvalue, ")", "\)" )
  return rvalue
End Function

Excuse me Beatrix, shoould I put the funtion on a specific place (I put in App)

So, the script looks like:

dim appPath as string = currentBuildLocation + "/" + shellEncode(currentBuildAppName)
if right(appPath, 4) <> ".app" then appPath = appPath + ".app"
var result as string = doShellCommand("/usr/bin/touch -acm " + appPath)
result = doShellCommand("xattr -rc " + appPath)
If result <> "" then print result

And the function

Public Function shellEncode(inValue as string) As String
  
  Dim rvalue as string = replaceAll( inValue, " ", "\ " )
  rvalue = replaceAll( rvalue, "&", "\&" )
  rvalue = replaceAll( rvalue, "-", "\-" )
  rvalue = replaceAll( rvalue, "(", "\(" )
  rvalue = replaceAll( rvalue, ")", "\)" )
  return rvalue
  
End Function

But get:
image

Should I define currentBuildLocation ?

Just copy the entire thing she posted (including the function definition) and paste into your build step.

That was the first thing I did but get:
image

Please just copy the code I posted AS IS into a build script. The “public” declaration isn’t needed.

I promise I did

But compiling error line 4

Should the “result” be defined ? I also tried adding var result as string but not working

If I have:
Architecture: Any, I get a compiler error

if Architecture: ARM, then the first one
image

Yes. The code needs to be syntactically correct, so make sure you declare result before it is used.

Its always funny when you spot your own code because of the way you write it… lol…