Posts

Top 5 problems you will face if you continue using Storyboards in your projects!

1.  Merge Conflicts: Frequent complex conflicts when multiple developers work on the same storyboard. 2. Difficult Code Review: Reviewing changes in XML-based storyboards is more complicated than in code. 3. Performance Overhead: Slower load times with large and complex storyboards.  4. Preview Limitations: Inaccurate UI representation on different devices, needing extra adjustments.  5. Limited Reusability: Storyboard UI components are less reusable than programmatically created ones.

What is @State in SwiftUI ?

The  @State  keyword is a  @propertyWrapper , a feature just recently introduced in Swift 5.1   State is a value or a set of values, that can change over time, and that affects a view’s behaviour, content, or layout. You use property with the @State attribute to add a state to a view. when you initialize a property that's marked  @State , you're not actually creating your own variable, but rather prompting  SwiftUI  to create  "something"  in the background that stores what you set and monitors it from now on! Your  @State var  just acts as a  delegate to access this wrapper . Every time your  @State  variable is  written ,  SwiftUI  will know as it is monitoring it. It will also know whether the  @State  variable was  read  from the  View 's  body . Using this information, it will be able to  recompute any  View  having referenced a  @State  variable in its  body  after a change to this variable. Code Example:- import SwiftUI struct ContentView : View

Automated Deployment with Fastlane on iOS

Image
  As iOS developers, we’ve all experienced the satisfying feeling of finally finishing coding an app and being excited to share it with users. Prior to users enjoying the app, there is only one more thing left to do- release the app to the App Store! Surely, you think it shouldn’t take longer than a few minutes of your time? Oh, you’re completely wrong. In order to reach that step, the following is needed: Ensure you have the right certificates and provisioning profiles in place. Create a variety of screenshots of the app. Build the app. Upload the app to App Store Connect. Log in to App Store Connect, input the correct metadata and inspect the upload. Submit the app for review and wait. These steps are just one approach to deploying your app as there are many more aspects that should be considered, such as dealing with build/version numbers, running tests, uploading beta releases etc. Why is this so difficult? Well actually, it used to be difficult but thanks to Fastlane, all of the m