- Open Xcode -> Preferences -> Components.
- Open the Console App, clear the console.
- Go back to the Xcode preferences. Start the simulator download, then cancel it.
- Now in the Console, you will see something about the cancellation with the download URL.
- Copy the URL from the Console, download it.
- Copy this file to ~/Library/Caches/com.apple.dt.Xcode/Downloads.
- If
Downloads
did not exist, create a newDownloads
directory. - If
Downloads
exists, remove all*.dvtdownloadableindex
files under it.
- If
- Open Xcode -> Preferences -> Components, start the simulator download again, it should find the file you downloaded and install it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.cinterop.memScoped | |
import kotlinx.cinterop.allocArrayOf | |
import kotlinx.cinterop.addressOf | |
import kotlinx.cinterop.usePinned | |
import platform.Foundation.NSData | |
import platform.Foundation.create | |
import platform.posix.memcpy | |
public fun ByteArray.toData(): NSData = memScoped { | |
NSData.create(bytes = allocArrayOf(this@toData), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSString+Truncate.m | |
// EMLabel | |
// | |
// Created by Mona Zhang on 3/31/15. | |
// Copyright (c) 2015 Mona Zhang. All rights reserved. | |
// | |
#import "NSString+Truncate.h" |