MonoTouch 4: The type or namespace name 'Outlet' could not be found - xcode

I have purchased MonoTouch last October from Novell. Now that I updated to MonoDevelop 2.8.5, and XCode 4.2, my projects won't build because the designer files complain:
The type or namespace name 'Outlet' could not be found
I have Monotouch 4.0.3, and just read in the Transitioning to XCode 4 article that Monotouch 4.0.4.1 or greater is required for XCode 4 support. When I try to update Monotouch, I can only find a MonoTouch 5 dmg, but it complains my current license does not allow me to upgrade to MonoTouch 5 (a natural thing because it now belongs to Xamarin)
So you could help me out with either of the two:
Tell me how I can download MonoTouch 4.0.4.1 or greater (but less than 5 due to licensing - I do not want to buy a new license)
How I can fix the problem of namespace during build
Any directions are greatly appreciated

Tell me how I can download MonoTouch 4.0.4.1 or greater
Please contact support#xamarin.com
They will be able to validate your license and allow you to download all/any versions you are entitled for.
How I can fix the problem of namespace during build
I don't think you can, without updating to 4.0.4.1, if you used Xcode's interface builder to develop your user interfaces.

MonoDevelop 2.8 is meant to be used with MonoTouch 5 (and Xcode 4.2), while MonoDevelop 2.6 is for MonoTouch 4.
This is an unfortunate artifact of the changes required in MonoDevelop to properly support iOS 5 (they were substantial, and the extra work required to be backwards compatible with older versions of MonoTouch was deemed to be too big).

Related

Is migration required from swift 2 to swift 2.1?

Xcode 7.1 is now available on app store but before I update xcode I need to be sure that my existing project won't breakdown because of the update. So would updating from xcode 7 to 7.1 run the migration assistant for swift 2 and breakdown my project?
It appears that there weren't any breaking syntax changes. Mostly just quality of life updates for the language (being able to put string literals in string interpolation statements, function covariance/contravariance, etc).

How do I open project version 1.0 with xcode 4.2?

I downloaded this Xcode project(version 1.0 as in contents.xcworkspacedata) from here
When I try to open it, got this error:
Failed to load project at '.../Lesson31_OSXCocoa/Lesson31_OSXCocoa.pbproj', incompatible project version.
How do I open project version 1.0 with xcode 4.2?
You're better off trying to find a newer tutorial, or just studying the code as-is, without expecting to build and run it.
Judging by the modification dates, this code is almost ten years old. Even if you can get a modern version of XCode to open it, there's no reason to think that the headers, libraries, etc., that it needs to compile and run will still be compatible. Moreover, ten years is a long time in software terms. While some of the content might still be applicable, it certainly won't be anywhere near the cutting edge (which itself won't be new by the time you've mastered it).
All that said, if you're really intent on working with that project file in XCode 4.2, the best way is probably to convert it the same way a continuously developed project would have: XCode by XCode.
You can download older versions of XCode from Apple here (requires free Apple developer account).
Some older version will be able to import that file and update it to a newer format.
Assuming you don't stop at that point and use that version of XCode, you can repeat the process with the updated project file and ever-newer versions of XCode until you've arrived at version 4.2.
Relatively easy to make a new project and add the appropriate files to it. Took less than 10 minutes (had to update the code in a few places). Note that I didn't spend much time cleaning up this old code - quite a few deprecated warnings. But it runs and works. I have Xcode 4.3.2 installed but hopefully you'll be able to open it with 4.2. Here's a link to it: Lesson31.zip
Note that the process for doing this (so you can do it for any others), is to create a new Mac OS X Cocoa Application project, add the files (except main.m) from the old project to the new project, and then add necessary libraries to fix link errors (OpenGL Framework). If there's a nib then you can open that in Xcode and copy the window with view and controller out of that project and paste them into the .xib file created with the new project. Then fix compiler warnings/errors as necessary (add a few (char*) coerces, remove reference to std::ios::nocreate which doesn't seem to be available, etc).

Xcode Base SDK: What is the easiest way to install multiple SDK versions side by side

