Skip to content

Commit

Permalink
Release 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujg-00 committed Oct 22, 2021
1 parent 5aafbde commit 332136e
Show file tree
Hide file tree
Showing 91 changed files with 1,513 additions and 1,021 deletions.
3 changes: 2 additions & 1 deletion Example/SensorsDataSwift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let options = SAConfigOptions(serverURL: "http://sdk-test.cloud.sensorsdata.cn:8006/sa?project=default&token=95c73ae661f85aa0", launchOptions: launchOptions)
options.maxCacheSize = 10000;
options.autoTrackEventType = [.eventTypeAppClick,.eventTypeAppStart,.eventTypeAppEnd,.eventTypeAppViewScreen]
options.enableVisualizedAutoTrack = true
options.enableHeatMap = true
SensorsAnalyticsSDK.start(configOptions: options)

SensorsAnalyticsSDK.sharedInstance()?.setFlushNetworkPolicy(SensorsAnalyticsNetworkType.typeALL)
SensorsAnalyticsSDK.sharedInstance()?.enableHeatMap()

let dict: Dictionary = ["key": "value", "key1": "value1"]
SensorsAnalyticsSDK.sharedInstance()?.track("testEvent", withProperties: dict)
Expand Down
39 changes: 25 additions & 14 deletions SensorsAnalyticsSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SensorsAnalyticsSDK"
s.version = "3.1.9"
s.version = "4.0.0"
s.summary = "The official iOS SDK of Sensors Analytics."
s.homepage = "http://www.sensorsdata.cn"
s.source = { :git => 'https://github.com/sensorsdata/sa-sdk-ios.git', :tag => "v#{s.version}" }
Expand All @@ -13,14 +13,25 @@ Pod::Spec.new do |s|

s.libraries = 'icucore', 'sqlite3', 'z'

s.subspec 'Common' do |c|
s.subspec 'Base' do |b|
core_dir = "SensorsAnalyticsSDK/Core/"
c.source_files = core_dir + "**/*.{h,m}"
c.public_header_files = core_dir + "SensorsAnalyticsSDK.h", core_dir + "SensorsAnalyticsSDK+Public.h", core_dir + "SAAppExtensionDataManager.h", core_dir + "SASecurityPolicy.h", core_dir + "SAConfigOptions.h", core_dir + "SAConstants.h"
c.ios.source_files = "SensorsAnalyticsSDK/RemoteConfig/**/*.{h,m}", "SensorsAnalyticsSDK/ChannelMatch/**/*.{h,m}", "SensorsAnalyticsSDK/Encrypt/**/*.{h,m}", "SensorsAnalyticsSDK/Deeplink/**/*.{h,m}", "SensorsAnalyticsSDK/DebugMode/**/*.{h,m}"
c.ios.public_header_files = "SensorsAnalyticsSDK/Encrypt/SAConfigOptions+Encrypt.h", "SensorsAnalyticsSDK/Encrypt/SAEncryptProtocol.h", "SensorsAnalyticsSDK/Encrypt/SASecretKey.h", "SensorsAnalyticsSDK/ChannelMatch/SensorsAnalyticsSDK+SAChannelMatch.h"
c.ios.resource = 'SensorsAnalyticsSDK/SensorsAnalyticsSDK.bundle'
c.ios.frameworks = 'CoreTelephony'
b.source_files = core_dir + "**/*.{h,m}"
b.exclude_files = core_dir + "SAAlertController.h", core_dir + "SAAlertController.m"
b.public_header_files = core_dir + "SensorsAnalyticsSDK.h", core_dir + "SensorsAnalyticsSDK+Public.h", core_dir + "SAAppExtensionDataManager.h", core_dir + "SASecurityPolicy.h", core_dir + "SAConfigOptions.h", core_dir + "SAConstants.h"
b.ios.resource = 'SensorsAnalyticsSDK/SensorsAnalyticsSDK.bundle'
b.ios.frameworks = 'CoreTelephony'
end

s.subspec 'Extension' do |e|
e.dependency 'SensorsAnalyticsSDK/Base'
end

