/
MKNetworkKit.podspec
38 lines (31 loc) · 1.37 KB
/
MKNetworkKit.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Pod::Spec.new do |s|
s.name = 'MKNetworkKit'
s.version = '0.83'
s.license = 'MIT'
s.summary = 'Full ARC based Networking Kit for iOS 4+ devices'
s.homepage = 'https://github.com/MugunthKumar/MKNetworkKit'
s.author = { 'MugunthKumar' => 'mknetworkkit@mk.sg' }
s.source = { :git => 'https://github.com/MugunthKumar/MKNetworkKit.git', :tag => 'v0.83' }
files = FileList['MKNetworkKit/*.{h,m}', 'MKNetworkKit/Categories/*.{h,m}']
s.ios.source_files = files.dup.exclude(/NSAlert/)
s.osx.source_files = files.dup.exclude(/UIAlertView/)
s.ios.frameworks = 'CFNetwork', 'Security'
s.osx.frameworks = 'CoreServices', 'Security'
s.clean_paths = 'MKNetworkKit-*', '*-Demo', 'SampleImage.jpg'
s.requires_arc = true
s.dependency 'Reachability', '~> 3.0'
def s.post_install(target)
# Fix an import statement which is used inconsistently in MKNetworkKit
# TODO create a ticket for this upstream
header = (pod_destroot + 'MKNetworkKit/MKNetworkKit.h')
header_contents = header.read.sub('Reachability/Reachability.h', 'Reachability.h')
header.open('w') do |file|
file.puts(header_contents)
end
# Add MKNetworkKit.h to the prefix header
prefix_header = config.project_pods_root + target.prefix_header_filename
prefix_header.open('a') do |file|
file.puts(%{#ifdef __OBJC__\n#import "MKNetworkKit.h"\n#endif})
end
end
end