Tips How to clean the iOS app launch screen cache? You might have noticed when you tried to change something in the launch screen on the iOS application, you still see the old launch screen. Because the system caches launch images and it's not cleared even after deleting the application. For cleaning the launch screen, all you have...
Tips How to do Git Blame in Xcode? If you work with a team, do you ever need to know who added this horrible bug? There are two ways to do Git Blame in Xcode. 1. Check the last change for a specific line To check the last change for a specific line, place the cursor on the...
Tips How to Open a File in Specific Xcode Position? In Xcode, you can open a file in various ways, you can open a file in the standard editor, in a new or existing assistant editor, in a new or existing tab, or in a new window. Here's how you can decide about this. When you clicking on...
Tips Xcode - How to Quick Jump on Specific Line Number? You might know, command + shift + o opens the "Open quickly" dialog, where you can quickly find and open files that contain the text you enter. But, If you type a line number after a file name in then open dialog jump straight to the that line number of...
Tips How to Access Document Directory Content in Files App? From iOS 11, If you set LSSupportsOpeningDocumentsInPlace to YES and UIFileSharingEnabled to YES in your Info.plist, you can access your application Documents directory in the Files application. <key>LSSupportsOpeningDocumentsInPlace</key> <true/> <key>UIFileSharingEnabled</key> <true/> For debugging...
Xcode How to set UserDefault Key Value from Launch Argument? This is the best hidden feature of UserDefaults. If you pass a UserDefault key and value as a launch argument this will set new value for that key. You can use this trick to override current value for any key. This will help you a lot in debugging. Here the...
Tips Test your localization string with NSDoubleLocalizedStrings You can use NSDoubleLocalizedStrings as a launch argument to double the length of all of your NSLocalizedStrings to easily test your UI for internationalization purposes. Here the side by side demo -...
Xcode How to Clear Derived Data using Xcode Keyboard Shortcut? Do you know, you can clear derived data from Xcode with a custom keyboard shortcut? First, Create a new script file somewhere in your system with following command - rm -rf ~/Library/Developer/Xcode/DerivedData rm -frd ~/Library/Caches/com.apple.dt.Xcode/* Now, open terminal and run chmod +x...
Tips Open Terminal for current Project using Xcode Keyboard Shortcut Do you know, you can open Terminal from Xcode at the project's path with a custom keyboard shortcut? First, Create a new script file in your project root directory with following command - #!/bin/sh open -a Terminal . Now, open terminal and run chmod +x Script.sh to...
Tips How to Remove unavailable simulators from Xcode? This little command will remove all unavailable simulators from Xcode. Here "unavailable" means unavailable to xcode-select's version of Xcode. xcrun simctl delete unavailable...
Tips Debug your AutoLayout constraints with Sound Notification And this is a great way to debug your AutoLayout constraints. Just pass UIConstraintBasedLayoutPlaySoundOnUnsatisfiable argument on launch and it’s plays sounds when constraints are screwed at runtime. -_UIConstraintBasedLayoutPlaySoundOnUnsatisfiable YES...
Tips How to Share files to Simulator from Finder? From Xcode 9, Simulator has Finder extension which allows you to share files directly from the Finder's window. However, drag & drop file to the Simulator's window seems much faster. However, You can do something similar with image/video files using the simctl command below: xcrun...
Tips How to capture the iOS Simulator video? You can take a screenshot or record a video of the simulator window using the xcrun command-line utility. To record a video, execute the following command xcrun simctl io booted recordVideo <filename>.<file extension>. For example: xcrun simctl io booted recordVideo appvideo.mov Press control + c...
Xcode How to use Simulator in full-screen mode with Xcode? Being able to run Xcode and iOS simulator together in full screen mode is probably my favorite feature of Xcode 9. You can just execute the following command in the terminal to enable this feature: defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES...
Tips How to improve the Swift project build time? The Xcode 9.2 release notes mentioned an experimental feature that may improve Swift build times, enabled with the "BuildSystemScheduleInherentlyParallelCommandsExclusively" user default. defaults write com.apple.dt.Xcode BuildSystemScheduleInherentlyParallelCommandsExclusively -bool NO Note: According to the release notes it's an experimental feature which can "increase memory...