# Error loading model using Roboflow Mobile iOS SDK

**URL:** <https://discuss.roboflow.com/t/error-loading-model-using-roboflow-mobile-ios-sdk/2076>\
**Category:** 🤝  Community Help\
**Created:** [April 29, 2023, 3:26pm UTC](https://discuss.roboflow.com/t/error-loading-model-using-roboflow-mobile-ios-sdk/2076 "2023-04-29T15:26:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuLius5838](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/julius5838/32/1849_2.png) [@JuLius5838](https://discuss.roboflow.com/u/JuLius5838)\
**Post date:** [April 29, 2023, 3:26pm UTC](https://discuss.roboflow.com/t/error-loading-model-using-roboflow-mobile-ios-sdk/2076/1 "2023-04-29T15:26:55Z")

</div>

Hi,  
I’m building an iOS app which uses object detection model (yolov8). I’ve already trained my model and uploaded the weights on roboflow. The model is available here: [Sign in to Roboflow](https://app.roboflow.com/school-wj3di/pmi-lu0ab/deploy/14)

But, when I’m trying to load the model using swift with this code:

```auto
import Foundation
import Roboflow
import SwiftUI

class RoboflowManager: ObservableObject{
    @Published var model : RFObjectDetectionModel?
    private let rf = RoboflowMobile(apiKey: "API_KEY")
    
    init(){
        Task.init{
            await loadModel()
        }
    }
    
    private func loadModel() async{
        let (loadedModel, loadError, _, _) = await rf.load(model: "MODEL", modelVersion: MODEL_VERSION)
        if let error = loadError{
            print("Error loading model : \(error)")
        }else{
            loadedModel!.configure(threshold:0.5, overlap:0.8, maxObjects: 2)
            self.model = loadedModel
        }
    }
    
    func detect(image: UIImage) async -> [RFObjectDetectionPrediction]?{
        guard let model = model else{
            print("Model not loaded")
            return nil
        }
        
        let (predictions, detectError) = await model.detect(image: image)
        if let error = detectError{
            print("Error detecting objects: \(error)")
            return nil
        }else{
            return predictions
        }
    }
}

```

I have the following error raised :

```auto
 No Model Found. Trying Again.
Error Loading Model. Check your API_KEY, project name, and version along with your network connection.

```

I obviously checked several times and the data are correct.  
Note that I have the same issue when using python and Pycharm on my local device. BUT, when I’m trying to load the model using Google Colab it finally works.  
I hope someone will have an answer to my question.
