How to resolve missing required file for Flutter iOS Build - xcode

I have written my first non-trivial flutter app and have successfully built and run it on both the Android and iOS simulators and an Android device (MOTO G7). In attempting to build it for an Xs Max connected to my iMac I get the following error during the Xcode build:
/Users/dev/FirstApp/ios/Runner/GeneratedPluginRegistrant.m:6:9: 'path_provider/PathProviderPlugin.h' file not found
I have searched the disk and found the following:
/Users/dev/FirstApp/build/ios/Debug-iphonesimulator/path_provider/path_provider.framework/Headers/PathProviderPlugin.h
/Users/dev/FirstApp/build/path_provider/intermediates/javac/debug/compileDebugJavaWithJavac/classes/io/flutter/plugins/pathprovider/PathProviderPlugin.class
I have googled and checked SO for various hints/solutions. None of the, few, suggested fixes has worked for me. My Flutter Doctor -v command display all checkmarks and no issues.
Am I missing something? Is this a Flutter/Xcode bug? I am using Xcode 10.3 and Flutter 1.7.x. Any suggestions or outright fixes would be appreciated.

In your xcode Open the *.xcworkspace file instead of *.xcodeproj file then
Product>Clean
Product>Archive
and waiting

Related

Flutter IOS build problem can't do flutter build ipa

hope u can help me, I've been stuck for days now with this problem. With the Android build I had no problems, but when I try to do flutter build ipa I get the following error:
Running Xcode build...
Xcode archive done. 74,4s
Failed to build iOS app
Error (Xcode): ../../.pub-cache/hosted/pub.dev/titled_navigation_bar-4.1.0/lib/src/navigation_bar.dart:83:11: Error: No named parameter with the name 'overflow'.
Encountered error while archiving for device.
I've tried several things like:
-flutter clean
-flutter pub cache repair
I've also tried to remove the package and install de pubs again, I've tried downgrading flutter... pretty much everything I've found here but no luck.
Thanks in advance.

React Native `RuntimeError: abort(Error: xcrun exited with non-zero code: 2` on iOS simulator

I was working on a React Native project with a group and was asked to use the iPhone 13 simulator as a model while working. I only had access to the iPhone 12 simulator, and I saw that my XCode was a version behind, so I updated it. Now with the new XCode, I am getting an error when I start the React Native server and try and open the iOS simulator. the error is shown below:
Running this command with the suggested build with -s Assertions=1 reveals the following:
My package.json is as following:
Any idea what is going on or how to proceed? Expo seems to be able to run, but trying to open the simulator crashes the server. The project I am on is near tight deadlines and I am totally held up by this. Either a way to troubleshoot this error or a way to roll back my XCode install and just live with a dated simulator would be greatly appreciated.
Figured it our thanks to ShepSims from https://github.com/expo/expo-cli/issues/2413 . Before being able to open the iOS simulator from the terminal, I needed to open XCode and open the simulator there. This mounts the simulator bundle, allowing later access by pressing i after running expo start.
I was receiving the same error as above with XCode command line tools installed only, no XCode installed.
I tried re-installing XCode command line tools which didn't do anything.
For me this was solved with advice mentioned at https://github.com/expo/expo-cli/issues/3871:
open Simulator.app, as it automatically sets the default device.
It is not anything. It was solved by opening simulator from XCOde on my mac
The fastest way from my point of view is "spotlight" (Cmd+Space) search for "Simulator", hit enter before running "expo start" in your terminal.
You can solve the problem by using this command
sudo expo start
Or
manually open simulator
start app: react-native run-ios
manually do: Hardware -> Device -> select iOS -> select Device (different than before !)
that will open a second simulator
start the app again: react-native run-ios (expo start then press i)
this opens the app in the selected simulator
Note:- please stay open the silumater then press the i in the expo and same for the react-native run-ios command

Problems with running app In flutter simulator after reinstalling Xcode

Sorry I need help I am total new into programming/developing.
Im working om a Mac M1 and I did experience problems.
In terminal I write:
flutter create and the flutter run.
The app builds.
But when I try to run and debug in vscode this error comes up:
Expected ios/Runner.xcodeproj but this file is missing. No application found for TargetPlatform.ios. Is your project missing an ios/Runner/Info.plist? Consider running "flutter create ." to create one.
Any ideas?

Nativescript: Error Building for iOS Simulator

I have followed the complete install guide for nativescript on a Mac (Big Sur). Also when running tns doctor everything seems fine. However, when i'am running tns build ios or tns run ios i get the following error:
error: Building for iOS Simulator, but the linked and embedded framework 'TNSWidgets.framework' was built for iOS + iOS Simulator. (in target 'projectapp' from project 'projectapp').
Could someone please tell me how to fix this. I installed nativescript 7.0.11 and
x-code 12.3
Yesterday with the Xcode update (12.3) I've got the same error, after seeing a lot of posts about this error the solution from Niko Dovidija IS THE CORRECT ONE.
My environment:
Xcode 12.3
iOS platform 6.5.3
Nativescript 6.7.8
In order to build the application in CLI update build.xconfig in iOS platform and add this line:
VALIDATE_WORKSPACE = YES
Posts about "similar" errors and didn't work for me.
Building for iOS simulator
Building for iOS simulator 'AFNetworking.framework'
So I just updated Xcode to 12.3 today, using nativescript 7.0.11 in my project and I got a simular issue. What worked for me was:
Open the platforms/ios folder using Xcode
Select "yourprojectname.xcodeproj" from the list
Select yourprojectname from the Targets
Expand Build Options and find Validate Workspace
Change to Yes
Rebuild the project
After that, I got a successful build.
Please note that I also needed to run ns platform clean ios command in order to make the build work after updating my Xcode to 12.3

Failed to find a suitable device for the type IBSimDev

I'm getting the following 2 errors that seem that alternate every time I try to build. I just upgrade my iOS to 12.2 which forced me to upgrade my osx to Mojave 10.14.4 and my xcode to 10.2.
Failed to find or create execution context for description.
Filed to find a suitable device for the type IBSimDeviceTypeiPad2x in
Assets.xcassets
This I have tried:
Cleaning Build Folder (repeatedly)
Closing and restarting Xcode and the simulator
Deleting Derived Data
I had faced the same issue my issue resolved by doing:
Clean build folder (shift + command + K)
Restart your system (Mac)
Note: Also missing simulator after updating to Xcode 10.3 fix by this solution.
Run this command in the terminal to make sure all simulator process in the background are killed :
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Well I don't know how many other people this is going to help out but here was my issue:
I poked around and finally got another error that said that my simulator runtime is not available. What ended up solving it was simply restarting my macbook found from this thread: The iOS 8.1 simulator runtime is not available error in Xcode 6.1

Resources