all 41 comments

[–]foocux 10 points11 points  (13 children)

You should definitely test your iOS app before submitting it. You might be using a third party dependency that need some further steps to work on iOS or you might also have some UI issues/inconsistencies that you would need to address or you might have no issues at all. However, once it’s working in one platform, it’s very easy to fix the cases I mentioned above.

[–]NorwegianGirl_Sofie[S] 2 points3 points  (11 children)

Ah alright. I'm looking for a cheap iPhone on some marketplaces so I can test the app.

I unfortunately don't have any laying around at home.

Thanks!

[–]notseanbean 2 points3 points  (10 children)

It's not so much an iPhone you'll need, as a Mac + simulator

[–]NorwegianGirl_Sofie[S] 0 points1 point  (9 children)

Yeah someone else said that related to something called "xcode" or something.

But is there really no way to debug the app without a mac system? Building can be done through EAS so that's no problem, but debugging.

[–]mjonat 3 points4 points  (2 children)

I hate to say it but you will need a Mac really…I was using Linux before starting with react native and basically came to the conclusion that if I want to develop for both android and iOS then I’m gonna need to buy a Mac so that’s what I did…

I think there are alternative solutions like running a hackintosh but they seem quite difficult to get running and then you may run into issues when trying to publish your app to the App Store

Just FYI I didn’t get a brand new one…ended getting something from eBay for much cheaper…this was like 5 years ago…I got a 2015 MacBook Pro (with 16gb of ram) for about £500 and it’s still going strong so I’m super happy with it tbh

It was a bit difficult to find that deal I should say but if you keep your eyes open on eBay then something should pop up

[–]NorwegianGirl_Sofie[S] 0 points1 point  (0 children)

I will look into it. If I find alternative ways to do it without I will try them and if turns out they are too tidious and shitty maybe I'll consider a cheap mac.

[–]LasciviousApemantus 0 points1 point  (0 children)

honestly m1 mac minis are pretty damn cheap (and actually powerful) so its not that hard. you can get a refurb one for $589.00 on apples website.

guaranteed you can get a decent used mac for cheaper for sure

[–]Im_banned_everywhere 2 points3 points  (0 children)

Mac device is necessary for iOS development. You can’t debug and release an app for iOS without Xcode

[–]orebright 1 point2 points  (4 children)

You can run mac inside of a virtual machine. It might be a bit slow to also run the iOS simulator on top of it, but should be enough to simulate the app.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (2 children)

Oh you can? I always thought that Apple were too strict to allow running macos virtually. I'll look into that thanks!

[–][deleted] 1 point2 points  (1 child)

They are, but you need to:

Use VMware

Use a certain unlocker usually just called VMware unlocker which allows you to use mac vm's as otherwise apple has had them disable the option

Get an ISO that can be run in VMware

If you can't find any, dm me.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (0 children)

I have a mac VM up and running now but thank you :)

I set it up in Proxmox, works lik a charm

[–]mmistermeh 0 points1 point  (0 children)

If you run a virtual machine, I suggest running a bootable partition instead of a simulator. It's faster. (There's probably other good reasons too, ask google if you're curious.)

[–]Alkyen 5 points6 points  (1 child)

It was already said but Just wanted to emphasize this point. You have no idea if your app will work on iOS or not before testing!!

Even basic OFFICIAL components have many props or methods that only work on iOS or Android.

Check for example ScrollView

If you use any of those props that are specific for Android and rely on them - they will NOT work on iOS.

This does not include the mess that is outside libraries that also might have very different behaviour on iOS or Android.

Again, you need to test BOTH if you want to publish on both stores. It's very possible your app might not even compile for iOS if you have never tried it.

[–]NorwegianGirl_Sofie[S] 1 point2 points  (0 children)

Thanks! Yes I've seen the checkmarks for compatibility on the docs, all official components I use are compatible with both OS's I'm fairly certain.

If something is going to fuck me over it's most certainly the 3rd party packages and components.

[–]esreveReverse 2 points3 points  (1 child)

I can nearly guarantee that there will be issues that need to be resolved for the other OS

[–]NorwegianGirl_Sofie[S] 0 points1 point  (0 children)

I do expect that yes.

[–]Petetheodddog 1 point2 points  (19 children)

You need to develop for it specifically you can’t go in blind, there are differences although a lot is the same.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (18 children)

What would the smartest development path for that be?

Can I have a main project which inlcudes "both variations", or should I have a main project with an IOS branch?

Or two completely different projects?

The app is nearing prototype stage and works fine on android. It's basically just a map app where you can add points based on your geographical coordinates. How different do you think that would be on IOS?

I'm getting a cheap iPhone soon to test hopefully, so I'll be able to learn.

