Right now you can try iOS 12 only using the beta version of Xcode, and you will also need macOS Mojave if you want to use the new Create ML tools.
When you creat the playgrond, choose macOS. That worked for me.
didnt work for me, ( I am on Mojave and xcode 10 beta).
For the import this worked, only the MLImageClassifierBuilder isn't available in macOS 10.13.x
Just in case anyone's still wondering, you need:
- A Mac computer on OSX Mojave beta (10.14)
- Xcode 10 beta
Then, the steps are as follow:
- Create a Playground
- By default, it would be set to iOS, so show Inspector (right pane) and change to macOS
- Remove any iOS code (like import UIKit), and write your macOS code (start by import CreateMLUI)
- It's still buggy, so if it doesn't compile, save then Command+Q to quite Xcode
- Relaunch Xcode, compile, hopefully it would work this time.
I originally made the same dumb mistake a lot of other people had and created an iOS playground, but even after creating a Mac OS one I still go the same error. Quitting didn't seem to fix it. What did was:
- Create a new single view Mac OS playground
- Use a completely different name
- Add the import CreateMLUI line
- Remove all the other boilerplate
Hope you find a solution...
Really should bump this up to the top!
1. Select macOS and NOT iOS.
2. Xcode version should be 10+
3. MacOS version should be mojave
1. Create a new playground with macOS application type playground.
2. If creatMLUI is not shown then, close the xcode and restart it.
3. As this is still in beta, it takes few time. Repeat step 2 till compliler identifies "CreateMLUI".