Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update swift, add podspec publish doc to RELEASE.md #170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Iroh.xcframework/ios-arm64/Iroh.framework/Headers/iroh_ffiFFI.h
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ void uniffi_iroh_ffi_fn_free_doc(void*_Nonnull ptr, RustCallStatus *_Nonnull out
uint64_t uniffi_iroh_ffi_fn_method_doc_close_me(void*_Nonnull ptr
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE_ENTRY
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE_ENTRY
uint64_t uniffi_iroh_ffi_fn_method_doc_delete_entry(void*_Nonnull ptr, void*_Nonnull author_id, RustBuffer prefix
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE
uint64_t uniffi_iroh_ffi_fn_method_doc_delete(void*_Nonnull ptr, void*_Nonnull author_id, RustBuffer prefix
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_EXPORT_FILE
Expand Down Expand Up @@ -2388,9 +2388,9 @@ uint16_t uniffi_iroh_ffi_checksum_method_doc_close_me(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE_ENTRY
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE_ENTRY
uint16_t uniffi_iroh_ffi_checksum_method_doc_delete_entry(void
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE
uint16_t uniffi_iroh_ffi_checksum_method_doc_delete(void

);
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ void uniffi_iroh_ffi_fn_free_doc(void*_Nonnull ptr, RustCallStatus *_Nonnull out
uint64_t uniffi_iroh_ffi_fn_method_doc_close_me(void*_Nonnull ptr
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE_ENTRY
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE_ENTRY
uint64_t uniffi_iroh_ffi_fn_method_doc_delete_entry(void*_Nonnull ptr, void*_Nonnull author_id, RustBuffer prefix
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE
uint64_t uniffi_iroh_ffi_fn_method_doc_delete(void*_Nonnull ptr, void*_Nonnull author_id, RustBuffer prefix
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_EXPORT_FILE
Expand Down Expand Up @@ -2388,9 +2388,9 @@ uint16_t uniffi_iroh_ffi_checksum_method_doc_close_me(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE_ENTRY
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE_ENTRY
uint16_t uniffi_iroh_ffi_checksum_method_doc_delete_entry(void
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE
uint16_t uniffi_iroh_ffi_checksum_method_doc_delete(void

);
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ void uniffi_iroh_ffi_fn_free_doc(void*_Nonnull ptr, RustCallStatus *_Nonnull out
uint64_t uniffi_iroh_ffi_fn_method_doc_close_me(void*_Nonnull ptr
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE_ENTRY
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE_ENTRY
uint64_t uniffi_iroh_ffi_fn_method_doc_delete_entry(void*_Nonnull ptr, void*_Nonnull author_id, RustBuffer prefix
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_DELETE
uint64_t uniffi_iroh_ffi_fn_method_doc_delete(void*_Nonnull ptr, void*_Nonnull author_id, RustBuffer prefix
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_FN_METHOD_DOC_EXPORT_FILE
Expand Down Expand Up @@ -2388,9 +2388,9 @@ uint16_t uniffi_iroh_ffi_checksum_method_doc_close_me(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE_ENTRY
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE_ENTRY
uint16_t uniffi_iroh_ffi_checksum_method_doc_delete_entry(void
#ifndef UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE
#define UNIFFI_FFIDEF_UNIFFI_IROH_FFI_CHECKSUM_METHOD_DOC_DELETE
uint16_t uniffi_iroh_ffi_checksum_method_doc_delete(void

);
#endif
Expand Down
5 changes: 4 additions & 1 deletion IrohLib.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ Pod::Spec.new do |spec|
spec.swift_version = '5.9'
spec.framework = "SystemConfiguration"
spec.ios.deployment_target = '15.0'
spec.dependency 'IrohLibFramework', "#{spec.version}"
# WARNINNG: we're publishing v0.21.0-1, not v0.21.0 because of an error in the binary artifact of the original release
# on the next release, rever to the template-driven URL:
# spec.dependency 'IrohLibFramework', "#{spec.version}"
spec.dependency 'IrohLibFramework', "0.21.0-1"
end

This file was deleted.

8 changes: 4 additions & 4 deletions IrohLib/Sources/IrohLib/IrohLib.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,7 @@ public protocol DocProtocol: AnyObject {
*
* Returns the number of entries deleted.
*/
func deleteEntry(authorId: AuthorId, prefix: Data) async throws -> UInt64
func delete(authorId: AuthorId, prefix: Data) async throws -> UInt64

/**
* Export an entry as a file to a given absolute path
Expand Down Expand Up @@ -2904,11 +2904,11 @@ open class Doc:
*
* Returns the number of entries deleted.
*/
open func deleteEntry(authorId: AuthorId, prefix: Data) async throws -> UInt64 {
open func delete(authorId: AuthorId, prefix: Data) async throws -> UInt64 {
return
try await uniffiRustCallAsync(
rustFutureFunc: {
uniffi_iroh_ffi_fn_method_doc_delete_entry(
uniffi_iroh_ffi_fn_method_doc_delete(
self.uniffiClonePointer(),
FfiConverterTypeAuthorId.lower(authorId), FfiConverterData.lower(prefix)
)
Expand Down Expand Up @@ -12812,7 +12812,7 @@ private var initializationResult: InitializationResult = {
if uniffi_iroh_ffi_checksum_method_doc_close_me() != 13449 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_iroh_ffi_checksum_method_doc_delete_entry() != 42178 {
if uniffi_iroh_ffi_checksum_method_doc_delete() != 54552 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_iroh_ffi_checksum_method_doc_export_file() != 16067 {
Expand Down
7 changes: 5 additions & 2 deletions IrohLibFramework.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "IrohLibFramework"
spec.version = "0.21.0"
spec.version = "0.21.0-1"
spec.summary = "Complied rust cocoa framework for Iroh"
spec.description = <<-DESC
Complied rust cocoa framework for Iroh.
Expand All @@ -13,6 +13,9 @@ Pod::Spec.new do |spec|
spec.author = { "b5" => "[email protected]" }
spec.ios.deployment_target = '15.0'
spec.static_framework = true
spec.source = { :http => "https://github.com/n0-computer/iroh-ffi/releases/download/v#{spec.version}/IrohLib.xcframework.zip" }
# WARNING: we're publishing v0.21.0-1, not v0.21.0 because of an error in the binary artifact of the original release
# in v0.21.1 or higher, switch back to the template-driven URL:
# spec.source = { :http => "https://github.com/n0-computer/iroh-ffi/releases/download/v#{spec.version}/IrohLib.xcframework.zip" }
spec.source = { :http => "https://github.com/n0-computer/iroh-ffi/releases/download/v0.21.0/IrohLib.xcframework.zip" }
spec.vendored_frameworks = 'Iroh.xcframework'
end
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let package = Package(
path: "IrohLib/Sources/IrohLib"),
.binaryTarget(
name: "Iroh",
url: "https://github.com/n0-computer/iroh-ffi/releases/download/v0.20.0/IrohLib.xcframework.zip",
checksum: "8123c2d43690c423e9bc8993c935b2fe009731f3b65b95754358570077037858")
url: "https://github.com/n0-computer/iroh-ffi/releases/download/v0.21.0/IrohLib.xcframework.zip",
checksum: "f8bfb2c9cdc9d602494e25e204ada6d44a7d6032de695a97893dca3c7fa3fac6")
]
)
7 changes: 7 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ let package = Package(

6. Commit the result & push

### Cocoapods
1. lint the `IrohLibFramework`: `pod spec lint IrohLibFramework.podspec`, make sure it passes
2. `pod trunk push IrohlibFramework.podspec`
3. `pod spec lint IrohFramework.podspec`, make sure it passes
4. wait 6 minutes for cache to catch up & show new `IrohLibFramework.podspec` as available
5. `pod trunk push IrohFramework.podspec --allow-warnings`

## Python

The first time:
Expand Down
Loading