Files
facebook-ios-sdk/FBSDKShareKit.podspec
joesusnick d6c84c3364 Adding more specific preprocessor definition for Cocoapod usage (#1106)
Summary:
Thanks for proposing a pull request!

To help us review the request, please complete the following:

- [x] sign [contributor license agreement](https://developers.facebook.com/opensource/cla)
- [x] I've ensured that all existing tests pass and added tests (when/where necessary)
- [x] I've updated the documentation (when/where necessary) and [Changelog](CHANGELOG.md) (when/where necessary)
- [x] I've added the proper label to this pull request (e.g. `bug` for bug fixes)

## Pull Request Details

Earlier naive implementation did not account for a setup where SPM was used for the Facebook iOS SDK and Cocoapods was used for other pods in the same project.

Fixed this by adding a more specific preprocessor macro `FBSDKCOCOAPODS` to the podspecs so that we can gate logic specifically on whether the Facebook iOS SDK is installed via CocoaPods.
Pull Request resolved: https://github.com/facebook/facebook-ios-sdk/pull/1106

Test Plan:
1. Create a sample project that includes CocoaPods and install an arbitrary pod that is not one of the iOS SDK Kits.
2. Install the iOS SDK using SPM pointed at this branch.
3. Confirm that it builds
4. Remove the Swift Package and add the iOS SDK Kits as CocoaPods pointed to a local checkout of this branch. ex:
```
  pod 'FBSDKCoreKit', :path => '/Users/<you>/facebook-ios-sdk'
  pod 'FBSDKLoginKit', :path => '/Users/<you>/facebook-ios-sdk'
  pod 'FBSDKShareKit', :path => '/Users/<you>/facebook-ios-sdk'
```
5. Confirm that it builds.

Reviewed By: jingping2015

Differential Revision: D18420523

Pulled By: joesus

fbshipit-source-id: 376f1d134fcd0341ed6f9143d83793900f990675
2019-11-11 13:27:40 -08:00

109 lines
6.6 KiB
Ruby

# Use the --use-libraries switch when pushing or linting this podspec
Pod::Spec.new do |s|
s.name = 'FBSDKShareKit'
s.version = '5.10.0'
s.summary = 'Official Facebook SDK for iOS to access Facebook Platform Sharing Features'
s.description = <<-DESC
The Facebook SDK for iOS ShareKit framework provides:
* Share content with Share Dialog and Message Dialog.
* Send Game Requests or App Invites to grow your app.
* Publish content and open graph stories with the Graph API
DESC
s.homepage = 'https://developers.facebook.com/docs/ios/'
s.license = { :type => 'Facebook Platform License', :file => 'LICENSE' }
s.author = 'Facebook'
s.platform = :ios, :tvos
s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '10.0'
s.source = { :git => 'https://github.com/facebook/facebook-ios-sdk.git',
:tag => "v#{s.version}"
}
s.ios.weak_frameworks = 'Accounts', 'AudioToolbox', 'CoreGraphics', 'CoreLocation', 'Foundation', 'QuartzCore', 'Security', 'Social', 'UIKit'
s.tvos.weak_frameworks = 'AudioToolbox', 'CoreGraphics', 'CoreLocation', 'Foundation', 'QuartzCore', 'Security', 'UIKit'
s.requires_arc = true
s.default_subspecs = 'Share'
s.swift_version = '5.0'
s.header_dir = 'FBSDKShareKit'
s.prefix_header_contents = '#define FBSDKCOCOAPODS'
s.subspec 'Share' do |ss|
ss.dependency 'FBSDKCoreKit', "~> 5.0"
ss.exclude_files = 'FBSDKShareKit/FBSDKShareKit/include/**/*'
ss.public_header_files = 'FBSDKShareKit/FBSDKShareKit/*.{h}'
ss.ios.source_files = 'FBSDKShareKit/FBSDKShareKit/**/*.{h,m}'
ss.ios.exclude_files = 'FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareButton.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareViewController.{h,m}'
ss.tvos.exclude_files = 'FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupAddDialog.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupJoinDialog.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteDialog.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKCameraEffectArguments.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKCameraEffectTextures.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestDialog.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKLikeButton.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKLikeControl.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKLikeObjectType.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKLiking.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKMessageDialog.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKSendButton.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareButton.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareCameraEffectContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareDialog.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareDialogMode.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKSharingButton.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKSharingScheme.{h,m}'
ss.tvos.source_files = 'FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareButton.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareViewController.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKHashtag.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareKit.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareConstants.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareConstants.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareLinkContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMediaContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphAction.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphObject.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphValueContainer.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKSharePhoto.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKSharePhotoContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareVideo.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareVideoContent.{h,m}',
'FBSDKShareKit/FBSDKShareKit/FBSDKSharing.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKSharingContent.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKSharingValidation.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMessengerActionButton.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMessengerGenericTemplateContent.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMessengerGenericTemplateElement.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMessengerMediaTemplateContent.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMessengerOpenGraphMusicTemplateContent.h',
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMessengerURLActionButton.h',
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareDefines.h',
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareError.{h,m}',
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareOpenGraphValueContainer+Internal.h',
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareUtility.{h,m}',
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKVideoUploader.{h,m}'
end
s.subspec 'Swift' do |ss|
ss.dependency 'FBSDKCoreKit/Swift', "~> #{s.version}"
ss.dependency 'FBSDKShareKit/Share'
ss.platform = :ios
ss.ios.source_files = 'FBSDKShareKit/FBSDKShareKit/Swift/*.{swift}'
ss.ios.exclude_files = 'FBSDKShareKit/FBSDKShareKit/Swift/Exports.swift'
end
end