Added preliminary iOS support, added checks for platform to hooks.