@txlemetry/react-native-plugin 2.5.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- package com.posthogreactnativeplugin
1
+ package com.txlemetryreactnativeplugin
2
2
 
3
3
  import com.facebook.react.ReactPackage
4
4
  import com.facebook.react.bridge.NativeModule
5
5
  import com.facebook.react.bridge.ReactApplicationContext
6
6
  import com.facebook.react.uimanager.ViewManager
7
7
 
8
- class PosthogReactNativePluginPackage : ReactPackage {
8
+ class TxlemetryReactNativePluginPackage : ReactPackage {
9
9
  override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
10
- listOf(PosthogReactNativePluginModule(reactContext))
10
+ listOf(TxlemetryReactNativePluginModule(reactContext))
11
11
 
12
12
  override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> = emptyList()
13
13
  }
package/ios/Package.swift CHANGED
@@ -1,7 +1,12 @@
1
1
  // swift-tools-version: 6.0
2
2
 
3
+ import Foundation
3
4
  import PackageDescription
4
5
 
6
+ // Set TXLEMETRY_SWIFT_PACKAGE_URL to build against a local or mirrored copy of the Txlemetry Apple SDK.
7
+ let txlemetryPackageURL = ProcessInfo.processInfo.environment["TXLEMETRY_SWIFT_PACKAGE_URL"].flatMap { $0.isEmpty ? nil : $0 }
8
+ ?? "https://github.com/hectorvss/txlemetry-ios.git"
9
+
5
10
  // React Native's SwiftPM autolinker references this package through
6
11
  // build/generated/autolinking/libs/ReactNativePlugin. These paths are relative
7
12
  // to that stable alias, not to node_modules.
@@ -19,47 +24,48 @@ let reactHeaderDependencies: [Target.Dependency] = [
19
24
 
20
25
  let package = Package(
21
26
  // This name must match React Native's Swift-name derivation for
22
- // @posthog/react-native-plugin.
27
+ // @txlemetry/react-native-plugin.
23
28
  name: "ReactNativePlugin",
24
29
  platforms: [.iOS(.v15)],
25
30
  products: [
26
31
  .library(
27
32
  name: "ReactNativePlugin",
28
- targets: ["PosthogReactNativePlugin", "PosthogReactNativePluginBridge"]
33
+ targets: ["TxlemetryReactNativePlugin", "TxlemetryReactNativePluginBridge"]
29
34
  ),
30
35
  ],
31
36
  dependencies: reactNativeDependencies + [
32
37
  .package(
33
- url: "https://github.com/PostHog/posthog-ios.git",
34
- .upToNextMinor(from: "3.69.10")
38
+ name: "Txlemetry",
39
+ url: txlemetryPackageURL,
40
+ .upToNextMajor(from: "4.0.0")
35
41
  ),
36
42
  ],
37
43
  targets: [
38
44
  .target(
39
- name: "PosthogReactNativePlugin",
45
+ name: "TxlemetryReactNativePlugin",
40
46
  dependencies: reactHeaderDependencies + [
41
- .product(name: "PostHog", package: "posthog-ios"),
47
+ .product(name: "Txlemetry", package: "Txlemetry"),
42
48
  ],
43
49
  path: ".",
44
50
  exclude: [
45
51
  "Package.swift",
46
- "PosthogReactNativePlugin-Bridging-Header.h",
47
- "PosthogReactNativePlugin.mm",
52
+ "TxlemetryReactNativePlugin-Bridging-Header.h",
53
+ "TxlemetryReactNativePlugin.mm",
48
54
  ],
49
- sources: ["PosthogReactNativePlugin.swift"]
55
+ sources: ["TxlemetryReactNativePlugin.swift"]
50
56
  ),
51
57
  // SwiftPM cannot compile Swift and Objective-C++ in one target. The
52
58
  // RCT_EXTERN_MODULE registration bridge is independent and is linked
53
59
  // into the same library product as the Swift implementation.
54
60
  .target(
55
- name: "PosthogReactNativePluginBridge",
61
+ name: "TxlemetryReactNativePluginBridge",
56
62
  dependencies: reactHeaderDependencies,
57
63
  path: ".",
58
64
  exclude: [
59
65
  "Package.swift",
60
- "PosthogReactNativePlugin.swift",
66
+ "TxlemetryReactNativePlugin.swift",
61
67
  ],
62
- sources: ["PosthogReactNativePlugin.mm"],
68
+ sources: ["TxlemetryReactNativePlugin.mm"],
63
69
  publicHeadersPath: "."
64
70
  ),
65
71
  ],
@@ -1,7 +1,7 @@
1
1
  #import <React/RCTBridgeModule.h>
2
2
  #import <React/RCTEventEmitter.h>
3
3
 
4
- @interface RCT_EXTERN_MODULE(PosthogReactNativePlugin, RCTEventEmitter)
4
+ @interface RCT_EXTERN_MODULE(TxlemetryReactNativePlugin, RCTEventEmitter)
5
5
 
6
6
  RCT_EXTERN_METHOD(setup:(NSString)sessionId
7
7
  withSdkOptions:(NSDictionary)sdkOptions