I added some images to my Flutter app using XCode, then I closed it and opened VS Code to build the app (since I always use VS Code).
I'm always getting this error:
Error (Xcode): unable to attach DB: error: accessing build database "/Users/username/Library/Developer/Xcode/DerivedData/Runner-biyumwxiyqxyjkacscuqcbwbjroj/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
Could not build the application for the simulator.
Error launching application on iPhone 13.
I tried to do some changes like "flutter clean" and reinstalling Pod files.
I also tried to use an old "ios" folder but it doesn't solve the issue.
Finally I tried to use Android Studio but nothing changes.
This happens with XCode closed.
Some advices?
Related
I'm trying to run the flutter app from Xcode to the simulator but every time I face build-time errors.
I don't know how to handle these errors from Xcode cuz I'm new to ios development.
But I don't see any errors while launching the flutter app from vscode
My pubspec dependencies are already on the latest versions.
In screenshot below, firebase auth , dkphotoimage causes the error but they are already on latest versions
How can I solve this?
Here is the image
I am trying to run the initial example apps generated by the Kotlin Multi Platform Mobile plugin in Android Studio. I followed these steps for my environment setup. The Android Simulator runs correctly, but the iPhone Simulator does not. The Run Configuration has the following error:
Error: Selected scheme "iosApp" does not support "iphonesimulator"
When I run the configuration (ignoring the error), the iPhone simulator does open and appears to load iOS, but it never loads the "Hello, iOS" application that is in Android Studio.
What would cause this?
Version Information:
macOS 12.2.1
Android Studio 2021.1.1 Patch 2
Xcode 13.3
I fixed it with the following method.
Please close the Android Studio.
Go to ~/Library/LaunchAgents/ folder and delete com.jetbrains.AppCode.BridgeService.plist there.
Launch Android Studio with the KMM plugin again. It should work now.
From my tests, it seems that there may be multiple reasons for which we receive this error:
the root folder of the ios project has a different name than the .xcodeproject file. Sometimes it works even if they are different and maybe it matters if we change this name after the frameworks was already connected to the iOS project.
"Other linker flags" were manually copied and they were not copied using the copy button from the Connect the framework to your iOS project. This results to wrong data like:
"$(inherited)",
"-framework",
"shared\n",
instead of
"$(inherited)",
"-framework",
shared,
I managed to fix this by going into Edit Configurations on Android Studio and choosing the location of my XCode project file again. I believe this is an error of the KMM plugin in Android Studio and has yet to be fixed.
Updating Android Studio and KMM plugin worked for me.
This Question can be repeated, but i have tried with all solutions available on web.
I'm trying to open flutter project in xcode by opening Runner.xcworkspace file from ios folder,
but facing following issue.
Couldn't load Runner.xcodeproj
Couldn't load Pods.xcodeproj
P.S have tried installing Pods
P.S Have multiple build flavors
EDIT
Today is i got the error popup with following message
The project at '/Users/nikhilsawant/StudioProjects/zingoy-flutter/ios/Runner.xcodeproj' cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode
Anyone have any idea how can i fix this without update xcode, As i don't have any free space.
I've got a Xamarin Forms app that previously worked well on both android and iOS simulator. After updating VSCode and XCode on Mac, I'm not able to launch it again.
The app builds well, with no errors, but with a warning that says:
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "Xamarin.iOS". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (MSB3245)
Nevertheless, it compiles, but when I launch the app on debug (or release) mode, it launches the iOS simulator, and then I can see the pause and stop buttons on VSCode as it was running, but the app is not installed in the iOS simulator and I see no changes on the simulator, just the main screen of iOS.
No breakpoints are active and, if in Windows I connect Visual Studio 2017 to a MAC virtual machine, I can launch the app, but it's pretty slow, so I need it to work on the MAC VM.
I've also tried to reinstall XCode and to reset settings on iOS simulator with no luck.
Any thoughs on what could be causing this problem?
First, make sure that all the tool versions are up to date. If the problem persists, you can delete two folders of bin and obj under the iOS project. They retain the old version of compilation information. Once the deletion is complete, you can rebuild your project.
I've solved it. It seems that visual studio didn't have permission to open the default projects folder (I don't know why this changed when I updated it). I've changed the default folder to another path, in my case, Downloads folder, and now the problem has gone. Pretty strange though.
** solved by trial and error, see comments **
Anyone who can help me troubleshoot the process of loading an iOS app into the XCode iPhoneSimulator?
Recently I set up the latest VS 2017 + Xamarin + XCode on my Mac Pro (MacOS 10.12.6 "Sierra"). I created a portable HelloWorld app with Xamarin, and it runs fine on the iPhoneSimulator, so everything is wired together correctly. I did also try a HelloWorld in XCode, it runs in the simulator too.
Today I loaded a sample app from GitHub, which is also a portable app supporting Android and iOS. After unloading the .Droid hive, I could successfully build it, no errors of any kind.
But if I try to run it in the iPhone simulator, the simulator starts, but then nothing happens any more, obvioulsly the app doesn't get executed, or an attempt to execute it is made, but fails silently. Other Xamarin apps appear on the iOS start screen, this one doesn't, it seems like it never reaches the simulator, or is rejected for some reason. System log shows nothing unusual. Usual steps to clean up the application and get an entirely new build (delete .obj and .bin and then rebuild all) have been tried, but no success.
Can anyone give me instructions ho I can do further troubleshooting? On Windows, I'd try to load the ready built apk into the simulator from a terminal window, sometimes this gives additional error infos, but on the Mac I have no idea how to accomplish this. What I can say though is that the build creates a ton of files in the debug directory (.exe, .dll, .pdb), but from ther I don't know how to proceed further.
The .Droid hive of the same application compiles and runs perfectly on my Windows host under the Android simulator.