AMA: iOS App Development with Ahmad Sahar

//AMA: iOS App Development with Ahmad Sahar

AMA: iOS App Development with Ahmad Sahar

This is the first in a series of AMAs that we have planned with tech experts where our subscribers get an opportunity to ask questions on tech and gain expert insights. First up, we have Ahmad Sahar, the author of iOS 14 Programming for Beginners (who is currently also developing the next edition, iOS 15 Programming for Beginners). Ahmad teaches iOS App Development, macOS Support Essentials, and how to use Apple macOS and iOS.

Here’s the AMA:


1. What advice would you give for beginners with no experience looking to transition into app development/programming?

Ahmad Sahar: Learn a graphical programming language, such as Scratch, to get acquainted with basic concepts. Then learn a text-based language such as Python. After that you can go to Apple’s Teaching Code web page (, and start learning Swift using Swift Playgrounds, followed by learning App Development using XCode. See the curriculum here:

2. What computer and software tools do I need to best learn iOS programming?

Ahmad Sahar: For iOS programming you’ll need a Mac that can run macOS 11 Big Sur or macOS 12 Monterey and you’ll need to download and install XCode, which is free.

3. Should I still learn UIKit or is SwiftUI good enough for basic apps?

Ahmad Sahar: SwiftUI is good enough for basic apps as it is fairly mature, and Apple has stated that it will be future of iOS development going forward. You can check out Packt’s book SwiftUI Projects and the other Packt SwiftUI titles as well.

4. Do You think that SwiftUI will become a cross platform UI framework in the future?

Ahmad Sahar: If by cross platform you mean using SwiftUI to write iOS and Android apps, that is unlikely. SwiftUI does allow you to write apps for all Apple platforms such as iOS, iPadOS, macOS, watchOS and tvOS.

5. Is it possible in SwiftUI to show a WKWebView in an ARKit node? Normal interactions with the webview like reloading, zooming, navigating etc. should work.

Ahmad Sahar: This should be possible as you can use any UIKit view in SwiftUI. Here’s an example:

6. Hello, I use the following call to edit an existing contact on the iPhone and everything works fine. The problem arises when I have to close and return to my application. The only way is to enter the modification and, while not modifying anything, confirm. In this way it closes. When I enter editing view, I would like to be able to insert a cancel button that allows me to close the editing without modifying, but I don’t know how to do it. I tried various solutions, but nothing worked. I’m using swift 5.3 with xCode 12.5

let store = CNContactStore() var vc = CNContactViewController() do{ let descriptor = CNContactViewController.descriptorForRequiredKeys() let editContact = try store.unifiedContact(withIdentifier: myContact.identifier, keysToFetch: [descriptor]) vc = CNContactViewController(for: editContact) } catch { print ("Error") } vc.allowsActions = true vc.delegate = self vc.title = "Modifica contatto" vc.contactStore = contactStore present(UINavigationController(rootViewController: vc), animated: true)

Ahmad Sahar: Sorry, I don’t know enough about your app to be able to tell you how to solve this. In my book, iOS 14 Programming for Beginners, I implement similar functionality. You can see the Code-in-Action videos for it here. I hope you find it helpful.


7. I need my app to communicate with a Bluetooth LE device using custom interfaces. What would be the best language to use for this use case: Swift, Objective-C, or any other language or library? Following up on the previous question, my app needs to be deployed on both iOS and Android. Should I use a framework like Dart or native languages?

Ahmad Sahar: It is best to use the native implementation for each platform (Kotlin + Android Studio for Android and Swift + Xcode for iOS) but if you have resource limitations (not enough programmers, don’t have the time to learn both frameworks), you can try Flutter and use the flutter_reactive_ble plugin: Other cross platform frameworks that you could use are React Native, Xamarin, Ionic, and so on. You should check the features of each of these frameworks when choosing which one to work with.

8. Is there a way to work in VSCode in windows, without having a mac?

Ahmad Sahar: VSCode does work in Windows. If you mean how to use Xcode in Windows, it isn’t possible because Xcode is Mac only. If you want to write iOS apps when you don’t have a Mac, you can try Flutter You can also look at frameworks like React Native, Xamarin, Ionic and so on, as mentioned in the previous answer. Note that you will still need a Mac running Xcode to build the executable file that will be submitted to the Apple App Store.

By | 2021-09-22T07:15:27+00:00 September 21st, 2021|Uncategorized|0 Comments

About the Author:

Leave A Comment