
Ask HN: How to Build an iPhone App in 2020? - NavyDish
I am a product person at a B2B startup and have been toying around with getting down to building a few side projects. While I understand the basic components of Ops, Backend, Frontend -- I have very little idea about Mobile app dev. The most that I have done a few years ago is basic JS&#x2F;CSS for frontend.<p>If I am looking to build an app like Breaker (https:&#x2F;&#x2F;www.breaker.audio&#x2F;) in 2020, what are the best practices and starting points that could be helpful?
======
gt565k
Use Swift. Go native or go home.

I've prototyped apps with React Native, and it was a dependency nightmare.
More time was spent researching and hacking in fixes and dealing with
upgrading the app to the latest version than actually building the app.

In contrast, we have an iOS app that was build 11 years ago, and it still runs
flawlessly on the latest iOS version. Apple supports their environment,
whereas, in ReactNative, even minor versions introduce breaking changes.

Hybrid mobile solutions are a nightmare, unless you're building a basic crud
app that doesn't interact with the hardware on the phone. But at that point,
just build a solid mobile web applications.

~~~
NavyDish
If I am looking to build an MVP and assuming that I can learn both native and
React/Flutter like frameworks -- which one would you suggest based on the
learning curve in both?

~~~
gt565k
Do it in Swift. Swift UI is easy to work with and create the MVP interface

------
mikece
First option: PWA

Second option: Ionic

Third option: if using web-based/hybrid cannot give you the features you need
(which I seriously question) then vendor native is the way to go
(Kotlin/Android Studio for Android, Swift/Xcode for iOS).

Forget cross-platform options like Flutter, React Native, or Xamarin: they
give you short term POC success at the cost of doubling the effort to deliver
a MVP if you hit any edge cases not covered by their 80/20 approach.

~~~
mraza007
Just curious why pwa compared to react native or flutter

~~~
mikece
PWA doesn't compare to React Native or Flutter as PWA is a web application
whereas React Native and Flutter are cross-platform _native widget_
approaches.

The problem for React Native (and Xamarin) is that the more layers of
abstraction you have the more layers that can get out of sync with the native
OS. Xamarin and React Native take cross-platform UI definitions and map those
onto native UI widgets and it's not unusual to run into problems with the
abstraction mapping as expected and debugging is an exercise in frustration.

Flutter is different animal in that it's not using native UI widgets but is a
complete stack. My imperfect analogy: React Native/Xamarin is like bringing a
translator with you to a restaurant to help you order: will probably work but
there are edge cases. Flutter is like bringing your own kitchen staff, kitchen
equipment, and food... as long as that's not prohibited you'll get exactly
what you expected. In theory this works just fine but there's no guarantee
that Apple won't protect it's walled garden (eg: keep your people, food, and
cooking gear out of our kitchen!) by banning apps that bring their own Skia
canvas and "runtime." Even if that doesn't happen there's the issue that you
might not have all of widgets you want or need (though as time passes this is
less of an issue).

With cross-platform solutions you are on your own if things don't work: you
cannot contact Apple and get help because the official answer is "Apps for iOS
are written in Swift or Objective-C in Xcode."

And yes I'm jaded after spending several years doing work with Xamarin and
looking at React Native and finally deciding that betting on the web (PWA or
Hybrid) is the way to go: HTML5 works the same on all mobile platforms (and in
the case of iOS if your needed features aren't available with PWA the code and
time need to convert that to a hybrid Ionic app is shockingly minimal).

EDIT: Ever since Ionic switched from the legacy Cordova base for hybrid to
their Capacitor project it's possible to mix fully platform native UIViews in
with your hybrid app with minimal fuss just in case you need a feature set
that requires "going straight to the metal" for part of your mobile app.

~~~
mraza007
Agreed. Facebook app is completely made with react native no doubt it does get
slow

~~~
jamil7
> Facebook app is completely made with react native

I don't think thats true unless it's changed, it's mostly Objective-C with
some React Native views. It's slow because it's a bloated, poorly-written
mess.

------
davidhbolton
If performance is an issue then native tools such as Java, Swift or even C#
are indeed the way to go. My own experience with C#/Xamarin on iPhone 6 was
that it was very performant, in excess of what I anticipated. A specific
example. I built a Uber type app using the Google iOS SDK.

It held all UK addresses (out of 29 million and 350,000 points of interest-
ATMS, supermarkets, railway stations etc) within a 25 mile radius cached in
RAM. Scrolling the map with your fingers, it used the lat/lng of the screen
centre and was able to search the in-RAM addresses to return the street the
map was over as a String. This matched what the map was displaying.

If you did a search of an address as it was typed character by character,
within 1/10th of a second it could return the top 100 matching addresses,
sorted by proximity. I challenge anyone to do that in JavaScript!

------
alfonsodev
I recommend you Let's build that app Podcast course[1]

It's a paid course, but will give you source code and save you a lot of time,
the instructor has a Youtube channel[2] with the same name, in case you want
to check his content first and see if you like it.

[1][https://www.letsbuildthatapp.com/course/Podcast](https://www.letsbuildthatapp.com/course/Podcast)

[2][https://www.youtube.com/channel/UCuP2vJ6kRutQBfRmdcI92mA](https://www.youtube.com/channel/UCuP2vJ6kRutQBfRmdcI92mA)

~~~
NavyDish
Thanks for this -- will check it out! Have you taken this course yourself?

------
rahulchhabra07
If you can learn both and can do without serving android users for a long long
time, choose Swift. Use RN if only you'll need to serve both right in the
first 2-3 years.

On the first glance, RN is less reliable and has performance issues. But
mature apps are able to build enough to make sure these aren't issues any
more.

We shifted our app from Native Android to RN. Today, it gives native like
experience, have extremely fast dev times and can port it for iOS as well. But
for around six months or so, the app had all these issues.

------
rusinov
If you want good app that feels like "a native citizen": Xcode and native
tools.