s.subspec 'Common' do |c|
c.dependency 'SensorsAnalyticsSDK/Extension'
c.public_header_files = 'SensorsAnalyticsSDK/JSBridge/SensorsAnalyticsSDK+JavaScriptBridge.h'
c.source_files = 'SensorsAnalyticsSDK/Core/SAAlertController.{h,m}', 'SensorsAnalyticsSDK/JSBridge/**/*.{h,m}'
c.ios.source_files = 'SensorsAnalyticsSDK/RemoteConfig/**/*.{h,m}', 'SensorsAnalyticsSDK/ChannelMatch/**/*.{h,m}', 'SensorsAnalyticsSDK/Encrypt/**/*.{h,m}', 'SensorsAnalyticsSDK/Deeplink/**/*.{h,m}', 'SensorsAnalyticsSDK/DebugMode/**/*.{h,m}', 'SensorsAnalyticsSDK/Core/SAAlertController.h'
c.ios.public_header_files = 'SensorsAnalyticsSDK/{Encrypt,RemoteConfig,ChannelMatch,Deeplink,DebugMode}/{SAConfigOptions,SensorsAnalyticsSDK}+*.h', 'SensorsAnalyticsSDK/Encrypt/SAEncryptProtocol.h', 'SensorsAnalyticsSDK/Encrypt/SASecretKey.h'
end

s.subspec 'Core' do |c|
Expand All @@ -41,7 +52,7 @@ Pod::Spec.new do |s|
g.ios.deployment_target = '8.0'
g.dependency 'SensorsAnalyticsSDK/Common'
g.source_files = "SensorsAnalyticsSDK/AutoTrack/**/*.{h,m}"
g.public_header_files = 'SensorsAnalyticsSDK/AutoTrack/SensorsAnalyticsSDK+SAAutoTrack.h'
g.public_header_files = 'SensorsAnalyticsSDK/AutoTrack/SensorsAnalyticsSDK+SAAutoTrack.h', 'SensorsAnalyticsSDK/AutoTrack/SAConfigOptions+AutoTrack.h'
g.frameworks = 'UIKit'
end

Expand All @@ -50,7 +61,7 @@ Pod::Spec.new do |s|
f.ios.deployment_target = '8.0'
f.dependency 'SensorsAnalyticsSDK/AutoTrack'
f.source_files = "SensorsAnalyticsSDK/Visualized/**/*.{h,m}"
f.public_header_files = 'SensorsAnalyticsSDK/Visualized/SensorsAnalyticsSDK+Visualized.h'
f.public_header_files = 'SensorsAnalyticsSDK/Visualized/SensorsAnalyticsSDK+Visualized.h', 'SensorsAnalyticsSDK/Visualized/SAConfigOptions+Visualized.h'
end

# 开启 GPS 定位采集
Expand All @@ -59,15 +70,15 @@ Pod::Spec.new do |s|
f.frameworks = 'CoreLocation'
f.dependency 'SensorsAnalyticsSDK/Core'
f.source_files = "SensorsAnalyticsSDK/Location/**/*.{h,m}"
f.private_header_files = 'SensorsAnalyticsSDK/Location/**/*.h'
f.public_header_files = 'SensorsAnalyticsSDK/Location/SensorsAnalyticsSDK+Location.h'
end

# 开启设备方向采集
s.subspec 'DeviceOrientation' do |f|
f.ios.deployment_target = '8.0'
f.dependency 'SensorsAnalyticsSDK/Core'
f.source_files = 'SensorsAnalyticsSDK/DeviceOrientation/**/*.{h,m}'
f.private_header_files = 'SensorsAnalyticsSDK/DeviceOrientation/**/*.h'
f.public_header_files = 'SensorsAnalyticsSDK/DeviceOrientation/SensorsAnalyticsSDK+DeviceOrientation.h'
f.frameworks = 'CoreMotion'
end

Expand All @@ -76,15 +87,15 @@ Pod::Spec.new do |s|
f.ios.deployment_target = '8.0'
f.dependency 'SensorsAnalyticsSDK/Core'
f.source_files = "SensorsAnalyticsSDK/AppPush/**/*.{h,m}"
f.private_header_files = 'SensorsAnalyticsSDK/AppPush/**/*.h'
f.public_header_files = 'SensorsAnalyticsSDK/AppPush/SAConfigOptions+AppPush.h'
end

# 使用崩溃事件采集
s.subspec 'Exception' do |e|
e.ios.deployment_target = '8.0'
e.dependency 'SensorsAnalyticsSDK/Common'
e.source_files = "SensorsAnalyticsSDK/Exception/**/*.{h,m}"
e.private_header_files = 'SensorsAnalyticsSDK/Exception/**/*.h'
e.public_header_files = 'SensorsAnalyticsSDK/Exception/SAConfigOptions+Exception.h'
end

# 基于 UA,使用 UIWebView 或者 WKWebView 进行打通
Expand Down
Loading

0 comments on commit 332136e

Please sign in to comment.