reference resources: http://ios.jobbole.com/93171/
The first step is to create an. sh file. The code is as follows.
#!/ bin/bash
RAMDISK=”ramdisk”
SIZE=1024 #size in MB for ramdisk.
diskutil erasevolume HFS+ $RAMDISK \
`hdiutil attach -nomount ram://$[SIZE*2048]`
Step 2: Run the. sh file.
Later, you will find that you will have an extra RAM disk, which is about 1 GB in size.
![](http://blog.anbig.com/wp-content/uploads/2017/05/a0e4b390594e1be08d75c719fd7fd9ff-300x72.png)
![](http://blog.anbig.com/wp-content/uploads/2017/05/f50a5ea1016dd41d2a82d47ac462ae2b-157x300.png)
Step 3: Connect Xcode. Xcode -> Preferences -> Locations -> Locations Tab, Configure DerivedData.![](http://blog.anbig.com/wp-content/uploads/2017/05/a81e54b26e9846ff8153c9b7bcdc5a55-300x185.png)