Skip to content

Commit

Permalink
fix: fix #164 Build Failure on CI Due to CocoaPods 1.1.9 in iOS Project
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyDaddy committed Nov 28, 2023
1 parent ea3671f commit d1758e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ios/RCTImageMarker/ImageMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class ImageMarker: NSObject, RCTBridgeModule {
let images = try await withThrowingTaskGroup(of: (Int, UIImage).self) { group in
for (index, img) in imageOptions.enumerated() {
group.addTask {
try await withUnsafeThrowingContinuation { continuation in
try await withUnsafeThrowingContinuation { continuation -> Void in
if Utils.isBase64(img.uri) {
if let image = UIImage.transBase64(img.uri) {
continuation.resume(returning: (index, image))
Expand Down
13 changes: 7 additions & 6 deletions ios/RCTImageMarker/RCTConvert+ImageMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,34 @@ import Foundation
import UIKit
import CoreFoundation
import React
import CoreGraphics

extension RCTConvert {
static func CGSize(_ json: Any, offset: Int) -> CGSize {
let arr = self.nsArray(json)
if arr!.count < offset + 2 {
NSLog("Too few elements in array (expected at least %zd): %@", 2 + offset, arr!)
return CoreFoundation.CGSize.zero
return CoreGraphics.CGSize.zero
}
return CoreFoundation.CGSize(width: self.cgFloat(arr![offset]), height: self.cgFloat(arr![offset + 1]))
return CoreGraphics.CGSize(width: self.cgFloat(arr![offset]), height: self.cgFloat(arr![offset + 1]))
}

static func CGPoint(_ json: Any, offset: Int) -> CGPoint {
let arr = self.nsArray(json)
if arr!.count < offset + 2 {
NSLog("Too few elements in array (expected at least %zd): %@", 2 + offset, arr!)
return CoreFoundation.CGPoint.zero
return CoreGraphics.CGPoint.zero
}
return CoreFoundation.CGPoint(x: self.cgFloat(arr?[offset]), y: self.cgFloat(arr![offset + 1]))
return CoreGraphics.CGPoint(x: self.cgFloat(arr?[offset]), y: self.cgFloat(arr![offset + 1]))
}

static func CGRect(_ json: Any, offset: Int) -> CGRect {
let arr = self.nsArray(json)
if arr!.count < offset + 4 {
NSLog("Too few elements in array (expected at least %zd): %@", 4 + offset, arr!)
return CoreFoundation.CGRect.zero
return CoreGraphics.CGRect.zero
}
return CoreFoundation.CGRect(x: self.cgFloat(arr![offset]), y: self.cgFloat(arr![offset + 1]), width: self.cgFloat(arr![offset + 2]), height: self.cgFloat(arr![offset + 3]))
return CoreGraphics.CGRect(x: self.cgFloat(arr![offset]), y: self.cgFloat(arr![offset + 1]), width: self.cgFloat(arr![offset + 2]), height: self.cgFloat(arr![offset + 3]))
}

static func CGColor(_ json: Any, offset: Int) -> CGColor? {
Expand Down

0 comments on commit d1758e5

Please sign in to comment.