Tuesday, 22 November 2022

iphone

iOS Development: Ways to Get Started Quickly


When we think about developing for iOS, the most common thing that comes to mind is a five-figure entry threshold: at a minimum, you need an iOS device on the latest version of the OS and a Mac. If you are already writing for iOS, you probably know the alternatives, and if not, see if it comes in handy? The review post below is just for this case. Under the cut you will find quite simple information, so if you want hardcore, you are not here!

So, we have an iOS device in our hands, the idea of ​​an application is in our head, and the desire to quickly master new knowledge is in our heart. Before us are three ways, just like the epic hero:

We take a Mac (more precisely, we need OS X), we take Xcode with the iOS SDK, we take Objective-C or Swift, we make a project, and as a result we get a real, “native”, iOS application that can even be submitted with peace of mind in the App Store, and enjoy the display of banners because our little development brings people joy.

We take at least a Mac, at least a Windows machine, we choose a framework that allows you to write mobile applications in languages ​​more familiar to many (JavaSctipt, C #). The framework will take care of how our code will be executed on the device: to ensure execution with our code, the code execution mechanism (runtime) will be linked, whose tasks, among other things, include translating calls of the programming language used into the API of the mobile platform. The advantage of the approach lies in a certain independence from a specific mobile platform (with which only the runtime itself connects us), minus – in a lower speed than that of the “native” application.

We take Notepad, any text file editor, sculpt a web page, properly equip it, and at the output we get a web application that, in fact, will run in a full-screen browser window (like a real application on the platform – without the browser address bar), but it will work, of course, with the speed and responsiveness of a regular web page. First of all, this will be visible in the absence of a normal Internet connection, however, you will agree that even this option is sometimes convenient. A web application, by the way, has the advantage that in order for users to access it, the page does not need to be submitted to the App Store, it is enough to give people its URL and offer to add it to the home screen.

Apple’s way

The path of a true Jedi true iOS developer lies in the plane of following the ideas of Apple. Fresh SDK, fresh version of Xcode, Apple documentation on Apple technologies, developer forums on Apple technologies – if you think about it, what else does it take to create a great application, except for a fraction of time? The benefit is obvious: the development is the closest to the platform and ideology of Apple, using all the novelties offered by Apple in the current (and future) iOS API, so that constant learning of new things brings more good than bad.

Apple updates regularly. The latest developer conference WWDC 2017 showed off a new SDK and a new version of the Xcode development environment. The list of changes is quite extensive (especially in anticipation of the release of iOS 11):

xcode

The text editor in Xcode was rewritten in Swift, making it more reliable and faster. Can you feel it? Yes! Syntax highlighting works (almost) instantly, opening and navigating the file is now without noticeable delays, and error messages no longer overlap the source code. In beta, everything looks very nice, let’s see what awaits us in the release!

Markdown support has been added to Xcode. Markup can be used when documenting code, and this functionality, at first glance, cosmetic, makes it quite noticeably easier to read code, especially someone else’s:

(Source)

The editor, by the way, has learned how to highlight code blocks, which is convenient when studying a large amount of code.

(Source)

Another important feature of Xcode 9 was code refactoring to Swift, Objective-C, Objective-C++, C. Refactoring allows you to rename classes, variables, and split methods into smaller ones.

(Source)

Of the less prominent, but nevertheless useful features, we can name:

A new build system (written in Swift, by the way);

GitHub support;

UI debugger started showing UIViewController;

Added more checks (for example, main thread API checker and undefined behavior tracking);

Parallel launch of tests on different devices and simulators, UI tests of several applications;

“Wireless” debugging on multiple devices to check apps for iPad and iPhone.​

Swift 4

This change stands alone. Everyone who has already experienced the feeling “it was in Swift 2, it was gone in Swift 3 ?!”, can feel deja vu, but now changes are expected, rather for the better (however, I will note in an undertone when it was not so, according to the authors – then?)

So:

Applications written in Swift 4 will become smaller in size.

Swift 4 will get native support for encoding/decoding to/from JSON. Before Swift 4, you had to write a lot of code yourself, or use third-party code generators.

What is the result

The mobile development market is still very young, and one of the problems is the lack of standards and systematic training of specialists. For various reasons, many developers have limited opportunities for development: someone is responsible for development in the company alone, somewhere the practice of researching new approaches and technologies is not developed. We strive to influence this situation by broadcasting our experience to the community, including through such internships at Redmadrobot.

It’s great that the guys all the time had questions: “how else to work with this architecture?”, “What design principle are you using here and why?”. The same problems can often be solved by combining different approaches. We didn’t have the goal of equipping interns with a specific technology stack — we wanted to show them different horizons.

All those who completed the internship are well-trained developers who are able to develop high-quality applications for their platforms. From the iOS stream, everyone reached the end, but in the Android camp, the losses amounted to three people. Two iOS developers have joined the Redmadrobot team – welcome on board. Traditionally, we say that this internship is not the last, stay tuned here on Habré and in our social networks.