MonoTouch: approaching obsolete iOS methods

As iOS updates, signatures and methods of older versions are marked obsolete with MonoTouch.

My question is: if we accept the proposal for a new method offered by MonoTouch, will we negatively impact older versions of iOS?

I understand that new features, such as Facebook in iOS 6, are not available in 4.3, but this question concerns the migration of MonoTouch applications to higher versions of iOS while maintaining compatibility.

For instance:

IOS 4.3 device running MonoTouch 6: remove obsolete methods and replace them with new ones?

+4
source share
2 answers

There is no single, general answer, as it depends on why the method / type was deprecated.

Most [Obsolete] attributes have a message about why you should avoid them. They mainly fall into two groups:

  • The API had a binding error, for example. typo. A new API has been added to fix this (and its name should be part of the description). In this case, there is no problem for device 4.3 using the new API added in MonoTouch 6.x;

  • Apple introduced a new API and abandoned the use of an older version. In this case, the description should contain the new API and the version of iOS where it is applied. You should not use the new API (for example, everything added in iOS 6.0) if you want to target older devices (for example, 5.x).

If you find the [Obsolete] method / types without a text message or when the text is not clear enough for you to make a clear decision, file a error report , so it can be fixed.

+3
source

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 opportunity to download old sdks for use with xcode. You can also download command line tools and device debugging support.

This will allow you to go to the hardware menu / simulator version and select 4.3 or 5.0 or 5.1, etc.

+1
source

Source: https://habr.com/ru/post/1444640/


All Articles