Change deprecated method calls to new ones. Guard iOS version dependant functionality behind availability checks.