Your OS and version? Any samples causes this? Do you use plugins? Do you use build scripts? Ken’s problem was in his scripts as he said here: XOJO 2022R1 and R11 - "Error creating Universal App: #2-" - #36 by Ken_Winograd
Latest Sequoia and of course a lot of plugins, most MBS … interesting is that it is compiling either ARM or X86 fine. Here my Build script:
Var result As String
result = ShowDialog("Edition Selector", _
"Which Edition is to be built?", _
"CORE", "LITE", "PLUS", 3)
if result="LITE" then
ConstantValue("PhaenoMind.Edition_LITE") = "True"
ConstantValue("PhaenoMind.Edition_PLUS") = "False"
ConstantValue("PhaenoMind.Edition_CORE") = "False"
ConstantValue("PhaenoMind.Edition_PANGO") = "False"
PropertyValue("PhaenoMind.MacOSXAppName") = "PhaenoMind LITE"
PropertyValue("PhaenoMind.Application Identifier") = "eu.phaenomind.2lite"
end if
if result="PLUS" then
ConstantValue("PhaenoMind.Edition_LITE") = "False"
ConstantValue("PhaenoMind.Edition_PLUS") = "True"
ConstantValue("PhaenoMind.Edition_CORE") = "False"
ConstantValue("PhaenoMind.Edition_PANGO") = "False"
PropertyValue("PhaenoMind.MacOSXAppName") = "PhaenoMind PLUS"
PropertyValue("PhaenoMind.Application Identifier") = "eu.phaenomind.plus"
end if
if result="CORE" then
ConstantValue("PhaenoMind.Edition_LITE") = "False"
ConstantValue("PhaenoMind.Edition_PLUS") = "False"
ConstantValue("PhaenoMind.Edition_CORE") = "True"
ConstantValue("PhaenoMind.Edition_PANGO") = "True"
PropertyValue("PhaenoMind.MacOSXAppName") = "PhaenoMind CORE"
PropertyValue("PhaenoMind.Application Identifier") = "eu.phaenomind.core"
end if
In Build Settings → macOS (navigator, left) is “Mac App Name” (Inspector, right pane) by any chance “myapp.app”? If so, change it to “myapp” and try again.
Oh. I see you trying to change it in the script. Is it working? I was expecting to see App.MacOSXAppName
Yes, it is working fine. It is not working with App.MacOSXAppName, but with PheanoMind.MacOSXAppName. And the name is changed in the pane then together with the identifier. Nice feature.
Out of options now. Except you loading a standard Xojo sample from the examples and trying to compile it as is changing it to universal so we conclude the isolation of the problem to your project or to a wider scope affecting any Xojo app.
I’m going to make a suggestion. Instead of changing the MAC name and identifier directly, try making those constants as well.
It’s possible that the modifications I made to the build system in 2022r1 before I left don’t play well with the app name being changed in a build script.
One workaround would be to change the name of the bundle after it’s built and signed (and notarized if you do that in the IDE)
Detect this condition, if confirmed open an issue ticket asking it to be allowed at a pre-compile step setting the environment for a build up.
I’ve always had the impression that changing the name of a built app during a build script was a bad idea. I don’t have a source for this, just that in the back of my mind that’s a red flag bad idea.
Didn’t it once cause issues with stitching the macOS universal builds together?
I’m not sure how much it helps, but my gut feeling is on the build script as well.
Agree with “during”, it would be unpredictable. But allowing it at a prep step, before a compile/build step, it should be ok. Seeing Michael script I do understand his desire and can see the usefulness for some users having several flavors of one app from the same code base.
You cherry picked the words and missed the idea. I meant at any point during Build Automation, not just a specific step.
Not cherry picked, I tried to get the core of your argument. Sorry if failed. But your argument came after my specific
So I kept the context.
Rick, Tim,
thanks a lot for your thoughts. What I am going to do is compile each of my three editions by selecting them with that dialog box. This means changing the App name, the identifier and also changing the constants controlling the code flow. So at the end tree versions can be created out of one Xojo code. Poor enough that the dialogs are limited to that.
So I surely can create each version separate. this is 6 times complie, delever etc. instead of 3, doubling the time.
Finally the question: Is this a bug or is it my fault - or is there any workaround?
It’s a bug. That and few other properties silently fails to change.
Fast PoC:
You need to file a request as I said before
Be sure to use the “App.” prefix in front of any of these properties.
Good catch. It worked in the test of the concept. But it should not fail silently.
So it could be possible to chain several changes and building commands using an IDE script and Running it.
Using app.* does not work at all here …
I made my test under Windows.
As you know, for macOS the IDE test script should be changed to something like:
PropertyValue("App.MacOSXAppName") = "macOSARMTest1"
Call BuildApp(24, True)
PropertyValue("App.MacOSXAppName") = "macOSUniversalTest2"
Call BuildApp(9, True)
Also, the IDE script is not a step script. It’s a build automation script before it. The step scripts start on each call to each proper BuildApp()
If this does not work, an issue must be reported. https://xojo.com/issues
Is this supposed to work? I always thought that the build name is set before compiling. Which is the reason for IDE Communicator scripts.
But it was changed BEFORE Building/compiling.
Edit:
Ok, I was forced to get my Mac. It worked.
Got the last version of 2025R1.1 now - the problem does not show up any more. Not sure what was the root cause but so what …