how to fix Archive Runner fail in flutter? - xcode

I made an app using a flutter and I want to distribute it to the app store. However, if I run archive, It has fail.
flutter clean
flutter getpackage
flutter upgrade and update
product clean in xcode
but I has success product -> build
just when I distribute the app to archive. I got fails...
Building AOT snapshot in release mode (ios-release)...
Dart snapshot generator failed with exit code -9
Building AOT snapshot in release mode (ios-release)... 309.0s (!)
Built to build/aot/.
Snapshotting (IOSArch.arm64) exited with non-zero exit code: -9
cp: build/aot/App.framework: No such file or directory
error: cannot parse the debug map for 'build/aot/App.framework/App': No such file or directory
Failed to generate debug symbols (dSYM) file for build/aot/App.framework/App.

You need to run "flutter build ios" before use the code in Xcode
Check the docs: https://flutter.dev/docs/deployment/ios

I solved this problem.
I made so many .dart files
so I spend a lot of time doing compile.
the problem is that there are many dart files
We need to reduce the dart file.
I built the release version and it was successful, leaving only the main files behind.
So the unnecessary dart file was erased and the build was successful.
But I don't think this is a fundamental solution.
I will continue to develop and make dart files. Then you'll face a situation where you don't build again.

Related

How can I fix build procedure for Tauri app on Windows?

I am an absolute beginner to to Tauri apps while building applications using Rust and NextJS (For UI). I am currently creating a Desktop app that is cross platform. The code compiles successfully. I use npm run tauri build to create builds for the application. The problem is that this command successfully builds .deb packages for Linux distros and .dmg for Macos. But fails to create an MSI installer for Windows.
I am sharing the logs for the build on Github actions. I was under the impression that this problem was probably only occuring on my code and my PC. But it seems it was failing on Github actions as well.
Compiling tauri-app v1.0.0 (D:\a\tauri-app\tauri-app\src-tauri)
Finished release \[optimized\] target(s) in 9m 35s
Info Verifying wix package
Downloading https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
Info validating hash
Info extracting WIX
Info Target: x64
Running candle for "main.wxs"
Error failed to bundle project: error running candle.exe: error running candle.exe: `failed to run C:\Users\runneradmin\AppData\Local\tauri/WixTools\candle.exe`
I have followed all the steps as specified in the documentation by Tauri at Tauri documentation. And also did exactly what was stated here at Cross platform compilation. This could be a bug from Tauri as well. Because wix is failing instantly. I have tried removing WixTools from the directory as it automatically downloads it. But had no luck! So if anyone can help me out with this, that would be perfect!

Incremental compilation has been disabled: it is not compatible with whole module optimization flutter

Hello flutter developer i created app on flutter which running on simulator successfully but now i am trying to create archive for uploading app on apple store i am getting this erorr
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
Command CompileSwiftSources failed with a nonzero exit code
i tried everything all this steps.
in build setting swift-compiler code generation->compilation mode incremental
pod deintegrate and resinstall
pod update
delete all xcode drive data tried again but everything failed please help it is very frustrating for me
also check image below

flutter 3.3 ShaderCompilerException ink_sparkle.frag failed with exit code -1073740791

Since updating my flutter to 3.3+ everytime I try to build my project there is this error on the console:
Target web_release_bundle failed: ShaderCompilerException: Shader compilation of
"C:\flutter\packages\flutter\lib\src\material\shaders\ink_sparkle.frag" to "build\web\assets\shaders/ink_sparkle.frag"
failed with exit code -1073740791.
Compiling lib\main.dart for the Web... 52,1s
Exception: Failed to compile application for the Web.
I've tried running flutter clean, deleting the project and downloading it again from github, clearing pub-cache from c:\flutter folder and also deleting flutter and installing it again but nothing worked
If you are using a mac try to open 'Security & Privacy' and give permission to the app that requests it.
It may seem out of context. But it worked for me!
This error is present since 3.3.0 and until today (3.3.2), it wasn't fixed... but there are some workarounds:
1- Downgrade flutter to 3.0.5 (some updates to the libs you use won't be avaliable as they are migrating to 3.3+)
2- They are currently tracking the issue on github and the 'temp fix' is checking if your project is in a folder with a utf8 character (like 'â', 'Á' and maybe some chinese or japanese characters) and moving it to a folder only with ASCII characters.
Ex:
from -> C:\Users\user\Área de Trabalho\
to -> C:\Users\user\

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

'hello/Hello.h' file not found - Trying to build/run iOS gomobile Hello app

I am building the gomobile Hello example app, but am running into the following problem: When trying to build and run the app after opening it in Xcode (7.1), I get the error 'hello/Hello.h' file not found'
From what I can tell, Hello.h is in fact in the hello folder of the native directory.
Following this discussion on Github, it seems like this is due to a recent change in the way Xcode 7 updates paths for the headers.
The proposed solution is to check Copy items if needed when importing the framework:
I can confirm that this fixes the issue. But note that you would then need to re-import the framework every time you make changes and build the go code.

Resources