iOS simulator reboots between runtimes and start - ios

iOS Rebooting
Whenever I run my application in Xcode. The simulator starts but not directly. It reboots. I tried both iOS 9.0 and 9.1, both of them take a lot of time starting and eventually run the application. I didn't face this issue while using Xcode 6 with iOS 8. Currently, I'm using Xcode 7 with iOS 9.0/9.1. I tried resetting content and settings but it didn't change anything. I have command line tools installed properly.

It will only boot up a different simulator device if you deploy to a device that isn't booted. If your run destination is the same as the booted device, it will not shutdown the booted device and boot a new one. This is not new to Xcode 7. It has always been this way.

Related

Failed to prepare device for development error when deploying app

I am trying to run my app on a physical device. The applicaiton builds but it doesnt deploy my app to the device.
I get this following error:
This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility.
Details:
I have xcode version 13.2.1
device is iphone 11 pro max with ios version 15.6 installed.
I tried to upgrade my xcode to 13.4.1 but on app store there is no button that indicates that i can upgrade.
Things I have tried:
restarting mac
restarting iphone device
closing and reopening xcode
cleaning project and rebuilding.
Any help will be appreciated.
Download xCode 13.4.1 directly using the link
https://download.developer.apple.com/Developer_Tools/Xcode_13.4.1/Xcode_13.4.1.xip

React Native Expo Managed App doesn't launch/start on iOS simulator

I've been having hard times with my old Windows laptop while developing React Native apps so I moved to MacOS laptop. I installed Android Studio and Xcode (including Xcode command line tools). Then I initialized a blank expo managed project. I started both on Android Emulator and iOS simulator. Android one worked out with an ádb´ error (or maybe warning). But on the other hand, iOS simulator did nothing. There's no Expo Go app installed on iOS device, so it can not launch my app using it. I don't get any error or warning related to this problem, so I can't trace the problem.
I have tried deleting global expo folder located at ´~/.expo/´, I also tried to give 777 (all permissions) on that folder to my current user.
I tried uninstalling and reinstalling expo package globally.
I made sure I have selected Xcode command line tools on ´Xcode -> Preferences -> Locations -> Xcode 13.2.1 (13C100)´
I tried to launch different iOS devices like (iPhone 6, 8, 13, iPod etc.)
I tried clearing cache and starting expo with ´sudo npm start --clear-cache´
I have been trying to solve this for at least 2 hours tried everything possibly related to my problem but none of them did work. There's one thing I don't understand though. Even though I used different iOS device simulators the Expo Metro Bundler showed this ´› Opening exp://10.42.33.15:19000 on iPhone 8´ output. I have tried iPhone 13, iPhone 6, iPod etc. but this was the same output for different devices. Here's some screenshot related to probem:
https://www.youtube.com/watch?v=dvuZn6gX_Q4
This tutorial video on YouTube helped me solve my problems. I think I was missing a few things:
I haven't granted required privacy permissions on my Mac for Xcode, Android Studio and VS Code. Open System Preferences > Security & Privacy > Go Privacy Tab > Give Full Disk Access to Xcode, VS Code, Android Studio, Terminal and Watchman (Watchman is not required, but I have also installed it for solving a problem before)
You should to launch both your Android and iOS simulators before starting your expo application. Simply go to Android Studio and launch your device. To launch iOS device use bash and type open -a simulator.
If you don't have Expo Go app installed on your iOS simulator then you should first install it before starting your expo app. To install it use expo client:install:ios command.
Start your app by using expo start command. Type i and a or click on Run on iOS simulator and Run on Android device/emulator buttons to launch your app on devices.
NOTE: If you app gets stuck at New update available, downloading... stage then you can start your expo app with cleaned cache using expo start -c command. It was helpful for me.
NOTE 2: You may need to use sudo command on some of the commands I've mentioned, I'm not sure which ones are required or not.
I run into the same issue every time when I tried to set it up on a new laptop.
Its fixed after the installation of xCode cli.
Take a look at this - https://docs.expo.dev/workflow/ios-simulator/
I fixed similar issue by hard restarting simulator
Top menu -> Device -> Erase All Content And Settings...

How to start Meteor app on specific iOS simulator

After my Xcode upgraded to version 7.3 I'm not able to start my Meteor apps on simulators other then iPhone-6s-Plus. When I enter command
meteor run ios
having no any simulator running it automatically starts iPhone-6s-Plus. But if I start some other simulator using Xcode then that's what I get trying to run app (using --verbose)
No target specified for emulator. Deploying to iPhone-6s-Plus, 9.3
simulator
** RUN SUCCEEDED **
An error was encountered processing the command
(domain=com.apple.CoreSimulator.SimError, code=159): Invalid device
state
How I can run my apps on any other simulator then iPhone-6s-Plus?
OK, seems it is normal behaviour with Meteor v1.3 described in documentation: http://guide.meteor.com/mobile.html#running-your-app
Currently, this will always run your app on a simulated iPhone 6s
Plus. Use ios-device to open Xcode and select another simulator
instead.
So command
meteor run ios-device
will open generated iOS project in Xcode where you will be able to select any other simulator or connected device.

Xcode 6 and iOS 7.1 simulator: Unable to boot the iOS Simulator

The iOS 7.1 simulator stopped working some time ago. I always get the dreaded Unable to boot iOS simulator error. The iOS 8.3 simulator works.
I have gone through all the related answers, and have tried all this to no avail:
Deleting Xcode.app and installing it again from the app store.
Deleting all simulator devices and recreating them from Window -> Devices.
Manually deleting the 7.1 simulator runtime from /Library/Developer/CoreSimulator/Profiles/Runtimes and reinstalling through the preferences pane.
Manually deleting all simulator Content and Settings from ~/Library/Developer/CoreSimulator/Devices.
Making sure a DYLD_INSERT_LIBRARIES environment variable is not set.
Making sure the correct Command Line Tools options is set in the preferences pane.
all sprinkled with restarts.
I don't know what else to do, sort of completely reinstalling OS X, which I'd prefer to avoid. This is using Xcode 6.3.2 (6D2105) on Yosemite 10.10.4 (14E36b).
Any ideas?
For people having the "Unable to boot the iOS Simulator" issue while running Xcode 6.x and who've upgraded to OS X 10.11 El Capitan, be warned that there is no effective solution as the iOS 7 simulator is functionally incompatible with El Cap.
See the following Apple Developer forum thread and read the response by jeremyhu:
https://forums.developer.apple.com/thread/5612
"This is a specific incompatibility of the iOS 7.1 libxpc being too old to satisfy the needs of the host's libsystem_stats.dylib."
Same issue for me and fixed it.
Run the following commands in order in Terminal. I'm not sure what's causing it but I have to run it every so often to fix it.
sudo mkdir /private/tmp
sudo chmod 0777 /private/tmp

worklight - App does not connect with server after installation in first attempt

I just updated my App on iOS 7 and when I deployed it on device then it did not connect after the very first installation. I killed the App and re-started it again then it connected.
Same way, on iOS simulator if i first run App then it do not connect but if I re-run it again then it connects. I have tried many times on simulator but same behavior. I even reset the simulator but same behavior.
Is this known issue? Please guide
I re-generated a fresh code on another Mac machine where only Xcode 5 was installed, and it worked fine. Previously on my Mac machine i had XCode 4.5 & XCode 5 separately, so i assume during generation something could have happened.

Resources