“End-of-central-directory signature not found.” when installing Xcode 8 beta xip file

The .xip file format contains an archive (xar containing a gzip archive and metadata) and a signature of the archive. The signature is important, since previously Xcode downloads have been altered (eg. XcodeGhost) to inject malicious code into apps. Therefore, approaches like skipping the verification (xattr -d com.apple.quarantine Xcode_8_beta.xip) seems irresponsible. I strongly encourage you … Read more

Get UITableView to scroll to the selected UITextField and Avoid Being Hidden by Keyboard

In my app, I have successfully used a combination of contentInset and scrollToRowAtIndexPath like this: When you want to display the keyboard, just add a contentInset at the bottom with your table with desired height: tableView.contentInset = UIEdgeInsetsMake(0, 0, height, 0); Then, you can safely use [tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:cell_index inSection:cell_section] animated:YES]; By adding the contentInset, … Read more

Xcode – Automatically add all files in a folder to a target

This is completely broken in Xcode. Adding folders by folder reference (@Pavel’s answer) should be correct – but it just doesn’t work. See also https://stackoverflow.com/a/42600782/2518722. I’m using Xcode 8.3 (update: still broken in Xcode 11), but it’s been broken for many generations prior, too. There isn’t a perfect workaround, but this is what I do: … Read more

Failed to install command line tools on OSX Mavericks

Install them from here. You must be a registered developer. Other solution is: in xcode click Xcode>Open Developer Tool>More Developer Tools This should then take you to a link which will require a developer Apple ID sign in. From there, you’ll be redirected after authenticating to https://developer.apple.com/download/more/ where you can manually download and install the … Read more