Xcode Use Xcode 14 to run/debug code on iOS 17 or tvOS 17 As you might know, Apple doesn't include the iOS 17 or tvOS 17 device support files in Xcode 15. So, the old trick of copy-paste the device support files from newer Xcode to older Xcode is not possible. But there is a trick in Xcode 14 which you...
Ubuntu How to fix Ubuntu slow Wi-Fi internet speed? There might be multiple reasons for slow Wi-Fi internet speed on Ubuntu. We'll focus on the following two main reasons for the slow internet speed on Ubuntu. 1. Switch from 2.4Ghz band to 5GHz band First of all, check if your WiFi is using the 5GHz band,...
Tips Create git repository zip file without git history Sometimes we need the code zip file but we don't want to include git history into it. There is a simple built-in command in git to do that. The git archive command is a built-in git feature that allows you to create an archive (such as a zip...
Tips Prevent External Monitor from Sleep when Macbook AC Adapter Unplugged I was facing this issue on my Macbook Pro in macOS Monterey. While I'm connected to the external monitor and the power cord is unplugged then the connected external monitor goes to sleep mode. Even if the Macbook lid is open. 1. Update Power Management Settings Run the...
Tips Download WWDC, Tech Talks, and other videos up to 16 times faster Downloading WWDC Videos from the Apple Website is very slow and during WWDC month it's terribly slow. So, to solve this problem here is one open-source tool [https://github.com/vineetchoudhary/Downloader-for-Apple-Developers] that can download WWDC videos up to 16 times faster with resume capability. Github - https:...
Tips How to change playback rate of WWDC Videos? One of the missing features from the WWDC video player is it doesn't have playback rate control. So, here is a simple script to change the playback rate of WWDC Videos - document.querySelector("video").playbackRate = 1.5 Run this script in your web browser console....
Tips Xcode 11.5 crash on launch on macOS 11 Big Sur This is a known issues. Xcode versions prior to Xcode 11.5 crash on launch on macOS 11. Curretly there is one workaround for this. You've to run the following command in the Terminal app to avoid crashes when starting Xcode: defaults write com.apple.dt.Xcode DVTDisableMainThreadChecker...
Tips How to Explore Private Framework with iPad Swift Playground App? Swift Playground [https://apps.apple.com/us/app/swift-playgrounds/id908519492] app is the best way to explore iOS private APIs. You can browse iOS Private Headers for latest version from here. [https://developer.limneos.net/]....
Xcode Use UIRefreshControl in any UIScrollView(UICollectionView, WebView) Apple documentation shows us how we can use an UIRefreshControl in an UITableViewController, but do you know, we can add it to any UIScrollView ? let refreshControl = UIRefreshControl() refreshControl.addTarget(self, action: #selector(handleRefresh), for: .valueChanged) scrollView.addSubview(refreshControl) In a similar way, we can add UIRefreshControl to a WKWebView. let...
Tips How to create empty commits to test CI & CD or anything else? Sometimes we need to make empty commits on some testing branch so that we can trigger various kinds of things like Jenkins build etc. So, here the way to make an empty commit which will trigger a push event on GitHub/GitLab, etc. This is more convenient than adding spaces...
Tips Generate Strongly-Typed Swift/Obj-C Data Models directly from JSON Quicktype [https://app.quicktype.io] generate Strongly-Typed Swift/Objective-C Data Models from JSON, Schema, and GraphQL. You just need to paste your JSON string in left side text box. Generated models code has comments at the top with a code sample that shows how to convert a JSON string to...
Tips How to create a Strongly Typed Info.plist? You can easily access info.plist strongly typed by create a struct this way - struct InfoPlist<T> { static func get(for key: String) -> T? { return Bundle.main.infoDictionary?[key] as? T } static subscript(key: String) -> T? { return get(for: key) } } Now you can...
Tips An easy way to maintain UserDefaults key You can use #function literal to get the property name as UserDefault key. In the following example, #function will get replaced by accessToken. Be aware, changing the property names may break functionality for the existing users. extension UserDefaults { var accessToken: String? { get { return string(forKey: #function) } set { set(newValue, forKey:...
Tips The xed - Xcode Text Editor Invocation Tool If you are in your Xcode project folder and your project has both a workspace( .xcworkspace) and a project(.xcodeproj) the file then you can use following command to open workspace in Xcode from your terminal - xed . If your project only has a project(.xcodeproj) the file then the...
Xcode Where to find Project Build Settings Documentation? Do you know Xcode's project build setting has documentation? Just press ⌥ (option) + Double Click for complete documentation or open Quick Help Inspector....