Skip to content

Commit 48ded81

Browse files
committed
Revert "refactor: Remove Cocoapods support (parse-community#1696)"
This reverts commit 03b2220.
1 parent d7625ba commit 48ded81

File tree

4 files changed

+283
-2
lines changed

4 files changed

+283
-2
lines changed

Parse.podspec

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'Parse'
3+
s.version = '2.0.2'
4+
s.license = { :type => 'BSD', :file => 'LICENSE' }
5+
s.homepage = 'http://parseplatform.org/'
6+
s.summary = 'A library that gives you access to the powerful Parse cloud platform from your iOS/OS X/watchOS/tvOS app.'
7+
s.authors = 'Parse Community'
8+
s.social_media_url = 'https://twitter.com/ParsePlatform'
9+
10+
s.source = { :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :tag => s.version.to_s }
11+
12+
s.platform = :ios, :osx, :tvos, :watchos
13+
s.ios.deployment_target = '9.0'
14+
s.osx.deployment_target = '10.9'
15+
s.tvos.deployment_target = '10.0'
16+
s.watchos.deployment_target = '2.0'
17+
18+
s.default_subspec = 'Core'
19+
20+
s.subspec 'Core' do |s|
21+
s.requires_arc = true
22+
23+
s.source_files = 'Parse/Parse/Source/*.{h,m}',
24+
'Parse/Parse/Internal/**/*.{h,m}'
25+
s.public_header_files = 'Parse/Parse/Source/*.h'
26+
s.private_header_files = 'Parse/Parse/Internal/**/*.h'
27+
28+
s.ios.exclude_files = 'Parse/Parse/Internal/PFMemoryEventuallyQueue.{h,m}'
29+
s.osx.exclude_files = 'Parse/Parse/Source/PFNetworkActivityIndicatorManager.{h,m}',
30+
'Parse/Parse/Source/PFProduct.{h,m}',
31+
'Parse/Parse/Source/PFPurchase.{h,m}',
32+
'Parse/Parse/Internal/PFAlertView.{h,m}',
33+
'Parse/Parse/Internal/Product/**/*.{h,m}',
34+
'Parse/Parse/Internal/Purchase/**/*.{h,m}',
35+
'Parse/Parse/Internal/PFMemoryEventuallyQueue.{h,m}'
36+
s.tvos.exclude_files = 'Parse/Parse/Source/PFNetworkActivityIndicatorManager.{h,m}',
37+
'Parse/Parse/Internal/PFAlertView.{h,m}'
38+
s.watchos.exclude_files = 'Parse/Parse/Source/PFNetworkActivityIndicatorManager.{h,m}',
39+
'Parse/Parse/Source/PFProduct.{h,m}',
40+
'Parse/Parse/Source/PFPurchase.{h,m}',
41+
'Parse/Parse/Source/PFPush.{h,m}',
42+
'Parse/Parse/Source/PFPush+Synchronous.{h,m}',
43+
'Parse/Parse/Source/PFPush+Deprecated.{h,m}',
44+
'Parse/Parse/Source/PFInstallation.{h,m}',
45+
'Parse/Parse/Internal/PFAlertView.{h,m}',
46+
'Parse/Parse/Internal/PFReachability.{h,m}',
47+
'Parse/Parse/Internal/Product/**/*.{h,m}',
48+
'Parse/Parse/Internal/Purchase/**/*.{h,m}',
49+
'Parse/Parse/Internal/Push/**/*.{h,m}',
50+
'Parse/Parse/Internal/Installation/Controller/*.{h,m}',
51+
'Parse/Parse/Internal/Installation/Constants/*.{h,m}',
52+
'Parse/Parse/Internal/Installation/CurrentInstallationController/*.{h,m}',
53+
'Parse/Parse/Internal/Installation/PFInstallationPrivate.h',
54+
'Parse/Parse/Internal/Commands/PFRESTPushCommand.{h,m}',
55+
'Parse/Parse/Internal/PFMemoryEventuallyQueue.{h,m}'
56+
57+
s.resource_bundle = { 'Parse' => 'Parse/Parse/Resources/en.lproj' }
58+
59+
s.ios.frameworks = 'AudioToolbox',
60+
'CFNetwork',
61+
'CoreGraphics',
62+
'CoreLocation',
63+
'QuartzCore',
64+
'Security',
65+
'StoreKit',
66+
'SystemConfiguration'
67+
s.ios.weak_frameworks = 'Accounts',
68+
'Social'
69+
s.osx.frameworks = 'ApplicationServices',
70+
'CFNetwork',
71+
'CoreGraphics',
72+
'CoreLocation',
73+
'QuartzCore',
74+
'Security',
75+
'SystemConfiguration'
76+
s.tvos.frameworks = 'CoreLocation',
77+
'StoreKit',
78+
'SystemConfiguration',
79+
'Security'
80+
81+
s.libraries = 'z', 'sqlite3'
82+
83+
s.dependency 'Bolts/Tasks', '1.9.1'
84+
s.user_target_xcconfig = {
85+
'GENERATE_INFOPLIST_FILE' => 'YES'
86+
}
87+
88+
s.pod_target_xcconfig = {
89+
'GENERATE_INFOPLIST_FILE' => 'YES'
90+
}
91+
end
92+
93+
s.subspec 'FacebookUtils' do |s|
94+
s.platform = :ios, :tvos
95+
s.ios.deployment_target = '12.0'
96+
s.tvos.deployment_target = '12.0'
97+
s.public_header_files = 'ParseFacebookUtils/ParseFacebookUtils/Source/*.h'
98+
s.source_files = 'ParseFacebookUtils/ParseFacebookUtils/Source/*.{h,m}'
99+
100+
s.frameworks = 'AudioToolbox',
101+
'CFNetwork',
102+
'CoreGraphics',
103+
'CoreLocation',
104+
'QuartzCore',
105+
'Security',
106+
'SystemConfiguration'
107+
s.ios.weak_frameworks = 'Accounts',
108+
'Social'
109+
110+
s.libraries = 'z', 'sqlite3'
111+
112+
s.dependency 'Parse/Core'
113+
s.dependency 'Bolts/Tasks', '1.9.1'
114+
s.dependency 'FBSDKCoreKit', '= 15.1.0'
115+
s.dependency 'FBSDKLoginKit', '= 15.1.0'
116+
s.dependency 'FBSDKCoreKit_Basics', '= 15.1.0'
117+
s.user_target_xcconfig = {
118+
'GENERATE_INFOPLIST_FILE' => 'YES'
119+
}
120+
121+
s.pod_target_xcconfig = {
122+
'GENERATE_INFOPLIST_FILE' => 'YES'
123+
}
124+
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=*simulator*]' => 'x86_64 armv7 arm64' }
125+
end
126+
127+
s.subspec 'FacebookUtils-iOS' do |s|
128+
s.platform = :ios
129+
s.ios.deployment_target = '12.0'
130+
s.public_header_files = 'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Source/*.h'
131+
s.private_header_files = 'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Internal/**/*.h'
132+
s.source_files = 'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Source/*.{h,m}',
133+
'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Internal/**/*.{h,m}'
134+
135+
s.frameworks = 'AudioToolbox',
136+
'CFNetwork',
137+
'CoreGraphics',
138+
'CoreLocation',
139+
'QuartzCore',
140+
'Security',
141+
'SystemConfiguration'
142+
s.ios.weak_frameworks = 'Accounts',
143+
'Social'
144+
145+
s.libraries = 'z', 'sqlite3'
146+
147+
s.dependency 'Parse/Core'
148+
s.dependency 'Parse/FacebookUtils'
149+
s.dependency 'Bolts/Tasks', '1.9.1'
150+
s.dependency 'FBSDKCoreKit', '= 15.1.0'
151+
s.dependency 'FBSDKLoginKit', '= 15.1.0'
152+
s.dependency 'FBSDKCoreKit_Basics', '= 15.1.0'
153+
s.user_target_xcconfig = {
154+
'GENERATE_INFOPLIST_FILE' => 'YES'
155+
}
156+
157+
s.pod_target_xcconfig = {
158+
'GENERATE_INFOPLIST_FILE' => 'YES'
159+
}
160+
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'x86_64 armv7 arm64' }
161+
end
162+
163+
s.subspec 'FacebookUtils-tvOS' do |s|
164+
s.platform = :tvos
165+
s.tvos.deployment_target = '12.0'
166+
s.public_header_files = 'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Source/*.h'
167+
s.private_header_files = 'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Internal/**/*.h'
168+
s.source_files = 'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Source/*.{h,m}',
169+
'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Internal/**/*.{h,m}'
170+
171+
s.frameworks = 'AudioToolbox',
172+
'CFNetwork',
173+
'CoreGraphics',
174+
'CoreLocation',
175+
'QuartzCore',
176+
'Security',
177+
'SystemConfiguration'
178+
s.libraries = 'z', 'sqlite3'
179+
180+
s.dependency 'Parse/Core'
181+
s.dependency 'Parse/FacebookUtils'
182+
s.dependency 'Bolts/Tasks', '1.9.1'
183+
s.dependency 'FBSDKTVOSKit', '= 15.1.0'
184+
s.dependency 'FBSDKShareKit', '= 15.1.0'
185+
s.user_target_xcconfig = {
186+
'GENERATE_INFOPLIST_FILE' => 'YES'
187+
}
188+
189+
s.pod_target_xcconfig = {
190+
'GENERATE_INFOPLIST_FILE' => 'YES'
191+
}
192+
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=*simulator*]' => 'x86_64 armv7 arm64' }
193+
end
194+
195+
s.subspec 'TwitterUtils' do |s|
196+
s.platform = :ios
197+
s.public_header_files = 'ParseTwitterUtils/ParseTwitterUtils/Source/*.h'
198+
s.source_files = 'ParseTwitterUtils/ParseTwitterUtils/Source/*.{h,m}',
199+
'ParseTwitterUtils/ParseTwitterUtils/Internal/**/*.{h,m}'
200+
s.private_header_files = 'ParseTwitterUtils/ParseTwitterUtils/Internal/**/*.h'
201+
s.resource_bundle = { 'TwitterUtils' => 'ParseTwitterUtils/ParseTwitterUtils/Resources/en.lproj' }
202+
s.frameworks = 'AudioToolbox',
203+
'CFNetwork',
204+
'CoreGraphics',
205+
'CoreLocation',
206+
'QuartzCore',
207+
'Security',
208+
'StoreKit',
209+
'SystemConfiguration'
210+
s.weak_frameworks = 'Accounts',
211+
'Social'
212+
s.libraries = 'z', 'sqlite3'
213+
s.dependency 'Parse/Core'
214+
s.user_target_xcconfig = {
215+
'GENERATE_INFOPLIST_FILE' => 'YES'
216+
}
217+
218+
s.pod_target_xcconfig = {
219+
'GENERATE_INFOPLIST_FILE' => 'YES'
220+
}
221+
222+
s.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
223+
end
224+
225+
s.subspec 'UI' do |s|
226+
s.platform = :ios
227+
s.requires_arc = true
228+
s.ios.deployment_target = '9.0'
229+
s.source_files = 'ParseUI/ParseUI/Internal/**/*.{h,m}',
230+
'ParseUI/ParseUI/Source/*.{h,m}'
231+
s.exclude_files = 'ParseUI/ParseUIDemo/**/*', 'ParseUI/SignInWithAppleTests/'
232+
s.public_header_files = 'ParseUI/ParseUI/Source/*.h'
233+
s.private_header_files = 'ParseUI/ParseUI/Internal/**/*.h'
234+
s.resource_bundles = { 'ParseUI' => ['ParseUI/ParseUI/Resources/Localization/*.lproj'] }
235+
s.frameworks = 'Foundation',
236+
'UIKit',
237+
'CoreGraphics',
238+
'QuartzCore'
239+
s.dependency 'Parse/Core'
240+
s.user_target_xcconfig = {
241+
'GENERATE_INFOPLIST_FILE' => 'YES'
242+
}
243+
244+
s.pod_target_xcconfig = {
245+
'GENERATE_INFOPLIST_FILE' => 'YES'
246+
}
247+
end
248+
249+
# prepare command for parseUI
250+
s.prepare_command = <<-CMD
251+
ruby ParseUI/Scripts/convert_images.rb \
252+
ParseUI/ParseUI/Resources/Images/ \
253+
ParseUI/Source/PFResources
254+
CMD
255+
end
256+

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[![Coverage](https://img.shields.io/codecov/c/github/parse-community/Parse-SDK-iOS-OSX/master.svg)](https://codecov.io/github/parse-community/Parse-SDK-iOS-OSX?branch=master)
1111
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/Parse-SDK-iOS-OSX/releases)
1212

13+
![Platforms](http://img.shields.io/cocoapods/p/Parse.svg?style=flat)
1314
![SPM](https://img.shields.io/badge/Swift_Package_Manager-compatible-green?style=flat)
1415

1516
[![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
@@ -34,7 +35,7 @@ A library that gives you access to the powerful Parse Server backend from your i
3435

3536
## Getting Started
3637

37-
The easiest way to install the SDK is via Swift Package Manager.
38+
#### Swift Package Manager
3839

3940
1. Open Xcode > File > Add packages...
4041
2. Add the following package URL:

Rakefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Constants
2525
script_folder = File.expand_path(File.dirname(__FILE__))
2626

2727
PARSE_CONSTANTS_HEADER = File.join(script_folder, 'Parse', 'Parse', 'Source/PFConstants.h')
28+
PARSE_PODSPEC = File.join(script_folder, 'Parse.podspec')
2829

2930
PLISTS = [
3031
File.join(script_folder, 'Parse', 'Parse', 'Resources', 'Parse-iOS.Info.plist'),
@@ -65,6 +66,12 @@ module Constants
6566
PLISTS.each do |plist|
6667
update_info_plist_version(plist, version)
6768
end
69+
70+
podspec_file = File.open(PARSE_PODSPEC, 'r+')
71+
podspec = podspec_file.read
72+
podspec.gsub!(/(.*s.version\s*=\s*')(.*)(')/, "\\1#{version}\\3")
73+
podspec_file.seek(0)
74+
podspec_file.write(podspec)
6875
end
6976

7077
def self.update_info_plist_version(plist_path, version)
@@ -873,4 +880,21 @@ namespace :test do
873880
end
874881
end
875882
end
883+
884+
desc 'Run Podspec Lint'
885+
task :cocoapods do |_|
886+
podspecs = ['Parse.podspec']
887+
results = []
888+
system("pod repo update --silent")
889+
podspecs.each do |podspec|
890+
results << system("pod lib lint #{podspec} --allow-warnings")
891+
results << system("pod lib lint #{podspec} --allow-warnings --use-libraries --use-modular-headers")
892+
end
893+
results.each do |result|
894+
unless result
895+
puts 'Podspec Tests Failed!'
896+
exit(1)
897+
end
898+
end
899+
end
876900
end

release.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async function config() {
8585
'npmPublish': false,
8686
}],
8787
['@semantic-release/git', {
88-
assets: [changelogFile, 'package.json', 'package-lock.json', ['Parse*/**/*.{h,plist}', '!**/xcuserdata/**'] ],
88+
assets: [changelogFile, 'package.json', 'package-lock.json', 'Parse.podspec', ['Parse*/**/*.{h,plist}', '!**/xcuserdata/**'] ],
8989
}],
9090
['@semantic-release/github', {
9191
successComment: getReleaseComment(),

0 commit comments

Comments
 (0)