nomad-cli / cupertino Goto Github PK
View Code? Open in Web Editor NEWCLI for the Apple Dev Center
License: MIT License
CLI for the Apple Dev Center
License: MIT License
The gem used to work fine for me, but lately all list commands seem to hang.
I'm able to log in to the portal through the browser.
No errors.
I'm happy to debug the issue further if you give me some pointers.
Ruby 1.9.3
$ ios login
Username:
[email protected]
Password:
**********
sh: -c: line 0: syntax error near unexpected token `)'
sh: -c: line 0: `security add-internet-password -a [email protected] -w ********** -s developer.apple.com'
Account credentials saved
My password needs to be escaped because it contains some symbols that would otherwise interfere with this shell command.
Is it possible to render the output of ios
as XML or JSON? I've some idears on how to integrate your wonderful gem into our build server to ease up delivering CI-builds to testers.
It would be great if the user's keychain could be used to store credentials instead of the plain-text .netrc file.
$ ios devices:add Foo Bar iPhone 3GS=590f9b347b825ce5fb40cd1bdf585ba0f813d312
Added 4 devices
really, no items were added. I had to use quotes.
$ ios devices:add 'Foo Bar iPhone 3GS'=590f9b347b825ce5fb40cd1bdf585ba0f813d312
Added 1 device
ios login
Username:
[enter apple id email]
Password:
error: No such file or directory - stty. Use --trace to view backtrace
Logged in successfully with ios login
, then tried ios devices:list
and selected a team, and got this error:
/Library/Ruby/Gems/1.8/gems/cupertino-0.8.0/lib/cupertino/provisioning_portal/helpers.rb:37:in `team': undefined method `key' for #<Hash:0x10bf48308> (NoMethodError)
Full backtrace here: https://gist.github.com/kristopherjohnson/5503954
Running this on Ubuntu 12.04
It seems the keychain is never saved. I installed curpertino and issued:
sudo ios login
and then gave my username and password. However, executing
sudo ios:devices:list
always prompts me for my username and password
I'm trying to use Cupertino (great tool btw!) to create a Pass type ID for me, but it is giving an NoMethodError. Here is the console output:
$ ios pass_type_ids:certificates:add pass.nl.wrep.test.cupertino --csr ~/wrep.csr --trace
Select a team:
1. TeamA
2. TeamB
? 1
/Library/Ruby/Gems/1.8/gems/cupertino-0.7.1/lib/cupertino/provisioning_portal/commands/pass_type_ids.rb:87: undefined method `[]' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:78:in `run!'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.3/lib/commander/delegates.rb:7:in `run!'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.3/lib/commander/import.rb:10
from /usr/bin/ios:23
After this error I've tried to use this CSR and pass type ID in the portal by hand, that's working fine. Also Cupertino did not change anything in the portal, so there is no ID created and no certificate generated.
Anyone who can give me a hand here?
We should have a way to download all the provisioning profiles in an account.
They just sit there. I do have a 'membership renewal' message on my Portal pages, until Apple verifies my renewal.
error: hostname was not match with the server certificate.
I have logged in.
You only see 1 account and it always picks the last one which in my case is the enterprise account.
It would be nice if it handle the duplicate name or takes the first one in the list as that will be the developer license and not the enterprise account.
Use case: a new person joins the team, and you have to add his/her iDevice UUID to the provisioning portal. This can be already automatized via
$ ios devices:add <DEVICE_ID>
But then you have to use profiles:manage:devices
and manually add it to all the profiles (opening the external editor, etc).
My suggestion is something like this:
$ ios profiles:manage:add_device_to_all_profiles <DEVICE_ID>
(With a better name) which would do basically what it says. That way adding a new iDevice to the team is as simple as running two commands. Or pottentially one, if the second one also checks if the device is there, and adds it otherwise :)
Thoughts?
PS: I should learn Ruby, for real.
undefined method `each' for nil:NilClass. Use --trace to view backtrace
for so many thing now
Iโm getting this when I try to install this gem:
% sudo gem install cupertino Building native extensions. This could take a while...
ERROR: Error installing cupertino:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby extconf.rb
checking for main() in -lstdc++... yes
checking for ruby/encoding.h... no
creating Makefile
CXX is automatically set to /usr/bin/clang++
make
/usr/bin/clang++ -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin12 -I. -I/opt/local/include -std=c89 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -std=c89 -fno-common -pipe -Os -arch x86_64 -fno-common -pipe -fno-common -arch x86_64 -c unf.cc
error: invalid argument '-std=c89' not allowed with 'C++/ObjC++'
make: *** [unf.o] Error 1
Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/unf_ext-0.0.5 for inspection.
Results logged to /opt/local/lib/ruby/gems/1.8/gems/unf_ext-0.0.5/ext/unf_ext/gem_make.out
I have this version of Ruby, installed with MacPorts:
% ruby -v ruby 1.8.7 (2012-06-29 patchlevel 370) [i686-darwin12]
% port installed ruby The following ports are currently installed:
ruby @1.8.7-p370_1 (active)
It is possible?
I just started using Cupertino and I'm finding that it isn't picking up the Distribution profiles I use for testing. It only sees my Team profile:
RongeAir:~% ios -t profiles:list
Select a team:
1. Central Atomics
2. XXXXX
3. XXXXX
? 1
+----------------------------------+------------+--------+
| Profile | App ID | Status |
+----------------------------------+------------+--------+
| iOS Team Provisioning Profile: * | XXXXXX | Active |
+----------------------------------+------------+--------+
I'm part of multiple teams as well, perhaps that is related.
Let me know how I can help debug! T
I logged into a developer account that has multiple teams. If I try to issue any command (devices:list, app_ids:list, profiles:list) I see a spinner in my Terminal tab for 10-20 seconds, then it goes away, and the command line just seems to be hung. I don't get any kind of error and I can't get it to exit out of the current command it's stuck in.
So seems like possibly ungraceful failure of accounts that have multiple teams?
/Library/Ruby/Gems/1.8/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:304:in `fetch': 500 => Net::HTTPInternalServerError for https://developer.apple.com/services-developerportal/QH65B2/account/ios/profile/regenProvisioningProfile.action?content-type=text/x-url-arguments&accept=application/json&requestId=b2755757-1d06-42b9-85e7-e4f7d5ddf6b3&userLocale=en_US&teamId=2ARNJY38FW -- unhandled response (Mechanize::ResponseCodeError)
Hi,
I have written a same script to add multiple devices by running single command
However, it is not recognizing the variable
variable for multiple devices is like
DEVICES="SH ./build.sh"
this build.sh will take all device list from testflight and add it to variable DEVICES in below format
"Device_name1"=Device_UDID1 "Device_name2"=Device_UDID2
I am running below command to add devices
$ios devices:add $DEVICES
However, when I am giving $ios device:add "xyz iPad"=123............1212
It is accepting
Can any one tell me, where i am wrong?
Hi,
while cupertino worked for me in one of the earlier versions, it now returns nothing for any command, e.g. like this:
ios devices:list
WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.8.0
+-------------+-------------------+
| Listing 0 devices. |
+-------------+-------------------+
| Device Name | Device Identifier |
+-------------+-------------------+
+-------------+-------------------+
Is it possible to manage (add/remove devices) distribution profiles? It seems that I can manage only development profiles, unless I'm missing something... (yes, I have permission to mange the distribution ones on the web :)
Hello,
In my AppleDeveloper account there are multiple teams.
In one of the teams i'm only a member and recognized that cupertino didn't work for that team. If i try to get the device:list i only get an empty table with 0 listed devices. I figured out, that cupertino uses the following URL to get device list: https://developer.apple.com/ios/manage/devices/index.action Using Safari to open that link shows an "Access denied" - warning. Members can check their devices here: https://developer.apple.com/ios/my/devices/index.action . Same problem for AppIDs and ProvisoningProfiles. Is there an easy way to fix that, or to check if the User is Admin, Agent or only a Member of the team? Changing the URL in agent.rb works for AppIDs but not for the deivice list, because the homepage doesn't use a checkbox to display the devices if you are only a member.
When the command requests a team from the list, the list
appears randomly sorted as it changes almost ever time.
Hi there,
Nice library, thanks for this.
I am trying to use ios utility to get the list of devices from the developer portal and I am constantly getting connection error:
error: Operation timed out - connect(2). Use --trace to view backtrace
Most likely it's happening because I need not set proxy settings so I am wondering if there is an option to for this.
Thanks.
I have 291 provision profile and having to download each one each time would be time consuming
also adding to all devices to all provision would totally save me many hours.
I love this tool.
thanks
Steven Fransen
Yahoo!
It looks like Apple has changed the dev site and broken the device management tool. When I try and run:
ios profiles:manage:devices
after selecting the provisioning profile I get the following error (with --trace on):
/Users/adamblock/.rvm/gems/ruby-2.0.0-p0/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:304:in `fetch': 404 => Net::HTTPNotFound for https://developer.apple.com/account/ios/profile/profileEdit.action?provisioningProfileId=[PROFILEID] -- unhandled response (Mechanize::ResponseCodeError)
After I logined successfully, when I type "ios devices:list", error occured. information shown below:
error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed. Use --trace to view backtrace
$ ios login
Username:
maxim@k**n.ru
Password:
************
Account credentials saved
$ ios devices:list
+-------------+-------------------+
| Listing 0 devices. |
+-------------+-------------------+
| Device Name | Device Identifier |
+-------------+-------------------+
+-------------+-------------------+
$ ios profiles:list
No development provisioning profiles found.
How to troubleshoot?
After I installed successfully, when I type "ios login", error occured. information shown below:
/Users/Levey/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find cupertino (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /Users/Levey/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/Levey/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users/Levey/.rvm/gems/ruby-1.9.3-p194/bin/ios:18:in `<main>
I run ios profiles:manage:devices
, choose an app, uncomment a device, save changes, and close the file.
The command line shows Successfully managed devices
.
But then when I run ios profiles:manage:devices
, the device is commented out again.
I am working on a fix for this problem.
having this trace
/Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/netrc-0.7.5/lib/netrc.rb:87:in take': unexpected EOF (Netrc::Error) from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/netrc-0.7.5/lib/netrc.rb:107:in
parse'
from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/netrc-0.7.5/lib/netrc.rb:34:in read' from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/cupertino-0.3.3/lib/cupertino/provisioning_portal/agent.rb:13:in
initialize'
from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/cupertino-0.3.3/lib/cupertino/provisioning_portal/helpers.rb:15:in new' from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/cupertino-0.3.3/lib/cupertino/provisioning_portal/helpers.rb:15:in
agent'
from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/cupertino-0.3.3/lib/cupertino/provisioning_portal/commands/devices.rb:7:in block (3 levels) in <top (required)>' from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/cupertino-0.3.3/lib/cupertino/provisioning_portal/helpers.rb:44:in
try'
from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/cupertino-0.3.3/lib/cupertino/provisioning_portal/commands/devices.rb:7:in block (2 levels) in <top (required)>' from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.2/lib/commander/command.rb:180:in
call'
from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.2/lib/commander/command.rb:180:in call' from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.2/lib/commander/command.rb:155:in
run'
from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.2/lib/commander/runner.rb:400:in run_active_command' from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.2/lib/commander/runner.rb:78:in
run!'
from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.2/lib/commander/delegates.rb:11:in run!' from /Users/windu/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.2/lib/commander/import.rb:10:in
block in <top (required)>'
nokogiri (~> 1.4) you should limit to to 1.5.9 and the latest version now requires ruby 1.9.2
It would be quite beneficial for automated processes utilizing cupertino to address profiles by name.
For instance, currently to download a distribution profile, without interaction, you must pipe the number of the profile to the command, like this:
echo "1" | ios profiles:download distribution
And hope that "1" represents the profile you want to download.
It would be preferable to a) not have to pipe stdio and 2) to address the profile directly. Something like:
ios profiles:download distribution "MyApp AdHoc"
(assuming "MyApp AdHoc" is the name of a distribution profile).
Thanks for listening!
Levi
This would make it easier to use this gem for automation.
Something like ios devices --team "The Name of the team"
or ios devices --team PQ3Y6LW123
I get an error when trying to access a list of profiles (or anything for that matter).
Using rvm'd ruby 1.9.3-p194 on Snow Leopard.
% ios profiles
error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed. Use --trace to view backtrace
with trace..
.......gems/net-http-persistent-2.7/lib/net/http/persistent/ssl_reuse.rb:70:in connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) from /Users/xxxxxxx/.rvm/gems/ruby-1.9.3-p194/gems/net-http-persistent-2.7/lib/net/http/persistent/ssl_reuse.rb:70:in
block in connect'
Suggestions as to how to fix this.. google did not come up with an easy solution.
When adding a new device then adding it to a provisioning profile, it would be nice to have it active by default.
ios devices:add 'Trent iPhone 5'=12345
ios profiles:devices:add Profile 'Trent iPhone 5'=12345
Am I missing something?
Unlike other commands when I execute
$ ios profiles:manage:devices distribution
I always only get to choose from my development profiles (e.g. the Xcode team profile) - not the ones used for distribution (those I would usually try to allow/restrict specific devices to/from).
The "profiles:list" command is returning a "UnexpectedContentError" error when executed:
Sequoia:jenkins labrown$ ios --version
ios 0.8.1
Sequoia:jenkins labrown$ ios profiles:list
error: Cupertino::ProvisioningPortal::UnexpectedContentError. Use --trace to view backtrace
Sequoia:jenkins labrown$ ios profiles:list --trace
/Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/agent.rb:159:in `list_profiles': Cupertino::ProvisioningPortal::UnexpectedContentError (Cupertino::ProvisioningPortal::UnexpectedContentError)
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/commands/profiles.rb:8:in `block (3 levels) in <top (required)>'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/helpers.rb:50:in `try'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/commands/profiles.rb:8:in `block (2 levels) in <top (required)>'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:78:in `run!'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/delegates.rb:11:in `run!'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/import.rb:10:in `block in <top (required)>'
Sequoia:jenkins labrown$ ios profiles:list distribution
error: Cupertino::ProvisioningPortal::UnexpectedContentError. Use --trace to view backtrace
Sequoia:jenkins labrown$ ios profiles:list distribution --trace
/Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/agent.rb:159:in `list_profiles': Cupertino::ProvisioningPortal::UnexpectedContentError (Cupertino::ProvisioningPortal::UnexpectedContentError)
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/commands/profiles.rb:8:in `block (3 levels) in <top (required)>'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/helpers.rb:50:in `try'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/cupertino-0.8.1/lib/cupertino/provisioning_portal/commands/profiles.rb:8:in `block (2 levels) in <top (required)>'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:78:in `run!'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/delegates.rb:11:in `run!'
from /Users/labrown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/import.rb:10:in `block in <top (required)>'
Everyone will notice these changes pretty quickly, so I'm opening this ticket only to track and discuss about the potential changes needed to be made to fix the ios
command line and make it work again :)
It would be also good to see devices count after running ios devices:list. If I have the number close to limit (100) it's important to know how much devices I can add.
Thanks.
When you execute ios login
and you are already authenticated, don't ask user to re-enter user credentials.
ios login
You are already authenticated
Username:
The command documentation for profiles:list states:
ios profiles:list
while it already supports:
ios profiles:list [development|distribution]
Nevermind. stupid mistake on my part.
I need to access different accounts depending on the project I'm working on, so it'd be really nice to be able to save the credentials for multiple accounts and quickly switch between them using an alias.
Here's how I was envisioning this would work:
login
can optionally be login [accountname] [alias]
If only an account name is specified, it's saved in the Keychain with no alias (the same as the current login command, just skipping the username prompt). If an alias is specified then the account name/alias pair is saved somewhere. Maybe in ~/.cupertino? I don't know the ruby conventions for saving config data like that.
logout
can be logout:all
or logout [accountname or alias]
Logging out would delete the saved alias if one exists.
account
to change the active account (e.g. ios account myalias
)Calling with no argument would print the active account.
I'm hoping to eventually hack this in myself, but I'm leaving this here for now if anyone else has any usage suggestions or gets inspired themselves :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.