Xcode 6 simulator ,unable to boot error - ios

I have installed latest Xcode 6 and try to run my project on iOS 8 simulator.It gives error as "unable to boot iOS simulator".
I have tried all stack overflow answers but not able to fix this.

I was facing the same issue and finally it is resolved. Thanks to apple who helped me.
For those who are still looking for solution, here is the one which helped me:
Just unset DYLD_INSERT_LIBRARIES environment variable in the /etc/launchd.conf or ~/.launchd.conf file. Which you can edit by "sudo vi /etc/launchd.conf" command. remove the above flag save it by using "ZZ" (captial Z) command and reboot the system. It works like a charm. Hope this helps you all.

Following are the steps for solved above issue:
Search launchd.conf file in your mac
If not found then create from Terminal with help of command
~ user$ sudo touch /etc/launchd.conf
Terminal will ask you machine password
Then Open created file with help of command for EDIT, if terminal give you error as permission failed
~ user$ sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/launchd.conf
Then open file manually from /etc/launchd.conf (Shift+cmd+g) and enter /etc/ (TextEdit software)
Remove the "DYLD_INSERT_LIBRARIES" line and save the file.
Restart your machine.
Xcode should work.

Related

Flutter run command error : FlutterView.send called on a detached view

Can anyone tell me why my app is not installing at all and ending with the error message
Observatory connection never became ready.
the app was working perfectly fine until yesterday .
I have changed the channel to master yesterday in the command prompt and from then on the app never runs.
I even switched back to channel alpha but still no use.
I have attached a screenshot of the command prompt where the installation was stuck forever.
I am not so sure if I need to reinstall the flutter. I am worried if I uninstall the flutter now it may not configure properly and I might break it forever.
Please can someone tell me what exactly might have gone wrong.
Many Thanks,
Mahi
Instead of reinstall try with following: (Mac)
Set Path Variable: via following terminal command
export PATH=~/flutter/bin:$PATH;
that is bin folder path of flutter.
export PATH=[PATH_TO_FLUTTER_GIT_FOLDER]/bin:$PATH
https://flutter.io/setup-macos/#update-your-path
If above not worked. Check with the Dart version
dart --version
Install the latest dart version:
brew install dart --devel
Hope this helps others.
For Mac
open terminal
$ echo $PATH
it will show like this
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
it means you need to add flutter in to path
Open Finder presss command + shift + G
Put /etc/paths in dialog and press GO
Copy the file "paths" and paste it on desktop
Then open the pasted "paths" file from desktop
and add following line into end of the file "/flutter/bin"
Then copy that file and again paste it on /etc/paths
same like step no 2
it will ask you to replace or not
press replace
Now if you hit $ echo $PATH on terminal it will show
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/swagat/development/flutter/bin
Now your $flutter doctor will work perfectly
The solution is from Google Groups #Flutter-Dev
Thank you very much for your reply #Michael Thomsen.
I've tried what you have suggested and the details are as follows:
When I used flutter run -v command the command prompt output is as follows:
It was stuck for a while at waiting for port connection if I am not wrong.
So I've used AndroidStudio, File>Open and selected android/ folder to run the app then the gradle was showing an error:
Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.2.0) and test app (25.4.0) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
I modified the build.gradle(Module:app) to show the correct version of 25.2.0 which was previously showing 25.4.0.
dependencies {
androidTestCompile 'com.android.support:support-annotations:25.2.0'
}
I just saved the changes inside android studio and the gradle sync completed without any errors.
Now I can run the app from inside Android Studio and also from IntelliJ IDE.
Thanks very much Michael this solved my problem.
Reinstalling flutter would be my starting point. If this problem persists, please post the output of $>flutter doctor and a description of what exactly leads to this error.

reset $PATH homebrew

I'm very new to coding and I was beginning to set up my development environment according to a Mackenzie Child youtube video. After downloading iTerm and installing homebrew, I was having trouble with updating the Ruby 2.0.0 version to 2.2.2. In the video Mackenzie changes his ~/.bash_profile and restarts iTerm to resolve the problem. I did the same thing except now iTerm doesn't recognize any commands. I can't access bash_profile or run any commands.
I believe the problem occurred when I changed my bash_profile except I can't access/find it anywhere. The command line doesn't let me access it either.I can't find any solutions to my specific problem online so I'm grateful if anyone can help.
Screenshot of iTerm
Thanks!
If restarting iTerm didn't fix your problem, then:
Open iterm.
Run export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin .
Run open -a TextEdit ~/.bash_profile . Paste what's in that file here.

Appium doctor shows error

When I run Appium doctor it shows:
Running iOS Checks
✖ Unknown SW Version Command: Error: Command failed: /bin/sh -c sw_vers -productVersion
/bin/sh: sw_vers: command not found
Appium-Doctor detected problems. Please fix and rerun Appium-Doctor.
Can anyone help let me know what is the wrong here?
running this solved my problem:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
You need to install the command line tools as marked in your message:
✖ Xcode Command Line Tools are NOT installed
From osxDaily:
Launch the Terminal, found in /Applications/Utilities/
Type the following command string:
xcode-select --install
A software update popup window will appear that asks: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?” choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)
Wait for the Command Line Tools package download to complete, it’ll be about 130MB and installs fairly quickly depending on your connection speed
The installer goes away on its own when complete, and you can then confirm everything is working by trying to use one of the commands that were just installed, like gcc, git, svn, rebase, make, ld, otool, nm, whatever you want from the list below. Assuming the installation went uninterrupted, the command will execute as expected. This also means you can compile and install things from source code directly without having to use a package manager. Enjoy your new unix command line toolkit!
Have you tried upgrading to the latest Appium version? Are you installing Appium through terminal? My appium-doctor issues were fixed after I installed Appium through terminal and updated the path variables in .bash profile. Appium desktop application is different than one installed through command line.
There are only two possible area which causing that error:
You need to keep all path veriable updated and correct in .bash_profile
You must install
XCode
NodeJS
properly. You must have all permission to access those.
Install all latest version of following things
JDK (Java Development Kit),
Xcode ,
Command Line tools ,
APPIUM For MAC OS
In my case, xcode command line tool isn't set. Simply go to Xcode>Preferences>Locations>Select desired Xcode version in Command Line Tools. OR from terminal follow Chhagan's answer xcode-select -s your path

