Unable to open Runner.xwworkspace file from project directory - xcode

While opening runner.xwworkspace from flutter project ios directory I am getting an error file does not exist.
Also while building it from xcode i am getting error ==> /bin/sh: /packages/flutter_tools/bin/xcode_backend.sh: No such file or directory

Did you change anything in your iOS project? If not then I can recommend recreating the iOS project by running flutter create again e.g.:
Go to the root of your project and remove ios directory and then recreate the project:
rm -rf ./ios
flutter create .
Check also the output from flutter doctor.

Related

Build Failed for flutter project in Xcode

Facing this issue when opening flutter project in Xcode
/Users/user/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.2/ios/Classes/webview-umbrella.h: No such file or directory (in target 'webview_flutter_wkwebview' from project 'Pods')
Please try these steps
Delete podfile.lock (Do NOT delete PodFile)
Delete .symlinks folder
Delete pods folder
Navigate to ios directory in terminal and run pod install
Open the xcworkspace file in xcode
Select product -> clean build folder
Run the project from xcode once. All subsequent builds should work in your ide

React native IOS build issue

I installed Xcode from AppStore and started the project with react-native init IOS_project command. I had an error after running npm run ios and I opened .../IOS_project/ios/IOS_project.xcodeproj file with Xcode and started the build. Build was failed with the error
fatal error: module map file /Users/artemgorovoi/Library/Developer/Xcode/DerivedData/IOS_project-distoubdwfsutrcrzcjxmzmcwzfx/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap not found
https://i.stack.imgur.com/CWx5U.jpg
https://tinyjpg.com/web/output/rt2x4mgj3tgk8607dy3q0ad6utw2ep1m/94D33C31-0A82-406D-B07F-299E0F621023.png
this happens because in order to run your React Native project through Xcode you must open the .xcworkspace file, in your case IOS_project.xcworkspace, if you only open the .xcodeproj file Xcode won't be able to locate your Pods

issue with all >1.2 flutter version on mac

17.5 ( last before 1.2 ) and when I try to upgrade to 1.2 or more I have
Warning: Podfile is out of date
This can cause issues if your application depends on plugins that do not support iOS.
See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.
To regenerate the Podfile, run:
rm ios/Podfile
I tried rm ios/Podfile
rm: ios/Podfile: No such file or directory
I follow issue and solution but not working with me ... Or did wrong things
If someone can help me thank you
[Edit] : I remove podfil, and It's ok, thank you for help
Find where your project file is stored in finder. Or by typing find ~/ -type f -name "YOUR PROJECT NAME" in terminal. list your files by typing ls and go into the ios file in your flutter project, then type rm Podfile. This should delete the podfile, and once you run the project again, the pods will be installed via flutter
Best thing to do here is regenerate the iOS Project.
If you have made any changes to the native solution (Xcode), meaning new view controllers, assets, or video files, etc, then make sure to back those up first.
Then delete the iOS project, from your flutter project workspace, and run the following command:
flutter create -i swift .
This will generate a swift solution, but if you're looking for objective-c then try this:
flutter create -i objc .
After the iOS project is recreated, you will need to clean the project, then make sure that the podfile exists in your project directory.
Then run:
cd ios
podfile install
After the podfile installs all the required dependencies, try a fresh deployment of your iOS project:
flutter run -d "Device Name" --release
But make sure that you are running flutter on the root directory, so:
cd ..

Can't find React native project on iOS Simulator or Xcode project

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.
Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.
Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.
Can anyone please help re-integrating the project in the emulator and on Xcode, please.
Here is the error when the emulator is running in a general terminal:
Here is the error when the emulator is running in a general terminal:
error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Here is the error for building the project within emulator when ran from VS code integrated terminal:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj
The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.
First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
Change the name and version accordingly on package.json
Delete /ios and /android folders which are remaining from your older app.
Run $react-native upgrade to generate /ios and /android folders again.
Run $react-native link for any native dependency.
Finally run $react-native run-ios or anything you want.
Courtesy of
https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project

nativescript 2.5 blank template error

I have just updated to NativeScript 2.5
I have created a new blank project using tns-template-blank:
$ tns create BlankProject --template tns-template-blank
...... Project BlankProject was successfully created.
When I try to run it, I get an error:
$ cd BlankProject $ tns run ios --emulator
We have failed to check if we need to add a compatability
LaunchScreen.xib due to: Error: ENOENT: no such file or directory,
open
'/Users/joseanquiles/MyProjects/Nativescript/BlankProject/app/App_Resources/iOS/Info.plist'
ENOENT: no such file or directory, scandir
'/Users/joseanquiles/MyProjects/Nativescript/BlankProject/platforms/ios/BlankProject/Resources'
However, if I create a new project using default template (without --template option), it run ok in iOS emulator.
Before, with NativeScript 2.4.2, it run perfectly, using blank template.
Is there a problem with blank template and 2.5 ?
Thank you in advance.
I had the same problem (for an iOS build) using both the tns-template-tab-navigation and the tns-template-master-detail and i noticed that a folder (and its contents) were missing from the app folder... the missing folder is called App_Resources.....
To fix the problem I just found a previous project that i had built with the default template (I think...) and copied the App_Resources folder across into the failing app folder.
My guess is that only a couple of the templates actually build the App_resources folder correctly but once you have copied the folder across from a successful build it 'should' work OK
Cheers
Ian

Resources