Xcode 5.1 Cordova iOS config.xml - xcode

I know there are several issues with the new version of xcode 5.1/cordova and it simply wont run apps on 64x bit devices / emu but I followed this tutorial and now it somehow works (even though it spits 14 warnings in my case)
But for some reasons config.xml is still being ignored. It's in red and you can't edit it.
Any suggestions?

You need to close your xcode. Build again using cordova build and open up again your xcode then you can run your app.

Related

iOS project changed to macOS and unable to compile code

Buildi info : https://imgur.com/a/VIAf4kt
The base SDK is set to iOS. But unlike before, I am unable to select iOS version instead it forces macOS on me. I think this is the reason I am unable to compile and get the following error: https://imgur.com/wJzCbKp
Attempted: Restart XCode. Switch to macOS and back to iOS.
EDIT: looks like all my other projects are set for macOS now. All of them have iOS as selected build settings and deployment target. Don't know why it is not syncing up.
Looks like it was an XCode update that prevents the APIs from linking up. I guess is Apple's way of blocking outdated xcode versions. I had to force quit xcode and all other projects running on Xcode. Then re-open xcode and the update for v.12.3 prompts and now everything is back to normal.
If you get the error, chances are your xCode is out of date because apple released a new version very recently. Try everything to find/ get it to update.

Flutter - Building for iOS, but the linked and embedded framework 'App.framework' was built for iOS Simulator

After updating to Catalina 10.15.4 beta with Xcode 13.4 beta, which also updated Simulator to 13.4 (921.4).
The application compiles and runs correctly on a physically attached device, but no simulators of any devices can pass this stage.
I got the errors
Building for iOS, but the linked and embedded framework 'App.framework' was built for iOS Simulator.
or
Building for iOS Simulator, but the linked and embedded framework 'App.framework' was built for iOS.
How can I fix this?
Xcode 11.4 changed the way frameworks are linked and embedded, and you may experience issues switching between iOS devices and simulators. Flutter v1.15.3 and later will automatically migrate your Xcode project.
To get unstuck, follow the instructions below;
Quick fix (make your simulator work)
rm -rf ios/Flutter/App.framework
Official recommended Steps to migrate manually
From the Flutter app directory, open ios/Runner.xcworkspace in
Xcode.
In the Navigator pane, locate the Flutter group and remove App.framework and Flutter.framework.
In the Runner target build settings Build Phases > Link Binary With Libraries confirm App.framework and Flutter.framework are no longer present. Also confirm in Build Phases > Embed Frameworks.
Change the Runner target build settings Build Phases > Thin Binary script as follows:
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh"
embed
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh"
thin
In the Runner target Build Settings > Other Linker Flags
(OTHER_LDFLAGS) add $(inherited) -framework Flutter
Hope it helps!
Select your Target from "TARGETS"
Select 'Build Settings'
Under 'Build Options' -> Set 'Validate Workspace' To 'YES'
After successfully building, set it back to 'NO'
Reason :
"In Xcode 12+, the default option for Validate Workspace is internally not set. We need to set it manually to avoid this kind of error. There is no problem in setting back to the default 'NO' option.
Xcode 11.4 changed the way frameworks are linked and embedded, which is causing issues switching between iOS devices and simulators.
Please follow official guide on how to migrate your project.
After several days trying to find a solution to test the Flutter app on iOS device, I finally found this:
flutter clean
flutter build ios
-Open xCode and run app on your device.
Updated to Xcode 11.4. Ios 13.4, Iphone X. App just fetches data using API.
App started on white screen and then finally crashes, both on simulator and device.
I followed the offical guide (I also rm -rf ios/Flutter/App.framework)
flutter.dev/docs/development/ios-project-migration.
I ran several times flutter clean
I also tried deleting Pods/ folder and Podfile.lock, then reinstalling using pod install in the ios folder.
As I am using async data I also added as 1st line in main()
WidgetsFlutterBinding.ensureInitialized();
No help, app did not started either simulator.
Then I removed ios/ and android/ folders. After that in project folder I ran command flutter create . that regenerates mentioned folders.
After this my app started fine both on simulator and on device.
I hope this would be help to others. NOTE!! if you have done any modifications manually to those folders please take backup or commit beforehand.
I have tried the solution on the official website of flutter but it didn't work for me, so I found a temporary solution which worked for me, but it took me some hard works:
Here is my example with project stuck_framework which is a fresh new project (first time run on the simulator)
I created 2 folders inside flutter project called
"ios_simulator" and "ios_real_device".
enter image description here
Now my first build was for the simulator, then I want to switch to a real device, I will move ios folder inside Flutter project to the "ios_simulator"
I open the project with visual studio code and run "flutter create ." and now I will choose a real device to rebuild the project ( if your simulator is online, please quit ).
enter image description here
Now I wait for the build finish and run on the real device without any errors. Now I have 2 ios project 1 for simulators and one for real devices.
Next time when I want to run on the simulator again, I just remove the current ios folder and copy the ios folder which I placed on "ios_simulator" back out to flutter project folder. Hope this help
Manually upgrading flutter to version 1.15 solve this issue as well. Running flutter version v1.15.17 helped me.
Also, you can switch to beta or dev channels by running flutter channel command but be sure you check your code against all BC changes...
In my case, it works only simulator(debug). if you want to deploy your app on the app store(release) i highly recommend you to upgrade flutter version using
flutter version v1.15.17
otherwise you would encounter crashed app with white screen.
just upgrade flutter version then all things work well
This error is caused by the Xcode 11.4 and can be resolved by Removing / Re-Embedding frameworks and adding a new Run Script Phase.
Under General -> "Frameworks, Libraries, and Embedded Content"
Delete the frameworks that are causing errors.
After deleting, re-embed the frameworks in the same location.
Under Build Phases add a new run script phase.
Select the "+" button in the "Build Phases" pane to create a "New Run Script Phase".
Confirm the script is the bottommost build phase, and configure its fields.
The Shell text field should read /bin/sh (which is the default value).
In the text-input area, enter the shell command rm -r "FRAMEWORK_DIRECTORY/YOUR_FRAMEWORK.framework/"
None of the other solutions here worked for me. In my case, the problem was fixed by searching my project for ONLY_ACTIVE_ARCH and changing them all to YES. I found my solution here:
https://developer.apple.com/forums/thread/656509

