Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such module "CreateMLUI"

I am using macOS Mojave Beta (10.14 18A293u) and Xcode 10.0 Beta (10L176w). I created a Swift Playground and I am unable to import CreateMLUI framework in order to use it. I keep getting an import error.

Playground Screenshot

I have tried creating both an iOS Playground and a macOS Playground

Anyone knows what I am doing wrong?

Thanks in advance.

like image 669
David Cruz Avatar asked Jun 06 '18 19:06

David Cruz


3 Answers

While macOS Mojave and Xcode 10 are in beta you may experience bugs while trying to use CreateML.

@Koen from one of the comments in my question found a topic in Apple Developer Forums with some workarounds. What I did was:

  1. Create a new single view Mac OS (NOT iOS) playground
  2. Use a completely different name if already created a buggy playground (this is important)
  3. Add the import CreateMLUI line
  4. Remove all the other boilerplate code
like image 162
David Cruz Avatar answered Oct 24 '22 15:10

David Cruz


I found the answer to this problem in the apple developers forum (Can't find the exact link to the post). You simply have to select the macOS tab when creating a playground.

like image 4
infinite369 Avatar answered Oct 24 '22 13:10

infinite369


When you create the playground make sure you select "macOS" tab instead of. "iOS".

like image 1
brockhampton Avatar answered Oct 24 '22 14:10

brockhampton