Skip to content

Commit

Permalink
fix: Fix wrong codegen params name of function encode in ios new arch (
Browse files Browse the repository at this point in the history
  • Loading branch information
llr101 authored Sep 9, 2024
1 parent a097371 commit 82b60fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ios/BlurhashModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ @implementation BlurhashModule
[self.impl createBlurhashFromImage:imageUri
componentsX:componentsX
componentsY:componentsY
resolver:resolve
rejecter:reject];
resolve:resolve
reject:reject];
}

RCT_EXPORT_METHOD(clearCosineCache)
Expand Down
2 changes: 1 addition & 1 deletion ios/BlurhashModuleImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public final class BlurhashModuleImpl: NSObject {
}

@objc
public func createBlurhashFromImage(_ imageUri: String, componentsX: Int, componentsY: Int, resolver resolve: @escaping (String) -> Void, rejecter reject: @escaping (String, String, Error?) -> Void) {
public func createBlurhashFromImage(_ imageUri: String, componentsX: Int, componentsY: Int, resolve: @escaping (String) -> Void, reject: @escaping (String, String, Error?) -> Void) {
let formattedUri = imageUri.trimmingCharacters(in: .whitespacesAndNewlines)

DispatchQueue.global(qos: .utility).async {
Expand Down
4 changes: 2 additions & 2 deletions src/specs/NativeBlurhashModule.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { type TurboModule, TurboModuleRegistry } from 'react-native';
import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
import type { Double } from 'react-native/Libraries/Types/CodegenTypes';

export interface Spec extends TurboModule {
createBlurhashFromImage: (imageUri: string, componentsX: Int32, componentsY: Int32) => Promise<string>;
createBlurhashFromImage: (imageUri: string, componentsX: Double, componentsY: Double) => Promise<string>;
clearCosineCache: () => void;
}

Expand Down

1 comment on commit 82b60fc

@iM-GeeKy
Copy link
Contributor

@iM-GeeKy iM-GeeKy commented on 82b60fc Oct 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrousavy @llr101 Is this planned to be be released any time soon? I'm seeing a hard crash when testing the new arch and this function appears to the culprit.

Image

Please sign in to comment.