[MonoTouch] Can MonoTouch give compiler warnings when using API that requires a higher iOS version then Im targetting?

HairyJohn mail at johnhair.com
Mon Mar 5 10:42:06 UTC 2012


Hi guys,
Is there a way to get compiler warnings or errors when using API from a
later version of iOS than I am targetting?
Im targetting iOS 4 but occasionally find Im using (and want to use) iOS 5
features. I want this to break my build, but allow me to abstract away
(maybe with extension methods) so I can handle the lower functional ability
of iOS 4 whilest still using the iOS 5 API.

Example: Lets say Im using class1 that has a number of properties.
class1.GetMeANumber() is marked as iOS 5 and above, but Im targeting iOS 4.
If I use class1.GetMeANumber() I want my build to break, *except* where I
specifically say its ok. That would mean Im totally aware of any API's Im
not using, and can offer appropriately reduced functionality where required.

Thanks
Hairy

--
View this message in context: http://monotouch.2284126.n4.nabble.com/Can-MonoTouch-give-compiler-warnings-when-using-API-that-requires-a-higher-iOS-version-then-Im-targe-tp4445734p4445734.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list