apply osx, ios compile

Signed-off-by: storypalse <storypalse@gmail.com>