Skip to content

Commit

Permalink
Release 2.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqiangliu committed Aug 28, 2021
1 parent 9b5c2af commit 6f9ed65
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 191 deletions.
2 changes: 1 addition & 1 deletion RNSensorsAnalyticsModule.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Pod::Spec.new do |s|
s.name = "RNSensorsAnalyticsModule"
s.version = "2.1.3"
s.version = "2.1.4"
s.summary = "The official React Native SDK of Sensors Analytics."
s.description = <<-DESC
神策分析 RN 组件
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.List;

public class RNSensorsAnalyticsPackage implements ReactPackage {
public static final String VERSION = "2.1.3";
public static final String VERSION = "2.1.4";
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<>();
Expand Down
2 changes: 1 addition & 1 deletion ios/RNSensorsAnalyticsModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#import "SAReactNativeManager.h"
#import "SAReactNativeEventProperty.h"

NSString *const kSAReactNativePluginVersion = @"react_native:2.1.3";
NSString *const kSAReactNativePluginVersion = @"react_native:2.1.4";

@implementation RNSensorsAnalyticsModule

Expand Down
9 changes: 9 additions & 0 deletions ios/SAReactNativeManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,15 @@ - (RCTRootView *)rootView {
current = current.presentingViewController;
rootView = [self rootViewWithCurrentView:current.view];
}

if (!rootView) {
// 当 rootViewController 为普通 UIViewController,且添加了 childController 时无法获取到 RCTRootView
// 此时直接通过 rootViewController 的 subview 获取 RCTRootView
// 这里是通过遍历所有的 subviews 查找,作为补充逻辑存在
UIViewController *root = [UIApplication sharedApplication].keyWindow.rootViewController;
rootView = [self rootViewWithCurrentView:root.view];
}

return rootView;
}

Expand Down
33 changes: 0 additions & 33 deletions ios/SAReactNativeswizzler.h

This file was deleted.

154 changes: 0 additions & 154 deletions ios/SAReactNativeswizzler.m

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sensorsdata-analytics-react-native",
"version": "2.1.3",
"version": "2.1.4",
"private": false,
"description": "神策分析 RN 组件",
"main": "index.js",
Expand Down

0 comments on commit 6f9ed65

Please sign in to comment.