0

After Firebase configuration, I try to run the simulator IOS 15.2 on iPhone 8 with visual Studio code with the command "run without debugging" but I get this error :

    Launching lib/main.dart on iPhone 8 in debug mode... CocoaPods' output:
Error output from CocoaPods: Ignoring ffi-1.14.2 because its extensions are not built.
Try: gem pristine ffi --version 1.14.2
        [!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install Error launching application on iPhone 8.
Exited (sigterm)

and when I run the error suggestion :

    ismac@ismails-MacBook-Pro flutter_chat % gem pristine ffi --version 1.14.2
    Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. 

Can you please help me ?

ismail
  • 318
  • 2
  • 11

1 Answers1

-1

This is the solution that worked for me.

follow this video : https://www.youtube.com/watch?v=EXp0gq9kGxI then open Podfile in ios folder and change :

"# platform :ios, '9.0'" to "platform :ios, 'current_version_of_ios'"

current_version_of_ios : is the real version of IOS in the moment you read this solution then before run the simulator :

Delete the podfile.lock file from iOS folder after that go to ios folder and run a below command

Pod install

It will install all the packages which are in your podfile.

Also, you need to set the target platform. Stay in the iOS folder and run below command

open Runner.xcworkspace

then your app will be open in XCode. Click on the "Runner" and set your target platform to 8.0. I fix my iOS build issue using this hope this will work for you.

ismail
  • 318
  • 2
  • 11
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/30777099) – Mario Petrovic Jan 09 '22 at 21:29
  • 1
    @MarioPetrovic ,it's done. – ismail Jan 09 '22 at 21:42