-
Font Awesome, Swift 5 Support With Swift Package Manager (SPM)
I wanted to give a try to Swift Package Manager which is build in functionality in Xcode 11. I have to say fantastic! I think in very short future all Git repository will be updated with this package independence manager. Finally we will be able tosay “good bye” to CocoaPod, Cartilage and some many other.…
-
Render and Test UIKit UIView Realtime On Xcode 11 With SwiftUI Integration
How to integrate UIKit UIView in few line of code. // // SampleV.swift // UIExp // // Created by dejaWorks on 14/01/2020. // Copyright © 2020 dejaWorks. All rights reserved. // #if canImport(SwiftUI) && DEBUG import SwiftUI #endif import UIKit // MARK: – An ordinary UIView class SampleV: UIView{ override init(frame: CGRect) { super.init(frame:…
-
Render and Test UIKit UIViewController Realtime On Xcode 11 With SwiftUI Integration
How to integrate UIKit UIViewController in few line of code. // // RedVC.swift // SwiftUIOne // // Created by dejaWorks on 14/01/2020. // Copyright © 2020 dejaWorks. All rights reserved. // #if canImport(SwiftUI) && DEBUG import SwiftUI #endif import UIKit // MARK: – An ordinary VC /// VC (UIKit UIViewController) class RedVC: UIViewController {…
-
GIT Adding TAG Into Repository
Add tag with comment. git tag -a v0.0.8 -m “3rd Beta release.”
-
Xcode11 iOS13 Simulators Couldn’t find MIDI Network Driver Problem – Solved
Recently I installed Xcode11 and tried my working music application on iOS13 simulator. But unfortunately I faced an unexpected runtime error message “Couldn’t find MIDI network driver” and crash! I was using last update of AudioKit 4.9 (as I updated it at the same time with Xcode 11) I thought that could be the problem. But not!…
-
Xcode With Sharp (non-antialias) Fonts On External Monitors
Everything is smooth and beautiful on MacBook Pro retina screen but if you’d like to use on external display some times it’s better not to use “antialias” for external screen. This is for sharp font setting for Xcode defaults write com.apple.dt.Xcode SourceEditorDisableAntialiasing -bool YES This is the default antialias setting defaults write com.apple.dt.Xcode SourceEditorDisableAntialiasing -bool…
-
Git Add New Remote Repository
To add a new repository # abcd is the remote name given can be anything # https://github.com/user/repo.git is any repository url $ git remote add abcd https://github.com/user/repo.git # See all remotes $ git remote show # Verify remotes $ git remote -v
-
iOS Swift Accessing Bundle Folder And File Write
To access a file in Bundle folder: Bundle.main.url(forResource:”YourFile”, withExtension: “FileExtension”) Also to write a file with error checking: var myData: Data! func checkFile() { if let documentsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).last { let fileURL = documentsDirectory.appendingPathComponent(“TheFile.extension”) do { let fileExists = try fileURL.checkResourceIsReachable() if fileExists == true { print(“File exists”) } else {…
-
iOS 11.3 Beta WIFI Connection Problem
If you have developer account and downloaded 11.3 beta; probably you had an unexpected Wi-Fi connection problem. You can try again and again by retyping your password and restarting the router but problem will persist. The only solution is restoring the stable version which is currently 11.2.5 via iTunes. But in this case iTunes won’t…
-
Git Create A New Branch Via Commit No/Hash
Creating a new branch by a commit no git branch branchname <sha1-of-commit>
-
Git Pull Specific Commit Via Commit No
In a empty folder. git clone <repository_address> git remote add origin <repository_address> #YOUR_SHA_HERE is like 12eb5133eda7fcf8b86a6cc70a0f8c3afc178263 git fetch origin master YOUR_SHA_HERE git checkout YOUR_SHA_HERE
-
iOS Swift Save|Load Custom Class Variables As Encoded Object
By using NSKeyedArchiver.archivedData, NSKeyedUnarchiver.unarchiveObject you can actually store the data as compressed zip in the device and recall/unzip them to your class structure Model Class class User: NSObject, NSCoding { // Common var userId: Int = 0 var userFullName: String = “” var userUsername: String = “” var userBiography: String = “” var userRegisterDate: String =…