[#612] Remove Support for Cocoapods (#706)

Our main dependency, Swift-GRPC is dropping support for Cocoapods from version 1.8.2.

Even though they make a great work at maintaining backwards compatibility, we will eventually be forced to drop Cocoapods support.

We've reached out partners like NighthawkApps, Horizontal Systems (Unstoppable) and Edge, who have reported not depending on Cocoapods.

We intend to end Cocoapods support on 0.18.0.

Closes #612
This commit is contained in:
Francisco Gindre 2023-01-06 12:26:00 -03:00 committed by GitHub
parent f6be12fd8c
commit 851023842f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 69 deletions

View File

@ -719,7 +719,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "co.electriccoin.ZcashLightClientSample-Testnet";
PRODUCT_MODULE_NAME = ZcashLightClientSample;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -742,7 +742,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "co.electriccoin.ZcashLightClientSample-Testnet";
PRODUCT_MODULE_NAME = ZcashLightClientSample;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -805,7 +805,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "co.electriccoin.ZcashLightClientSample-Testnet";
PRODUCT_MODULE_NAME = ZcashLightClientSample;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -828,7 +828,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "co.electriccoin.ZcashLightClientSample-Testnet";
PRODUCT_MODULE_NAME = ZcashLightClientSample;
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@ -26,10 +26,6 @@ Add a package with the source "https://github.com/zcash/ZcashLightClientKit.git"
If you want to include a beta version of `ZCashLightClientKit` in an Xcode project e.g `0.14.0-beta` you will need to specify it with the commit sha instead as it does not appear that Xcode supports 'meta data' from semantic version strings for swift packages (at the time of writing).
## Cocoapods Support
Add `pod "ZcashLightClientKit", ~> "0.14.0-beta"` to the target you want to add the kit too.
# Testing
The best way to run tests is to open "Package.swift" in Xcode and use the Test panel and target an iOS device. Tests will build and run for a Mac target but are not currently working as expected.

View File

@ -1,30 +0,0 @@
// N.B This file is copied from the one that SPM generates to give a
// `Bundle.module` variable. Using the macro we include this only for non-SPM
// distribution methods, which we equate to "CocoaPods".
// We use CocoaPods' "Resource Bundles" to copy the resources that we need and
// we have called our main one "Resources" (see the podspec file), hence the hardcoded name.
#if !SWIFT_PACKAGE
import class Foundation.Bundle
private class BundleFinder {}
extension Foundation.Bundle {
/// Returns the resource bundle associated with the current Swift module.
static var module: Bundle = {
let bundleName = "Resources"
let candidates = [
// Bundle should be present here when the package is linked into a framework.
Bundle(for: BundleFinder.self).resourceURL
]
for candidate in candidates {
let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle")
if let bundle = bundlePath.flatMap(Bundle.init(url:)) {
return bundle
}
}
fatalError("unable to find bundle named Resources")
}()
}
#endif

View File

@ -1,27 +0,0 @@
Pod::Spec.new do |s|
s.name = 'ZcashLightClientKit'
s.version = '0.17.5-beta'
s.summary = 'Zcash Light Client wallet SDK for iOS'
s.description = <<-DESC
Zcash Light Client wallet SDK for iOS
DESC
s.homepage = 'https://github.com/zcash/ZcashLightClientKit'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = {
'Francisco Gindre' => 'francisco.gindre@gmail.com',
'Jack Grigg' => 'str4d@electriccoin.co'
}
s.source = { :git => 'https://github.com/zcash/ZcashLightClientKit.git', :tag => s.version.to_s }
s.source_files = 'Sources/ZcashLightClientKit/**/*.{swift,h}'
s.resource_bundles = { 'Resources' => 'Sources/ZcashLightClientKit/Resources/*' }
s.swift_version = '5.6'
s.ios.deployment_target = '13.0'
s.dependency 'gRPC-Swift', '~> 1.8.0'
s.dependency 'SQLite.swift', '~> 0.13.0'
s.dependency 'libzcashlc', '0.1.1'
s.static_framework = true
end

View File

@ -3,7 +3,6 @@
The project is integrated the following CI platforms:
- Bitrise
- Builds
- Deployment to Cocoapods Trunk
- Travis CI
- Builds
@ -19,11 +18,8 @@ The project is integrated the following CI platforms:
Prerequisites:
- Write permissions on the repo
- Push permission on CocoaPods Trunk
Steps:
- build the project
- run tests
- Create a new tag MAJOR.MIDDLE.MINOR{-betaX}
- update the ZcashLightClientKit.podspec file with the corresponding version.
- run `pod lib lint --skip-tests --allow-warnings && pod trunk push --skip-tests --allow-warnings` to create pod version