import { Platform } from 'ionic-angular';

@Component({…})
export MyPage {
constructor(public plt: Platform) {
if (this.plt.is(‘ios’)) {
// This will only print when on iOS
console.log(‘I am an iOS device!’);
}
}
}

https://ionicframework.com/docs/api/platform/Platform/