Skip to content

Commit

Permalink
fix: rename advert to ads (#289)
Browse files Browse the repository at this point in the history
* fix: rename advert to ads

* style: code format

* feat: release 4.0.0-beta.2

---------

Co-authored-by: GIOSDK <[email protected]>
  • Loading branch information
YoloMao and GIOSDK authored Oct 26, 2023
1 parent 3093a4a commit 0627a3a
Show file tree
Hide file tree
Showing 26 changed files with 115 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/spm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ jobs:
- name: Build
run: xcodebuild build -scheme GrowingTracker -destination 'platform=macOS' -quiet

advert-build-iOS:
ads-build-iOS:
runs-on: macos-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Build
run: xcodebuild build -scheme GrowingModule_Advert -destination 'platform=iOS Simulator,name=iPhone 14' -quiet
run: xcodebuild build -scheme GrowingModule_Ads -destination 'platform=iOS Simulator,name=iPhone 14' -quiet

apm-build-iOS:
runs-on: macos-latest
Expand Down
78 changes: 39 additions & 39 deletions Example/Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Example/Example/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ - (void)SDK3rdStart {
configuration.idMappingEnabled = YES;
configuration.dataSourceId = @"ab555003531e0fd1";

#if defined(SDKADVERTMODULE)
#if defined(SDKADSMODULE)
configuration.ASAEnabled = YES;
configuration.deepLinkHost = @"https://n.datayi.cn";
configuration.deepLinkCallback = ^(NSDictionary * _Nullable params, NSTimeInterval processTime, NSError * _Nullable error) {
Expand Down
4 changes: 2 additions & 2 deletions Example/Example/GrowingIO-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#endif

#if __has_include("GrowingAdvertising.h")
// Advert Module
// Ads Module
#import "GrowingAdvertising.h"
#define SDKADVERTMODULE
#define SDKADSMODULE
#endif

#if __has_include("GrowingAPM+Private.h")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"target" : {
"containerPath" : "container:Example.xcodeproj",
"identifier" : "349B528A28C0884400EE88FE",
"name" : "AdvertTests"
"name" : "AdvertisingTests"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// AdvertTest.m
// AdvertisingTest.m
// GrowingAnalytics
//
// Created by YoloMao on 2022/9/1.
Expand All @@ -24,16 +24,16 @@
#import "GrowingTrackerCore/Manager/GrowingConfigurationManager.h"
#import "GrowingTrackerCore/Thread/GrowingDispatchManager.h"

#import "Modules/Advert/Event/GrowingAdvertEventType.h"
#import "Modules/Advert/Utils/GrowingAdUtils.h"
#import "Modules/Advertising/Event/GrowingAdEventType.h"
#import "Modules/Advertising/Utils/GrowingAdUtils.h"

#import "MockEventQueue.h"

@interface AdvertTest : XCTestCase
@interface AdvertisingTest : XCTestCase

@end

@implementation AdvertTest
@implementation AdvertisingTest

- (void)setUp {
// 恢复为未发送激活事件
Expand Down
8 changes: 4 additions & 4 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ project 'Example'

target 'Example' do
pod 'GrowingAnalytics/Autotracker', :path => '../'
pod 'GrowingAnalytics/Advert', :path => '../'
pod 'GrowingAnalytics/Ads', :path => '../'
pod 'GrowingAnalytics/ImpressionTrack', :path => '../'

# pod 'GrowingAnalytics/Tracker', :path => '../'
Expand Down Expand Up @@ -51,14 +51,14 @@ target 'ProtobufTests' do
pod 'GrowingAnalytics/Autotracker', :path => '../'
end

target 'AdvertTests' do
target 'AdvertisingTests' do
pod 'GrowingAnalytics/Autotracker', :path => '../'
pod 'GrowingAnalytics/Advert', :path => '../'
pod 'GrowingAnalytics/Ads', :path => '../'
end

target 'ExampleiOS13' do
pod 'GrowingAnalytics/Autotracker', :path => '../'
pod 'GrowingAnalytics/Advert', :path => '../'
pod 'GrowingAnalytics/Ads', :path => '../'

# 这一行勿删,避免 Multiple commands produce 报错
# 背景:GrowingToolsKit(version 1.0.9+) 依赖 GrowingAPM
Expand Down
8 changes: 4 additions & 4 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- GrowingAnalytics/Advert (4.0.0-beta.1):
- GrowingAnalytics/Ads (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/APM (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
Expand Down Expand Up @@ -122,7 +122,7 @@ PODS:
- SDWebImage/Core (5.18.3)

DEPENDENCIES:
- GrowingAnalytics/Advert (from `../`)
- GrowingAnalytics/Ads (from `../`)
- GrowingAnalytics/APM (from `../`)
- GrowingAnalytics/Autotracker (from `../`)
- GrowingAnalytics/ImpressionTrack (from `../`)
Expand Down Expand Up @@ -150,7 +150,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
GrowingAnalytics: 1bb25325883e2c4bec0d1b8e1d9e6540185d88e8
GrowingAnalytics: 3e66e18de41e54f94e0d71e787826b467ce25095
GrowingAPM: 6750d66ca6876c2c7d22c1c087625bc9ccc3430c
GrowingToolsKit: 134a78b023c4ab7da51e0a1111e9956a96e42dab
GrowingUtils: f0a9858cfd15dc584367957f24a784813a68d637
Expand All @@ -160,6 +160,6 @@ SPEC CHECKSUMS:
SDCycleScrollView: a0d74c3384caa72bdfc81470bdbc8c14b3e1fbcf
SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958

PODFILE CHECKSUM: eadc8a2cddef5401cfafd1d713a6bacab48232e6
PODFILE CHECKSUM: ab056def7c57fcd5747a7be922ee9fc2b5ce9783

COCOAPODS: 1.13.0
12 changes: 6 additions & 6 deletions GrowingAnalytics.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'GrowingAnalytics'
s.version = '4.0.0-beta.1'
s.version = '4.0.0-beta.2'
s.summary = 'iOS SDK of GrowingIO.'
s.description = <<-DESC
GrowingAnalytics具备自动采集基本的用户行为事件,比如访问和行为数据等。目前支持代码埋点、无埋点、可视化圈选、热图等功能。
Expand Down Expand Up @@ -159,11 +159,11 @@ GrowingAnalytics具备自动采集基本的用户行为事件,比如访问和
hybrid.dependency 'GrowingAnalytics/TrackerCore', s.version.to_s
end

s.subspec 'Advert' do |advert|
advert.ios.deployment_target = '10.0'
advert.source_files = 'Modules/Advert/**/*{.h,.m,.c,.cpp,.mm}'
advert.public_header_files = 'Modules/Advert/Public/*.h'
advert.dependency 'GrowingAnalytics/TrackerCore', s.version.to_s
s.subspec 'Ads' do |ads|
ads.ios.deployment_target = '10.0'
ads.source_files = 'Modules/Advertising/**/*{.h,.m,.c,.cpp,.mm}'
ads.public_header_files = 'Modules/Advertising/Public/*.h'
ads.dependency 'GrowingAnalytics/TrackerCore', s.version.to_s
end

s.subspec 'APM' do |apm|
Expand Down
2 changes: 1 addition & 1 deletion GrowingTrackerCore/GrowingRealTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#import "GrowingTrackerCore/Utils/GrowingDeviceInfo.h"
#import "GrowingULAppLifecycle.h"

NSString *const GrowingTrackerVersionName = @"4.0.0-beta.1";
NSString *const GrowingTrackerVersionName = @"4.0.0-beta.2";
const int GrowingTrackerVersionCode = 40000;

@interface GrowingRealTracker ()
Expand Down
6 changes: 3 additions & 3 deletions GrowingTrackerCore/GrowingTrackConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

@interface GrowingTrackConfiguration ()

// Advert
// Ads
@property (nonatomic, assign) BOOL ASAEnabled;
@property (nonatomic, copy) NSString *deepLinkHost;
@property (nonatomic, copy) id deepLinkCallback;
Expand Down Expand Up @@ -57,7 +57,7 @@ - (instancetype)initWithAccountId:(NSString *)accountId {
_encryptEnabled = NO;
_useProtobuf = YES;

// Advert
// Ads
_ASAEnabled = NO;
_deepLinkHost = nil;
_deepLinkCallback = nil;
Expand Down Expand Up @@ -96,7 +96,7 @@ - (id)copyWithZone:(NSZone *)zone {
configuration->_encryptEnabled = _encryptEnabled;
configuration->_useProtobuf = _useProtobuf;

// Advert
// Ads
configuration->_ASAEnabled = _ASAEnabled;
configuration->_deepLinkHost = [_deepLinkHost copy];
configuration->_deepLinkCallback = [_deepLinkCallback copy];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "Modules/Advert/AppleSearchAds/GrowingAsaFetcher.h"
#import "Modules/Advert/Event/GrowingActivateEvent.h"
#import "Modules/Advert/Event/GrowingAdvertEventType.h"
#import "Modules/Advert/Public/GrowingAdvertising.h"
#import "Modules/Advert/Utils/GrowingAdUtils.h"
#import "Modules/Advertising/AppleSearchAds/GrowingAsaFetcher.h"
#import "Modules/Advertising/Event/GrowingActivateEvent.h"
#import "Modules/Advertising/Event/GrowingAdEventType.h"
#import "Modules/Advertising/Public/GrowingAdvertising.h"
#import "Modules/Advertising/Utils/GrowingAdUtils.h"

#import "GrowingTrackerCore/Event/GrowingEventManager.h"
#import "GrowingTrackerCore/Helpers/GrowingHelpers.h"
Expand Down Expand Up @@ -85,7 +85,7 @@ - (NSArray *)growingEventManagerEventsWillSend:(NSArray<id<GrowingEventPersisten
if ([jsonObject isKindOfClass:[NSDictionary class]]) {
NSDictionary *dic = (NSDictionary *)jsonObject;
if (!dic[@"eventName"] // 兼容旧版无 eventName
|| [dic[@"eventName"] isEqualToString:GrowingAdvertEventNameActivate]) {
|| [dic[@"eventName"] isEqualToString:GrowingAdEventNameActivate]) {
activate = event;
break;
}
Expand Down Expand Up @@ -133,8 +133,8 @@ - (void)growingEventManagerEventsDidSend:(NSArray<id<GrowingEventPersistenceProt
id jsonObject = event.toJSONObject;
if ([jsonObject isKindOfClass:[NSDictionary class]]) {
NSDictionary *dic = (NSDictionary *)jsonObject;
if ([dic[@"eventName"] isEqualToString:GrowingAdvertEventNameActivate] ||
[dic[@"eventName"] isEqualToString:GrowingAdvertEventNameDefer]) {
if ([dic[@"eventName"] isEqualToString:GrowingAdEventNameActivate] ||
[dic[@"eventName"] isEqualToString:GrowingAdEventNameDefer]) {
// 普通激活和 defer 都可视为激活已发送
GrowingAsaFetcher.status = GrowingAsaFetcherStatusCompleted;
[GrowingAdUtils setActivateSent:YES];
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "Modules/Advert/Event/GrowingActivateEvent.h"
#import "Modules/Advertising/Event/GrowingActivateEvent.h"
#import "GrowingTrackerCore/Utils/GrowingDeviceInfo.h"

NSString *const GrowingEventTypeActivate = @"ACTIVATE";
NSString *const GrowingAdvertEventNameActivate = @"$app_activation";
NSString *const GrowingAdvertEventNameDefer = @"$app_defer";
NSString *const GrowingAdvertEventNameReengage = @"$app_reengage";
NSString *const GrowingAdEventNameActivate = @"$app_activation";
NSString *const GrowingAdEventNameDefer = @"$app_defer";
NSString *const GrowingAdEventNameReengage = @"$app_reengage";

@implementation GrowingActivateEvent

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// GrowingAdvertEventType.h
// GrowingAdEventType.h
// GrowingAnalytics
//
// Created by YoloMao on 2022/8/29.
Expand All @@ -20,6 +20,6 @@
#import "GrowingTrackerCore/Event/GrowingTrackEventType.h"

FOUNDATION_EXPORT GrowingEventType const GrowingEventTypeActivate;
FOUNDATION_EXPORT NSString *const GrowingAdvertEventNameActivate;
FOUNDATION_EXPORT NSString *const GrowingAdvertEventNameDefer;
FOUNDATION_EXPORT NSString *const GrowingAdvertEventNameReengage;
FOUNDATION_EXPORT NSString *const GrowingAdEventNameActivate;
FOUNDATION_EXPORT NSString *const GrowingAdEventNameDefer;
FOUNDATION_EXPORT NSString *const GrowingAdEventNameReengage;
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "Modules/Advert/Public/GrowingAdvertising.h"
#import "Modules/Advert/AppleSearchAds/GrowingAsaFetcher.h"
#import "Modules/Advert/Event/GrowingActivateEvent.h"
#import "Modules/Advert/Event/GrowingAdvertEventType.h"
#import "Modules/Advert/Request/GrowingAdPreRequest.h"
#import "Modules/Advert/Utils/GrowingAdUtils.h"
#import "Modules/Advertising/Public/GrowingAdvertising.h"
#import "Modules/Advertising/AppleSearchAds/GrowingAsaFetcher.h"
#import "Modules/Advertising/Event/GrowingActivateEvent.h"
#import "Modules/Advertising/Event/GrowingAdEventType.h"
#import "Modules/Advertising/Request/GrowingAdPreRequest.h"
#import "Modules/Advertising/Utils/GrowingAdUtils.h"

#import "GrowingTrackerCore/Core/GrowingContext.h"
#import "GrowingTrackerCore/DeepLink/GrowingDeepLinkHandler.h"
Expand Down Expand Up @@ -395,7 +395,7 @@ - (void)generateAppActivation {
return;
}

GrowingActivateBuilder *builder = GrowingActivateEvent.builder.setEventName(GrowingAdvertEventNameActivate);
GrowingActivateBuilder *builder = GrowingActivateEvent.builder.setEventName(GrowingAdEventNameActivate);
if (userAgent.length > 0) {
builder.setAttributes(@{@"userAgent": userAgent.copy});
}
Expand All @@ -411,7 +411,7 @@ - (void)generateAppDefer:(NSDictionary *)dic {
}

GrowingActivateBuilder *builder =
GrowingActivateEvent.builder.setEventName(GrowingAdvertEventNameDefer).setAttributes(dic);
GrowingActivateEvent.builder.setEventName(GrowingAdEventNameDefer).setAttributes(dic);
[[GrowingEventManager sharedInstance] postEventBuilder:builder];
[GrowingAdUtils setActivateWrote:YES];
[GrowingAdUtils setActivateDefer:YES];
Expand All @@ -425,7 +425,7 @@ - (void)generateAppReengage:(NSDictionary *)dic {
}

GrowingActivateBuilder *builder =
GrowingActivateEvent.builder.setEventName(GrowingAdvertEventNameReengage).setAttributes(dic);
GrowingActivateEvent.builder.setEventName(GrowingAdEventNameReengage).setAttributes(dic);
if ([GrowingSession currentSession].state == GrowingSessionStateActive) {
[[GrowingEventManager sharedInstance] postEventBuilder:builder];
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ NS_SWIFT_NAME(Advertising)

@end

@interface GrowingTrackConfiguration (Advert)
@interface GrowingTrackConfiguration (Ads)

@property (nonatomic, assign) BOOL ASAEnabled;
@property (nonatomic, copy) NSString *deepLinkHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "Modules/Advert/Request/GrowingAdPreRequest.h"
#import "Modules/Advert/Public/GrowingAdvertising.h"
#import "Modules/Advert/Request/GrowingAdRequestHeaderAdapter.h"
#import "Modules/Advertising/Request/GrowingAdPreRequest.h"
#import "Modules/Advertising/Public/GrowingAdvertising.h"
#import "Modules/Advertising/Request/GrowingAdRequestHeaderAdapter.h"

#import "GrowingTrackerCore/Manager/GrowingConfigurationManager.h"
#import "GrowingTrackerCore/Network/Request/Adapter/GrowingRequestAdapter.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "Modules/Advert/Request/GrowingAdRequestHeaderAdapter.h"
#import "Modules/Advertising/Request/GrowingAdRequestHeaderAdapter.h"
#import "GrowingULTimeUtil.h"

@interface GrowingAdRequestHeaderAdapter ()
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "Modules/Advert/Utils/GrowingAdUtils.h"
#import "Modules/Advertising/Utils/GrowingAdUtils.h"
#import "GrowingTrackerCore/FileStorage/GrowingFileStorage.h"
#import "GrowingTrackerCore/Helpers/GrowingHelpers.h"
#import "GrowingTrackerCore/Manager/GrowingConfigurationManager.h"
#import "Modules/Advert/Public/GrowingAdvertising.h"
#import "Modules/Advertising/Public/GrowingAdvertising.h"

static NSString *const kGrowingAdertisingFileKey = @"GrowingAdertisingFileKey";
static NSString *const kGrowingAdIsActivateDeferKey = @"GrowingAdvertisingActivateDefer";
Expand Down
Loading

0 comments on commit 0627a3a

Please sign in to comment.