Problem manually Codesigning 64 bit apps

I managed to manually sign one 64 bit app about a month ago. However, now manual code signing fails with the error message

ERROR ITMS-90240: “Unsupported Architectures. Your executable contained the following disallowed architectures: ‘[i386 (in net.eircom.Xcalc.pkg/Payload/Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework)]’. New apps submitted to the Mac App Store must support 64-bit starting January 2018, and Mac app updates and existing apps must support 64-bit starting June 2018.” [h] [/h]

Any suggestions appreciated

Yes. Use App Wrapper where the tick of a checkbox will remove that code for you.

While that’s a nice feature, Xojo really should clean that for you. Any Feedbackrequest for that yet?

<https://xojo.com/issue/52546>

Thanks for all the replies. I know App Wrapper is a great app. But I like to do my own code signing. Is there anyone out there who still code signs their own apps?
Have you solved this problem?
If so any help greatly appreciated

There is literally no reason to not use App Wrapper other than cost. There is ZERO benefit to manually code signing, and you just walk yourself into headaches like this. It’s totally understandable to be in a position where App Wrapper can’t be justified for price, but other than that you aren’t doing yourself any favors by trying to do it all yourself.

How to use lipo to remove the 32 bit binary from the framework is part of the feedback case that Jason linked.

Edit: Here’s the relevant line from the feedback case for those without access to it.

lipo -remove i386 /*.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework -o /*.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework

AppWrapper seems very nice (I don’t use it myself) but if you use any kind of continuous integration and deployment, you want to be able to code-sign manually.

The lipo command above should be added to your build script prior to code-signing. Add more if you have more i386-based frameworks.

AppWrapper hooks into the IDE as a build step, you can build, sign, create a disk image or installer, and sign that, all in one step.

Very nice! So it all boils down to whether you are ready to pay for AppWrapper (as you noted), but I must say that paying is just one side of the coin. Some people like to keep the numbers of external dependencies low.

That being said, AppWrapper looks like it can take care of many potential headaches for you.

Thanks for the help, I tried the lipo command below but got the following fatal error message

Last login: Mon Jul 23 22:09:57 on ttys001
Mrs-MacBook-Pro:~ jmalthouse$ cd ./Desktop
Mrs-MacBook-Pro:Desktop jmalthouse$ cd ./XcalcBuild
Mrs-MacBook-Pro:XcalcBuild jmalthouse$ lipo -remove i386 /Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework -o /Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can’t open input file: /Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework (No such file or directory)
Mrs-MacBook-Pro:XcalcBuild jmalthouse$

Apologies but any help appreciated!

[quote=397543:@Jonathan Malthouse]Thanks for the help, I tried the lipo command below but got the following fatal error message

Last login: Mon Jul 23 22:09:57 on ttys001
Mrs-MacBook-Pro:~ jmalthouse$ cd ./Desktop
Mrs-MacBook-Pro:Desktop jmalthouse$ cd ./XcalcBuild
Mrs-MacBook-Pro:XcalcBuild jmalthouse$ lipo -remove i386 /Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework -o /Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can’t open input file: /Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework (No such file or directory)
Mrs-MacBook-Pro:XcalcBuild jmalthouse$

Apologies but any help appreciated![/quote]

It looks like it could not find the file. Since you are already in the folder, try this

lipo -remove i386 Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework -o Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework

The path to the file is incorrect. I doubt that it’s “/Xcalc.app”. Make sure to put the full path to your .app in the file (and use quotes or beware of spaces!)

Wow! I’ve been using AppWrapper for years and never knew about this - thank you!!!

Me, using AppWrapper to code sign, Adding Help Files created with Freeway Pro, and, in future, creating disk images as well.

Thanks everyone.
I have now uploaded my app to the MAS. As Edwin Lay pointed out as I have my app in the build folder his code below worked
lipo -remove i386 Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework -o Xcalc.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework

Thank you very much for this informative thread!

But XOJO should prepare its framework by itself!
This is my meaning and it’s completely independent of the price etc.