Open in app
Home
Notifications
Lists
Stories

Write
Lucky Mehndiratta
Lucky Mehndiratta

Home

Jul 29

Integrate SwiftLint into your project-Swift

SwiftLint helps you to follow the style guide rules that are accepted by the Swift community. Follow the following steps to integrate the SwiftLint in your project when you are going to start your project so that you can do it from the starting point. But if you missed that…

Swift

3 min read


Jul 24

Pull-to-Refresh →SwiftUI

Sometimes we need to refresh the data list on the screen so that we will get the latest data from the backend. So, Pull-to-Refresh comes into the picture in this scenario. …

I OS

1 min read


Jul 24

Generate HMAC String-Swift

A Hash-based message authentication Algorithm import Foundation import CryptoKit import CommonCrypto class HmacDigest { static func getHmac()->String{ let hMAC = “your string”.hmac(algorithm: .SHA512, key: “your key”) return hMAC } } extension String { func hmac(key: String) -> String { var digest = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) CCHmac(CCHmacAlgorithm(kCCHmacAlgSHA256), key, key.count, self, self.count, &digest) let data…

Hmac

1 min read


Jul 23

Swift REST API call using Alamofire

Here we are going to get the data from the backend using REST API by Alamofire library. Whenever we are going to convert our dummy data models into dynamic data models then we need to get data from the backend server. There are multiple ways to get the data or…

I OS

4 min read


Jul 2

Check Network Connection-iOS(Swift)

We need to check the network connection using swift in the iOS Mobile Application development before hitting the API or showing the network status in our app according to the network connection either green or red. …

I OS App Development

1 min read


Jul 2

UIView or UIButton Gradient-iOS(Swift)

Sometime we need to set the gradient on the UIView or UIButton as per the project requirement so here is some code that can be used in your project to set the gradient. …

I OS

2 min read


May 18

Date Extension-iOS(Swift)

Sometimes we need to modify the date format as we got it from the server to display on the UI or we need to send it to the server as we got it from the date picker. Below is some useful method for Date Formatting. extension Date { func string(format…

Swift

2 min read


May 10

Use HEX Color code String in iOS- Swift

Sometime we need to create custom app colors and use it to through out the project with HEX Color code String. Below is the way of create a color with HEX Color code string and use it as per your requirement. extension UIColor { static var random: UIColor { let r:CGFloat…

I OS

2 min read


May 9

Best way to use Font Name using enum in iOS-Swift

As we need to add the custom font style in our project as per the client’s requirement so rather than using or setting the font name and size from the storyboard inspectors. We can use this way to set the font and size of the text throughout the project. …

I OS

2 min read


Mar 12

Upload dSYM to Firebase using terminal-iOS

Today we will upload the dSYM to Firebase using the terminal by following the steps. 1. Go to your project setting in the Xcode and select the DWARF with dSYM File in the Debug Information Format of Build Options. 2. Go to Window->Organizer. Select the archive for which you want to upload…

I OS

2 min read

Lucky Mehndiratta

Lucky Mehndiratta

iOS & Flutter Developer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable