title: Flutter signature invalid when tried on an iOS device
body: <h2>TL;DR</h2>
  <p><strong>EDIT 2020-05-06</strong> : My app installs correctly from iOS 13.4, but after some time the app crashes at start and I have to re-install it. I don't know why. Maybe after iOS updates?</p>
  <p>Also see answer below: <a href="https://stackoverflow.com/a/60013390/1121497">https://stackoverflow.com/a/60013390/1121497</a></p>
  <h2>Full question</h2>
  <p>I am trying to run a new Flutter app (the sample app created by <code>flutter create</code>) on an iOS device (an iPhone XS).
  Xcode manages to install it, but then it crashes with this message:</p>
  <pre><code>dyld: Library not loaded: @rpath/Flutter.framework/Flutter
    Referenced from: /private/var/containers/Bundle/Application/BA807438-FA5B-4021-B37D-FC437B2C80CA/Runner.app/Runner
    Reason: no suitable image found.  Did find:
      /private/var/containers/Bundle/Application/BA807438-FA5B-4021-B37D-FC437B2C80CA/Runner.app/Frameworks/Flutter.framework/Flutter: code signature invalid for '/private/var/containers/Bundle/Application/BA807438-FA5B-4021-B37D-FC437B2C80CA/Runner.app/Frameworks/Flutter.framework/Flutter'
  </code></pre>
  <p>If I try <code>flutter run</code>, the app also opens and crashes. And the command keeps waiting forever:</p>
  <pre><code>$ flutter run
  Launching lib/main.dart on Ferran Maylinch’s iPhone in debug mode...
   
  Automatically signing iOS for device deployment using specified development team in Xcode project: 25D86TPBWG
  Running Xcode build...                                                  
                                                     
   ├─Assembling Flutter resources...                           4.3s
   └─Compiling, linking and signing...                        13.3s
  Xcode build done.                                           21.0s
  Installing and launching...                                             
  (This is taking an unexpectedly long time.)       ⢿
  </code></pre>
  <p>In Xcode I configured a Team (Personal Team) and the Signing Certificate (Apple Development certificate) seems fine because I can install a Hello world Swift project on my device.</p>
  <p>Note: <strong>I'm not paying an account of Apple Developer Program</strong>. Is that absolutely necessary to run Flutter apps on iOS devices?</p>
  <p>I have followed the <a href="https://flutter.dev/docs/get-started/install/macos" rel="noreferrer">macOS instructions</a> and <code>flutter doctor</code> says I have everything I need for iOS:</p>
  <pre><code>[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-ES)
   
  [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
      ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
  [✓] Xcode - develop for iOS and macOS (Xcode 11.3)
  [!] Android Studio (version 3.5)
      ✗ Flutter plugin not installed; this adds Flutter specific functionality.
      ✗ Dart plugin not installed; this adds Dart specific functionality.
  [✓] IntelliJ IDEA Ultimate Edition (version 2019.3.1)
  [!] VS Code (version 1.41.1)
      ✗ Flutter extension not installed; install from
        https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
  [✓] Connected device (1 available)
  
  ! Doctor found issues in 3 categories.
  </code></pre>
  <p>As you can see, I used the stable channel, to discard problems with the beta channel, but I usually work in the beta channel to build <a href="https://flutter.dev/docs/get-started/web" rel="noreferrer">flutter for web</a> (which works fine).</p>
  <p>In the iOS simulator the app works fine too.</p>
  <p>Recently I noticed that I don't have the file <code>ios/Podfile</code>. I found <a href="https://stackoverflow.com/questions/51599686/flutter-podfile-and-pods-folders-not-created-in-ios-directory">this post</a> talking about that. I don't know whether this is important or not in my case, but I tried to manually add this <a href="https://github.com/flutter/flutter/blob/master/examples/flutter_view/ios/Podfile" rel="noreferrer">Podfile</a>. Anyway, I get the same signature error.</p>
  <p>Frustrated by this, I switched to <a href="https://www.nativescript.org/" rel="noreferrer">NativeScript</a> for now.</p>