0

I've been writing cross platform GTK# projects in MonoDevelop (2.8.8.4) for a month or so, and I thought I'd try my hand at something that looks and breathes a little more like a Mac application.

When I create a "Cocoa Application" in MonoDevelop I can select Leopard as the target to build for in the "Project Options | General | Main Settings | MonoObj Settings | Target Mac OS Version". A project made this way builds and I can run it on my Mac.

I do not have the option of selecting the target Mac OS version available to me when I create a "MonoMac" project, and when I attempt to build a project the target is always for mac OSX 10.6. That is no good for me since I only have Leopard. [Of course I could upgrade :( ] It seems to me I shouldn't have to do that.

I've tried looking at all the configuration files that I can think of *.sln, *.csproj. I've also tried adding the extra "references" in the "MonoMac" project that are used in the "Cocoa Application" type project. It seems to me that I should be able to set a compiler switch, if I knew what that switch was. (I sort of was hoping for a cleaner approach if that is possible. Maybe this is something that is fixed in a later version of MonoDevelop, but I think my version is the last that is supported by Mac Leopard).

Any thoughts, or comments are more that welcome. Feel free to just point me in the right direction. (URLs etc)

Cheers.

happy coder
  • 1,517
  • 1
  • 14
  • 29
  • By the way, the "Cocoa Application" project type sounds like you are using Monobjc, which is not the same as MonoMac. – Curtis Nov 22 '12 at 19:32
  • Yes, I was a bit suspicious also. That is why I put the different type of projects in quotations. The project types being what I chose when I created new "solutions" from the MonoDevelop menu system. I hadn't seen your answer, but I fooled around with what I had in my solution "references" and thought it odd that I didn't have "MonoMac", so I added it in, and now projects can build correctly when I edit the "Info.plist" to work for Mac Leopard (10.5). Thanks for your help! I learned another thing while I was at it because of your comment, that I could change the target OS in the ".xib" files. – happy coder Nov 23 '12 at 18:15

1 Answers1

2

Two places you'll need to change:

  1. Change your .xib's to have a deployment target of 10.5
  2. Change your Info.plist to have a LSMinimumSystemVersion of 10.5

You may need to delete the .app bundle in the output directory for these to be regenerated properly.

Curtis
  • 1,552
  • 15
  • 20
  • Thanks ... that got me going. I found though, that I only have to edit the "info.plist" file in my soulution to set the MinimumSystemVersion to 10.5, and when I build the solution all is taken care of. Although, I do wonder why I should have to edit the "info.plist" file in the first place, it would seem that it is generated by MonoMac upon creation of the file. Is there a setting somewhere in the bowels of MonoMac which specifies the build target? – happy coder Nov 23 '12 at 18:11
  • Setting it in the xib is useful so that Xcode doesn't allow you to do things that aren't compatible. Like auto layouts, etc. There is no specific setting in monomac as that is the only difference. In newer versions of monodevelop there is a setting in the project settings but all that does is control the value in the plist. (; – Curtis Nov 26 '12 at 16:42
  • Thanks for your help on this. By recent version of MD, I'm assuming the latest, 3.0 series. I think refers to that. Too bad, I guess I'll stick with MD 2.8.8.6. Or could I compile MD 3.0 to work on my Mac Leopard (10.5.8)? – happy coder Nov 26 '12 at 18:20