David Cruz
David Cruz

Reputation: 3017

No such module "CreateMLUI"

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

Playground Screenshot

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

Does anyone know what I am doing wrong?

Thanks in advance.

Upvotes: 25

Views: 7622

Answers (6)

David Cruz
David Cruz

Reputation: 3017

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 you have already created a buggy playground (this is important)
  3. Add the import CreateMLUI line
  4. Remove all the other boilerplate code

Upvotes: 48

Micheal Bee
Micheal Bee

Reputation: 628

In new versions of macOS, the CreateMLUI library has been deprecated and removed. Instead, create models in CreateML, a developer application inside Xcode.

Upvotes: 0

Nadia Ahmadian
Nadia Ahmadian

Reputation: 19

This feature is no longer supported in this environment. You can complete this task in the Create ML app. Follow these steps:

Xcode -> Toolbar -> Open Developer Tool -> Create ML -> New Document

Upvotes: 1

IvanPavliuk
IvanPavliuk

Reputation: 1790

  1. Open Xcode menu
  2. Choose Open Developer Tool > Create ML
  3. Press New Document
  4. Select Image Classification
  5. Specify name and a place where the project will be saved

Upvotes: 1

brockhampton
brockhampton

Reputation: 314

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

Upvotes: 1

infinite369
infinite369

Reputation: 75

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.

Upvotes: 5

Related Questions