cocoapods 1.4.0.beta.1 → 1.4.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccd89248d652b96a2bc808fb3ee21df39d3478f0
4
- data.tar.gz: 54a96361eb879bb08e1a094032450fa33b84af37
3
+ metadata.gz: 435d85f5f3ea7e2924e657bc8a5511dc477ea0be
4
+ data.tar.gz: 880a615bf2c28d75295a0e1b6117e1451c696724
5
5
  SHA512:
6
- metadata.gz: 51657c926930d550992f2463cc1c26b679b8fefb6daaa86e7c83988eb6967ab43792b7c10fe39f58068e205639b6e628d12541094953aee91e9e0adf1290ffd9
7
- data.tar.gz: e52fe2eb2101c6bdbadd571a77bc6b845b1992b923c5c9ed2a5380990ad94994c4f95d039eda866a3df15ef2045ca49e13e723cbdf47d91534e6994a56beedf6
6
+ metadata.gz: 72ed25c0b7a5faab93b0f6576f82db05981206cdeda385f00751bbe4011f512cb1a57be9d9f927211a4833bd641601b3e199fb28dda834fe11db270cdbbcf9ce
7
+ data.tar.gz: 086ff09352aa6face50b22e8a8910a22c34c38141a7dc11d6e426bc749876082951d5d07ac4675f8d9ca8e85f74febe128ca63c19aa0b6a7b9d5912673778f91
@@ -4,6 +4,85 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.4.0.beta.2 (2017-10-24)
8
+
9
+ ##### Enhancements
10
+
11
+ * Integrate execution position for shell script phases
12
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
13
+ [#7101](https://github.com/CocoaPods/CocoaPods/pull/7101)
14
+
15
+ * Add support to integrate script phases from podspecs
16
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
17
+ [#7092](https://github.com/CocoaPods/CocoaPods/pull/7092)
18
+
19
+ * Add support for preventing pch file generation with the skip_pch podspec attribute
20
+ [Paul Beusterien](https://github.com/paulb777)
21
+ [#7044](https://github.com/CocoaPods/CocoaPods/pull/7044)
22
+
23
+ * Add app host support for test specs
24
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
25
+ [#6953](https://github.com/CocoaPods/CocoaPods/issues/6953)
26
+
27
+ * Add support for resources in source static library frameworks
28
+ [Paul Beusterien](https://github.com/paulb777)
29
+ [#7100](https://github.com/CocoaPods/CocoaPods/pull/7100)
30
+
31
+ ##### Bug Fixes
32
+
33
+ * Copy .swiftmodule into static_frameworks to enable access to Swift static frameworks
34
+ [Paul Beusterien](https://github.com/paulb777)
35
+ [#7140](https://github.com/CocoaPods/CocoaPods/issues/7140)
36
+
37
+ * Fix docs for prefix header paths
38
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
39
+ [#7149](https://github.com/CocoaPods/CocoaPods/pull/7149)
40
+
41
+ * Fix integration `prefix_header_file` with test specs
42
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
43
+ [#7147](https://github.com/CocoaPods/CocoaPods/pull/7147)
44
+
45
+ * Set the default Swift version to 3.2 during validation
46
+ [Victor Hugo Barros](https://github.com/heyzooi)
47
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
48
+ [#7136](https://github.com/CocoaPods/CocoaPods/pull/7136)
49
+
50
+ * Better warning message for which Swift version was used during validation
51
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
52
+ [#7121](https://github.com/CocoaPods/CocoaPods/issues/7121)
53
+
54
+ * Fix static_framework Swift pod dependencies and implement pod access to dependent vendored_framework modules
55
+ [Paul Beusterien](https://github.com/paulb777)
56
+ [#7117](https://github.com/CocoaPods/CocoaPods/issues/7117)
57
+
58
+ * Strip vendored dSYMs during embed script phase
59
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
60
+ [#7111](https://github.com/CocoaPods/CocoaPods/issues/7111)
61
+
62
+ * Warn when a pod that was added or changed includes script phases
63
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
64
+ [#7110](https://github.com/CocoaPods/CocoaPods/pull/7110)
65
+
66
+ * Build pod targets with script phases and integrate them properly
67
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
68
+ [#7104](https://github.com/CocoaPods/CocoaPods/pull/7104)
69
+
70
+ * Do not set a `CODE_SIGN_IDENTITY` for macOS app hosts or xctest bundles
71
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
72
+ [#7103](https://github.com/CocoaPods/CocoaPods/pull/7103)
73
+
74
+ * Fix framework and resources paths caching
75
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
76
+ [#7068](https://github.com/CocoaPods/CocoaPods/pull/7068)
77
+
78
+ * Build subspecs in static frameworks without error
79
+ [Paul Beusterien](https://github.com/paulb777)
80
+ [#7058](https://github.com/CocoaPods/CocoaPods/pull/7058)
81
+
82
+ * Ensure `SYMROOT` is properly set for all user configurations
83
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
84
+ [#7081](https://github.com/CocoaPods/CocoaPods/issues/7081)
85
+
7
86
  ## 1.4.0.beta.1 (2017-09-24)
8
87
 
9
88
  ##### Enhancements
@@ -29,7 +108,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
29
108
  [#6969](https://github.com/CocoaPods/CocoaPods/pull/6969)
30
109
 
31
110
  * For source static frameworks, include frameworks from dependent targets and libraries in OTHER_LDFLAGS
32
- [paulb777](https://github.com/paulb777)
111
+ [Paul Beusterien](https://github.com/paulb777)
33
112
  [#6988](https://github.com/CocoaPods/CocoaPods/pull/6988)
34
113
 
35
114
  ##### Bug Fixes
@@ -85,7 +164,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
85
164
 
86
165
  * Fix validation warnings when using --swift-version
87
166
  [Danielle Tomlinson](https://github.com/dantoml)
88
- [#6971](https://github.com/CocoaPods/CocoaPods/issue/6971)
167
+ [#6971](https://github.com/CocoaPods/CocoaPods/pull/6971)
89
168
 
90
169
  * Fix xcconfig boolean merging when substrings include yes or no
91
170
  [Paul Beusterien](https://github.com/paulb777)
@@ -66,6 +66,7 @@ module Pod
66
66
  autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
67
67
  autoload :UmbrellaHeader, 'cocoapods/generator/umbrella_header'
68
68
  autoload :XCConfig, 'cocoapods/generator/xcconfig'
69
+ autoload :AppTargetHelper, 'cocoapods/generator/app_target_helper'
69
70
  end
70
71
 
71
72
  require 'cocoapods/core_overrides'
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.4.0.beta.1'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.4.0.beta.2'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -0,0 +1,227 @@
1
+ module Pod
2
+ module Generator
3
+ # Stores the common logic for creating app targets within projects including
4
+ # generating standard import and main files for app hosts.
5
+ #
6
+ module AppTargetHelper
7
+ # Adds a single app target to the given project with the provided name.
8
+ #
9
+ # @param [Project] project
10
+ # the Xcodeproj to generate the target into.
11
+ #
12
+ # @param [Symbol] platform
13
+ # the platform of the target. Can be `:ios` or `:osx`, etc.
14
+ #
15
+ # @param [String] deployment_target
16
+ # the deployment target for the platform.
17
+ #
18
+ # @param [String] name
19
+ # The name to use for the target, defaults to 'App'.
20
+ #
21
+ # @return [PBXNativeTarget] the new target that was created.
22
+ #
23
+ def self.add_app_target(project, platform, deployment_target, name = 'App')
24
+ project.new_target(:application, name, platform, deployment_target)
25
+ end
26
+
27
+ # Creates and links an import file for the given pod target and into the given native target.
28
+ #
29
+ # @param [Project] project
30
+ # the Xcodeproj to generate the target into.
31
+ #
32
+ # @param [PBXNativeTarget] target
33
+ # the native target to link the generated import file into.
34
+ #
35
+ # @param [PodTarget] pod_target
36
+ # the pod target to use for when generating the contents of the import file.
37
+ #
38
+ # @param [Symbol] platform
39
+ # the platform of the target. Can be `:ios` or `:osx`, etc.
40
+ #
41
+ # @param [Boolean] use_frameworks
42
+ # whether to use frameworks or not when generating the contents of the import file.
43
+ #
44
+ # @param [String] name
45
+ # The name to use for the target, defaults to 'App'.
46
+ #
47
+ # @return [Array<PBXBuildFile>] the created build file references.
48
+ #
49
+ def self.add_app_project_import(project, target, pod_target, platform, use_frameworks, name = 'App')
50
+ source_file = AppTargetHelper.create_app_import_source_file(project, pod_target, platform, use_frameworks, name)
51
+ source_file_ref = project.new_group(name, name).new_file(source_file)
52
+ target.add_file_references([source_file_ref])
53
+ end
54
+
55
+ # Creates and links a default app host 'main.m' file.
56
+ #
57
+ # @param [Project] project
58
+ # the Xcodeproj to generate the target into.
59
+ #
60
+ # @param [PBXNativeTarget] target
61
+ # the native target to link the generated main file into.
62
+ #
63
+ # @param [Symbol] platform
64
+ # the platform of the target. Can be `:ios` or `:osx`, etc.
65
+ #
66
+ # @param [String] name
67
+ # The name to use for the target, defaults to 'App'.
68
+ #
69
+ # @return [Array<PBXBuildFile>] the created build file references.
70
+ #
71
+ def self.add_app_host_main_file(project, target, platform, name = 'App')
72
+ source_file = AppTargetHelper.create_app_host_main_file(project, platform, name)
73
+ source_file_ref = project.new_group(name, name).new_file(source_file)
74
+ target.add_file_references([source_file_ref])
75
+ end
76
+
77
+ # Adds the xctest framework search paths into the given target.
78
+ #
79
+ # @param [PBXNativeTarget] target
80
+ # the native target to add XCTest into.
81
+ #
82
+ # @return [void]
83
+ #
84
+ def self.add_xctest_search_paths(target)
85
+ target.build_configurations.each do |configuration|
86
+ search_paths = configuration.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= '$(inherited)'
87
+ search_paths << ' "$(PLATFORM_DIR)/Developer/Library/Frameworks"'
88
+ end
89
+ end
90
+
91
+ # Adds the provided swift version into the given target.
92
+ #
93
+ # @param [PBXNativeTarget] target
94
+ # the native target to add the swift version into.
95
+ #
96
+ # @param [String] swift_version
97
+ # the swift version to set to.
98
+ #
99
+ # @return [void]
100
+ #
101
+ def self.add_swift_version(target, swift_version)
102
+ raise 'Cannot set empty Swift version to target.' if swift_version.blank?
103
+ target.build_configurations.each do |configuration|
104
+ configuration.build_settings['SWIFT_VERSION'] = swift_version
105
+ end
106
+ end
107
+
108
+ # Creates a default import file for the given pod target.
109
+ #
110
+ # @param [Project] project
111
+ # the Xcodeproj to generate the target into.
112
+ #
113
+ # @param [PodTarget] pod_target
114
+ # the pod target to use for when generating the contents of the import file.
115
+ #
116
+ # @param [Symbol] platform
117
+ # the platform of the target. Can be `:ios` or `:osx`, etc.
118
+ #
119
+ # @param [Boolean] use_frameworks
120
+ # whether to use frameworks or not when generating the contents of the import file.
121
+ #
122
+ # @param [String] name
123
+ # The name of the folder to use and save the generated main file.
124
+ #
125
+ # @return [Pathname] the new source file that was generated.
126
+ #
127
+ def self.create_app_import_source_file(project, pod_target, platform, use_frameworks, name = 'App')
128
+ language = pod_target.uses_swift? ? :swift : :objc
129
+
130
+ if language == :swift
131
+ source_file = project.path.dirname.+("#{name}/main.swift")
132
+ source_file.parent.mkpath
133
+ import_statement = use_frameworks && pod_target.should_build? ? "import #{pod_target.product_module_name}\n" : ''
134
+ source_file.open('w') { |f| f << import_statement }
135
+ else
136
+ source_file = project.path.dirname.+("#{name}/main.m")
137
+ source_file.parent.mkpath
138
+ import_statement = if use_frameworks && pod_target.should_build?
139
+ "@import #{pod_target.product_module_name};\n"
140
+ else
141
+ header_name = "#{pod_target.product_module_name}/#{pod_target.product_module_name}.h"
142
+ if pod_target.sandbox.public_headers.root.+(header_name).file?
143
+ "#import <#{header_name}>\n"
144
+ else
145
+ ''
146
+ end
147
+ end
148
+ source_file.open('w') do |f|
149
+ f << "@import Foundation;\n"
150
+ f << "@import UIKit;\n" if platform == :ios || platform == :tvos
151
+ f << "@import Cocoa;\n" if platform == :osx
152
+ f << "#{import_statement}int main() {}\n"
153
+ end
154
+ end
155
+ source_file
156
+ end
157
+
158
+ # Creates a default app host 'main.m' file.
159
+ #
160
+ # @param [Project] project
161
+ # the Xcodeproj to generate the target into.
162
+ #
163
+ # @param [Symbol] platform
164
+ # the platform of the target. Can be `:ios` or `:osx`.
165
+ #
166
+ # @param [String] name
167
+ # The name of the folder to use and save the generated main file.
168
+ #
169
+ # @return [Pathname] the new source file that was generated.
170
+ #
171
+ def self.create_app_host_main_file(project, platform, name = 'App')
172
+ source_file = project.path.dirname.+("#{name}/main.m")
173
+ source_file.parent.mkpath
174
+ source_file.open('w') do |f|
175
+ case platform
176
+ when :ios, :tvos
177
+ f << IOS_APP_HOST_MAIN_CONTENTS
178
+ when :osx
179
+ f << MACOS_APP_APP_HOST_MAIN_CONTENTS
180
+ end
181
+ end
182
+ source_file
183
+ end
184
+
185
+ IOS_APP_HOST_MAIN_CONTENTS = <<EOS.freeze
186
+ #import <Foundation/Foundation.h>
187
+ #import <UIKit/UIKit.h>
188
+
189
+ @interface CPTestAppHostAppDelegate : UIResponder <UIApplicationDelegate>
190
+
191
+ @property (nonatomic, strong) UIWindow *window;
192
+
193
+ @end
194
+
195
+ @implementation CPTestAppHostAppDelegate
196
+
197
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
198
+ {
199
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
200
+ self.window.rootViewController = [UIViewController new];
201
+
202
+ [self.window makeKeyAndVisible];
203
+
204
+ return YES;
205
+ }
206
+
207
+ @end
208
+
209
+ int main(int argc, char *argv[])
210
+ {
211
+ @autoreleasepool
212
+ {
213
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([CPTestAppHostAppDelegate class]));
214
+ }
215
+ }
216
+ EOS
217
+
218
+ MACOS_APP_APP_HOST_MAIN_CONTENTS = <<EOS.freeze
219
+ #import <Cocoa/Cocoa.h>
220
+
221
+ int main(int argc, const char * argv[]) {
222
+ return NSApplicationMain(argc, argv);
223
+ }
224
+ EOS
225
+ end
226
+ end
227
+ end
@@ -102,6 +102,15 @@ module Pod
102
102
  echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${source}\\" \\"${DWARF_DSYM_FOLDER_PATH}\\""
103
103
  rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
104
104
  fi
105
+
106
+ local basename
107
+ basename="$(basename -s .framework.dSYM "$source")"
108
+ binary="${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
109
+
110
+ # Strip invalid architectures so "fat" simulator / device frameworks work on device
111
+ if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then
112
+ strip_invalid_archs "$binary"
113
+ fi
105
114
  }
106
115
 
107
116
  # Signs a framework with the provided identity
@@ -5,9 +5,13 @@ module Pod
5
5
  # framework. It states public attributes.
6
6
  #
7
7
  class InfoPlistFile
8
- # @return [Target] the target represented by this Info.plist.
8
+ # @return [Version] version The version to use for when generating this Info.plist file.
9
9
  #
10
- attr_reader :target
10
+ attr_reader :version
11
+
12
+ # @return [Platform] The platform to use for when generating this Info.plist file.
13
+ #
14
+ attr_reader :platform
11
15
 
12
16
  # @return [Symbol] the CFBundlePackageType of the target this Info.plist
13
17
  # file is for.
@@ -16,12 +20,13 @@ module Pod
16
20
 
17
21
  # Initialize a new instance
18
22
  #
19
- # @param [Target] target @see target
20
- #
23
+ # @param [Version] version @see version
24
+ # @param [Platform] platform @see platform
21
25
  # @param [Symbol] bundle_package_type @see bundle_package_type
22
26
  #
23
- def initialize(target, bundle_package_type: :fmwk)
24
- @target = target
27
+ def initialize(version, platform, bundle_package_type = :fmwk)
28
+ @version = version
29
+ @platform = platform
25
30
  @bundle_package_type = bundle_package_type
26
31
  end
27
32
 
@@ -39,21 +44,6 @@ module Pod
39
44
  end
40
45
  end
41
46
 
42
- # The version associated with the current target
43
- #
44
- # @note Will return 1.0.0 for the AggregateTarget
45
- #
46
- # @return [String]
47
- #
48
- def target_version
49
- if target && target.respond_to?(:root_spec)
50
- version = target.root_spec.version
51
- [version.major, version.minor, version.patch].join('.')
52
- else
53
- '1.0.0'
54
- end
55
- end
56
-
57
47
  # Generates the contents of the Info.plist
58
48
  #
59
49
  # @return [String]
@@ -108,7 +98,7 @@ module Pod
108
98
  'CFBundleInfoDictionaryVersion' => '6.0',
109
99
  'CFBundleName' => '${PRODUCT_NAME}',
110
100
  'CFBundlePackageType' => bundle_package_type.to_s.upcase,
111
- 'CFBundleShortVersionString' => target_version,
101
+ 'CFBundleShortVersionString' => version,
112
102
  'CFBundleSignature' => '????',
113
103
  'CFBundleVersion' => '${CURRENT_PROJECT_VERSION}',
114
104
  'NSPrincipalClass' => '',
@@ -117,6 +107,7 @@ module Pod
117
107
 
118
108
  info['CFBundleExecutable'] = '${EXECUTABLE_NAME}' if bundle_package_type != :bndl
119
109
  info['CFBundleVersion'] = '1' if bundle_package_type == :bndl
110
+ info['NSPrincipalClass'] = 'NSApplication' if bundle_package_type == :appl && platform == :osx
120
111
 
121
112
  info
122
113
  end
@@ -71,6 +71,7 @@ module Pod
71
71
  XCConfigHelper.add_target_specific_settings(target, @xcconfig)
72
72
  recursive_dependent_targets = target.recursive_dependent_targets
73
73
  @xcconfig.merge! XCConfigHelper.search_paths_for_dependent_targets(target, recursive_dependent_targets, @test_xcconfig)
74
+ XCConfigHelper.generate_vendored_build_settings(target, recursive_dependent_targets, @xcconfig, false) if target.requires_frameworks?
74
75
  if @test_xcconfig
75
76
  test_dependent_targets = [target, *target.recursive_test_dependent_targets].uniq
76
77
  @xcconfig.merge! XCConfigHelper.search_paths_for_dependent_targets(target, test_dependent_targets - recursive_dependent_targets, @test_xcconfig)