Monotouch and XCode 4, where did the outlets go? - c#

Today I updated my mac with the latest version of MonoDevelop, MonoTouch and the Mono-Framework. I also downloaded the latest version of XCode, version 4 (a nifty 4.5 gig download).
At first I did not notice it because I was busy copying code into my project for re-use. But when the time came to actually add some controls, actions and outlets to the MainWindow file - I realized that something was missing.
Hopefully I have over-looked something, because I cannot find functions for adding outlets and actions any more? After googling the problem I realized that the new XCode now does these things by code -- but not in C#, it's exclusively an Objective C thing.
How exactly do I solve this problem? I am currently downloading XCode 3.2.6 but surely there has to be a better option? (I dont even know if this will install over the 4.x version) How exactly do I define actions and outlets by code? Are there any tutorials on this to curve the extra time it will take?
Any help is welcome
Update: A tip for those who need to remove XCode and start from scratch. Open a terminal window and type:
"sudo /Developer/Library/uninstall-devtools --mode=all"
This will remove your current XCode installation (all of it). Remember to re-boot your Mac afterwards. You can then install an older version of XCode.

From Miguel's MT 4.0 Announcement
We are currently hard at work to add
support to MonoDevelop to work with
the new XCode 4.
With XCode 4, Apple removed Interface
Builder as a standalone tool. We
should have a beta in a couple of
weeks of the solution we came up with.

you can install them side by side by doing so(I believe you have Xcode 4 installed):
Run the Xcode 3 installer
When you can choose the install location change it to the folder of your choice but not to developer
Complete the installation and open Xcode 3
done

use mono for mac os.
then convert your application on monomac solution and build and run application, after build u get .app file,
for this you need C# plugin on mono.
or cocoa sharp plugin.

Related

Xamarin.Android: Can not debug

I have a problem with Visual Studio Community 2015 and Xamarin.
When I want to debug my Program the virtual device start but the App does not open.
This is the Log:
1>"aapt.exe" exited with code -1073741819.
1>The file "obj\Debug\android\bin\packaged_resources" does not exist.
I don´t know how to fix this problem, I hope you can help me.
Complete Log: Here
This is a known issue currently, where a too new version of Android SDK Build-tools. This error will occur when version 24.x is used, due to Xamarin being compatible with 23.x
We have a technical bulletin available on our release blog, which describes the issue and the solution:
Recommended fix: Uninstall Android SDK Build-tools version 24 using
the Android SDK Manager.
Another separate issue is that version 24 of the Android SDK
Build-tools package requires Java JDK 1.8 or higher. This can cause at
least 1 error:
“java.lang.UnsupportedClassVersionError: com/android/dx/command/Main :
Unsupported major.minor version 52.0”
Source: https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/
Thanks!
Here are a few solutions that worked for some users, as this error might have multiple causes :
Check your AndroidManifest.xml file for any typo. File names must not contain characters like -. This is also the case for any code file. Oh, and by the way, don't use keywords as file names. For example, a file named New.cs might break your app.
Check that the Android SDK you're targeting is installed on your computer. Click Tools->Android->Package manager and install or update the SDK you're targeting. Also, install tools, build tools and platform tools. You might want Android Support Library and Google Play Services too.
According to the logs you put on pastebin, it seems like the last thing done before the build fail is to check for Android SDK Build tools rev 24. There is high chances you lack those files, or that some are corrupted. I'd delete and reinstall everything.

System.Speech in Mono on Linux

