After upgrading to Xcode 11.2 from Xcode 11.1, app crashes due to _UITextLayoutView

Update: Fixed! 🎉🎊 The ONLY Solution is to update This bug is fixed in Xcode 11.2.1. So you can download and use it from here. Storyboards containing a UITextView will no longer cause the app to crash on operating system versions earlier than iOS 13.2, tvOS 13.2, or macOS 10.15.2. (56808566, 56873523) Xcode 11.2 is … Read more

How to pass prepareForSegue: an object

Simply grab a reference to the target view controller in prepareForSegue: method and pass any objects you need to there. Here’s an example… – (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Make sure your segue name in storyboard is the same as this line if ([[segue identifier] isEqualToString:@”YOUR_SEGUE_NAME_HERE”]) { // Get reference to the destination view controller … Read more

How can I delete derived data in Xcode 8?

(Working in Xcode 11 and 12) You can go to File > Workspace Settings if you are in a workspace environment or File > Project Settings for a regular project environment. Then click over the little grey arrow under Derived data section and select your project folder to delete it.

Error when testing on iOS simulator: Couldn’t register with the bootstrap server

status: this has been seen as recently as Mac OS 10.8 and Xcode 4.4. tl;dr: This can occur in two contexts: when running on the device and when running on the simulator. When running on the device, disconnecting and reconnecting the device seems to fix things. Mike Ash suggested launchctl list|grep UIKitApplication|awk ‘{print $3}’|xargs launchctl … Read more

How do I install CocoaPods?

POD Install Open terminal and type: sudo gem install cocoapods The Gem will get installed in Ruby inside the System library. Or try on Mac OS X v10.11 (El Capitan), type: sudo gem install -n /usr/local/bin cocoapods If there is an error “activesupport requires Ruby version >= 2.xx”, then install latest activesupport first by typing in the … Read more

Add an element to an array in Swift

As of Swift 3 / 4 / 5, this is done as follows. To add a new element to the end of an Array. anArray.append(“This String”) To append a different Array to the end of your Array. anArray += [“Moar”, “Strings”] anArray.append(contentsOf: [“Moar”, “Strings”]) To insert a new element into your Array. anArray.insert(“This String”, at: … Read more