Navpreet Kailay is an accomplished iOS Developer with over five years of experience in building and optimizing mobile applications across various industries, including e-commerce, education, and logistics. He has a proven track record of enhancing app performance, ensuring high user engagement, and maintaining a 98% crash-free rate in top-tier applications. He is proficient in Swift, Objective-C, and several key frameworks and tools such as GraphQL, Firebase, and Core Data. Known for his problem-solving skills and ability to collaborate effectively in Agile environments, he has consistently delivered scalable and intuitive solutions, earning recognition like the Plobal Apps Rising Star award for his significant contributions.
iOS Developer (SDE-1)
PLOBAL APPSSDE - iOS
Plobal AppsSoftware Engineer - iOS
Nickelfox TechnologiesiOS developer
TechwinLabs LLPiOS Developer
Quadtrics SolutionsiOS Developer
NICKELFOX TECHNOLOGIESiOS Developer
TECHWIN LABS LLPPostman
Jira
Git
TestFlight
Xcode
Firebase
Firebase Realtime Database
Sendbird
Google Analytics
CleverTap
CocoaPods
Bitbucket
Sourcetree
Confluence
Google Sheets
Core Data
Realm
Crashlytics
Google Analytics
Push Notifications
RESTful APIs
Twilio
Firebase Analytics
APNS
AppsFlyer
Crashlytics
GraphQL
Confluence
Klaviyo
AVFoundation
Google Maps API
RESTful APIs
A Social Media app with features like Feeds, Messaging, Sharing and WhatsApp Like Voice and Video Calling.
The app supports three types of users: Property Owners, Vendors, and Contractors to manage and work on construction projects.
Yeah. So my name is. I'm from Punjab, Mohali, and I've been working as an AS developer for the last, uh, 5 years, 5 months. I got a chance to work in service based companies, and the last company of mine was product based company. And it was a base the product was based on the ecommerce platform. I was a part of customer success team, uh, for more than 1 year. I also got a chance to work in the platform team and as well as the the launch team as well for a for a while. So I got a chance to, uh, work on the core features and the urgent, uh, bugs and maintenance of the project, uh, that were revenue impacting. And the platform was based on Shopify APS, GraphQL APS, and, uh, the whole, uh, loads of, uh, customization based on the ecommerce platform. And in the past, I got a chance to work on domains like social media datings, productivity apps, utility apps, and whole lot lot of other, uh, domains and industries and the highest native development.
While I have not, um, got the chance to work with the core animations along the gesture recognizer, but, uh, I believe that, uh, to, uh, for example, uh, let's take an example or a task where a user, uh, wants to, uh, user we want to provide a user, uh, an animation while he scrolls or, uh, swipe on the screen on on a specific point. And if he, uh, if he swipes, uh, from one point to another, we can use those points and states of that, uh, gesture recognizer instance. And we can, uh, uh, for example, we can have using those points, we can have the fluid animations or we can move those, uh, views, uh, in which the points are enclosed in. So we can animate those views, uh, based on the position of the gesture recognizer, uh, which is being, uh, changed by the user.
Okay. So there are multiple instances, uh, where, uh, we get to use, uh, we get to safely unwrap optional in the swift, and, uh, we can do it by optional chaining and optional binding as well. So we can use a flat, uh, to, uh, get out of safely unwrap value out of an optional value. And, uh, we can also use garlic and allow, uh, and other methods as well. And, uh, there are, uh, there is a asymmetry mark that we use to check the unadd value, but in a unsafe manner. And, uh, we have a question mark, which is our optional operator that we can use, uh, that we use, uh, in the optional training as well.
Key consideration while designing a reasonable network layer insert. Okay. So there are a few, uh, consideration that I take, uh, personally. First is to have a loosely decoupling, uh, between the layers, between low and high high modules of the project. Uh, in this case, our low, uh, low level module would be the API manager, uh, which would be a network, uh, layer of our and in between would be an abstraction layer, uh, which will, uh, get the request and return a generic object, which, for this example, could be a portable object and plus one error if due to some reason the network request got gets failed. So this is the the abstraction would be one point. And the other thing would be using protocols in order to introduce the abstractions. We can have, uh, certain service, like inject dependencies to use the abstraction layer in between. And, uh, so that the view model, which would be the calling entity of the of a particular network request, would not, uh, know what the actual, uh, implementation between the layer is and just, uh, gets to call and get the desired model of out of it.
Well, the architecture pattern, uh, depends upon, uh, the nature of the project, the size and scope of the project. I generally use, uh, MVVM, and, uh, the factor that I get to decide what to, uh, what architecture to use is solely depend upon how large the project is gonna be, what is the nature, what are the requirement specifically for this particular project. And based on that, I got to choose the architecture pin. And, uh, so far, I've used MVC and m v MVVM pattern, and I'm looking forward to learn more like WIPER and MVP, uh, like architecture patterns. So this is, uh, my, uh, approach towards choosing the right architectural pattern. And, uh, I would since I'm learning more about the MVVM, I would choose MVVM pattern because it, uh, it separates the concerns. It separates the business logic out of the view, and, uh, it allows us to, uh, keeps, uh, the maintenance of code, uh, in a better way and key makes the testability and the testability easy. Uh, we get to perform test better and, uh, because we have a set related concerns, we have like, we can introduce abstraction in between the layers so it it gets easier to mock, uh, the entities or modules to test, uh, with lesser code and reusable code. So my, uh, choice would be the MBB for long lasting as application.
So as you know that, uh, SwiftUI framework allows us to, uh, have great UI, uh, with lesser code and with less complex code. And since, uh, SwiftUI allows us to write a code which is state driven, which means our view is a function of our state. So it allows us to, uh, have control over each state of a view, how the view looks. It is, uh, basically depends upon, uh, an entity which is our state and which is binded to the view. So our state is binded with the view and it allows us to, uh, use those particular, uh, animations and, uh, and transitions directly linked to that particular variable. And, uh, using that, we can perform, uh, use a few available view modifiers, uh, inside the SwiftUI or added by SwiftUI like animations. We can pass on few values like bounce, snappy, and that view modifier animation view modifier allows us to input that parameter which is our binding operator to our animation view modifier that allows us to have scene lamps animations, uh, whenever the view renders or or if you if some state of that particular view changes. For example, there is a recent development made to the SF Symbols. Uh, they have provided us a view modifier, uh, to these views that holds these symbols, uh, like, spend some but, uh, for example, when I stay a button changes its state or we can switch one image icon of that particular button to another using, uh, and while doing that, uh, we can, uh, use this modifier, uh, transition effects in which we can pass on this symbol, uh, SF symbol effects to, like, appear, uh, bouncy. And there are a lot of other options we can pass into it to have a very good looking animations. Suppose, uh, in this, uh, example that I used in case of a button image, the button icon can easily, uh, can be animated, uh, while changing its icon. So there are a lot of other provisions as well, like changing colors, transition colors, and there are whole lot of other, uh, possibilities now, uh, provided directly by the iOS and Apple.
K. Let's look at the code. First of all, we are hard coding, uh, while creating this entity, new user. Uh, we are directly hard coding the, uh, values without, uh, in a very tight unsafe manner. So we are not explicitly, uh, using the models, uh, which are we can generate the NSObject models directly out of the entities rather than using setting up the direct hard word values in a very key value manner. Rather, we can use models, uh, given by the code data, uh, to write a better code, uh, to process data in the code data. So that would be one thing, and this is the main thing that I am able to look at. Plus, we are unsafely unwrapping the the entity description there in the second line where we are, uh, constructing the entity of this user type. So that is also the, uh, not a good way to write a code, uh, in this, uh, in this particular context. And, uh, as I discussed earlier, we can use those and and as manager object. The, uh, when we generate those, uh, models, we were given particular, uh, properties and functions by the core data to, uh, safely, uh, get the instances of those entities and, uh, the context as well. So this is the, uh, these are the 2, 3 things that I can look directly from this code.
Yes, sir. Looks like, uh, this particular, um, piece of code does not, uh, follow the single responsibility principle, uh, because along the crude operations for the user, uh, it also, uh, have is having the authentication methods. So we can have a different protocol or, uh, we can have a different module, uh, for the long ring, uh, in or out user. And, uh, plus, uh, the fetch users can be, uh, differ have we can have the fetch user functional different repository. So we can have a so to suggest a better way to refactor it, the class can adopt a protocol, uh, which would be the user repository to create and delete the user, uh, or the upgrade user, of course. So these three function can move out in a different protocol. And, uh, to log in and log out, uh, these function 2 function can move. We refactored into a different protocol, and, uh, the implementation can be wrapped by any layer that can, uh, have it will be having the the implementation details of logging out or logging in the user. Same for the create user, delete, and upgrade user. And we can have the 3rd. This is the option. We can have the fetch user into a different repository protocol. So we can have breakdown these particular, uh, functions into the, uh, into the form of abstraction layers, protocols, and then this different, uh, different classes or structures can, uh, like user manager, authentication manager, and, uh, they can adapt to those particular protocols and adapt to the solid principle, uh, single responsibility, uh, principle in a better way.
So there can be number of steps, uh, to troubleshoot, uh, troubleshoot a fix to fix a memory leak, uh, with an objective c, a return IRS application. So first would be the, uh, the program can, uh, directly look for the strong differences between the entities and between the owners, uh, the classes. In this case, if the instances of particular glasses are holding stronger references to each other and they are not, uh, handled properly, which can introduce, uh, these strong, uh, retained cycles, uh, so we can use, uh, like, we have auto release tools, uh, to, uh, release the memory as as soon as we do not require those, uh, those particular objects in a given context. So that would be one thing using weak references. Uh, that could be another approach that we can, uh, follow around everywhere along, uh, across the board to avoid the strong references. And, uh, we can use threaded, uh, sanitizers to check if there are any, um, data races around the code. Uh, we can build, uh, we can, uh, start that process as well. It takes some time to build the code, and it provides, uh, the, uh, the set sanitizer context wherever it finds, uh, any data is is happening. And, uh, 2 other thing would be to use, uh, a certain d, uh, debugging tools to find out the memory leaks. I have not, uh, have not got, uh, myself exposed to those tools as of now, but would love to explore more possibilities to, uh, find the memory leaks in a better way.
So, uh, to manage app secrets, uh, like APIs, keys, passwords, uh, we can there are certain, uh, secure ways to do that in the, uh, in the x code given by the Apple. Uh, one would be to have the the API APIs keys. Uh, of course, there are other ways as well to securing, storing these or processing these, uh, values. Uh, for now, I would say API keys can be placed inside the config file, and that can be securely, uh, fetched, uh, through the bundle inside our code, uh, rather than storing it directly inside the board. So only the, uh, so it works in the key value format. So only the keys will be used to fetch the APIs, uh, in the code, API keys in the code, uh, using those key names, uh, and their values can be fetched without, uh, hard coding the actual values, uh, of the it is API's key that came to the code, uh, or in a layer. And the passwords can be, uh, easily stored in the, uh, the key chain, uh, framework of by the apple. That could be the 2 ways for these particular things. And there are other uh, ways as well to, uh, encode, decode, uh, the keys, uh, to to have another encryption layer, uh, on the top of it.
It's a good question. I have not currently got a chance to, uh, setting up a CICD pipeline. From scratch, I've been part of the, uh, the teams and the companies where the CICD are, uh, pipelines are integral part of the process, uh, development part or the release, uh, release part of the project. Uh, but, yes, I would love to explore more, and I'm looking forward to, uh, include CICD pipeline, uh, for testing and quick development, uh, and, uh, to generally explore how the whole world of CICD, uh, works. And I'm looking forward to learn it in my own project that I am working on. But, uh, I would still try to look at the question one more time if I can contribute to the answer in a in a known way. The first priority, I believe, would be, uh, to choose a better solution, uh, to what, uh, what framework or what methodology I would that I want to use for this pipeline. What is the scheme size of working on that particular project that will be incorporating CICD in their workflow? And, uh, how what type of branching um, system that the team is using. Maybe these factors also might, uh, affect the this particular decision or how to prioritize this, uh, if it makes sense.