Ionic ios app development - ios

I am new to mobile development, working on my first app for both iOS and Android. I was under the impression that I can develop it through Ionic once (on my Linux system) and deploy it for both, but recently found out I need to develop on a Mac for iOS?
Like this guy said to someone equally unimpressed:
https://stackoverflow.com/a/38117802/8494414
Also stated here:
https://stackoverflow.com/a/40779188/8494414
My question is, at which stage do I need a Mac? Can I do all the development on my system and then just deploy with a Mac? Did I need to do something special from the get-go to support iOS? I am already rather deep in the process, but should I be considering a different framework?
I do find it strange that this knowledge doesn't seem very explicitly available.
Thank you for any help!

If you want to do a build for the iOS platform you will always need a macOS based operating system with xcode installed at some point. You can do all the coding on your linux machine as the hybrid part will be the same for all platforms. But if you want to test or deploy the iOS version of your app you will need either a mac or you will have to use some third party service where you can upload your sourcecode and you get a ready for install .ipa back. Ionic itself offers a service like that: see Ionic Package Service

As joshmorony said on his blog:
In order to compile an iOS application using Cordova, you need the iOS
SDK, which is only possible if you have a Mac and XCode. This is not
an issue for Android because the Android SDK can be installed on both
Windows and Mac. If you are not using a Mac, you simply can not create
iOS builds.
you can also use some virtual machines but they can be illegal and I don't recommend them

Related

Can you build a react-native iOS app using WINDOWS?

