Frage

As iOS is upgraded the signatures and methods of older versions get marked as obsolete by MonoTouch.

My question is, if we take the suggestion for a new method that MonoTouch offers , will we be negatively affecting older iOS versions?

I understand that new features, such as Facebook in iOS 6 are not available in 4.3, but this question is more about migration for MonoTouch apps to higher versions of IOS while keeping compatibility.

For example:

An iOS 4.3 device running a MonoTouch 6 app : Will removing obsolete methods and replacing them with the new ones work still ?

War es hilfreich?

Lösung

There's no single, general, answer as it depend why the method/type was obsoleted.

Most [Obsolete] attributes have a message stating why you should avoid them. They mostly fall in two groups:

  • There was a binding error in the API, e.g. a typo. A new API was added to correct this (and its name should be part of the description). In this case there is no problem, for a 4.3 device, to use the new API added in MonoTouch 6.x;

  • Apple introduced a new API and deprecated the use of an older one. In this case the description should state the new API and the iOS version where it applies. You should not use the new API (e.g. anything added in iOS 6.0) if you wish to target older devices (e.g. 5.x).

If you find [Obsolete] method/types without any text message or when the text is not clear enough to allow you to make a clear decision please file a bug report so it can be corrected.

Andere Tipps

This may help in testing. Add old iPhone Simulators:

open xcode and in the top menu go to xcode >> preferences >> Downloads and you will be given the option to download old sdks to use with xcode. You can also download command line tools and Device Debugging Support.

This will let you go to the simulators Hardware/Version menu and choose 4.3 or 5.0 or 5.1 etc.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top