DEV Community

Nuno Vieira
Nuno Vieira

Posted on

I'm a Swift Native Speaker, Ask Me Anything!

Top comments (22)

Collapse
 
alchermd profile image
John Alcher

Your thoughts on Android vs iOS? Specifically in the context of a software developer looking to get into the mobile dev field.

Collapse
 
nunovieira profile image
Nuno Vieira

If you have the opportunity and time, try both and see what you prefer. I actually had to learn iOS in my job, I had that opportunity. Actually, the iOS Ecosystem was nothing that I thought I would ever be doing right now, it just happened really, but I'm glad it did! Swift is my favourite language right now, and doing front-end code in Native for me it is more challenging and interesting than on the Web. When I was doing front-end code on the Web, I always felt that I wasn't even programming, and wasn't challenging enough (although with SPA's right now it is way different of what I was doing back then). And that's why I always did backend on the Web, so I could feel the challenge of writing OOP and FP code. But, with Native Mobile Development, this is where I'm feeling I belong, I can build UI's and I'm writing code that for me is challenging :)

To answer your question, both platforms are great, they both have pros and cons, and it is a question of preference and what of the pros and cons you value the most. Android has a lot of Devices, you have to be careful and be prepared that your apps won't run the same in every device ( if you feel writing code to support different browsers is a pain, this is much worse! ). On the other hand, it is easier and faster to publish apps for android, you will target a much bigger audience, but probably not willing to pay much for your apps. If you want to go as a Freelance Mobile Developer, totally go for iOS, since people will actually pay for your apps. Also, if you want to work for a startup (and especially in the US) go for iOS, since startups will probably build their prototypes for iOS first, and then go to the Android market, because iOS will cover most of the US market, and also it is faster to build iOS apps, since there are fewer devices to test. Both have good languages right now which you can use (Kotlin & Swift). One of the pain points in iOS, especially in the junior iOS Days, is how you do your UI. There is a lot of ways to do UI in iOS, and in the beginning, you might feel lost, and researching about which is the best way to do UI, since there are so many, and it feels like there is no standard (Spoiler Alert: Storyboards when learning is fine, go for Xibs for small apps, for bigger apps with a lot of reusable components, do UI in code, but then again, in the code you also have multiple APIs to choose from -.-). Where for Android, although there are also multiple ways you can do UI, it feels it is more standardized (someone corrects me if I'm wrong).

Anyways, if I would learn Android, I would start with Kotlin, since it is now the Default language for Android and it is way much better than Java. And it looks very Swift-like, so if you learn Swift or Kotlin, you will easily learn the other one :) Hope I could help! I'm also learning Android in my free time, it is good to understand both platforms! And they have very similar concepts!

Collapse
 
alchermd profile image
John Alcher

Thank you for your insight!

Though not really materializing in the near future, I'm really interest to get into the mobile dev domain. iOS seems to be the more lucrative, but Apple products are marked at an insane premium in my country and I have to budget my resources carefully as I finish my bachelors. I guess I'll stick with Android for now since I'm sure that these skills are transferable anyway.

Kotlin as the language choice is interesting, though I'm familiar with Java by virtue that I know other C-style OOP languages. I'd look into that for sure.

Thread Thread
 
nunovieira profile image
Nuno Vieira

Also look for jobs in your country. See if there is more Android than in iOS if that's the case, then it makes sense to go for Android.

The good thing about Kotlin is that you would be learning 2 things instead of just one. Kotlin and Android. But with Java, if you are familiar with it already, you would probably learn Android Faster. And yes most of them are transferable :)

I also had experience with Java, mostly in the University. But if you learn Kotlin or Swift, you won't go back anymore to Java :P

Thread Thread
 
alchermd profile image
John Alcher

On average there's a lot more Android jobs (which is to be expected, isn't it?). Though I'm looking at it as a career option down the line since I'm pretty much set with webdev at the moment, and iOS seems to be the higher paying path.

I also have another question: is iOS development strongly tied to an IDE? For example, working with a non Java/C# web stack, I can probably function (with some loss in production) with just vim and a terminal, and a lot of people do this professionally. Unlike Java and C# where development is almost synonymous with an IDE. Can the same be said with iOS?

Thread Thread
 