Can you build for iOS with react-native on Windows?
Or does it require xcode?
If so, any work arounds?
I dont want to work on a mac... or a mac vm.
I think the app you create with react-native will work with iOS but you might just have to develop it without an iOS SDK. (essentially, you can't really see the app in a virtual iOS device whilst developing).
However, i think if you develop the app for android using android studio SDK with react native, the app should also work with iOS as well. It's just that you won't really be able to see the app in development on a virtual iOS device.
Another option is to use expo when using react native. Essentially, it displays your app on your iphone so you can technically do app development whilst viewing the app on an iOS device, but I don't think its that great as you can only see it on your phone, whilst I prefer to use a virtual device on my laptop.
You can view documentation for expo in the react native docs here:
https://facebook.github.io/react-native/docs/getting-started
I'd recommend you to just develop the app for android using the android SDK from Android studio. This also works with expo or react native CLI. Although you may have to develop the app in a virtual android device, I think the app also works with an iOS device (it may just look a little bit different e.g. a button in android will look different to a button on iOS)
Here's a tutorial that really helped me with learning React-Native:
https://www.youtube.com/watch?v=NuZOwsmzcro
Just follow the steps and make sure you install an android SDK. Then once you get to around "9:25", instead of starting up an iOS emulator from an iOS SDK, start up the android one from android SDK, then hit the button "a" to choose android and you're all set!
The short answer is NO. iOS apps need to build on a Mac. However, if you have a cheap old Mac, or even a Mac cloud account, you can effectively do the equivalent while (almost) never touching the Mac. Of course, this assumes that it has been setup up once, and builds via Xcode or Xcode command line. Once that is done, you can automate it so that you're working and testing only on the PC.
For example, I once took over a React Native project where the previous developer did something similar. Because it was a generic interface, he coded on his PC, then tested via the Android emulator without ever testing for iOS. At that point you can simply push code to GitHub (manually, or with something like Fastlane or a user script). Separately, you have a script on that old Mac or online Mac-as-a-service that checks periodically and builds when the code changes. There were some times when the Mac needed special attention, but for the most part, it worked solely on one machine.
Namely, you can not run IOS Simulator on windows. But you can access a virtual IOS machine and run Simulator from windows virtually as a solution..

Is there any way to build IOS app on Windows?

I'm developing native apps but I have a Windows pc. Is there an actual way to build iOS apps on Windows? And can I run an ios emulator on Windows? I researched but I can't find an actual way.
I tried to install MacOS Sierra on Virtual Box but it consistently restarting.
Do I need both to build it?
NativeScript CLI & Sidekick support cloud build that would help you build your app from a Windows machine, basically the source code is uploaded to a remote machine and built there, then you could directly run the package on your local iOS device.
But unfortunately it is not possible to run the iOS Simulator on Windows at all, which is a limitation from Apple.
I haven't used it before, but apparently you can do so using Nativescript Sidekick.
Yes, flutter is the key to do it,
But I don't recommend it because its still in beta state and to implement it you need to learn a new language i.e dart which feels similar to Java at start but is actually very different also you won find any book or tutorials.
While their is 1 more solution
You can download McOs virtual machine but it would be very slow, recommended only if you have a powerful computer

Ionic - Build for IOS on Windows (for latest IOS and Ionic)

I successfully built my app for Android, but naturally things are not that simple for IOS for a windows user.
This question has been asked many times before in many places at different times in different versions, but I'm interested to see if there's any up-to-date info on the issue.
Here's an old topic with a variety of answers: https://forum.ionicframework.com/t/how-to-build-app-for-iphone-without-mac/19929/19
I'm using ionic 3 and I'd like to build for the latest IOS, My PC OS is Windows 10.
Does Ionic provide any way to make this process easier?
I understood that in the latest IOS an apple dev account is no longer a requirement for testing. How do I test without one? (perhaps it's possible only when using a MAC?)
How do I use PhoneGap Build with Ionic?
https://build.phonegap.com/apps
It requires apple app certificate and keys to build.
Am I supposed to manually create a config.xml? https://github.com/phonegap/phonegap-template-hello-world/blob/master/www/config.xml
I use windows to develop Ionic. In order to build for IOS I have installed VMWare on which I emulate MacOS X, installed xcode and all the tools necessary for building ionic. I have been able to test and deploy my apps to an ios device through usb with ionic/xcode. However I haven't push any apps to the app store yet. If you want to get started into this, take a look at this link.
After doing some research I found out that ionic has a cloud packaging service.
https://ionicframework.com/pro/package (previously https://docs.ionic.io/services/package/ [link dead])

Create IOS App with Cordova on Windows10

How to make an IOS App with cordova on Windows 10? I just looked here on the official site https://cordova.apache.org/docs/en/2.5.0/guide/getting-started/ios/. It says that you need an iMac! Do you realy need it? What for? Cant you just download XCode for Windows (or with emulator) and than use it to build Apps with Cordova?
FYI,
You can't install Xcode in windows. Xcode is designed and developed by Apple specifically for mac OS X.
It doesn't mean that you can't use Xcode on windows.
Check out below link, it should be a good starting point for you.
Xcode on Windows
Hope this helps, Cheers!!!!
those docs are really old. Here's a link to the latest.
You can create multi-platform Cordova apps under Windows, but you'll need some virtualization software (or a separate OS X box) in order to specifically add the ios and osx platforms and run them in an emulator. The same is true if you want to create the various windows platform flavors on a Macintosh -- or if you want to create the Windows / Mac platforms on a Linux box.
The Visual Studio site has some more information on setup.
You can also use the PhoneGap Build Service to create the UWP/Android/iOS apps for you, and install them / test them directly on the appropriate devices. You can use "hydration" to push changes to the devices as you go. But I'm thinking that in the long run you might want to invest in a Mac for building / testing iOS -- it's easier to debug.

Cordova development on Windows for iOS

I'm a longtime Windows desktop developer (25+ years) who has been doing native Blackberry 10 mobile development for 18 months. For my next app I have to hit as many mobile platforms as possible and have decided on Cordova (NOT PhoneGap) for the job.
I have successfully built and deployed a test app on Blackberry 10 and Android with the Cordova CLI. Now I need to get the workflow for iOS figured out before I start actually coding the real app so I can test on all platforms as I go along. I have OSX Mavericks running in a VMware VM from Windows 8.1 and have Xcode installed on OSX. I'm only slightly knowledgeable in OSX, but I know that I must use it to build for iOS. What I'm trying to figure out is how much duplication of effort I have to expend within OSX to build for iOS. I suspect the challenges would be the same if I was using a physical Mac to package and test for iOS so hopefully there are others out there who have figured out the cleanest way to do this.
Can I use Cordova on Windows to create the iOS project and source or do I have to create a duplicate project platform using Cordova on the Mac and keep duplicate source code there too? If I can do all that from Windows, do I just copy it over to Mavericks after every Cordova build and use Xcode to package and run it in an emulator? If anyone out there is running OSX in a VM for this like I am, is it possible to map a host path into OSX so I don't have to recreate the platform source at all after I build it from Windows? I'm assuming there is not way to automate the whole thing from Windows Cordova like there is for the Android and Blackberry platforms, am I wrong?
My desire is to do ALL coding in Windows and only use Maverick for the final bundling for iOS. After 25 years of pro development I'm not used to being a complete newbie and I'm not crazy about it. LOL
Learn Mac OS X. I know you feel out of sorts in this environment, but honestly -- it's not that difficult. In fact, I made the transition from Windows 7 rather than upgrading to Windows 8, and I was comfortable very quickly. (Far more comfortable than I am with a Windows 8 laptop others in my family use.)
Remember that Mac OS X is a Unix underneath (BSD). This means that if you are in any way familiar with Linux or Unix but are put off by working with the Mac GUI, you can almost always fall back to the terminal. (In my not-so-humble opinion, Mac OS X makes for a very nice *nix machine!)
Your VM should be able to share drives across the network, just like it would if it were a real machine (Apple supports SMB reasonably well). This way both environments could point to the same Cordova project without having to worry about copies. (You can copy the projects around, but it would be easier, in my opinion, just to share across the network. Less risk of accidentally doing something stupid.)
The only things that require a Mac are:
Creation of certificates / provisioning profiles (and there are ways around this on Windows, but it is not supported)
Submission to the app store
Remote debugging using Safari (You can use Weinre to come close, but it doesn't support breakpoints and such)
Local compilation of your code (and there are other toolchains available that do this on other OSes, but again, not supported by Cordova).
Running the app in a simulator
The above means that you can develop your app on Windows and only run to the VM for compilation / submission. With the advent of the Phonegap Developer app (http://app.phonegap.com), you can skip the (re)build step during development and testing as well (as long as you use only core plugins).
Note: I know you indicate you are using Cordova and NOT PhoneGap. What's nice is that, ATM, the Phonegap Developer App works just fine with Cordova projects (whereas PG Build often requires config.xml to be moved and plugins to be handled differently). It does require the PhoneGap CLI to be installed. As long as you are using core plugins, it definitely saves time by eliminating the rebuild steps.
The Cordova project can be created on any platform -- but I know there was a time when adding the iOS platform to your project (cordova platform add ios) would check that all pre-reqs were met, but I'm not sure if that is still the case. It can't hurt to try. But if it is required, use a network share and add the platform on the VM. Keep in mind that the platforms should be thought of as build artifacts -- your app code should live in the root www, which doesn't depend on the added platforms.
Do not rely on the iOS Simulator to tell you anything about how the app works or performs on a real device. The simulator has all the power of your desktop (processor speed, memory, etc.) and lacks many on-device features as well. I suspect the visual performance of the iOS Simulator will be horrid, since it will rely on the GPU as routed through the VM. (Frankly, it's not always great on a real Mac.) You really, really, really must have a real device to test on. (Again, the PhoneGap Developer App can ease the pain of repeat deployments for testing.)

Resources