Can't get Eto.Forms app to work on Mac

567 views
Skip to first unread message

goldstei...@gmail.com

unread,
Feb 2, 2016, 5:05:52 PM2/2/16
to Eto.Forms
Hello,

First, I don't actually have a Mac. I just send a test app to a friend who does, then he reports back on whether it works. This friend has OS X El Capitan 10.11.3 with the latest Mono already installed.

So, I create a new Eto project using the Visual Studio Eto template (settings: Combined Windows & Linux assemblies, separate Mac, PCL, Code Preview).
I build the new project as is. The app works locally on Windows. I go to my bin folder, zip the MyApp.Desktop.app folder, and send it to my friend.

He tries to run it and gets this error: The operation couldn't be completed. (OSStatus error -67062.)

Looking online, this seems to happen when you create the zip on Mac, as it includes an extra __MACOS folder that causes issues (https://github.com/picoe/Eto/wiki/Troubleshooting-&-Common-Problems). Weird, I didn't zip the folder on Mac but on Windows. and I can't see any __MACOS folder anywhere. I ask the guy to allow unsigned apps and try again (I saw someone mention that online). Same result.

Then I ask him to try running the exe with mono through command lines. This doesn't work either. This time he gets this error:
Unhandled Exception: System.InvalidOperationException: Could not detect platform. Are you missing a platform assembly?

Again, weird. The generated application code says "Platform.Detect" (from "new Application(Platform.Detect).Run(new MainForm());"), so I guess it's supposed to figure it out on its own. I made sure he had all the needed assemblies in the same folder as the exe (that is to say all the assemblies in the MonoBundle folder: MyApp.Desktop.exe, MyApp.Desktop.pdb, MyApp.dll, MyApp.pdb, Eto.dll, Eto.Mac.dll, Eto.xml, MonoMac.dll).

Can anyone help? Thanks.

curtis

unread,
Feb 3, 2016, 12:40:27 PM2/3/16
to Eto.Forms, goldstei...@gmail.com
Hi,

What utility are you using to zip up the .app bundle?  Perhaps it is adding information on executable status of the launcher..  

I have tested by zipping using windows explorer's right click > send to > compressed folder, which seems to work for me.

I wonder if it'd be useful if the nuget package also created the .zip file for you to eliminate these sort of problems.. hmm..

Hope this helps!
Curtis.

goldstei...@gmail.com

unread,
Feb 3, 2016, 5:32:43 PM2/3/16
to Eto.Forms, goldstei...@gmail.com
Hey,

Thanks for answering.
I zipped it with 7zip. I just tried doing it with the native Windows archiver, and he told me he gets the same error.


See anything wrong with these? Thanks.

curtis

unread,
Feb 4, 2016, 1:19:17 AM2/4/16
to Eto.Forms, goldstei...@gmail.com
No problem!

I think I've finally tracked down the issue.  It stems from the fact the app is flagged that it was downloaded from the internet *and* not code signed by a developer ID (which I would recommend, but it requires you to have access to a mac).  If the user turns off gatekeeper, it all works.  

However, with gatekeeper on you should be able to force opening of unsigned apps, but that doesn't seem to work in this case.  It appears this is due to the following two lines in the Info.plist file (which shouldn't have been there to begin with):

<key>CFBundleResourceSpecification</key>
<string>ResourceRules.plist</string>


If you remove those lines from the Mac\MyApp.app\Contents\Info.plist file in your project (and rebuild), it should work properly.

Hope this helps!   And let me know if that works for you and I'll fix this for the next update.

Cheers!
Curtis.

goldstei...@gmail.com

unread,
Feb 4, 2016, 6:25:49 PM2/4/16
to Eto.Forms, goldstei...@gmail.com
Alright, it worked. :)
Thank you very much, and keep up the good work.
Reply all
Reply to author
Forward
0 new messages