Can I install Xcode from the command line? - xcode

Is it possible to install Xcode from the command line (on iOS)? I need it to create Appium tests, and because Appium is a booger to install, I'm trying to automate as much of the set-up as possible.

For me its a little bit hard to get your intention.
Do you want to install the Mac Xcode on an iOS device? No this is not possible?
-> no you cannot install the Xcode for Mac on iOS
Do you want to use an Terminal app on your iOS device to install Xcode for Mac on your Mac?
-> You can use MAS and SSH into your Mac from your iOS device and execute the command.

Related

Mac - Appium - How to setup Xcode simulator with specific OS version and .app file through command line

While setting up Appium on Mac, I am stuck at a point where we have got .app file to automate on an iphone simulator.
I am able to launch app which comes with .xcodeproj on Xcode.
But now I have an MyApp.app file to use on a Simulator. if I try to open a simulator using UDID it always open latest iOS version on Latest iPhone Simulator using this command:
open -a "Simulator" --args -CurrentDeviceUDID 8A63E11E-BEE4-4A1A-B77B-205D19A3DEE3
I need to open this on a specific iOS version on specific device then install MyApp.app on it. (also I am not able to get bundle id of app; not sure at which step I can do this)
Moreover, it Would be great if you can also share settings for Appium Inspector and where to fetch values from ?

Terminal does not find the installed Xcode

i have download and installed the Xcode 12.4 from apple site (not apple store) because I am using macOS Catalina 10.15.7 and the latest Xcode version right now requires at-least BigSur 11.0. I have also installed the latest Xcode command line tools.
But when i try to open my react native project in Xcode simulator from terminal using npm run ios it says,
"Xcode needs to be installed (don't worry, you won't have to use it), would you like to continue to the App Store? › (Y/n)"
By the way, I am a new mac user so, i don't know much about it yet. So, any kind of help will be appreciated.
My bad, i have not selected the installed command line tools in Xcode. If anybody got this issue then make sure you also select the installed command line tools. Simply open Xcode, go to preference -> locations -> command line tools.
If you're having this issue, running this in the terminal may fix it for you.
sudo xcode-select -s /Applications/Xcode.app
Open Xcode
go to settings
go to locations tab
select an Xcode version in the select labeled "Command Line Tools"

How to open an Android Studio made Flutter project on Mac?

How can I open an existing Flutter project made by Android Studio on Mac-Os to export ipa version of app? Can it be done with Mac-Os version of Android Studio or I have to do it with X-Code? How?
Thanks in Advance
I could finally do that by accomplishing the following steps:
Copy the project into macOs (with X-Code Installed)
Open it by Android Studio (preferably latest version)
Enable Flutter and Dart plugin on Android Studio framework settings
Run command flutter packages get (Connection to Flutter repositories must be available)
Run flutter build ios --release as #Günter Zöchbauer truly commented
Connect iPhone device or simulator and run directly on your device
If some errors printed you may need to verify your developer account settings on X-Code or check Github page of your libraries for possible iOS issues
You can do it in XCode.
Ensure you run flutter build ios --release before you do.
Connection to physical iPhone device is not necessary. Run any sample project in xcode. Start a Simulator. (Only One simulator preferrably).
clone the repository from github into Mac (with X-Code Installed)
open terminal.
cd to your pubspec.yaml
flutter run (it will automatically run flutter pub get)
(It will launch on the already running iOS simulator)
follow steps on flutter.dev to install flutter. Above steps will only work from terminal if flutter doctor(any flutter command) is recognized

How can I build Ionic3 angular4 hybrid application as ios .ipa file?

I am using a windows machine. So I have installed MAC OS sierra using VMWare in the same machine.
I have developed a Ionic3 Angular4 application with Cordova.
I have successfully created the .apk file using the command "ionic cordova build/run android" in my Windows.
So now I want to generate .ipa file. So I just moved the entire project to my MAC OS box. Then installed cordova & Ionic.
Now I am trying to build using command "ionic cordova build/run ios"
But getting the below error
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer
directory '/Library/Developer/CommandLineTools' is a command line tools instance
So executed sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.
But got error /Applications/Xcode.app/Contents/Developer” does not exist
How can overcome these errors and build my ios .ipa file?
Note: Xcode not installed manually. But installed the Xcode via Terminal (a popup opened and asked to install xcode. So clicked install button. Finally It showed Xcode installed successfully)
You will have to install xcode. See the cordova platform guide for iOS. And you will also need the xcode commandline-tools (which you already installed). If you want to run you application in a simulator you will also have to install ios-sim (sudo npm install -g ios-sim#latest). And for deploying your application to a real device ios-deploy (sudo npm install -g ios-deploy#latest)

Can Xcode-beta identified as normal Xcode?

I want to test the Meteor iOS build feature with Xcode 7 Beta. Only the Xcode Beta version is installed on my machine, and the given Meteor terminal command says 'Xcode is not installed'. It is probably because the Beta is actually called 'xcode-beta'. Are there any ways, to solve this?
The command I stuck with:
meteor install-sdk ios

Resources