Started splitting shared and iOS-specific code.