Skip to content

Commit

Permalink
Revert "refactor: Remove Cocoapods support (parse-community#1696)"
Browse files Browse the repository at this point in the history
This reverts commit 03b2220.
  • Loading branch information
shlusiak committed Jun 26, 2023
1 parent d7625ba commit 48ded81
Show file tree
Hide file tree
Showing 4 changed files with 283 additions and 2 deletions.
256 changes: 256 additions & 0 deletions Parse.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
Pod::Spec.new do |s|
s.name = 'Parse'
s.version = '2.0.2'
s.license = { :type => 'BSD', :file => 'LICENSE' }
s.homepage = 'http://parseplatform.org/'
s.summary = 'A library that gives you access to the powerful Parse cloud platform from your iOS/OS X/watchOS/tvOS app.'
s.authors = 'Parse Community'
s.social_media_url = 'https://twitter.com/ParsePlatform'

s.source = { :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :tag => s.version.to_s }

s.platform = :ios, :osx, :tvos, :watchos
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '2.0'

s.default_subspec = 'Core'

s.subspec 'Core' do |s|
s.requires_arc = true

s.source_files = 'Parse/Parse/Source/*.{h,m}',
'Parse/Parse/Internal/**/*.{h,m}'
s.public_header_files = 'Parse/Parse/Source/*.h'
s.private_header_files = 'Parse/Parse/Internal/**/*.h'

s.ios.exclude_files = 'Parse/Parse/Internal/PFMemoryEventuallyQueue.{h,m}'
s.osx.exclude_files = 'Parse/Parse/Source/PFNetworkActivityIndicatorManager.{h,m}',
'Parse/Parse/Source/PFProduct.{h,m}',
'Parse/Parse/Source/PFPurchase.{h,m}',
'Parse/Parse/Internal/PFAlertView.{h,m}',
'Parse/Parse/Internal/Product/**/*.{h,m}',
'Parse/Parse/Internal/Purchase/**/*.{h,m}',
'Parse/Parse/Internal/PFMemoryEventuallyQueue.{h,m}'
s.tvos.exclude_files = 'Parse/Parse/Source/PFNetworkActivityIndicatorManager.{h,m}',
'Parse/Parse/Internal/PFAlertView.{h,m}'
s.watchos.exclude_files = 'Parse/Parse/Source/PFNetworkActivityIndicatorManager.{h,m}',
'Parse/Parse/Source/PFProduct.{h,m}',
'Parse/Parse/Source/PFPurchase.{h,m}',
'Parse/Parse/Source/PFPush.{h,m}',
'Parse/Parse/Source/PFPush+Synchronous.{h,m}',
'Parse/Parse/Source/PFPush+Deprecated.{h,m}',
'Parse/Parse/Source/PFInstallation.{h,m}',
'Parse/Parse/Internal/PFAlertView.{h,m}',
'Parse/Parse/Internal/PFReachability.{h,m}',
'Parse/Parse/Internal/Product/**/*.{h,m}',
'Parse/Parse/Internal/Purchase/**/*.{h,m}',
'Parse/Parse/Internal/Push/**/*.{h,m}',
'Parse/Parse/Internal/Installation/Controller/*.{h,m}',
'Parse/Parse/Internal/Installation/Constants/*.{h,m}',
'Parse/Parse/Internal/Installation/CurrentInstallationController/*.{h,m}',
'Parse/Parse/Internal/Installation/PFInstallationPrivate.h',
'Parse/Parse/Internal/Commands/PFRESTPushCommand.{h,m}',
'Parse/Parse/Internal/PFMemoryEventuallyQueue.{h,m}'

s.resource_bundle = { 'Parse' => 'Parse/Parse/Resources/en.lproj' }

s.ios.frameworks = 'AudioToolbox',
'CFNetwork',
'CoreGraphics',
'CoreLocation',
'QuartzCore',
'Security',
'StoreKit',
'SystemConfiguration'
s.ios.weak_frameworks = 'Accounts',
'Social'
s.osx.frameworks = 'ApplicationServices',
'CFNetwork',
'CoreGraphics',
'CoreLocation',
'QuartzCore',
'Security',
'SystemConfiguration'
s.tvos.frameworks = 'CoreLocation',
'StoreKit',
'SystemConfiguration',
'Security'

