forked from wordpress-mobile/WordPress-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Podfile
90 lines (81 loc) · 3.46 KB
/
Podfile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
xcodeproj 'WordPress/WordPress.xcodeproj'
platform :ios, '5.0'
pod 'AFNetworking', '1.2'
pod 'Reachability', '~> 3.0.0'
pod 'JSONKit', '~> 1.4', :inhibit_warnings => true
pod 'NSURL+IDN', :podspec => 'https://raw.github.com/koke/NSURL-IDN/master/Podfile'
pod 'CTidy', :git => 'git://github.com/wordpress-mobile/CTidy.git'
pod 'DTCoreText', '~> 1.6'
pod 'UIDeviceIdentifier', '~> 0.1'
pod 'SVProgressHUD', '~> 0.9'
pod 'SSKeychain', '~> 0.2'
pod 'SFHFKeychainUtils', '~> 0.0.1'
pod 'wpxmlrpc', '~> 0.1'
pod 'WordPressApi', :podspec => 'https://raw.github.com/koke/WordPressApi/master/WordPressApi.podspec'
pod 'NSObject-SafeExpectations', :podspec => 'https://raw.github.com/koke/NSObject-SafeExpectations/master/NSObject-SafeExpectations.podspec'
pod 'Mixpanel'
pod 'CocoaLumberjack', '~>1.6.2'
pod 'NSLogger-CocoaLumberjack-connector', '~>1.3'
pod 'google-plus-ios-sdk', '~> 1.3.0'
pod 'MGImageUtilities', :git => 'git://github.com/wordpress-mobile/MGImageUtilities.git'
pod 'Quantcast-Measure', '~> 1.2.10'
pod 'CocoaLumberjack', '~>1.6.2'
pod 'NSLogger-CocoaLumberjack-connector', '~>1.3'
target :WordPressTest, :exclusive => true do
pod 'OHHTTPStubs', '~> 1.1'
end
# The post install hook add certain compiler flags for JSONKit files so that
# they won't generate warnings. This had been done in the podspec before, but
# was removed later for some reason.
post_install do |installer|
# Adds the specified compiler flags to the given file in the project.
#
# @param [Xcodeproj::Project] project
# The Xcode project instance.
#
# @param [String] filename
# The name of the file to work with.
#
# @param [String] new_compiler_flags
# The compiler flags to add.
#
# @example Disable some warning switches for JSONKit:
# add_compiler_flags(installer.project,
# "JSONKit.m",
# "-Wno-deprecated-objc-isa-usage -Wno-format")
#
def add_compiler_flags(project, filename, new_compiler_flags)
# find all PBXFileReference objects of the given file
files = project.files().select { |file|
file.display_name() == filename
}
# get the PBXBuildFile references of the found files
# PBXBuildFile actually contains flags for building the file
build_files = files.map { |file|
file.build_files()
}.compact.flatten
# compiler flags key in settings
compiler_flags_key = "COMPILER_FLAGS"
if build_files.length > 0
build_files.each { |build_file|
settings = build_file.settings
if settings.nil?
# If we don't have settings for the file we create a new hash
settings = Hash[compiler_flags_key, new_compiler_flags]
else
compiler_flags = settings[compiler_flags_key]
compiler_flags = (compiler_flags.nil?) ?
new_compiler_flags :
(compiler_flags + " " + new_compiler_flags)
settings[compiler_flags_key] = compiler_flags
end
build_file.settings = settings
}
else
puts "No build file refs found for #{filename}!"
end
end
# compiler flags that turn off the JSONKit's warnings
JSONKIT_FLAGS = "-Wno-deprecated-objc-isa-usage -Wno-format -Wno-parentheses"
add_compiler_flags(installer.project, "JSONKit.m", JSONKIT_FLAGS)
end