Alright what I noticed is that when I am developing against iOS 4.3, and I set my deployment target as iOS 4.1, I DO NOT get any kind of warning from the IDE about calls which are not supported in the minimum deployment target.
For example, calling [CLLocationManager authorizationStatus] shows no warning, despite the fact that the documentation for authorizationStatus says it was implemented in iOS 4.2.
I expect this would be a problem when wouldn't it?
From what I understand the solution to this is to download multiple SDK versions, temporarily build against the SDK for your minimum version, but switch to the current SDK version in order to ship.
If there is a better way to do this please advise. How can I get more options in Xcode under the "Base SDK" setting?
I expect this would be a problem when wouldn't it?
Yes, you'll generally crash if you call a method that doesn't exist.
From what I understand the solution to this is to download multiple
SDK versions, temporarily build against the SDK for your minimum
version, but switch to the current SDK version in order to ship.
That's a pretty good approach; probably the best way to find this kind of error semi-automatically.
If there is a better way to do this please advise. How can I get more
options in Xcode under the "Base SDK" setting?
You don't install all the SDK's together in a single "Developer" folder. Install each one separately -- there's an option to choose an alternate location when you install the SDK. Then it's just a matter of finding the copy of Xcode in the right folder and launching.
You don't need to have multiple options under Base SDK -- the normal practice is to just use the latest, but set the Deployment Target to the minimum version of iOS that your app supports.

Will my Xcode 4 project work in Xcode 3?

Further to this question:
Make UML with the code in xcode4
I wrote some code with Xcode 4. The UML modelling feature in Xcode 3 was removed in Xcode 4.
I would still like to use the UML modelling feature in Xcode 3, will my project written with Xcode 4 work in Xcode 3,
I don't know about your diagrams, but your Xcode 4 project will (mostly) work with Xcode 3. (At least, it ought to work well enough to generate diagrams based on the classes.)
If you’d like to continue using Xcode 4 for development and you have access to another computer or a VMWare image, you could install a copy of Xcode 3 on it and use it to generate diagrams only.
Alternatively, you get a commercial product like Visual Paradigm to reverse engineer your Objective-C source code or start using Xcode 3 again for development (if possible).

Installing iOS SDK 4.1 on xcode 3.2.5

I've read through a lot of posts and couldn't really figure out the answer to this question. So I apologize if I duplicating it here.
I have installed xcode 3.2.5 to my machine and it comes with SDK 4.2. My iPhone is on 4.1 and I am not planning to move it to 4.2 just yet. Problem is that I can't use this phone for testing. Since the only SDK that I have installed is 4.2, when I try to run debug with my iPhone, I get this message:
Can't install application
The info.plist for application at /blabla/app.app specifies a minimum OS of 4.2, which is too high to be installed on this device.
So, I got to Targets -> Get Info and I see that it is indeed targeting 4.2 (but that is the only option available - since I don't have the other SDK's installed).
So, the question is: how to I keep xcode 3.2.5, but install SDK 4.1 in addition to 4.2?
It took a while to figure this out.
I couldn't see 'iOS Deployment Target' on the info.plist either. Here's what I did.
a) Project -> Edit Project Settings
b) go to 'deployment' section
c) Change
'Targeted Device Family' = iPhone/iPad
'iOS Deployment Target = 'iOS 4.1'
Open up your info.plist in your project. There is a place where you can define for iOS 4.1.
Just open the previous SDK dmg, then go to Packages, and install the SDK 4.1 package.
More info : Install sdk 2.0 to 3.1 for xcode 3.2
Note : the "Packages" directory is not visible in the dmg since xcode_3.2.5_and_ios_sdk_4.2_final. Just use the Terminal (or finder "Go to folder") to open "/Volumes/Xcode and iOS SDK/Packages".
Edit : the xcode4.1 for Snow Leopard create an app called "Install Xcode.app". The packages directory is inside the app package.
The best way to do this is to find a copy of Xcode 3.2.4, with iOS 4.1, and install it in a separate directory. When you install, take the dropdown that's set to Developer and switch it to DevOld, or something similar. As there's no way to install new SDKs in the new version of Xcode, keeping multiple versions is the best you can do.
If you simply want to be able to run your app in 4.1, not necessarily develop in it, go into your target's settings, and under the build tab, set the iOS Deployment Target key to 4.1 or below.
Good luck!
What you need to do is:
In the BUILD section of the Project info click on Show and change its value from Setting defined at this level to All Settings.
In the updated list of settings you will surely locate the desired one.
Good Luck!

Resources