s.libraries = 'z', 'sqlite3'

s.dependency 'Bolts/Tasks', '1.9.1'
s.user_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}

s.pod_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}
end

s.subspec 'FacebookUtils' do |s|
s.platform = :ios, :tvos
s.ios.deployment_target = '12.0'
s.tvos.deployment_target = '12.0'
s.public_header_files = 'ParseFacebookUtils/ParseFacebookUtils/Source/*.h'
s.source_files = 'ParseFacebookUtils/ParseFacebookUtils/Source/*.{h,m}'

s.frameworks = 'AudioToolbox',
'CFNetwork',
'CoreGraphics',
'CoreLocation',
'QuartzCore',
'Security',
'SystemConfiguration'
s.ios.weak_frameworks = 'Accounts',
'Social'

s.libraries = 'z', 'sqlite3'

s.dependency 'Parse/Core'
s.dependency 'Bolts/Tasks', '1.9.1'
s.dependency 'FBSDKCoreKit', '= 15.1.0'
s.dependency 'FBSDKLoginKit', '= 15.1.0'
s.dependency 'FBSDKCoreKit_Basics', '= 15.1.0'
s.user_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}

s.pod_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=*simulator*]' => 'x86_64 armv7 arm64' }
end

s.subspec 'FacebookUtils-iOS' do |s|
s.platform = :ios
s.ios.deployment_target = '12.0'
s.public_header_files = 'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Source/*.h'
s.private_header_files = 'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Internal/**/*.h'
s.source_files = 'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Source/*.{h,m}',
'ParseFacebookUtilsiOS/ParseFacebookUtilsiOS/Internal/**/*.{h,m}'

s.frameworks = 'AudioToolbox',
'CFNetwork',
'CoreGraphics',
'CoreLocation',
'QuartzCore',
'Security',
'SystemConfiguration'
s.ios.weak_frameworks = 'Accounts',
'Social'

s.libraries = 'z', 'sqlite3'

s.dependency 'Parse/Core'
s.dependency 'Parse/FacebookUtils'
s.dependency 'Bolts/Tasks', '1.9.1'
s.dependency 'FBSDKCoreKit', '= 15.1.0'
s.dependency 'FBSDKLoginKit', '= 15.1.0'
s.dependency 'FBSDKCoreKit_Basics', '= 15.1.0'
s.user_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}

s.pod_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'x86_64 armv7 arm64' }
end

s.subspec 'FacebookUtils-tvOS' do |s|
s.platform = :tvos
s.tvos.deployment_target = '12.0'
s.public_header_files = 'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Source/*.h'
s.private_header_files = 'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Internal/**/*.h'
s.source_files = 'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Source/*.{h,m}',
'ParseFacebookUtilsTvOS/ParseFacebookUtilsTvOS/Internal/**/*.{h,m}'

s.frameworks = 'AudioToolbox',
'CFNetwork',
'CoreGraphics',
'CoreLocation',
'QuartzCore',
'Security',
'SystemConfiguration'
s.libraries = 'z', 'sqlite3'

s.dependency 'Parse/Core'
s.dependency 'Parse/FacebookUtils'
s.dependency 'Bolts/Tasks', '1.9.1'
s.dependency 'FBSDKTVOSKit', '= 15.1.0'
s.dependency 'FBSDKShareKit', '= 15.1.0'
s.user_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}

s.pod_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=*simulator*]' => 'x86_64 armv7 arm64' }
end

