{"action":"opened","issue":{"url":"https://api.github.com/repos/fastlane/spaceship/issues/277","repository_url":"https://api.github.com/repos/fastlane/spaceship","labels_url":"https://api.github.com/repos/fastlane/spaceship/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/spaceship/issues/277/comments","events_url":"https://api.github.com/repos/fastlane/spaceship/issues/277/events","html_url":"https://github.com/fastlane/spaceship/issues/277","id":138615071,"number":277,"title":"Help I am confused on something profile.devices = Spaceship.device.all","user":{"login":"sfransen","id":3065847,"avatar_url":"https://avatars.githubusercontent.com/u/3065847?v=3","gravatar_id":"","url":"https://api.github.com/users/sfransen","html_url":"https://github.com/sfransen","followers_url":"https://api.github.com/users/sfransen/followers","following_url":"https://api.github.com/users/sfransen/following{/other_user}","gists_url":"https://api.github.com/users/sfransen/gists{/gist_id}","starred_url":"https://api.github.com/users/sfransen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfransen/subscriptions","organizations_url":"https://api.github.com/users/sfransen/orgs","repos_url":"https://api.github.com/users/sfransen/repos","events_url":"https://api.github.com/users/sfransen/events{/privacy}","received_events_url":"https://api.github.com/users/sfransen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-04T23:23:35Z","updated_at":"2016-03-04T23:23:35Z","closed_at":null,"body":"@KrauseFx\r\nI am trying to add all Devices to each Provision Profiles since Cupertino is not working any more.\r\n\r\n So I changing sign \r\n but the this line of code from spaceship is not working right\r\nprofile.devices = Spaceship.device.all # This line doesn't seems to do anything\r\n if I do this line it crashes\r\n#profile.update!  crashes here   \r\n\r\n what am I doing wrong or has Apple Site messed us up some more.\r\nThanks\r\n\r\n here is my download_all.rb file from sigh\r\n`\r\nmodule Sigh\r\n  class DownloadAll\r\n    # Download all valid provisioning profiles\r\n    def download_all\r\n      UI.message \"Starting login with user '#{Sigh.config[:username]}'\"\r\n      Spaceship.login(Sigh.config[:username], nil)\r\n      Spaceship.select_team\r\n      UI.message \"Successfully logged in\"\r\n      \r\n      UI.message \"Start the For Loop of repairing Provison Profiles\"\r\n      Spaceship.provisioning_profile.all.find_all { |p| !p.valid? }.map(&:repair!)\r\n      UI.message \"Finished repairing Provison Profiles\"\r\n\t\t\r\n      Spaceship.provisioning_profile.all.each do |profile|\r\n        if profile.valid?\r\n          UI.message \"Downloading profile '#{profile.name}'...\"\r\n          profile_name = \"#{profile.name}.mobileprovision\"\r\n          UI.message \"Profile Name is '#{profile_name}'\"\r\n          download_profile(profile)\r\n        else\r\n          UI.important \"skip this Invalid Provison Profile invalid/expired profile '#{profile.name}'\"\r\n        end\r\n      end\r\n    end\r\n\r\n    def download_profile(profile)\r\n      FileUtils.mkdir_p(Sigh.config[:output_path])\r\n      profile_name = \"#{profile.name}.mobileprovision\"\r\n      \r\n      # Push the changes back to the Apple Developer Portal\r\n\t\tif profile.class.pretty_type != \"AppStore\"\r\n\t\t\tUI.message \"Add All the Devices to Provsion Profile\"\r\n\t\t\tprofile.devices = Spaceship.device.all # This line doesn't seems to do anything\r\n\t\t\t#profile.update!  crashes here   \r\n\t\t end\r\n  \r\n      goodname = profile_name.gsub(\" \", \"_\")\r\n      output_path = File.join(Sigh.config[:output_path], goodname)\r\n         File.open(output_path, \"wb\") do |f|\r\n            f.write(profile.download)\r\n      end\r\n\r\n      Manager.install_profile(output_path) unless Sigh.config[:skip_install]\r\n    end\r\n  end\r\nend\r\n`"}}