blob: ea5606ddfe1b1558f0d1358a36edab3892315822 [file] [log] [blame]
Jorge Canizales249483e2015-06-01 19:55:27 -07001# This file describes to Cocoapods how to integrate the Objective-C runtime into a dependent
2# project.
3# Despite this file being specific to Objective-C, it needs to be on the root of the repository.
4# Otherwise, Cocoapods gives trouble like not picking up the license file correctly, or not letting
5# dependent projects use the :git notation to refer to the library.
Jorge Canizales687a5fe2015-05-13 19:54:55 -07006Pod::Spec.new do |s|
7 s.name = 'Protobuf'
Protobuf Team Bot482156c2023-04-12 15:43:07 -07008 s.version = '3.22.3'
Jorge Canizales687a5fe2015-05-13 19:54:55 -07009 s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
Feng Xiaoafe98de2018-08-22 11:55:30 -070010 s.homepage = 'https://github.com/protocolbuffers/protobuf'
Maximilian82372d82022-01-27 01:23:14 +010011 s.license = 'BSD-3-Clause'
Jorge Canizales592c44f2015-05-14 14:16:40 -070012 s.authors = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' }
Thomas Van Lenten7da023b2016-05-09 13:53:20 -040013 s.cocoapods_version = '>= 1.0'
Jorge Canizales687a5fe2015-05-13 19:54:55 -070014
Feng Xiaoafe98de2018-08-22 11:55:30 -070015 s.source = { :git => 'https://github.com/protocolbuffers/protobuf.git',
Deanna Garcia942cec02022-05-20 21:43:48 +000016 :tag => "v#{s.version}" }
Jorge Canizalesf492dd82016-02-10 19:19:17 -080017
TeBoringfe982642015-08-26 23:55:33 -070018 s.source_files = 'objectivec/*.{h,m}',
Thomas Van Lenten56c48ae2020-01-22 15:50:52 -050019 'objectivec/google/protobuf/Any.pbobjc.h',
20 'objectivec/google/protobuf/Api.pbobjc.h',
21 'objectivec/google/protobuf/Duration.pbobjc.h',
22 'objectivec/google/protobuf/Empty.pbobjc.h',
23 'objectivec/google/protobuf/FieldMask.pbobjc.h',
24 'objectivec/google/protobuf/SourceContext.pbobjc.h',
25 'objectivec/google/protobuf/Struct.pbobjc.h',
26 'objectivec/google/protobuf/Timestamp.pbobjc.h',
27 'objectivec/google/protobuf/Type.pbobjc.h',
28 'objectivec/google/protobuf/Wrappers.pbobjc.h'
TeBoringfe982642015-08-26 23:55:33 -070029 # The following would cause duplicate symbol definitions. GPBProtocolBuffers is expected to be
30 # left out, as it's an umbrella implementation file.
31 s.exclude_files = 'objectivec/GPBProtocolBuffers.m'
Thomas Van Lenten7da023b2016-05-09 13:53:20 -040032
33 # Set a CPP symbol so the code knows to use framework imports.
34 s.user_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }
35 s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }
Jorge Canizales687a5fe2015-05-13 19:54:55 -070036
Thomas Van Lentena6f9ec82022-09-23 15:35:39 -040037 s.ios.deployment_target = '10.0'
38 s.osx.deployment_target = '10.12'
39 s.tvos.deployment_target = '12.0'
40 s.watchos.deployment_target = '6.0'
Jorge Canizales687a5fe2015-05-13 19:54:55 -070041 s.requires_arc = false
Thomas Van Lenten35fcbfd2022-04-26 12:43:54 -040042
43 # The unittest need the generate sources from the testing related .proto
44 # files. So to add a `test_spec`, there would also need to be something like a
45 # `script_phases` to generate them, but there would also need to be a way to
46 # ensure `protoc` had be built. Another option would be to move to a model
47 # where the needed files are always generated and checked in. Neither of these
48 # seem that great at the moment, so the tests have *not* been wired into here
49 # at this time.
Jorge Canizales687a5fe2015-05-13 19:54:55 -070050end