fastlane 2.19.0 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e389b85d55b84c0cc8877620abe3c6c1a5950d8c
|
4
|
+
data.tar.gz: 5f12f7169f070c1abdeb23ce1f95df1c8ad93ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a8b0256c9e43b6c198d88d271a4f3120a988fa264d8549fd56f5926abb2a5dd784b46a61cb6b100dcf363c44ac96851199c501c5dad5e78eccf63b8818f1a97
|
7
|
+
data.tar.gz: 0a5ff3c5924f07bcb4a622834d448d111dcb690780902f05591f47776bec8b3fa8343ab2c1c16829aaecde9efd1faf748629c999e7f1c7a6efdc8a7b8d2baba5
|
@@ -23,7 +23,11 @@ module Fastlane
|
|
23
23
|
begin
|
24
24
|
setup_project
|
25
25
|
ask_for_apple_id
|
26
|
-
|
26
|
+
if self.project.mac?
|
27
|
+
UI.important("Generating apps on the Apple Developer Portal and iTunes Connect is not currently available for Mac apps")
|
28
|
+
else
|
29
|
+
detect_if_app_is_available
|
30
|
+
end
|
27
31
|
print_config_table
|
28
32
|
if UI.confirm("Please confirm the above values")
|
29
33
|
default_setup
|
@@ -62,7 +66,7 @@ module Fastlane
|
|
62
66
|
copy_existing_files
|
63
67
|
generate_appfile(manually: false)
|
64
68
|
detect_installed_tools # after copying the existing files
|
65
|
-
if self.itc_ref.nil? && self.portal_ref.nil?
|
69
|
+
if !self.project.mac? && self.itc_ref.nil? && self.portal_ref.nil?
|
66
70
|
create_app_if_necessary
|
67
71
|
end
|
68
72
|
enable_deliver
|
@@ -112,11 +116,11 @@ module Fastlane
|
|
112
116
|
puts Terminal::Table.new(rows: rows, title: "Detected Values")
|
113
117
|
puts ""
|
114
118
|
|
115
|
-
unless self.itc_ref
|
119
|
+
unless self.itc_ref || self.project.mac?
|
116
120
|
UI.important "This app identifier doesn't exist on iTunes Connect yet, it will be created for you"
|
117
121
|
end
|
118
122
|
|
119
|
-
unless self.portal_ref
|
123
|
+
unless self.portal_ref || self.project.mac?
|
120
124
|
UI.important "This app identifier doesn't exist on the Apple Developer Portal yet, it will be created for you"
|
121
125
|
end
|
122
126
|
end
|
@@ -191,7 +195,6 @@ module Fastlane
|
|
191
195
|
config = {} # this has to be done like this
|
192
196
|
FastlaneCore::Project.detect_projects(config)
|
193
197
|
project = FastlaneCore::Project.new(config)
|
194
|
-
|
195
198
|
produce_options_hash = {
|
196
199
|
app_name: project.app_name,
|
197
200
|
app_identifier: self.app_identifier
|
@@ -492,7 +492,9 @@ module Spaceship
|
|
492
492
|
end
|
493
493
|
|
494
494
|
def create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
|
495
|
-
ensure_csrf(Spaceship::ProvisioningProfile)
|
495
|
+
ensure_csrf(Spaceship::ProvisioningProfile) do
|
496
|
+
fetch_csrf_token_for_provisioning
|
497
|
+
end
|
496
498
|
|
497
499
|
params = {
|
498
500
|
teamId: team_id,
|
@@ -509,7 +511,9 @@ module Spaceship
|
|
509
511
|
end
|
510
512
|
|
511
513
|
def download_provisioning_profile(profile_id, mac: false)
|
512
|
-
ensure_csrf(Spaceship::ProvisioningProfile)
|
514
|
+
ensure_csrf(Spaceship::ProvisioningProfile) do
|
515
|
+
fetch_csrf_token_for_provisioning
|
516
|
+
end
|
513
517
|
|
514
518
|
r = request(:get, "account/#{platform_slug(mac)}/profile/downloadProfileContent", {
|
515
519
|
teamId: team_id,
|
@@ -524,7 +528,9 @@ module Spaceship
|
|
524
528
|
end
|
525
529
|
|
526
530
|
def delete_provisioning_profile!(profile_id, mac: false)
|
527
|
-
ensure_csrf(Spaceship::ProvisioningProfile)
|
531
|
+
ensure_csrf(Spaceship::ProvisioningProfile) do
|
532
|
+
fetch_csrf_token_for_provisioning
|
533
|
+
end
|
528
534
|
|
529
535
|
r = request(:post, "account/#{platform_slug(mac)}/profile/deleteProvisioningProfile.action", {
|
530
536
|
teamId: team_id,
|
@@ -534,7 +540,9 @@ module Spaceship
|
|
534
540
|
end
|
535
541
|
|
536
542
|
def repair_provisioning_profile!(profile_id, name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
|
537
|
-
ensure_csrf(Spaceship::ProvisioningProfile)
|
543
|
+
ensure_csrf(Spaceship::ProvisioningProfile) do
|
544
|
+
fetch_csrf_token_for_provisioning
|
545
|
+
end
|
538
546
|
|
539
547
|
params = {
|
540
548
|
teamId: team_id,
|
@@ -584,6 +592,24 @@ module Spaceship
|
|
584
592
|
|
585
593
|
csrf_cache[klass] = self.csrf_tokens
|
586
594
|
end
|
595
|
+
|
596
|
+
# We need a custom way to fetch the csrf token for the provisioning profile requests, since
|
597
|
+
# we use a separate API endpoint (host of Xcode API) to fetch the provisioning profiles
|
598
|
+
# All we do is fetch one profile (if exists) to get a valid csrf token with its time stamp
|
599
|
+
# This method is being called from all requests that modify, create or downloading provisioning
|
600
|
+
# profiles.
|
601
|
+
# Source https://github.com/fastlane/fastlane/issues/5903
|
602
|
+
def fetch_csrf_token_for_provisioning(mac: false)
|
603
|
+
req = request(:post, "account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action", {
|
604
|
+
teamId: team_id,
|
605
|
+
pageNumber: 1,
|
606
|
+
pageSize: 1,
|
607
|
+
sort: 'name=asc'
|
608
|
+
})
|
609
|
+
|
610
|
+
parse_response(req, 'provisioningProfiles')
|
611
|
+
return nil
|
612
|
+
end
|
587
613
|
end
|
588
614
|
# rubocop:enable Metrics/ClassLength
|
589
615
|
end
|