Skip to content

Commit

Permalink
style: code format
Browse files Browse the repository at this point in the history
  • Loading branch information
runner authored and YoloMao committed Jul 6, 2023
1 parent 5f4607e commit 7cc4ad4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Modules/V2Adapter/GrowingAutoTrackKit.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

#if __has_include(<UIKit/UIKit.h>)
#import "Modules/V2Adapter/Public/GrowingAutoTrackKit.h"
#import "Modules/V2AdapterTrackOnly/Public/GrowingV2Adapter.h"
#import <objc/message.h>
#import <objc/runtime.h>
#import "GrowingAutotrackerCore/Public/GrowingAutotrackConfiguration.h"
#import "GrowingTrackerCore/GrowingRealTracker.h"
#import "GrowingTrackerCore/Manager/GrowingConfigurationManager.h"
#import "GrowingTrackerCore/Thirdparty/Logger/GrowingLogger.h"
#import "Modules/V2AdapterTrackOnly/Public/GrowingV2Adapter.h"

@interface UIView (Internal)

Expand Down Expand Up @@ -169,7 +169,7 @@ @implementation UIView (Deprecated)

- (double)growingImpScale {
GIOLogDebug(@"[V2Adapter] %s 已废弃", __FUNCTION__);

GrowingTrackConfiguration *configuration = GrowingConfigurationManager.sharedInstance.trackConfiguration;
if ([configuration isKindOfClass:[GrowingAutotrackConfiguration class]]) {
return ((GrowingAutotrackConfiguration *)configuration).impressionScale;
Expand Down
8 changes: 3 additions & 5 deletions Modules/V2AdapterTrackOnly/GrowingCoreKit.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
// limitations under the License.

#import "Modules/V2AdapterTrackOnly/Public/GrowingCoreKit.h"
#import "Modules/V2AdapterTrackOnly/Public/GrowingV2Adapter.h"
#import <objc/message.h>
#import <objc/runtime.h>
#import "GrowingTrackerCore/GrowingRealTracker.h"
#import "GrowingTrackerCore/Manager/GrowingConfigurationManager.h"
#import "GrowingTrackerCore/Manager/GrowingSession.h"
#import "GrowingTrackerCore/Thirdparty/Logger/GrowingLogger.h"
#import "GrowingTrackerCore/Utils/GrowingDeviceInfo.h"
#import "Modules/V2AdapterTrackOnly/Public/GrowingV2Adapter.h"

static id growing_getTracker(void) {
Class class = NSClassFromString(@"GrowingAutotracker") ?: NSClassFromString(@"GrowingTracker");
Expand Down Expand Up @@ -114,9 +114,7 @@ + (void)track:(NSString *)eventId withVariable:(NSDictionary<NSString *, NSObjec
((void (*)(id, SEL, NSString *, NSDictionary *))objc_msgSend)(tracker, selector, eventId, variable);
}

+ (void)track:(NSString *)eventId
withNumber:(NSNumber *)number
andVariable:(NSDictionary<NSString *, id> *)variable {
+ (void)track:(NSString *)eventId withNumber:(NSNumber *)number andVariable:(NSDictionary<NSString *, id> *)variable {
[self track:eventId withVariable:variable];
}

Expand Down Expand Up @@ -174,7 +172,7 @@ + (void)setPeopleVariableWithKey:(NSString *)key andNumberValue:(NSNumber *)numb
[self setPeopleVariable:@{key: numberValue.stringValue}];
}

+ (void)setUserAttributes:(NSDictionary<NSString *, id>*)attributes {
+ (void)setUserAttributes:(NSDictionary<NSString *, id> *)attributes {
[self setPeopleVariable:attributes];
}

Expand Down
15 changes: 9 additions & 6 deletions Modules/V2AdapterTrackOnly/Public/GrowingCoreKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ typedef NS_ENUM(NSInteger, GrowingAspectMode) {
+ (void)track:(NSString *)eventId;
+ (void)track:(NSString *)eventId withNumber:(NSNumber *)number;
+ (void)track:(NSString *)eventId withVariable:(NSDictionary<NSString *, id> *)variable;
+ (void)track:(NSString *)eventId
withNumber:(NSNumber *)number
andVariable:(NSDictionary<NSString *, id> *)variable;
+ (void)track:(NSString *)eventId withNumber:(NSNumber *)number andVariable:(NSDictionary<NSString *, id> *)variable;
+ (void)setUserId:(NSString *)userId;
+ (void)clearUserId;
+ (void)setPeopleVariable:(NSDictionary<NSString *, NSObject *> *)variable;
+ (void)setPeopleVariableWithKey:(NSString *)key andStringValue:(NSString *)stringValue;
+ (void)setPeopleVariableWithKey:(NSString *)key andNumberValue:(NSNumber *)numberValue;
+ (void)setUserAttributes:(NSDictionary<NSString *, id>*)attributes; // cdp
+ (void)setUserAttributes:(NSDictionary<NSString *, id> *)attributes; // cdp

#pragma mark - Configuration

Expand Down Expand Up @@ -116,10 +114,15 @@ typedef NS_ENUM(NSInteger, GrowingAspectMode) {
+ (void)startWithAccountId:(NSString *)accountId NS_UNAVAILABLE;

// cdp
+ (void)startWithAccountId:(NSString *)accountId dataSourceId:(NSString *)dataSourceId withSampling:(CGFloat)sampling NS_UNAVAILABLE;
+ (void)startWithAccountId:(NSString *)accountId
dataSourceId:(NSString *)dataSourceId
withSampling:(CGFloat)sampling NS_UNAVAILABLE;
+ (void)startWithAccountId:(NSString *)accountId dataSourceId:(NSString *)dataSourceId NS_UNAVAILABLE;
+ (void)track:(NSString *)eventId withItem:(NSString *)itemId itemKey:(NSString *)itemKey NS_UNAVAILABLE;
+ (void)track:(NSString *)eventId withVariable:(NSDictionary<NSString *, id> *)variable forItem:(NSString *)itemId itemKey:(NSString *)itemKey NS_UNAVAILABLE;
+ (void)track:(NSString *)eventId
withVariable:(NSDictionary<NSString *, id> *)variable
forItem:(NSString *)itemId
itemKey:(NSString *)itemKey NS_UNAVAILABLE;
+ (void)trackPage:(NSString *)pageName NS_UNAVAILABLE;
+ (void)trackPage:(NSString *)pageName withVariable:(NSDictionary<NSString *, id> *)variable NS_UNAVAILABLE;

Expand Down

0 comments on commit 7cc4ad4

Please sign in to comment.