0

I have an iPhone 6s Plus. My app runs perfectly on the simulator... though I am facing some problems with running it on my phone... I haven't even asked my app to fetch any data from Firestore, I have just initialised firebase and it is crashing... Let me show you what the debug console says...

dyld: Library not loaded: @rpath/FBLPromises.framework/FBLPromises
  Referenced from: /private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/SmartSkin
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=25
    /private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
    /private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/5D5C5446-A64F-4613-91EE-D3ABC4B5DA72/SmartSkin.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
(lldb) 

Here is my code inside my applicationDidFinishLaunchingWithOptions()

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        let db = Firestore.firestore()
        FirebaseApp.configure()
        return true
    }

Here is the code inside my main view controller

import UIKit
import CoreML
import Vision
import FirebaseFirestore

let db = Firestore.firestore()

class MainViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate
{

    @IBOutlet weak var skinImageView : UIImageView!
    let imagePicker = UIImagePickerController()

    override func viewDidLoad()
    {
        super.viewDidLoad()
        imagePicker.delegate = self
        if UIImagePickerController.isSourceTypeAvailable(.camera)
        {
            imagePicker.sourceType = .camera
        }
        imagePicker.allowsEditing = false
    }

//    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any])
//    {
//        if let image = info[.originalImage] as? UIImage
//        {
//            skinImageView.image = image
//            guard let ciimage = CIImage(image: skinImageView.image!) else{fatalError("Could Not Convert To CIImage!")}
//            detect(image : ciimage)
//        }
//    }
//
//    func detect(image : CIImage)
//    {
//        guard let model = try? VNCoreMLModel(for: <#T##MLModel#>)
//            else
//        {
//            fatalError("SkinDiseaseRecognitionV1 Model Failed")
//        }
//        let request = VNCoreMLRequest(model: <#T##VNCoreMLModel#>) { (request, error) in
//            guard let results = request.results as? [VNClassificationObservation]
//                else
//            {
//                fatalError("InceptionV3 Failed To Process Image")
//            }
//            print(results)
//            if let firstResult = results.first
//            {
//                self.navigationItem.title = firstResult.identifier.capitalized
//            }
//            let handler = VNImageRequestHandler(ciImage: image)
//
//            do
//            {
//                try handler.perform([request])
//            }
//            catch
//            {
//                fatalError("There was an getting data from InceptionV3, \(error.localizedDescription)")
//            }
//        }
//    }
//
//    @IBAction func cameraButtonPressed(_ sender: UIBarButtonItem)
//    {
//        present(imagePicker, animated: true, completion: nil)
//    }

//    func getLink(document: String)
//    {
//        db.collection(<#T##collectionPath: String##String#>)
//    }
}

extension MainViewController
{
    @IBAction func linkButtonPressed(_ sender: UIButton)
    {
    }
}

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
XtremeDevX
  • 1,482
  • 2
  • 13
  • 38
  • I have noticed that there was an error, in the firebase configuration but I have fixed that too and it is still not working on my iPhone – XtremeDevX May 16 '20 at 15:59
  • Hey Frank!! Would you by any change know how to sort out this issue? This happened even with my previous app... I really appreciate any help I receive! – XtremeDevX May 16 '20 at 16:21
  • Is there something basic I am missing – XtremeDevX May 16 '20 at 16:34
  • Two thoughts: 1. Is the Simulator running on the same iOS version as your physical device? 2. Did you setup the GoogleService-Info.plist? – RedX May 16 '20 at 16:53
  • 3
    Ah nevermind sorry, I didn't read the error message. Here is the solution: https://stackoverflow.com/questions/60096258/library-not-loaded-rpath-fblpromises-framework-fblpromises-ios-13-3-1 – RedX May 16 '20 at 16:55
  • Hey RedX! Does this mean that it should get an apple developer account?? Will that solve the solution for sure?? Thanks so much for responding!! – XtremeDevX May 16 '20 at 16:59
  • No, as the accepted answer describes: “ UPDATE 04/2020: Upgrading to iOS 13.4 and XCode 11.4 currently solves this issue.”. Which iOS version is your iPhone running on? Which Xcode version do you use? – RedX May 17 '20 at 13:38

0 Answers0