title: Firebase App Working In Simulator But Problem On Actual iPhone
body: <p>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...</p>
  
  <pre><code>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) 
  </code></pre>
  
  <p>Here is my code inside my applicationDidFinishLaunchingWithOptions()</p>
  
  <pre><code>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {
          // Override point for customization after application launch.
          let db = Firestore.firestore()
          FirebaseApp.configure()
          return true
      }
  </code></pre>
  
  <p>Here is the code inside my main view controller</p>
  
  <pre><code>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: &lt;#T##MLModel#&gt;)
  //            else
  //        {
  //            fatalError("SkinDiseaseRecognitionV1 Model Failed")
  //        }
  //        let request = VNCoreMLRequest(model: &lt;#T##VNCoreMLModel#&gt;) { (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(&lt;#T##collectionPath: String##String#&gt;)
  //    }
  }
  
  extension MainViewController
  {
      @IBAction func linkButtonPressed(_ sender: UIButton)
      {
      }
  }
  
  </code></pre>