Error deploying model on iOS

This category is for question related to accounts on https://app.roboflow.com/

Please share the following so we may better assist you:

  1. Project type (Object detection, Classification, Polygon, etc.)
    Object detection
  2. The operating system & browser you are using and their versions
    iOS Swift.
  3. The screenshot of the error being triggered in your browser’s developer tools/console. Please copy/paste the url below to watch how to pull up your devtools

I’m able to successfully use the hosted API, but when I try to deploy a model to iOS I always get No Model Found. Trying Again. Error loading model. Check your API_KEY, project name, and version along with your network.

Any tips on what I need to do to properly configure it?

Hey @tbelote

It sounds like you have Roboflow on Swift properly installed but there’s a problem with your configuration.

Is this similar to how you are configuring your Roboflow instance? (From Roboflow on iOS docs)

import Roboflow

let rf = RoboflowMobile(apiKey: "API_KEY")
rf.load(model: "YOUR-MODEL-ID", modelVersion: YOUR-MODEL-VERSION-#) { [self] model, error, modelName, modelType in
    ... *content*
}

or

import Roboflow
let rf = RoboflowMobile(apiKey: "API_KEY")
let (model, loadingError, modelName, modelType) = await rf.load(model: "YOUR-MODEL-ID", modelVersion: YOUR-MODEL-VERSION-#)

You should be replacing the API key, model ID, and model version with info from your account. Your error suggests it might not be loading in the model properly, so double-check that.

  • API Key: Go to the Roboflow App, click on Account > Settings > Under your workspace click Roboflow API > Make sure to use the Private API Key, not the publishable one.
  • Model Name & Version: Go to your model version in the Roboflow App, look in the URL: https://app.roboflow.com/project/*model name*/*model version*

If that isn’t the issue, sending the code you’re having trouble with might help us fix your problem quicker. (Make sure to remove sensitive info such as your API key when sending it)

Thanks, I’m checking that now.

Here is roughly what my code looks like that doesn’t work:

let rf = RoboflowMobile(apiKey: “private_key_here”)
rf.load(model: “can-bottle-box”, modelVersion: 1) { [self] (model, error, modelName, modelType) in

It does work this way:
https://detect.roboflow.com/can-bottle-box/1?api_key=private_key_here&name=YOUR_IMAGE.jpg"

I’m using the example code in the UI here: Sign in to Roboflow

Hi @tbelote - thank you for adding the details. I wanted to ask if you can email me with a Google Drive folder containing your XCode files -and specifically, the code file with this snippet:
image

I’ll use it in a comparison to a personal test with my own projects, to see where the issue is coming up.

I’m emailing your forum-email, and sending a forum DM with my email address, now.

I sent an email and a dm with the details. Please let me know if you received them. Thanks!