I have a CI setup with multiple slaves. I'd like to install different versions of the iOS simulator, but this needs to be done from the Downloads tab in the Xcode Preferences. Ideally there would be a command line tool that we could run to download and install specific versions. Does this exist?
If you don't care about having the system keep track of the package receipts, you can just install them on one of your systems and then rsync /Library/Developer/CoreSimulator/Profiles/Runtimes over to the other systems.
Note that after the transfer, I'd suggest doing 'sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService' on the other slaves since the service expects the profiles to be moved into place and might not respond well to the rsync.
Related
I want to write a script that installs some OSX .provisionprofile files on a macOS machine, but i cannot find any information online on how to install this type of provisioning profile via the Terminal.
Everywhere, people just mention and ask about iOS .mobileprovisioning which is a whole different thing and they're really easy to install with a script.
Is it possible to install a OSX .provisionprofile via CLI? If yes, how?
Seems OSX provisioning profiles are treated the exact same way mobileprovision profiles are for iOS. This means you can just copy them in "~/Library/MobileDevice/Provisioning Profiles" and rename them to their uuid.
Code example can be found in the answer here: Can an Xcode .mobileprovision file be 'installed' from the command line?
Our build server has multiple versions of Xcode installed. Our build scripts use xcode-select to choose the correct version. All that is fine.
Some of our builds take a while to run. We're thinking of allowing multiple simultaneous builds (Bamboo agents) on the same build server. My worry is that xcode-select on different (but simultaneous) builds would cause a race condition. A build that begins with Xcode 9.4.1 might get switched to Xcode 10.0 mid-build if a second build begins and requires that version.
My only thoughts are to use VM's/new machines to parallelize the builds.
I'm curious if anyone's dealt with this scenario. Thanks.
You might try using xcrun instead of xcode-select to invoke your xcodebuilds. You may find your builds contending for system resources when building concurrently...
You can set the DEVELOPER_DIR environment variable rather than switching the active Xcode using xcode-select.
From the xcode-select man page:
ENVIRONMENT
DEVELOPER_DIR
Overrides the active developer directory. When DEVELOPER_DIR is set, its value will be used instead of the system-wide active
developer directory.
Note that for historical reason, the developer directory is considered to be the Developer content directory inside the Xcode
application (for example
/Applications/Xcode.app/Contents/Developer). You can set the environment variable to either the actual Developer contents
directory, or the Xcode application directory -- the
xcode-select provided shims will automatically convert the
environment variable into the full Developer content path.
I would like to build/launch the VSCode source code in the native Bash for Windows client. I have followed the steps outlined in the VSCode wiki on how to contribute, and everything is working as expected (All commands have been run on the WSL terminal following the Linux instructions)
After running yarn run watch, I try to launch VSCode by running DISPLAY=:0 ./scripts/code.sh from the source code directory, but nothing happens. I get two duplicate warnings:
[21496:1128/120229.392130:WARNING:audio_manager.cc(295)] Multiple instances of AudioManager detected
but I'm not sure if this is causing the problem. I have an X Server client running, and have used to to successfully launch native Windows applications through WSL (terminator, emacs, etc.)
Is what I'm trying to do possible? If so, how can I make it work?
Amazing that you asked this! I was attempting to do the exact same thing at (it seems) the exact same time. Here's my process.
Install XMing
Install the xfree apps
Set DISPLAY=:0
Run xeyes ==> Awesome googly eyes!
Attempt to build vscode from source. The build docs seem to be incomplete b/c I had to install a ton of libraries beyond those listed e.g.
yarn
gulp
gulp-cli
pkg-config
libx11-dev
libxkbfile-dev
libsecret-1-dev
libgtk2.0-dev
libxss-dev
gnome-dev
libgconf2-dev
libnss3-dev
libasound2-dev
Eventually get the yarn tasks to finish such that I could run code.sh
./scripts/code.sh
[20474:1128/153959.035267:ERROR:bus.cc(427)] Failed to connect to the bus: F
ailed to connect to socket /var/run/dbus/system_bus_socket: No such file or
directory
[20474:1128/153959.081986:WARNING:audio_manager.cc(295)] Multiple instances
of AudioManager detected
[20474:1128/153959.082101:WARNING:audio_manager.cc(254)] Multiple instances
of AudioManager detected
Looking at ps I see that the process was running.
Conjectures
It seems that building from source from WSL is not yet supported. Or maybe you can build the artifact, but you can't connect to the Windows display to show it. Based on the quality of the xeyes session, it looks like a very, very, very primitive experience e.g. still using WinXP-style minimize / maximize / close icons.
I was literally writing an Issue on their github page when I thought I'd do one last search and found this post. Much of vscode treats WSL as a second-class environment on Windows. Recent work seems to suggest that things are going to get better as driving to integration between Windows' two internal environments continues to improve (e.g. https://github.com/Microsoft/vscode/issues/39144)
Update 2017-11-30
Based on some pursuit via Github, it seems that this issue has been reported to the WSL team: https://github.com/Microsoft/WSL/issues/2293. It appears to be under active consideration by the WSL team. I've added some commentary about my use case there.
I have put together a bash script that automates the installation and removal of various apks.
The script uses adb to install to sdcard then uninstall packagename to remove. If it has problems finding the package name (it's only happened if the AndroidManifest is broke) it reverts to using adb to get to the applications menu via shell input keyevent "direction" to the sdcard section then as there will only be one app here it selects it and removes it.
The problem is that the script now has to run on a nexus 5 running kitkat.. so the only way to view the app list is by way of 'downloaded apps', 'running apps' and 'all apps'. The install will now be to the handset not sdcard as nexus has no sdcard.
Can anyone recommend a way to find the last installed app to android 4.4 so I can use its name within a variable to remove it? I've been told to try pm list packages, but this is no good as I won't know what the app is called when away from the phone.
The handset is rooted if that helps..
thanks
I use Ubuntu 12.04, 64-bit, Acer Aspire One D270
I gave these commands
adb shell mount -rw -o remount /dev/block/mtdblock0 /system
adb shell rm /system/app/PinyinIME.apk
adb shell rm /system/app/LatinIME.apk
adb shell rm /system/app/OpenWnn.apk
and thought they were lethal weapons in getting rid of the thorny IMEs installed in the emulator, thereby enabling me to work solely with the hardware keyboard and saving me the trouble of going to Language and Keyboard settings each time I start the emulator and disabling the IMEs.
But I had never imagined that there would be even the remotest chance that all the IMEs (but for the sample soft keyboard which I removed using adb uninstall) would be back and enabled once I restarted the emulator for next use!
How to make the adb shell rm command permanent? It seems from this that the removals using uninstall are permanent. So I tried using the adb uninstall command to uninstall the other IMEs:
aneesh#nb-14:~$ adb uninstall jp.co.omronsoft.openwnn
Failure
aneesh#nb-14:~$ adb uninstall com.android.inputmethod.pinyin.PinyinIME
Failure
aneesh#nb-14:~$ adb uninstall com.android.inputmethod.latin.LatinIME
Failure
Why does this not work?? If none of the above is answerable then consider the following: In light of the fact that all the IMEs are reinstalled, it's obvious that theire installation is part of the booting process of the emulator. Can someone help me to remove these IME installation commands from the boot process??
I want this pain-in-the-ass killed because, if after inserting an emoticon (whatsapp) I change the position of the cursor to insert some text, I find that the cursor remains there for 3 to 8 seconds and goes back to its original position and the honourable dignitary, Latin keyboard comes up. Then it lets me insert text wherever I want until I again want to insert smileys. But this initial fuss each time I change cursor position does not augur well with me!
Snapshot enabling option is missing! Screenshot below:
As a result it's not surprising that even the Launch from Snapshot and Save from Snapshot options are disabled:
When I create an emulator from the latest version it still shows the same options as in the first screenshot in this question, no emulation options. Really strange! Been updating to newer sdk versions but never saw this development!
You cannot use adb uninstall on apps installed in the /system directory.
If those apps are "reappearing" after you restart the emulator, I would imagine it is because your emulator is not using snapshots, to save the current state when it closes.
If you are using Eclipse/AVD manager to manage your emulators, take a look at the pictures below. If you are using snapshots, and the apps are still restored, please comment or update your question. Then we can look for an alternate solution.
Enable snapsots when creating emulator:
Launch emulator from snapshot:
Images courtesy of: http://tools.android.com/recent/emulatorsnapshots
Edit:
In Ubuntu, you should still have the option to enable snapshots. I tested creating an emulator without initially enabling snapshots, and when I edit-ed the AVD, I had the snapshot option:
I am a little confused, since you have the snapshot option (albeit, not available) in the AVD launch options. Are you using the latest version of the SDK?
Edit 2:
When creating a new AVD, do you have the emulator options?
Edit 3:
Alright, I'm really starting to run out of ideas here. I take it that when you create an AVD you do not have the snapshot options? I updated to the latest version of the SDK manager and I did have them.
Try making an emulator through the command line:
Use:
android list targets
to get a list of target IDs.
Then create the AVD:
android create avd -t 12 -n test_002 -a --abi armeabi_v7a
The -a argument will specify that the emulator should use snapshots. In my case, 12 was the ID of 4.2.2, but it may vary so use the first command to find the ID you want. For more information on command line options see the following:
http://developer.android.com/tools/help/android.html
http://developer.android.com/tools/help/emulator.html
You should be able to add combinations of -help to most of the commands to get additional help info.