File tree Expand file tree Collapse file tree 12 files changed +47
-22
lines changed Expand file tree Collapse file tree 12 files changed +47
-22
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ let package = Package(
66 platforms: [ . iOS( . v13) ] ,
77 products: [
88 . library( name: " WalletCore " , targets: [ " WalletCore " ] ) ,
9- . library( name: " SwiftProtobuf " , targets: [ " SwiftProtobuf " ] )
9+ . library( name: " WalletCoreSwiftProtobuf " , targets: [ " WalletCoreSwiftProtobuf " ] )
1010 ] ,
1111 dependencies: [ ] ,
1212 targets: [
@@ -16,7 +16,7 @@ let package = Package(
1616 checksum: " 651894a9418fdd33ae5374367a6a64a57fa92b6e6ffb2d6723c319da97472cb4 "
1717 ) ,
1818 . binaryTarget(
19- name: " SwiftProtobuf " ,
19+ name: " WalletCoreSwiftProtobuf " ,
2020 url: " https://github.com/trustwallet/wallet-core/releases/download/4.2.9/SwiftProtobuf.xcframework.zip " ,
2121 checksum: " 946efd4b0132b92208335902e0b65e0aba2d11b9dd6f6d79cc8318e2530c9ae0 "
2222 )
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ Then add libraries to target's `dependencies`:
7373
7474``` swift
7575.product (name : " WalletCore" , package : " WalletCore" ),
76- .product (name : " SwiftProtobuf " , package : " WalletCore" ),
76+ .product (name : " WalletCoreSwiftProtobuf " , package : " WalletCore" ),
7777```
7878
7979### CocoaPods
Original file line number Diff line number Diff line change 1+ # Original podspec:
2+ # https://github.com/apple/swift-protobuf/blob/main/SwiftProtobuf.podspec
3+ Pod ::Spec . new do |s |
4+ s . name = 'WalletCoreSwiftProtobuf'
5+ s . version = '1.29.0'
6+ s . license = { :type => 'Apache 2.0' , :file => 'LICENSE.txt' }
7+ s . summary = 'Swift Protobuf Runtime Library'
8+ s . homepage = 'https://github.com/apple/swift-protobuf'
9+ s . author = 'Apple Inc.'
10+ s . source = { :git => 'https://github.com/apple/swift-protobuf.git' , :tag => s . version }
11+
12+ s . requires_arc = true
13+ s . ios . deployment_target = '11.0'
14+ s . osx . deployment_target = '10.13'
15+
16+ s . cocoapods_version = '>= 1.13.0'
17+
18+ s . source_files = 'Sources/SwiftProtobuf/**/*.swift'
19+ s . resource_bundle = { 'WalletCoreSwiftProtobuf' => [ 'Sources/SwiftProtobuf/PrivacyInfo.xcprivacy' ] }
20+
21+ s . swift_versions = [ '5.0' ]
22+ end
Original file line number Diff line number Diff line change 44
55import UIKit
66import TrustWalletCore
7- import SwiftProtobuf
7+ import WalletCoreSwiftProtobuf
88
99enum PlaygroundError : Error {
1010 case invalidHexString
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ project 'TrustWalletCore.xcodeproj'
99target 'WalletCore' do
1010 use_frameworks!
1111
12- pod 'SwiftProtobuf '
12+ pod 'WalletCoreSwiftProtobuf '
1313
1414 target 'WalletCoreTests'
1515end
Original file line number Diff line number Diff line change 11PODS:
2- - SwiftProtobuf (1.13 .0)
2+ - WalletCoreSwiftProtobuf (1.29 .0)
33
44DEPENDENCIES:
5- - SwiftProtobuf
5+ - WalletCoreSwiftProtobuf
66
77SPEC REPOS:
88 trunk:
9- - SwiftProtobuf
9+ - WalletCoreSwiftProtobuf
1010
1111SPEC CHECKSUMS:
12- SwiftProtobuf: fd4693388a96c8c2df35d3b063272b0e7c499d00
12+ WalletCoreSwiftProtobuf: a4798576a2d309511fc45f81843d348732ec571d
1313
14- PODFILE CHECKSUM: aac2324ba35cdd5631cb37618cd483887bab9cfd
14+ PODFILE CHECKSUM: 1112f54f83017d2c0c1d9d4bf5c21f65c5187d0e
1515
1616COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change 55// file LICENSE at the root of the source code distribution tree.
66
77import Foundation
8- import SwiftProtobuf
8+ import WalletCoreSwiftProtobuf
99
1010public typealias SigningInput = Message
1111public typealias SigningOutput = Message
@@ -22,7 +22,7 @@ public final class AnySigner {
2222 public static func sign< SigningOutput: Message > ( input: SigningInput , coin: CoinType ) -> SigningOutput {
2323 do {
2424 let outputData = nativeSign ( data: try input. serializedData ( ) , coin: coin)
25- return try SigningOutput ( serializedData : outputData)
25+ return try SigningOutput ( serializedBytes : outputData)
2626 } catch let error {
2727 fatalError ( error. localizedDescription)
2828 }
@@ -72,7 +72,7 @@ public final class AnySigner {
7272 public static func plan< TransactionPlan: Message > ( input: SigningInput , coin: CoinType ) -> TransactionPlan {
7373 do {
7474 let outputData = nativePlan ( data: try input. serializedData ( ) , coin: coin)
75- return try TransactionPlan ( serializedData : outputData)
75+ return try TransactionPlan ( serializedBytes : outputData)
7676 } catch let error {
7777 fatalError ( error. localizedDescription)
7878 }
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ platform :ios do
2323 lane :swift_protobuf_xcframework do
2424 create_xcframework (
2525 workspace : 'TrustWalletCore.xcworkspace' ,
26- scheme : 'SwiftProtobuf ' ,
26+ scheme : 'WalletCoreSwiftProtobuf ' ,
2727 destinations : [ 'iOS' ] ,
2828 xcframework_output_directory : 'build' ,
2929 enable_bitcode : false
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ tools/doxygen_convert_comments
6969
7070if [ -x " $( command -v protoc-gen-swift) " ] && isTargetSpecified " ios" ; then
7171 " $PROTOC " -I=$PREFIX /include -I=src/proto --cpp_out=src/proto --java_out=lite:jni/proto --swift_out=swift/Sources/Generated/Protobuf --swift_opt=Visibility=Public src/proto/* .proto
72+ # Replace SwiftProtobuf with WalletCoreSwiftProtobuf
73+ find swift/Sources/Generated/Protobuf -name " *.swift" -exec sed -i ' ' ' s/import SwiftProtobuf/import WalletCoreSwiftProtobuf/g' {} \;
74+ find swift/Sources/Generated/Protobuf -name " *.swift" -exec sed -i ' ' ' s/SwiftProtobuf./WalletCoreSwiftProtobuf./g' {} \;
7275else
7376 " $PROTOC " -I=$PREFIX /include -I=src/proto --cpp_out=src/proto --java_out=lite:jni/proto src/proto/* .proto
7477fi
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ Pod::Spec.new do |s|
6464 'Sources/Types/*.swift',
6565 'Sources/Generated/Enums/*.swift',
6666 'Sources/Generated/Protobuf/*.swift'
67- ss.dependency 'SwiftProtobuf '
67+ ss.dependency 'WalletCoreSwiftProtobuf '
6868 end
6969 s.subspec 'Core' do |ss|
7070 ss.vendored_frameworks = '*.xcframework'
You can’t perform that action at this time.
0 commit comments