nunovieira profile image
Nuno Vieira

Yes probably iOS is the higher paying path right now for some reasons. Because not only is for a premium market, but also there is less iOS Developers than Android ones, even though there is more Android jobs. The reason for this fewer iOS Developers, it is because a lot of people already had Androids back then, and were familiar with Java, and probably nobody wanted to touch Objective-c.

Yes, it is a bit tied to Xcode, you can use also AppCode from JetBrains, but if you want to use storyboards and xibs you need Xcode for that :/ You can use vscode and vim to edit fast stuff in swift, but nothing more than that !

Thread Thread
 
alchermd profile image
John Alcher

This has been a great exchange. Thanks a lot for your time!

Collapse
 
nunovieira profile image
Nuno Vieira

I work with Obj-c too right now, since I have to maintain old iOS code from the current project Iโ€™m working on. And for me swift is the style of language I like, it is strongly typed, but as type inference so you donโ€™t need to write always what type of a variable it is, so it makes your code short and simple, but safe at the same time. With optionals, and if you use it right, you can make your apps crash-free. With objective-c what I hate the most is the syntax and the dynamism it has, it can be really hard to debug if you have something that is null, and call a function from a null object, it simply doesnโ€™t happen anything, doesnโ€™t crash but you also donโ€™t have a clue of what happened. But for me, what really is the worst of the language, is the syntax, it is nothing like the other languages Iโ€™m used to, writing with brackets it just doesnโ€™t feel right for me, it might be because of my background with Java, Python and PHP, which were my first languages, I donโ€™t know... When Iโ€™m writing swift, I feel like Iโ€™m writing english, I love the labels for each argument, you always know what each argument it is for, and makes your code very readable. And to finish ( although I could be here aall day telling why I like Swift :p ) what I also like about swift is the mix of OOP and functional programming, you can use both and if you want to write immutable code, you can, if you want to write traditional OOP code you can do it too :) Struct, and the Awesome swift Enums make the language super powerful!

I understand the difficulty to buy a laptop that is 2kโ‚ฌ, I also never bought one, Iโ€™m lucky to have one from my company right now, and always had, since I never bought one with my personal money. And right now I donโ€™t have any public iOS apps made by myself, so I donโ€™t pay the license aswell ( you donโ€™t need the license if you just want to try iOS development, or until you publish an app to the store )

Collapse
 
ben profile image
Ben Halpern

โ€œSwift Native speakerโ€, what exactly do you mean by this?

Collapse
 
nunovieira profile image
Nuno Vieira • Edited

Hello Ben! It means Swift is my main programming language. So "main" can be described as "native", it is the language I am more fluent. Also, I develop iOS "Native" Apps :D

Collapse
 
aswathm78 profile image
Aswath KNM

Even I had the same doubt!!!

So What's your thought on React Native, Ionic , Flutter ?

Thread Thread
 
nunovieira profile image
Nuno Vieira

I think they are very useful in some cases, it is really going to depend on the resources you have, what type of team you have and what type of app you are building. Although I donโ€™t really recommend Ionic or any webview based frameworks, as it increases normally total size of the applications, and the performance is usually bad, and it doesnโ€™t have a good user experience. But one thing is for sure is that none of the three will ever replace native, at least in their current states.

Iโ€™ve tried already React Native and Flutter. I liked React Native, because it is very simple and easy, and since Iโ€™m familiar with React it was very easy for me to get familiar with the framework. And because there is a lot people that are using React in Web and everywhere, it makes a lot of sense that teams adopt it. Anyways you still need to write native code in some components, and you need to have someone that has experience in native, and understands the Android and iOS guidelines, or your app will never have that native feel and experience. I see a lot of React Native apps that feel very web like, and donโ€™t have common Native Features and Details. There are actually few apps that I liked made with React Native. The ones I remember are Discord, Pipify and MLS ( major league soccer app). Those are good apps, but even those apps, I notice some details that donโ€™t feel native, like some touch UI feedback details, transitions in Navigations, or even performance issues. But for the general people they wonโ€™t notice it is not a native app. But there is yet a lot of issues with React Native, for example Discord app is only for iOS, they had a lot of troubles in using their code for Android, so the Android app is native, and they actually used React Native and did not used their main selling point, which is cross platform Native Development. They are actually right now refactoring some key parts of React Native, lets hope it will be for the better. About Flutter, I think it came a bit too late for the Party. Also I didnโ€™t like the Widget and Dart experience, at least for me. I prefer much better the React approach of using components with JSX. The good about Flutter is the performance which is better than React Native, but still not perfect, and it looks that you donโ€™t need so much to write native code, as their cross platform features are better. But it is not for me, at least for now, I canโ€™t get used to creating Widgets with class constructors and make the code so nested :/

