Build error: Couldn't open unitypurchasing error, no suitable image found
Hello. I'm having a lot of trouble trying to build for OSX. I'll list the steps that i'm following:
1 - Create a OSX build in Unity.
2 - Inside the package contents of the builded file overwrite the Info.plist file with the edited one (correct bundle version and short bundle version).
3 - Look for any .meta files, .svn folders and the Info.plist in the bundles (pacage contents) inside Plugins folder and delete them.
4 - On the terminal i use the following commands:
codesign -f -v -s "3rd Party Mac Developer Application: [APP NAME] Inc" [APP NAME].app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib
codesign -f -v -s "3rd Party Mac Developer Application: [APP NAME] Inc" [APP NAME].app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
codesign -f -v -s "3rd Party Mac Developer Application: [APP NAME] Inc" [APP NAME].app/Contents/Plugins/TrackpadTouchOSX.bundle
codesign -f -v -s "3rd Party Mac Developer Application: [APP NAME] Inc" [APP NAME].app/Contents/Plugins/unitypurchasing.bundle
codesign -f -v -s "3rd Party Mac Developer Application: [APP NAME] Inc" --entitlements "Dummy.entitlements" [APP NAME].app
productbuild --component [APP NAME].app /Applications --sign "3rd Party Mac Developer Installer: [APP NAME] Inc" [APP NAME].pkg
But i'm having some problems with the
codesign -f -v -s "3rd Party Mac Developer Application: [APP NAME] Inc" --entitlements "Dummy.entitlements" [APP NAME].app
because it returns "code object is not signed at all".
Then i find out i can use this:
codesign -f -v -s "3rd Party Mac Developer Application: [APP NAME] Inc" --entitlements "Dummy.entitlements" [APP NAME].app --deep
I added the "--deep" on the final of this command. And it worked, our project is signed. And i can use the productbuild command.
5 - I install the pkg file generated from the productbuild command and this is the error's I get at the start of my app.
Couldn't open /Applications/[APP NAME].app/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing, error: dlopen(/Applications/[APP NAME].app/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing,2): no suitable image found.