Skip to content

Commit

Permalink
[ObjC] Add the privacy manifest to the ObjC CocoaPod. (#15663)
Browse files Browse the repository at this point in the history
There are no restrict calls, so the manifest asserts that.

The CocoaPods support now ensure you are using CocoaPods >= 1.12 as that
avoids all the know bugs in CocoaPods support needed to capture the
Privacy Manifest in a resource bundle.

PiperOrigin-RevId: 602433417

Co-authored-by: Thomas Van Lenten <[email protected]>
  • Loading branch information
zhangskz and thomasvl authored Jan 31, 2024
1 parent 8b0f6fd commit 935fcb7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Protobuf.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = 'BSD-3-Clause'
s.authors = { 'The Protocol Buffers contributors' => '[email protected]' }
s.cocoapods_version = '>= 1.0'

# Ensure developers won't hit CocoaPods/CocoaPods#11402 with the resource
# bundle for the privacy manifest.
s.cocoapods_version = '>= 1.12.0'

s.source = { :git => 'https://github.com/protocolbuffers/protobuf.git',
:tag => "v#{s.version}" }
Expand All @@ -30,6 +33,10 @@ Pod::Spec.new do |s|
# left out, as it's an umbrella implementation file.
s.exclude_files = 'objectivec/GPBProtocolBuffers.m'

s.resource_bundle = {
"Protobuf_Privacy" => "PrivacyInfo.xcprivacy"
}

# Set a CPP symbol so the code knows to use framework imports.
s.user_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }
s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }
Expand Down

0 comments on commit 935fcb7

Please sign in to comment.