Build for iOS on Windows machine

Hi,

I’m new to Ionic.

Is it possible to build for iOS from a Windows machine?
I have a Mac on my desk right next to me. Is it possible to connect to it and debug directly on the iphone like i can do on Android?

I am working with Ionic 7.2.0 and Visual Studio Code on Windows.

Greetings

No, Apple/iOS is a closed system and you can only develop iOS apps on a Mac. Thanks Apple…sigh…

I don’t own any Apple products so we use MacInCloud.com to do our iOS testing (in the emulator) and builds for the App Store. I do all my Ionic development locally (on Linux) and test Android locally. When I am ready to release a new version of the app, I log into the Mac, do a git pull/fetch, run ionic cap build ios and test in the iOS emulator, and then create the build and push it to the App Store.

If there are any iOS files changed due to the build (like the podfile) or any small fixes made, I’ll git push from the Mac.

You could follow a similar workflow. Lucky for you, you have a Mac next to you that will make it easier. You could maybe remote into it from your Windows PC to make it even easier?

1 Like

Doesn’t it work with a VM? I don’t need live-updade … only for compile in the end.

I’m far not ready yet and didn’t try it yet …

Using macOS images in non Apple hardware is agains the macOS TOS, so might or might not work, but it’s not allowed to do so.

1 Like

I’m using ubuntu at home in homeoffce.

When i’m trying to build my app in vscode, im always getting the error
“[error] /bin/sh: 1: pod: not found”

is pod something ios specific? I’m not using ios at home, only in office.

Running for Web is working…

Yes, pod is CocoaPods, iOS specific.
I’ve heard of people running CocoaPods on linux, should be possible since it’s a ruby package and that would make npx cap sync work on linux, but the actual ipa build would still fail.

So is there a way to to get rid of the error message

[error] /bin/sh: 1: pod: not found

I get it with almost everything I do in vscode on linux in my project.

I also can’t update packages i’m using with the ionic extension for vscode.
I always have to do it on the terminal with “–legacy-peer-deps”
is there a way to fix that too?

I am on Linux too and just ignore this error in VS Code :sweat_smile:

Are you using a framework with Ionic (Vue, React, Angular)? Have you just tried running npm update to update the packages?

I’m using Angular.

npm update also only works with --legacy-peer-deps

Is it ok, that not all packages are updated? e.g. angular-core is still 17.0.9
I tried to update it directly to 17.1.0, but after that my app no longer started :slight_smile: