Skip to content

Commit 03a9156

Browse files
authored
Improve podspec (AFNetworking#4528)
* Remove submodules, requires_arc * Removed redundant public_header_files * Fixed bundle identifier for CocoaPods generated framework * Remove prefix_header_contents attribute
1 parent 6ec99c9 commit 03a9156

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

AFNetworking.podspec

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,28 @@ Pod::Spec.new do |s|
66
s.homepage = 'https://github.com/AFNetworking/AFNetworking'
77
s.social_media_url = 'https://twitter.com/AFNetworking'
88
s.authors = { 'Mattt Thompson' => '[email protected]' }
9-
s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => s.version, :submodules => true }
10-
s.requires_arc = true
11-
12-
s.public_header_files = 'AFNetworking/AFNetworking.h'
13-
s.source_files = 'AFNetworking/AFNetworking.h'
14-
15-
pch_AF = <<-EOS
16-
#ifndef TARGET_OS_IOS
17-
#define TARGET_OS_IOS TARGET_OS_IPHONE
18-
#endif
9+
s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => s.version }
10+
11+
s.pod_target_xcconfig = {
12+
'PRODUCT_BUNDLE_IDENTIFIER' => 'com.alamofire.AFNetworking'
13+
}
1914

20-
#ifndef TARGET_OS_WATCH
21-
#define TARGET_OS_WATCH 0
22-
#endif
15+
s.source_files = 'AFNetworking/AFNetworking.h'
2316

24-
#ifndef TARGET_OS_TV
25-
#define TARGET_OS_TV 0
26-
#endif
27-
EOS
28-
s.prefix_header_contents = pch_AF
29-
3017
s.ios.deployment_target = '9.0'
3118
s.osx.deployment_target = '10.10'
3219
s.watchos.deployment_target = '2.0'
3320
s.tvos.deployment_target = '9.0'
34-
21+
3522
s.subspec 'Serialization' do |ss|
3623
ss.source_files = 'AFNetworking/AFURL{Request,Response}Serialization.{h,m}'
37-
ss.public_header_files = 'AFNetworking/AFURL{Request,Response}Serialization.h'
3824
ss.watchos.frameworks = 'MobileCoreServices', 'CoreGraphics'
3925
ss.ios.frameworks = 'MobileCoreServices', 'CoreGraphics'
4026
ss.osx.frameworks = 'CoreServices'
4127
end
4228

4329
s.subspec 'Security' do |ss|
4430
ss.source_files = 'AFNetworking/AFSecurityPolicy.{h,m}'
45-
ss.public_header_files = 'AFNetworking/AFSecurityPolicy.h'
4631
ss.frameworks = 'Security'
4732
end
4833

@@ -52,7 +37,6 @@ EOS
5237
ss.tvos.deployment_target = '9.0'
5338

5439
ss.source_files = 'AFNetworking/AFNetworkReachabilityManager.{h,m}'
55-
ss.public_header_files = 'AFNetworking/AFNetworkReachabilityManager.h'
5640

5741
ss.frameworks = 'SystemConfiguration'
5842
end
@@ -65,15 +49,13 @@ EOS
6549
ss.dependency 'AFNetworking/Security'
6650

6751
ss.source_files = 'AFNetworking/AF{URL,HTTP}SessionManager.{h,m}', 'AFNetworking/AFCompatibilityMacros.h'
68-
ss.public_header_files = 'AFNetworking/AF{URL,HTTP}SessionManager.h', 'AFNetworking/AFCompatibilityMacros.h'
6952
end
7053

7154
s.subspec 'UIKit' do |ss|
7255
ss.ios.deployment_target = '9.0'
7356
ss.tvos.deployment_target = '9.0'
7457
ss.dependency 'AFNetworking/NSURLSession'
7558

76-
ss.public_header_files = 'UIKit+AFNetworking/*.h'
7759
ss.source_files = 'UIKit+AFNetworking'
7860
end
7961
end

0 commit comments

Comments
 (0)