Skip to content

Commit

Permalink
fix: warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
YoloMao committed May 7, 2024
1 parent e17d52a commit 0daedd6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
run: |
xcresultparser -o cobertura ${{ env.DERIVED_DATA }}/Logs/Test/*.xcresult/ \
> ${{ env.DERIVED_DATA }}/cobertura-coverage.xml
pwd
pushd ${{ env.DERIVED_DATA }}
ls
popd
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#if Growing_OS_IOS
#import "GrowingTrackerCore/GrowingWindow.h"
#import "GrowingTrackerCore/Helpers/UIKit/UIApplication+GrowingHelper.h"
#import "GrowingULApplication.h"

@implementation UIApplication (GrowingHelper)

Expand All @@ -30,7 +31,7 @@ @implementation UIApplication (GrowingHelper)
/// 我们需要将其加入数组中
- (NSArray<UIWindow *> *)growingHelper_allWindows {
NSArray *array = [self windows];
UIWindow *keyWindow = [self keyWindow];
UIWindow *keyWindow = [self growingul_keyWindow];

if (!keyWindow) {
return array;
Expand Down
34 changes: 11 additions & 23 deletions GrowingTrackerCore/Thirdparty/Logger/GrowingLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,12 @@
// prior written permission of Deusty, LLC.

#import <Foundation/Foundation.h>

// The Swift Package integration has no support for the legacy macros.
#if __has_include(<CocoaLumberjack/GrowingLegacyMacros.h>)
// Enable 1.9.x legacy macros if imported directly and it's not a swift package build.
#ifndef Growing_LEGACY_MACROS
#define Growing_LEGACY_MACROS 1
#endif
// Growing_LEGACY_MACROS is checked in the file itself
#import "GrowingLegacyMacros.h"
#endif

// Names of loggers.
#import "GrowingTrackerCore/Thirdparty/Logger/GrowingLoggerNames.h"

#if OS_OBJECT_USE_OBJC
#define DISPATCH_QUEUE_REFERENCE_TYPE strong
#define GIO_DISPATCH_QUEUE_REFERENCE_TYPE strong
#else
#define DISPATCH_QUEUE_REFERENCE_TYPE assign
#define GIO_DISPATCH_QUEUE_REFERENCE_TYPE assign
#endif

@class GrowingLogMessage;
Expand Down Expand Up @@ -224,7 +212,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
* Provides access to the underlying logging queue.
* This may be helpful to Logger classes for things like thread synchronization.
**/
@property (class, nonatomic, DISPATCH_QUEUE_REFERENCE_TYPE, readonly) dispatch_queue_t loggingQueue;
@property (class, nonatomic, GIO_DISPATCH_QUEUE_REFERENCE_TYPE, readonly) dispatch_queue_t loggingQueue;

/**
* Logging Primitive.
Expand Down Expand Up @@ -304,7 +292,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
line:(NSUInteger)line
tag:(nullable id)tag
format:(NSString *)format
args:(va_list)argList NS_SWIFT_NAME(log(asynchronous:level:flag:context:file:function:line:tag:format:arguments:));
args:(va_list)argList;

/**
* Logging Primitive.
Expand Down Expand Up @@ -332,7 +320,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
line:(NSUInteger)line
tag:(nullable id)tag
format:(NSString *)format
args:(va_list)argList NS_SWIFT_NAME(log(asynchronous:level:flag:context:file:function:line:tag:format:arguments:));
args:(va_list)argList;

/**
* Logging Primitive.
Expand All @@ -343,7 +331,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
* @param logMessage the log message stored in a `GrowingLogMessage` model object
*/
+ (void)log:(BOOL)asynchronous
message:(GrowingLogMessage *)logMessage NS_SWIFT_NAME(log(asynchronous:message:));
message:(GrowingLogMessage *)logMessage;

/**
* Logging Primitive.
Expand All @@ -354,7 +342,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
* @param logMessage the log message stored in a `GrowingLogMessage` model object
*/
- (void)log:(BOOL)asynchronous
message:(GrowingLogMessage *)logMessage NS_SWIFT_NAME(log(asynchronous:message:));
message:(GrowingLogMessage *)logMessage;

/**
* Since logging can be asynchronous, there may be times when you want to flush the logs.
Expand Down Expand Up @@ -573,7 +561,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
*
* @param logMessage the message (model)
*/
- (void)logMessage:(GrowingLogMessage *)logMessage NS_SWIFT_NAME(log(message:));
- (void)logMessage:(GrowingLogMessage *)logMessage;

/**
* Formatters may optionally be added to any logger.
Expand Down Expand Up @@ -633,7 +621,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
* Thus, a dedicated dispatch queue is used for each logger.
* Logger implementations may optionally choose to provide their own dispatch queue.
**/
@property (nonatomic, DISPATCH_QUEUE_REFERENCE_TYPE, readonly) dispatch_queue_t loggerQueue;
@property (nonatomic, GIO_DISPATCH_QUEUE_REFERENCE_TYPE, readonly) dispatch_queue_t loggerQueue;

/**
* If the logger implementation does not choose to provide its own queue,
Expand Down Expand Up @@ -666,7 +654,7 @@ FOUNDATION_EXTERN NSString * __nullable GrowingExtractFileNameWithoutExtension(c
* The formatter may also optionally filter the log message by returning nil,
* in which case the logger will not log the message.
**/
- (nullable NSString *)formatLogMessage:(GrowingLogMessage *)logMessage NS_SWIFT_NAME(format(message:));
- (nullable NSString *)formatLogMessage:(GrowingLogMessage *)logMessage;

@optional

Expand Down Expand Up @@ -884,7 +872,7 @@ typedef NS_OPTIONS(NSInteger, GrowingLogMessageOptions){
}

@property (nonatomic, strong, nullable) id <GrowingLogFormatter> logFormatter;
@property (nonatomic, DISPATCH_QUEUE_REFERENCE_TYPE) dispatch_queue_t loggerQueue;
@property (nonatomic, GIO_DISPATCH_QUEUE_REFERENCE_TYPE) dispatch_queue_t loggerQueue;

// For thread-safety assertions

Expand Down

0 comments on commit 0daedd6

Please sign in to comment.