I'm working on a project in Linux (KUbuntu) using Mono and Monodevelop. I want to use the System.Speech library, which is completely possible with Monodevelop in Unity on Windows 7. I've been doing a lot of looking online over the past few hours and as far as I can tell System.Speech WAS added to Mono.
I've updated all of mono, mono --version is showing 4.0.2 (latest version), and Monodevelop version is showing 5.9.4 (as far as I can tell that also is the most updated version). This is making me think that I have all of the latest updates for all the development software.
I've rebooted, created new projects, manually built monodevelop from git, everything I can think of. That all being done, I right click on References=>Edit References=>System.Speech, and nothing is showing up. Again I double checked by trying it on Unity on my windows machine, and it's definitely there.
Does anyone have any idea what's going on? I'm not really sure what other details to give for something like this but I'm clearly missing something. I'm more than happy to post any other information you would need, and I thank you infinitely for any help!
System.Speech is a part of MSFT's .Net and is dependent on native audio drivers, the TLS engine, etc... and is only available on Windows.
I believe there was some work done in Mono with the Speech namespace 4/5 years ago, but there is nothing in this namespace in the current releases.
You would need to look at third party speech libs on Linux and write some C# wrappers for them if they are not currently available.

Can I use xcode to program in c#?

I develop almost entirely in c#, but own a mac computer. I have windows running in parallels desktop to work with Visual Studio. I wanted to develop in c# for mac os and downloaded monodevelop, which is great except for its GUI designer I completely hate it and don't know how people can even use it. I mean, after how easy it was to create GUI applications with the Visual Studio designer I feel so weird to work with it.
I investigated about it and found out that apple's interface builder could solve that problem for me. However, the only way to get it now apparently is downloading xcode, since apple doesn't distribute it as a stand-alone app now. (That's what I think)
I knew that Xcode doesn't support c#, but I read about some plugins with which you can add those functionalities.
Can you tell me if its possible to add this compatibility to xcode? Or if you know alternatives to monodevelop that have a GUI designer that is more similar to VS.
As of version 2.8, MonoDevelop support using XCode with both MonoTouch (for iOS) and MonoMac. Here is the link to the release documentation.
Yes, you have to download XCode and, if I recall correctly, there may be a nominal charge for it, but the minimal cost (if any) will be worth the improved productivity.
Having said that, using XCode's interface builder takes a LOT of getting used to for someone coming from the VS world.

Run XNA 4.0 game on other machines

I checked here: How do I get an XNA 4.0 game to run on other machines?, but there's no real solution in it.
I created a completely empty XNA4.0 project, selected Release and compiled it, rar'd up the Release folder and sent it to a non-development PC. Got an Appcrash generic error.
Its probably something standard I'm doing wrong, but no idea what..
Can confirm that both .NET4.0, XNA Redist 4.0 and DirectX are installed on the other machine.
UPDATE: The empty 'new game' loads now, but I have made a program or six over the last years, each of which doesn't run on the other machine. Could someone perhaps link me to 'proper' referencing, assemblies, and such? Google dropped those words more than once in combination with my problem.
UPDATE: I asked a friend to test on his PC, at first, same error, but he forgot to install the XNA 4.0 redist. After that, my files were running fine on his pc. Still, they're not working on my own non-development machine, for some reason. Anyway, thanks for the suggestions, now that I know its local I can probably fix it myself. Suggestions are still welcome.
The end-user needs to have .NET 4.0, the XNA 4.0 Redistributable (not the full game studio), and DirectX installed.
Is there the Dot-Net 4.0 and XNA 4.0 framework installed?
Choose to publish the project and you will get an installer that check and install required libraries for you...

Compiling moonlight application on Mac OS X

I'm using MonoDevelop 2.8.5 and I'm trying to compile a moonlight application, but it fails. I created a brand new Moonlight Application Project and tried to compile it, but it fails with the following error.
Error: Framework 'Moonlight / Silverlight 4.0' not installed. (MoonlightTest)
In this question from October 2011 one of the developers of MonoDevelop states that is not possible to do this without some major hassle.
Is this still true with the new version(s) of MonoDevelop out?
If so, how can I compile Moonlight Application Projects in MonoDevelop if I'm willing to go through some hassle?
This is a bit of "psychic debugging" but I've run into it a lot in linux and imagine you might have the same problem happening on OS X. Is the compiler that Monodevelop is looking for exactly the same as the version you installed? It might be something as simple as the folder being called Moonlight1.3 vs Moonlight1.3.1. Look at the build output and see what version it is looking for then look in your applications folder (via terminal the app folder in the finder might hide the info) and check that they are the same.

Categories