s.subspec 'TwitterUtils' do |s|
s.platform = :ios
s.public_header_files = 'ParseTwitterUtils/ParseTwitterUtils/Source/*.h'
s.source_files = 'ParseTwitterUtils/ParseTwitterUtils/Source/*.{h,m}',
'ParseTwitterUtils/ParseTwitterUtils/Internal/**/*.{h,m}'
s.private_header_files = 'ParseTwitterUtils/ParseTwitterUtils/Internal/**/*.h'
s.resource_bundle = { 'TwitterUtils' => 'ParseTwitterUtils/ParseTwitterUtils/Resources/en.lproj' }
s.frameworks = 'AudioToolbox',
'CFNetwork',
'CoreGraphics',
'CoreLocation',
'QuartzCore',
'Security',
'StoreKit',
'SystemConfiguration'
s.weak_frameworks = 'Accounts',
'Social'
s.libraries = 'z', 'sqlite3'
s.dependency 'Parse/Core'
s.user_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}

s.pod_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}

s.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
end

s.subspec 'UI' do |s|
s.platform = :ios
s.requires_arc = true
s.ios.deployment_target = '9.0'
s.source_files = 'ParseUI/ParseUI/Internal/**/*.{h,m}',
'ParseUI/ParseUI/Source/*.{h,m}'
s.exclude_files = 'ParseUI/ParseUIDemo/**/*', 'ParseUI/SignInWithAppleTests/'
s.public_header_files = 'ParseUI/ParseUI/Source/*.h'
s.private_header_files = 'ParseUI/ParseUI/Internal/**/*.h'
s.resource_bundles = { 'ParseUI' => ['ParseUI/ParseUI/Resources/Localization/*.lproj'] }
s.frameworks = 'Foundation',
'UIKit',
'CoreGraphics',
'QuartzCore'
s.dependency 'Parse/Core'
s.user_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}

s.pod_target_xcconfig = {
'GENERATE_INFOPLIST_FILE' => 'YES'
}
end

# prepare command for parseUI
s.prepare_command = <<-CMD
ruby ParseUI/Scripts/convert_images.rb \
ParseUI/ParseUI/Resources/Images/ \
ParseUI/Source/PFResources
CMD
end

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![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)
[![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)

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

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

## Getting Started

The easiest way to install the SDK is via Swift Package Manager.
#### Swift Package Manager

1. Open Xcode > File > Add packages...
2. Add the following package URL:
Expand Down
24 changes: 24 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Constants
script_folder = File.expand_path(File.dirname(__FILE__))

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

PLISTS = [
File.join(script_folder, 'Parse', 'Parse', 'Resources', 'Parse-iOS.Info.plist'),
Expand Down Expand Up @@ -65,6 +66,12 @@ module Constants
PLISTS.each do |plist|
update_info_plist_version(plist, version)
end

podspec_file = File.open(PARSE_PODSPEC, 'r+')
podspec = podspec_file.read
podspec.gsub!(/(.*s.version\s*=\s*')(.*)(')/, "\\1#{version}\\3")
podspec_file.seek(0)
podspec_file.write(podspec)
end

def self.update_info_plist_version(plist_path, version)
Expand Down Expand Up @@ -873,4 +880,21 @@ namespace :test do
end
end
end

desc 'Run Podspec Lint'
task :cocoapods do |_|
podspecs = ['Parse.podspec']
results = []
system("pod repo update --silent")
podspecs.each do |podspec|
results << system("pod lib lint #{podspec} --allow-warnings")
results << system("pod lib lint #{podspec} --allow-warnings --use-libraries --use-modular-headers")
end
results.each do |result|
unless result
puts 'Podspec Tests Failed!'
exit(1)
end
end
end
end
2 changes: 1 addition & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function config() {
'npmPublish': false,
}],
['@semantic-release/git', {
assets: [changelogFile, 'package.json', 'package-lock.json', ['Parse*/**/*.{h,plist}', '!**/xcuserdata/**'] ],
assets: [changelogFile, 'package.json', 'package-lock.json', 'Parse.podspec', ['Parse*/**/*.{h,plist}', '!**/xcuserdata/**'] ],
}],
['@semantic-release/github', {
successComment: getReleaseComment(),
Expand Down

0 comments on commit 48ded81

Please sign in to comment.