Add SPM support for the Objective-C runtime (v27.1 / pod 3.27.1) - #1
Open
damian-kolasinski wants to merge 1 commit into
Open
Add SPM support for the Objective-C runtime (v27.1 / pod 3.27.1)#1damian-kolasinski wants to merge 1 commit into
damian-kolasinski wants to merge 1 commit into
Conversation
Based on v27.1 (== CocoaPods Protobuf 3.27.1). Adds Package.swift mirroring Protobuf.podspec (sources objectivec/*.m minus the GPBProtocolBuffers.m umbrella, MRC via -fno-objc-arc unsafeFlags, PrivacyInfo.xcprivacy resource) plus spm/include shim headers so both framework-style and quoted imports resolve for consumers. No upstream source files modified. Claude-Session: https://claude.ai/code/session_01LTj6vGgu7NmTs7bjupWAGh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Swift Package Manager support for the Protocol Buffers Objective-C runtime, so the KingsChat iOS app can consume it via SPM/Tuist instead of the CocoaPods
Protobufpod.Version provenance
objc-v27.1== upstream tag v27.1, which is exactly CocoaPodsProtobuf3.27.1 (Protobuf.podspecat that tag:s.version = '3.27.1',:tag => "v27.1").Package.swift,spm/include/shim headers, andspm/README.md.What the manifest mirrors from the podspec
objectivec/*.mexcludingGPBProtocolBuffers.m(umbrella implementation file; compiling it would duplicate symbols).objectivec/*.h+objectivec/google/protobuf/*.pbobjc.h, exposed via shims so both generated-code import spellings compile without definingGPB_USE_PROTOBUF_FRAMEWORK_IMPORTS:#import <Protobuf/GPBProtocolBuffers.h>#import "GPBProtocolBuffers.h"PrivacyInfo.xcprivacybundled as a resource.requires_arc = false→-fno-objc-arcviacSettings.unsafeFlags.Consumption — pin by revision
Because of
unsafeFlags, SwiftPM rejects this package as a versioned dependency; consume it by revision:Product/target name:
Protobuf.Validation
xcodebuild -scheme Protobuf -destination "generic/platform=iOS Simulator" build— BUILD SUCCEEDED;-fno-objc-arcconfirmed in the compile response file.<Protobuf/Any.pbobjc.h>, callingGPBTimestamp/GPBAnyAPIs — compiles and links.https://claude.ai/code/session_01LTj6vGgu7NmTs7bjupWAGh