How do you integrate your CreateML file into a your App Playground Xcode project without this error? No predominant language detected. Set COREML_CODEGEN_LANGUAGE to preferred language.

I see the solution is simple "just change the language in the build settings" but the build settings are not a thing in an App Playground project. It also says duplicated tasks.

Answered by FahimU89 in 822647022
  1. Open your Package.swift file.
  2. Update your iOS version to 18.2 (or whatever the latest version is).
  3. Adjust your targets to look like this:
let package = Package(
    name: "SSC Project",
    platforms: [
        .iOS("18.2")
    ],
    targets: [
        .executableTarget(
            name: "AppModule",
            path: ".",
            resources: [
                .copy("Exercises")
            ]
        )
    ]
)

For reference, the "Exercises" folder is where I kept my ML model. Make sure to replace "Exercises" with the name of your folder and update the iOS version accordingly. That's it!

Accepted Answer
  1. Open your Package.swift file.
  2. Update your iOS version to 18.2 (or whatever the latest version is).
  3. Adjust your targets to look like this:
let package = Package(
    name: "SSC Project",
    platforms: [
        .iOS("18.2")
    ],
    targets: [
        .executableTarget(
            name: "AppModule",
            path: ".",
            resources: [
                .copy("Exercises")
            ]
        )
    ]
)

For reference, the "Exercises" folder is where I kept my ML model. Make sure to replace "Exercises" with the name of your folder and update the iOS version accordingly. That's it!

How do you integrate your CreateML file into a your App Playground Xcode project without this error? No predominant language detected. Set COREML_CODEGEN_LANGUAGE to preferred language.
 
 
Q