Message from debugger: unable to attach error for osx app

I have been building mac app on my mac mini and it always worked well but today i faced this error, searched a lot but no luck.
Message from debugger: unable to attach
What i tried:
Clear derived data
Quit Xcode
Restart machine
installation directory set to blank and also to /Applications
Tried Skip Install No / Yes
Using developer Signing certs
M using only Developer certificates and not provisioning profile to sign my cocoa app
Xcode 8.2
OSX 10.12.1
Please help :)
This is what fixed it for me, perhaps it will help others but I do realize the question was for 8.2. I had it set to Xcode 9 "New Build System" disabling this and switching to "Standard Build System" in the Project Settings under the File Menu. I had tried all the other things like killing DerivedData, clean build, restarting Xcode. I also verified that my dependent libraries were set correctly. The only thing that worked was disabling new "New Build System"
I just had this problem today. I have little demo code in a mac project(created with Xcode 9.4). This error just started to occur after I upgraded system to macOS Mojave 10.14. However, in Xcode 10 this project runs no problem(without changing anything). If you can use Xcode 10 it will probably be fixed.
Unfortunately, the above solutions didn't work for me (although I am sure they work for some people).
Here is what worked for me, in case this helps anyone else:
Close Xcode
Open Xcode and Create a new Xcode project
In the iOS template, select Single View App then click Next
yes, I know you are trying to get a macOS app attaching to the debugger :).
Give the iOS app any product name and organization identifier you would like and click Next
Create the new project anywhere you would like (I saved it to my desktop)
Build and run (cmd + r) the iOS app on a simulator like the iPhone 8 (starting a simulator and running the iOS app will take a little time, so have patients)
After the iOS app runs in the simulator, click to stop it from running (the stop button is next to the run button)
Open your macOS app that you are having trouble connecting a debugger to, and build and run it (cmd + r)
This, for some reason, allowed me to connect to the debugger with my macOS app...
Xcode version: 10.1, macOS Mojave version: 10.14.2

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators

Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.
Anybody have a permanent fix or workaround?
Looks like this is a known issue. From the Xcode 5 release notes:
After switching the minimum deployment target of an application from
iOS 7.0 to a release prior to iOS 7.0, building and running the
application may fail with the message “iOS Simulator failed to install
the application.”
Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023
Another release note:
iOS Simulator
If an iOS app is detached, relaunching the same app from Xcode will
result in a black screen in the Simulator even though the new app is
launched. Terminate the app in the Simulator or relaunch it for the
second time. 14648784
Delete the old version app in your simulator (usually iOS 6.x).
Alternatively, header over to iOS Simulator - Reset Content and Settings.
This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.
You need to do this for every iOS Simulator version that causes the problem.
None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!
if you have already developed project and you used xib to develop views then
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.
i got the same problem but solved by following way....
Launch the iOS Simulator
Go and click "iOS Simulator" menu
Click "Reset content and settings"
Close simulator and rebuild your app.
Above screen shot is showing the way how you can do this...
I think this works for you...!!!
Deleting the app in the simulator works for me.
just wanted to add that this happen only if I open xib that created in xcode 4.6
If it's other files, this not happen
try this ....
in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.
None of the above things worked for me. I just reinstalled xcode and it worked.
Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.
/Users/YOURUSERNAME/Library/Developer/Xcode/ --> remove all contents of this folder, then simply launch the app from Xcode.
To check your Executable file settng ex.$(EXECUTABLE_NAME)
(Project setting - info property page)
I have different issue when getting error message “iOS Simulator failed to install application”, the reason is because I have added a property in App-Info.plist without any value. For instance, [Application Category] with no value. Thus the error will show up as well.
When I got this error, the image of the phone actually appeared, but the image of the app I wanted to test did not. Instead, I was on the main page of the phone that shows the apps you have. I fixed this problem by deleting the many icons that appeared on the start screens - about 30 of them. These had been created when I testing apps over the months. So, not saying its a solution, but it started working after I deleted the old app images.
For me it was -framework XCTest.
It made the app die with iOS Simulator failed to install application
and on the device Could not inspect the application package.
Removed it and now works.
You are using Xcode GM which is under beta stage. Use latest Xcode 5.1.1 available.
Also, these error occur while switching between simulator (32 bit and 64 bit).
Quit the simulator and re-build the application. OR
Reset simulator from "iOS simulator" -> "Reset content and settings.."
I changed my app name and bundle id midway. I happened to delete the Executable File name in my plist. I changed it back to "${EXECUTABLE_NAME}" (no quotes) and I'm back in business.

