Updating loader script to handle iOS devices