"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC

While attempting to compile my C program, running the following command:
gcc pthread.c -o pthread
Returns:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
and my code does not compile.
Why is this happening and how can I fix this problem?
Open up Xcode, and accept the new user agreement. This was happening because a new version of Xcode was downloaded and the new agreement was not accepted.
sudo xcodebuild -license
will take care of it with no trouble on the command line. Note that you'll have to manually scroll through the license, and agree to its terms at the end, unless you add "accept" to the command line :
sudo xcodebuild -license accept
Got stuck as I was trying to a go get ... I think it was related to git.
Here is how was able to fix it ...
I entered the following in terminal:
sudo xcodebuild -license
This will open the agreement. Go all the way to end and type "agree".
That takes care of go get issues.
It was quite interesting how unrelated things were.
Opening XCode and accepting the license fixes the issue.
You don't need to fiddle around with any command :)
Once the XCode is updated, open the Xcode IDE program. Please accept terms and conditions.
You are all set to go :))
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
A new version of OSX or XCode was installed and Apple wants you to agree to their Terms and Conditions. So just launch Xcode and "Agree" to them.
I had the same issue, after accepting the license launching XCode or running sudo xcodebuild -license accept i had to restart my Mac – otherwise it did not worked.
Follow these steps:
Open Terminal.
Enter this command: sudo xcodebuild --license.
Enter system password.
Agree to the license.
I had the same issue when I tried to use git.
It is possible to install git without it. And I doubt that gcc on mac is truly dependent on XCode. And I don't want to use root to accept something unless I'm sure I need it.
I uninstalled XCode by navigating to the applications folder and dragging XCode to the trash.
Now my git commands work as usual. I'll re-install XCode if/when I truly need it.
I'm facing the same issue.
The issue because of X-Code.
Solution:
1. Open X-code and accept user agreement (T&C).
or
2. Restart your MAC, It will resolve automatically.
If you have similar issues in Intellij do as others said above me :
Open Terminal.
Enter this command: sudo xcodebuild --license.
Enter system password.
Go to the end of file: Press space(button) to do that.
Type 'Agree' to the license.
And you are done.!!

error uploading app for iTunes connect

I get an error when I try to submit app to app store ,the error ocurrs on the last step ( app is being uploaded )
Error : "an error occurred while uploading to the app store"
I doubled checked my certificated and profile and my app configuration on both XCode and iTunes connect.
I tried using the Application Loader but I'm getting the same error
I also tried changing the Java version from 1.7 to 1.6 as many answers suggesting but it didn't work
I'm on Xcode 4.6.2 , OSX 10.8.3 and on java version "1.6.0_45"
Note that when I choose Validate instead of Distribute after archiving the app I get no errors. the error only appears when I try to submit to the app store
EDIT
I restored the Java version to 1.7.0_21 since it seems that the problem is not caused by Java ,
the application loader shows the following two errors in the error log
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter: line 14: awk: command not found
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter: line 18: ../share/iTMSTransporter.woa/iTMSTransporter: No such file or directory
I reinstalled Xcode as a desperate attempt to solve this issue but with no luck
I had exactly the same issue and was able to fix it by slightly adapting the file
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter
change the path to the awk to absolute (and i also uncommented the echo of the script path, which probably isn't necessary). Here my changed file:
#!/bin/sh
# if the user has the run script in their PATH
# then we can get the path to the script from
# 'which'. otherwise, we have to get the path
# from $0
if [ "$0" = "iTMSTransporter" ] ; then
SCRIPT_PATH=`which iTMSTransporter`
else
SCRIPT_PATH=$0
fi
# get the script's directory
SCRIPT_DIR=`echo $SCRIPT_PATH | /usr/bin/awk -F"/" '{print substr($0,1,length($0)-length($NF))}'`
# call the transporter relative to the script's directory
echo Calling: ${SCRIPT_DIR}../share/iTMSTransporter.woa/iTMSTransporter "$#"
"${SCRIPT_DIR}../share/iTMSTransporter.woa/iTMSTransporter" "$#"
I guess this behavior is caused by inproper classpath setup which I wasn't able to resolve though.
After fixing the script, I managed to upload my app through the XCode Organiser.
I was facing the same problem.
I tried many solutions listed on a lots of forums but none of them worked for me.
Here's what I did:
I found Application Loader at /Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS
But before that I accidentally ran iTMSTransporter from terminal by using:
"open /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/MacOS/itms/bin/iTMSTransporter"
and it updated by it self. I'm sure whether this was necessary.
Started Application Loader, logged in and selected the ipa file that I had created using Xcode. I started the upload process and it was success.
Now the app is in review. :)
I hope this helps.
Edit: To load Application Loader from terminal use this: "open /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/MacOS/Application\ Loader"
I have tried many methods that were suggested in apple forums and on stackoverflow but non of them worked for me. so I decided to backup my OSx lion and re-install the system all over again.
I know that this might be too radical solution but I had to do it because nothing else worked.

Resources