I’m a newbie in using Appium with iOS simulator and I’m now just trying to set it up. I read that I should authorize use of the iOS simulator by running the below command:
sudo authorize-ios
I tried the command and got the error below. Can someone help on how to resolve the error?
Thanks!
info AuthorizeIOS Enabling DevToolsSecurity
info AuthorizeIOS Updating security db for developer access
info AuthorizeIOS Granting access to built-in simulator apps
info AuthorizeIOS The xcode directory is : /Applications/Xcode.app/Contents/Developer
info AuthorizeIOS Changing ownership to ‘monicamendoza’ on directories: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/Applications
ERR! AuthorizeIOS Encountered an issue changing user priveledges for iOS sim app dirs: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/Applications
ERR! AuthorizeIOS Error was: Command ‘chown -R monicamendoza: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/Applications’ exited with code 1
Do you have npm installed ?
To check if it is installed on your Mac, just type npm, if you get commnad not found, then you don’t have npm installed, you can install it by running command: brew install node
Please go through the link i mentioned in my previous comment.
Also make sure you have HoneyBrew installed, to install honeybrew, just type the following command in the Terminal:
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
Can you walk me through, how you installed Appium, i thought you are running it from the source, but in your last comment I see you are running the command in the Appium.app folder,
did you install it through npm?
If yes, then you must have that appium in a different location (maybe in you user folder),
Please do the following:
Open terminal and type ls -lrt, see if you have appium folder there.
If yes then navigate to that folder and run sudo $(npm bin)/authorize-ios again
Sorry, I actually have 2 installations. Initially I installed the Appium GUI but then I had problems with it using the latest Android Studio so I installed the latest version using npm.
I tried doing ls -lrt but there’s no Appium folder in the results.
Okay, so I was able to run all commands but I still got the same error after running ‘sudo $(npm bin)/authorize-ios’
info AuthorizeIOS Enabling DevToolsSecurity
info AuthorizeIOS Updating security db for developer access
info AuthorizeIOS Granting access to built-in simulator apps
info AuthorizeIOS The xcode directory is : /Applications/Xcode.app/Contents/Developer
info AuthorizeIOS Changing ownership to 'monicamendoza' on directories: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/Applications
ERR! AuthorizeIOS Encountered an issue changing user priveledges for iOS sim app dirs: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/Applications
ERR! AuthorizeIOS Error was: Command 'chown -R monicamendoza: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/Applications' exited with code 1
Not sure what’s wrong but I tried doing all these in another macbook and it worked fine. Do you think it’s because I have multiple appium installations?