IOS Simulator cannot find sdk and the simulated application quit errors

I have been having this Xcode problem for a couple of months where my iOS simulator stops working whenever i run any application on Xcode and says, "The simulated application quit." and "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." I am running Xcode 4.3.3 and have iOS sdk 5.1 and everything updated but it happened on my previous version of Xcode also. I have tried reinstalling Xcode over 10 times now and have been posting this question for a while now. No one has been able to get a solution. I have even sent in a bug report to apple but i don't think they will respond. I have tried doing everything every other person that has this problem has been told to do in other threads. I'm honestly thinking about just buying a new mac and seeing if Xcode will work on that one or taking in my current one to get looked at by apple. So if anyone has any ideas please let me know.
Go to Xcode -> Preferences -> Downloads and make sure the "Target SDK" you have selected in your project is in fact installed under the Downloads windows. For me this magically was uninstalled. Once i installed the SDK that my app was using, all worked again
This worked for me: http://www.colinbowern.com/posts/the-simulated-application-quit
I just deleted the folder "6.1" under ~/Library/Application Support/iPhone Simulator
The I just launched again the app and the simulator recreated correctly the 6.1 folder.
Resetting the simulator settings (iOS Simulator > Reset Contents and Settings) resolved this issue for me.
I had the same issue. For me suddenly all the installed simulators (4.3 through to 6.0) stopped working. I then went to Xcode -> Preferences -> Downloads, and there I had the chance to update at least the 5.0 simulator. This is now working, yet I was not able to get the 4.3 or 5.1 or 6.0 to work.
I have personally experienced a weird thing with xcode regarding this issue. Sometimes the sdk is installed properly but it still gives this error. I have two classes, if I call first class from the app delegate then the ipad simulator works fine but when I call the second class then it gives the error that the sdk needs to be re-installed.
In my case when the error occured, I had two errors in the second class. When I corrected the errors after debugging, the ipad simulator started to work completely fine. This is quite weird but its not the problem with your sdk, the problem is somewhere in the code.
This just happened to me. I tried to launch with iPhone 5.1 Simulator, got the error "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." I tried running iPad 5.1 Sim, which worked. I switched to non-retina iPad. Then I tried running iPhone 5.1 Simulator again, and it worked.

Resources