Collapse
 
ikemkrueger profile image
Ikem Krueger • Edited

Python has โ€ždir(object)โ€œ to show what properties and methods an object has, and โ€žhelp(object)โ€œ to show the โ€ždocstringโ€œ (the first comment after the object defintion, which documents the object). Is there something similar for the Swift REPL?

Collapse
 
nunovieira profile image
Nuno Vieira

Hello Ikem!

I don't think there is a similar function to those in Swift, at least I don't know! Correct me, someone, if I'm wrong!

Collapse
 
djdany01 profile image
Dani J. Pรฉrez • Edited

Have you worked as Dev with other languages more than Swift and iOS 'Native'?
If so, have you find more job for Swift than others languages?

Collapse
 
nunovieira profile image
Nuno Vieira • Edited

Hi Daniel! Yes I have, before doing iOS Development, I started my carear as full-stack web developer. Working mainly with PHP Yii2 And HTML, JS and CSS. Even today I do some web related projects, but more personal projects, where I play with react and other more modern technologies. Then I transacted to a Full-Stack iOS Developer, so not only I was developing the iOS clients, I was also developing the REST APIโ€™s. For the the REST APIโ€™s, I was working with Elixir Phoenix and PostgresSQL. Right now, my current job is doing only iOS, since it is big company, and it is more difficult to switch context in this types of companies, since there is enough resources for each part of the application. About the job opportunities I have a lot of them in LinkedIn, I donโ€™t even have to search for them. At least in Portugal, there is not many iOS Developers, so even if there is more jobs in web, there is also more competition in the web than in Mobile Native Development. Doing Mobile Native development and Functional Progamming in the Backend was very important for me, since it leveled up my General Software Skills and Code Quality. Basically swift teaches you how to write safe and clean code :)

Collapse
 
djdany01 profile image
Dani J. Pรฉrez

Wow what an extensive answer.
Really thank you Nuno, i have experience in Android Dev and i was thinking to learn swift, you pushed me more!

Thank you!

Thread Thread
 
nunovieira profile image
Nuno Vieira

No problem! ;) Glad I did!

Collapse
 
flaviocopes profile image
flavio โšก๏ธ๐Ÿ”ฅ

What's the best way to learn Swift in 2018?

Collapse
 
nunovieira profile image
Nuno Vieira • Edited

Hello Flavio!

There is a lot of good resources to learn Swift out there. I would start with the basics, getting familiar with the syntax first. To learn only the basics there is a lot of tutorials, videos, blog posts etc.. If that is your prefered way to learn. But probably the best way to learn the basics is actually following the official Swift Tour in here. After finishing the Tour, you can progress to the basics, and keep going until you feel more confortable with the language and even learn more advanced concepts. The Guides are really well explained. There are some new concepts in the Swift Language, that some people might not be familiar with. I would recommend to focus on learning well the Optionals, Optional Chaining, How to use if-let, and guard statements, so your code is safe and clean (in swift is also easy to write safe code but ugly code if you don't know how to use if-let and guards). It is critical that this concepts are clear when programming in swift :)

These are some of the blogs and channels that I really recommend if you are interested in Swift and also iOS:

Best iOS Youtube Channels (They are really amazing):

With this resources, you have everything you need to learn Swift and iOS :)

Collapse
 
mauran profile image
Mauran Muthiah

tabs vs spaces? Jk! Cocoapods vs Carthage, and why?

Collapse
 
nunovieira profile image
Nuno Vieira

Iโ€™ve only used Cocoapods for now. If you have a small to medium project, cocoapods it will be enough and it is simpler to use. Then, if some dependencies take to much to compile and they donโ€™t change that often, you can use both and use Carthage only for some dependencies. It adds complexity, but it will reduce the compile time of the project.