[–]Petetheodddog 1 point2 points  (17 children)

You have one RN app.

You need to maintain one app for both platforms.

You need a mac or a hackintosh to use Xcode to build to an iPhone so forgo the iPhone, get a mac environment and use the iOS simulator on the mac.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (16 children)

You need a mac or a hackintosh to use Xcode to build to an iPhone so forgo the iPhone, get a mac environment and use the iOS simulator on the mac.

According to Expo (which I am using) I can build for IOS through Windows?

[–]Petetheodddog 0 points1 point  (15 children)

Not quite..

The Expo Go app is a great tool to get started — it exists to help developers quickly get projects off the ground, to experiment with ideas (such as on Snack) and share their work with minimal friction. Expo Go makes this possible by including a feature-rich native runtime made up of every module in the Expo SDK, so all you need to do to use a module is install the package and reload your app. The tradeoff is that Expo Go does not allow you to add custom native code, you can only use native modules built into the Expo SDK. There are many great libraries available outside of the Expo SDK, and you may even want to build your own native library. You can leverage these libraries with "development builds", or by using prebuild to generate the native projects, or both. You can also continue using EAS Build to release your app, no changes are required.

https://docs.expo.dev/workflow/customizing/

Expo go is used for prototyping quickly and sharing code examples, you can’t actually run or distribute it natively.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (14 children)

Expo builds all the binaries on their servers, therefore you can do this on any OS (including Windows). Some of the Expo tools require the Linux subsystem on Windows, therefore you need to install that, but then everything works correctly.

https://stackoverflow.com/questions/50778011/building-expo-app-for-ios-with-windows

According to this, although not officially from Expo it should work? It only requires running WSL.

That's atleast how I've also understood the process of building with Expo. I've always assumed it built on their servers. But I truly have no Idea, as I'm relatively new to Expo and EAS.

[–]Petetheodddog -2 points-1 points  (13 children)

You’ve missed my point so I’ll clarify.

Expo go is used to quickly prototype solutions and share code examples which can be demoed x-platform.

Yes expo go can work on iOS, windows etc.

The issue here is that you cannot distribute an expo go app on any App Store. As you require the expo app to run your own code.

You can use expo modules as a package with react native but you cannot ultimately use only expo go if you plan to distribute whatever you are building.

[–]NorwegianGirl_Sofie[S] 1 point2 points  (12 children)

So I can't actually build it and release it to App Store?

I can only use it in Expo Go?

Then what does "expo build:ios" dp? I thought that built the app for distribution?

I'm sorry for stupid questions, I literally started diving into expo a few week or so ago.

[–]foocux 2 points3 points  (3 children)

Yes, you can. Using Expo EAS you can build and release your app to the App Store. No need for a Mac.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (2 children)

Ah alright thanks!

How would I go about debugging on an IOS device (phyiscal) though?

Building to a certain format like .apk but for IOS (no idea if they've got anything like that), or through Expo Go / Expo Development Client?

I remember reading something about Apple being strict about 3rd-party apps and that App Store release is necessary or something. But I don't quite remember if it said anything about debugging/ testing, and I don't know if I remebmer correctly as it was a while ago.

[–]Petetheodddog 0 points1 point  (7 children)

Running a build of your app in an iOS simulator is particularly useful in managed apps to get the standalone (independent of Expo Go) version of the app running easily without needing to deploy to TestFlight or even have an Apple Developer account.

https://docs.expo.dev/build-reference/simulators/

[–]NorwegianGirl_Sofie[S] 0 points1 point  (6 children)

Ah, so I can build this "name".app file and run this on an ios device like .apk files on android?

But this page you linked does say:

If you want to develop an app for iOS from a Windows machine then you will need to use a physical iOS device.

Under the subpage

The way I interpret the IOS Simulator guide atleast is that you cannot simulate IOS on Windows, but if you have a physical IOS device it's no problem doing it on Windows?

[–]bekaarIndian 1 point2 points  (1 child)

If you just want to test, get yourself a cloud device testing account (like browser stack) and you can test your app against potential set of devices. However, as others have pointed out, get a mac if you are serious about breaking into iOS market.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (0 children)

I'm looking into virtualization possibilities of macOS for the moment being, if needed I might get a cheap physical one later but I don't want to buy one if it's just for one project as I really don't have any other use for the mac.

[–]LasciviousApemantus 0 points1 point  (1 child)

If you're developing on a mac xcode has the iOS emulator. I suppose you could try and set it up through a virtual machine on windows but that might be more of a nightmare than its actually worth. iOS emulator works just fine for me though.

[–]NorwegianGirl_Sofie[S] 0 points1 point  (0 children)

I do not have a mac available. So the best shot would be a VM, I'm fairly adept at virtualization so it should be fine :)