JimmyDaddy / react-native-image-marker

🙈Adding text or icon watermark to your image using React Native👀👀
https://jimmydaddy.github.io/react-native-image-marker/
MIT License
324 stars 93 forks source link

Build Failure on CI Due to CocoaPods 1.1.9 in iOS Project #164

Closed devGbarbosa closed 11 months ago

devGbarbosa commented 11 months ago

Issue Summary

Hello everyone, I'm currently using AppCenter to build my app for app stores, and I've encountered an issue during the iOS build process. It appears that the CocoaPods version 1.1.9 is causing the build to fail when executed on the continuous integration (CI) pipeline.

Description

The build failure seems to be related to the CocoaPods version 1.1.9. Unfortunately, the error messages and stack traces are not clear enough for me to identify the exact issue.

Logs

2023-11-25T00:29:55.5485650Z <module-includes>:1:9: note: in file included from <module-includes>:1:
2023-11-25T00:29:55.5486000Z #import "React-Core-umbrella.h"
2023-11-25T00:29:55.5486170Z         ^
2023-11-25T00:29:55.5486650Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:27:9: note: in file included from /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:27:
2023-11-25T00:29:55.5486960Z #import "React/RCTDevSplitBundleLoader.h"
2023-11-25T00:29:55.5487120Z         ^
2023-11-25T00:29:55.5487620Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTDevSplitBundleLoader.h:9:9: note: in file included from /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTDevSplitBundleLoader.h:9:
2023-11-25T00:29:55.5487950Z #import <React/RCTJSScriptLoaderModule.h>
2023-11-25T00:29:55.5488110Z         ^
2023-11-25T00:29:55.5488630Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTJSScriptLoaderModule.h:16:67: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
2023-11-25T00:29:55.5489300Z @property (nonatomic, copy, nonnull) void (^loadScript)(RCTSource *source);
2023-11-25T00:29:55.5489500Z                                                                   ^
2023-11-25T00:29:55.5490220Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTJSScriptLoaderModule.h:16:67: note: insert '_Nullable' if the pointer may be null
2023-11-25T00:29:55.5490520Z @property (nonatomic, copy, nonnull) void (^loadScript)(RCTSource *source);
2023-11-25T00:29:55.5491130Z                                                                   ^
2023-11-25T00:29:55.5491650Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTJSScriptLoaderModule.h:16:67: note: insert '_Nonnull' if the pointer should never be null
2023-11-25T00:29:55.5491980Z @property (nonatomic, copy, nonnull) void (^loadScript)(RCTSource *source);
2023-11-25T00:29:55.5492180Z                                                                   ^
2023-11-25T00:29:55.5492510Z <module-includes>:1:9: note: in file included from <module-includes>:1:
2023-11-25T00:29:55.5492810Z #import "React-Core-umbrella.h"
2023-11-25T00:29:55.5492980Z         ^
2023-11-25T00:29:55.5493450Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:9: note: in file included from /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:
2023-11-25T00:29:55.5493750Z #import "React/RCTTiming.h"
2023-11-25T00:29:55.5493900Z         ^
2023-11-25T00:29:55.5494350Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:17:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
2023-11-25T00:29:55.5494740Z - (void)callTimers:(NSArray<NSNumber *> *)timers;
2023-11-25T00:29:55.5494940Z                                         ^
2023-11-25T00:29:55.5495320Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:17:41: note: insert '_Nullable' if the pointer may be null
2023-11-25T00:29:55.5495690Z - (void)callTimers:(NSArray<NSNumber *> *)timers;
2023-11-25T00:29:55.5495880Z                                         ^
2023-11-25T00:29:55.5496280Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:17:41: note: insert '_Nonnull' if the pointer should never be null
2023-11-25T00:29:55.5496650Z - (void)callTimers:(NSArray<NSNumber *> *)timers;
2023-11-25T00:29:55.5496820Z                                         ^
2023-11-25T00:29:55.5497120Z <module-includes>:1:9: note: in file included from <module-includes>:1:
2023-11-25T00:29:55.5497420Z #import "React-Core-umbrella.h"
2023-11-25T00:29:55.5497580Z         ^
2023-11-25T00:29:55.5498050Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:9: note: in file included from /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:
2023-11-25T00:29:55.5498340Z #import "React/RCTTiming.h"
2023-11-25T00:29:55.5498490Z         ^
2023-11-25T00:29:55.5498930Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:25:4: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
2023-11-25T00:29:55.5499360Z - (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate;
2023-11-25T00:29:55.5499560Z    ^
2023-11-25T00:29:55.5499930Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:25:4: note: insert '_Nullable' if the pointer may be null
2023-11-25T00:29:55.5500310Z - (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate;
2023-11-25T00:29:55.5500510Z    ^
2023-11-25T00:29:55.5500890Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:25:4: note: insert '_Nonnull' if the pointer should never be null
2023-11-25T00:29:55.5501280Z - (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate;
2023-11-25T00:29:55.5501460Z    ^
2023-11-25T00:29:55.5501760Z <module-includes>:1:9: note: in file included from <module-includes>:1:
2023-11-25T00:29:55.5502410Z #import "React-Core-umbrella.h"
2023-11-25T00:29:55.5502590Z         ^
2023-11-25T00:29:55.5503050Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:9: note: in file included from /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:
2023-11-25T00:29:55.5503630Z #import "React/RCTTiming.h"
2023-11-25T00:29:55.5503780Z         ^
2023-11-25T00:29:55.5504240Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:25:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
2023-11-25T00:29:55.5504660Z - (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate;
2023-11-25T00:29:55.5504860Z                                   ^
2023-11-25T00:29:55.5505240Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:25:55: note: insert '_Nullable' if the pointer may be null
2023-11-25T00:29:55.5505620Z - (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate;
2023-11-25T00:29:55.5505830Z                                                       ^
2023-11-25T00:29:55.5506230Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:25:55: note: insert '_Nonnull' if the pointer should never be null
2023-11-25T00:29:55.5506740Z - (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate;
2023-11-25T00:29:55.5506950Z                                                       ^
2023-11-25T00:29:55.5507250Z <module-includes>:1:9: note: in file included from <module-includes>:1:
2023-11-25T00:29:55.5507560Z #import "React-Core-umbrella.h"
2023-11-25T00:29:55.5507730Z         ^
2023-11-25T00:29:55.5508200Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:9: note: in file included from /Users/runner/work/1/s/ios/Pods/Headers/Public/React/React-Core-umbrella.h:39:
2023-11-25T00:29:55.5508500Z #import "React/RCTTiming.h"
2023-11-25T00:29:55.5508660Z         ^
2023-11-25T00:29:55.5509110Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:28:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
2023-11-25T00:29:55.5509430Z                jsSchedulingTime:(NSDate *)jsSchedulingTime
2023-11-25T00:29:55.5509610Z                                         ^
2023-11-25T00:29:55.5510010Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:28:41: note: insert '_Nullable' if the pointer may be null
2023-11-25T00:29:55.5510290Z                jsSchedulingTime:(NSDate *)jsSchedulingTime
2023-11-25T00:29:55.5510480Z                                         ^
2023-11-25T00:29:55.5510990Z /Users/runner/work/1/s/ios/Pods/Headers/Public/React-Core/React/RCTTiming.h:28:41: note: insert '_Nonnull' if the pointer should never be null
2023-11-25T00:29:55.5511270Z                jsSchedulingTime:(NSDate *)jsSchedulingTime
2023-11-25T00:29:55.5511450Z                                         ^
2023-11-25T00:29:55.5511940Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/ImageMarker.swift:25:79: error: cannot infer return type for closure with multiple statements; add explicit type to disambiguate
2023-11-25T00:29:55.5512300Z         let images = try await withThrowingTaskGroup(of: (Int, UIImage).self) { group in
2023-11-25T00:29:55.5512490Z                                                                               ^
2023-11-25T00:29:55.5512780Z                                                                                       -> <#Result#> 
2023-11-25T00:29:55.5513240Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/RCTConvert+ImageMarker.swift:18:20: error: module 'CoreFoundation' has no member named 'CGSize'
2023-11-25T00:29:55.5513530Z             return CoreFoundation.CGSize.zero
2023-11-25T00:29:55.5513710Z                    ^~~~~~~~~~~~~~ ~~~~~~
2023-11-25T00:29:55.5514160Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/RCTConvert+ImageMarker.swift:20:16: error: module 'CoreFoundation' has no member named 'CGSize'
2023-11-25T00:29:55.5515150Z         return CoreFoundation.CGSize(width: self.cgFloat(arr![offset]), height: self.cgFloat(arr![offset + 1]))
2023-11-25T00:29:55.5515640Z                ^~~~~~~~~~~~~~ ~~~~~~
2023-11-25T00:29:55.5516130Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/RCTConvert+ImageMarker.swift:27:20: error: module 'CoreFoundation' has no member named 'CGPoint'
2023-11-25T00:29:55.5516420Z             return CoreFoundation.CGPoint.zero
2023-11-25T00:29:55.5516680Z                    ^~~~~~~~~~~~~~ ~~~~~~~
2023-11-25T00:29:55.5517150Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/RCTConvert+ImageMarker.swift:29:16: error: module 'CoreFoundation' has no member named 'CGPoint'
2023-11-25T00:29:55.5517480Z         return CoreFoundation.CGPoint(x: self.cgFloat(arr?[offset]), y: self.cgFloat(arr![offset + 1]))
2023-11-25T00:29:55.5517690Z                ^~~~~~~~~~~~~~ ~~~~~~~
2023-11-25T00:29:55.5518150Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/RCTConvert+ImageMarker.swift:36:20: error: module 'CoreFoundation' has no member named 'CGRect'
2023-11-25T00:29:55.5518460Z             return CoreFoundation.CGRect.zero
2023-11-25T00:29:55.5518630Z                    ^~~~~~~~~~~~~~ ~~~~~~
2023-11-25T00:29:55.5519080Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/RCTConvert+ImageMarker.swift:38:16: error: module 'CoreFoundation' has no member named 'CGRect'
2023-11-25T00:29:55.5519460Z         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]))
2023-11-25T00:29:55.5519710Z                ^~~~~~~~~~~~~~ ~~~~~~
2023-11-25T00:29:55.5520180Z /Users/runner/work/1/s/node_modules/react-native-image-marker/ios/RCTImageMarker/Utils.swift:106:40: warning: comparing non-optional value of type 'UIColor' to 'nil' always returns true
2023-11-25T00:29:55.5520500Z             shadow.shadowColor = color != nil ? color : UIColor.gray

2023-11-25T00:29:55.5980760Z    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'react-native-image-marker' from project 'Pods')
2023-11-25T00:29:55.5981370Z    CompileSwift normal arm64 (in target 'react-native-image-marker' from project 'Pods')

If anyone in the community or the development team has experience with similar CocoaPods build failures or can offer guidance on troubleshooting, I would greatly appreciate your assistance.

JimmyDaddy commented 11 months ago

@devGbarbosa Hello, what is the version of React Native in your project?

devGbarbosa commented 11 months ago

@JimmyDaddy Hey, currently my RN version is 0.68.2

JimmyDaddy commented 11 months ago

@JimmyDaddy Hey, currently my RN version is 0.68.2

Could you please upgrade your CocoaPods version? It seems to be quite outdated.

devGbarbosa commented 11 months ago

@JimmyDaddy sure, I'm gonna do it soon. Thanks for the fixing 👍

JimmyDaddy commented 11 months ago

@devGbarbosa v1.1.10 is available now, you can give it a try, but I can't guarantee the problem has been fixed, especially if your Cocoapods version remains at 1.1.9.