tagworks-sdk-v1-react 1.1.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.
Files changed (33) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +33 -0
  3. package/android/build.gradle +101 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +4 -0
  6. package/android/src/main/AndroidManifestNew.xml +3 -0
  7. package/android/src/main/java/com/tagworkssdkv1/DataBundleModule.kt +229 -0
  8. package/android/src/main/java/com/tagworkssdkv1/StandardEventModule.kt +21 -0
  9. package/android/src/main/java/com/tagworkssdkv1/TagWorksModule.kt +317 -0
  10. package/android/src/main/java/com/tagworkssdkv1/TagworksSdkV1Module.kt +25 -0
  11. package/android/src/main/java/com/tagworkssdkv1/TagworksSdkV1Package.kt +18 -0
  12. package/ios/DataBundleModule.swift +271 -0
  13. package/ios/DataBundleModuleBridge.m +29 -0
  14. package/ios/StandardEventModule.swift +58 -0
  15. package/ios/StandardEventModuleBridge.m +17 -0
  16. package/ios/TagWorksModule.swift +262 -0
  17. package/ios/TagWorksModuleBridge.m +46 -0
  18. package/ios/TagworksSdkV1-Bridging-Header.h +2 -0
  19. package/ios/TagworksSdkV1.mm +14 -0
  20. package/ios/TagworksSdkV1.swift +8 -0
  21. package/lib/commonjs/index.js +38 -0
  22. package/lib/commonjs/index.js.map +1 -0
  23. package/lib/module/index.js +32 -0
  24. package/lib/module/index.js.map +1 -0
  25. package/lib/typescript/commonjs/package.json +1 -0
  26. package/lib/typescript/commonjs/src/index.d.ts +3 -0
  27. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  28. package/lib/typescript/module/package.json +1 -0
  29. package/lib/typescript/module/src/index.d.ts +3 -0
  30. package/lib/typescript/module/src/index.d.ts.map +1 -0
  31. package/package.json +189 -0
  32. package/src/index.tsx +25 -0
  33. package/tagworks-sdk-v1.podspec +43 -0
package/package.json ADDED
@@ -0,0 +1,189 @@
1
+ {
2
+ "name": "tagworks-sdk-v1-react",
3
+ "version": "1.1.0",
4
+ "description": "TagWorks SDK React Native Library",
5
+ "source": "./src/index.tsx",
6
+ "main": "./lib/commonjs/index.js",
7
+ "module": "./lib/module/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./lib/typescript/module/src/index.d.ts",
12
+ "default": "./lib/module/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
16
+ "default": "./lib/commonjs/index.js"
17
+ }
18
+ }
19
+ },
20
+ "files": [
21
+ "src",
22
+ "lib",
23
+ "android",
24
+ "ios",
25
+ "cpp",
26
+ "*.podspec",
27
+ "react-native.config.js",
28
+ "!ios/build",
29
+ "!android/build",
30
+ "!android/gradle",
31
+ "!android/gradlew",
32
+ "!android/gradlew.bat",
33
+ "!android/local.properties",
34
+ "!**/__tests__",
35
+ "!**/__fixtures__",
36
+ "!**/__mocks__",
37
+ "!**/.*"
38
+ ],
39
+ "scripts": {
40
+ "example": "yarn workspace tagworks-sdk-v1-example",
41
+ "test": "jest",
42
+ "typecheck": "tsc",
43
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
44
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
45
+ "prepare": "bob build",
46
+ "release": "release-it"
47
+ },
48
+ "keywords": [
49
+ "react-native",
50
+ "ios",
51
+ "android"
52
+ ],
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+http://192.168.20.44:8443/etc/mobile/sdk/tagworks-sdk-v1-react.git"
56
+ },
57
+ "author": "pudaegii <pudaegii@obzen.com> (https://github.com/JongCheol-obzen)",
58
+ "license": "MIT",
59
+ "bugs": {
60
+ "url": "http://192.168.20.44:8443/etc/mobile/sdk/tagworks-sdk-v1-react/issues"
61
+ },
62
+ "homepage": "http://192.168.20.44:8443/etc/mobile/sdk/tagworks-sdk-v1-react#readme",
63
+ "publishConfig": {
64
+ "registry": "https://registry.npmjs.org/"
65
+ },
66
+ "devDependencies": {
67
+ "@commitlint/config-conventional": "^17.0.2",
68
+ "@evilmartians/lefthook": "^1.5.0",
69
+ "@react-native-community/cli": "15.0.1",
70
+ "@react-native/eslint-config": "^0.73.1",
71
+ "@release-it/conventional-changelog": "^9.0.2",
72
+ "@types/jest": "^29.5.5",
73
+ "@types/react": "^18.2.44",
74
+ "commitlint": "^17.0.2",
75
+ "del-cli": "^5.1.0",
76
+ "eslint": "^8.51.0",
77
+ "eslint-config-prettier": "^9.0.0",
78
+ "eslint-plugin-prettier": "^5.0.1",
79
+ "jest": "^29.7.0",
80
+ "prettier": "^3.0.3",
81
+ "react": "18.3.1",
82
+ "react-native": "0.76.5",
83
+ "react-native-builder-bob": "^0.35.2",
84
+ "release-it": "^17.10.0",
85
+ "turbo": "^1.10.7",
86
+ "typescript": "^5.2.2"
87
+ },
88
+ "resolutions": {
89
+ "@types/react": "^18.2.44"
90
+ },
91
+ "peerDependencies": {
92
+ "react": "*",
93
+ "react-native": "*"
94
+ },
95
+ "workspaces": [
96
+ "example"
97
+ ],
98
+ "packageManager": "yarn@3.6.1",
99
+ "jest": {
100
+ "preset": "react-native",
101
+ "modulePathIgnorePatterns": [
102
+ "<rootDir>/example/node_modules",
103
+ "<rootDir>/lib/"
104
+ ]
105
+ },
106
+ "commitlint": {
107
+ "extends": [
108
+ "@commitlint/config-conventional"
109
+ ]
110
+ },
111
+ "release-it": {
112
+ "git": {
113
+ "commitMessage": "chore: release ${version}",
114
+ "tagName": "v${version}"
115
+ },
116
+ "npm": {
117
+ "publish": true
118
+ },
119
+ "github": {
120
+ "release": true
121
+ },
122
+ "plugins": {
123
+ "@release-it/conventional-changelog": {
124
+ "preset": "angular"
125
+ }
126
+ }
127
+ },
128
+ "eslintConfig": {
129
+ "root": true,
130
+ "extends": [
131
+ "@react-native",
132
+ "prettier"
133
+ ],
134
+ "rules": {
135
+ "react/react-in-jsx-scope": "off",
136
+ "prettier/prettier": [
137
+ "error",
138
+ {
139
+ "quoteProps": "consistent",
140
+ "singleQuote": true,
141
+ "tabWidth": 2,
142
+ "trailingComma": "es5",
143
+ "useTabs": false
144
+ }
145
+ ]
146
+ }
147
+ },
148
+ "eslintIgnore": [
149
+ "node_modules/",
150
+ "lib/"
151
+ ],
152
+ "prettier": {
153
+ "quoteProps": "consistent",
154
+ "singleQuote": true,
155
+ "tabWidth": 2,
156
+ "trailingComma": "es5",
157
+ "useTabs": false
158
+ },
159
+ "react-native-builder-bob": {
160
+ "source": "src",
161
+ "output": "lib",
162
+ "targets": [
163
+ [
164
+ "commonjs",
165
+ {
166
+ "esm": true
167
+ }
168
+ ],
169
+ [
170
+ "module",
171
+ {
172
+ "esm": true
173
+ }
174
+ ],
175
+ [
176
+ "typescript",
177
+ {
178
+ "project": "tsconfig.build.json",
179
+ "esm": true
180
+ }
181
+ ]
182
+ ]
183
+ },
184
+ "create-react-native-library": {
185
+ "type": "module-legacy",
186
+ "languages": "kotlin-swift",
187
+ "version": "0.45.0"
188
+ }
189
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,25 @@
1
+ // import { NativeModules, Platform } from 'react-native';
2
+ import { NativeModules } from 'react-native';
3
+
4
+ // const LINKING_ERROR =
5
+ // `The package 'tagworks-sdk-v1' doesn't seem to be linked. Make sure: \n\n` +
6
+ // Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
7
+ // '- You rebuilt the app after installing the package\n' +
8
+ // '- You are not using Expo Go\n';
9
+
10
+ // const TagworksSdkV1 = NativeModules.TagworksSdkV1
11
+ // ? NativeModules.TagworksSdkV1
12
+ // : new Proxy(
13
+ // {},
14
+ // {
15
+ // get() {
16
+ // throw new Error(LINKING_ERROR);
17
+ // },
18
+ // }
19
+ // );
20
+ //
21
+ // export function multiply(a: number, b: number): Promise<number> {
22
+ // return TagworksSdkV1.multiply(a, b);
23
+ // }
24
+ const { TagWorksModule, DataBundleModule, StandardEventModule } = NativeModules;
25
+ export { TagWorksModule, DataBundleModule, StandardEventModule };
@@ -0,0 +1,43 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
+
6
+ Pod::Spec.new do |s|
7
+ s.name = "tagworks-sdk-v1-react"
8
+ s.version = package["version"]
9
+ s.summary = package["description"]
10
+ s.homepage = package["homepage"]
11
+ s.license = package["license"]
12
+ s.authors = package["author"]
13
+
14
+ s.platforms = { :ios => min_ios_version_supported }
15
+ s.source = { :git => "http://192.168.20.44:8443/etc/mobile/sdk/tagworks-sdk-v1-react.git", :tag => "#{s.version}" }
16
+
17
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
18
+ # s.dependency "TagWorks-SDK-iOS", '~> 1.1.18'
19
+ s.dependency "TagWorks-SDK-iOS"
20
+
21
+ # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
22
+ # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
23
+ if respond_to?(:install_modules_dependencies, true)
24
+ install_modules_dependencies(s)
25
+ else
26
+ s.dependency "React-Core"
27
+
28
+ # Don't install the dependencies when we run `pod install` in the old architecture.
29
+ if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
30
+ s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
31
+ s.pod_target_xcconfig = {
32
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
33
+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
34
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
35
+ }
36
+ s.dependency "React-Codegen"
37
+ s.dependency "RCT-Folly"
38
+ s.dependency "RCTRequired"
39
+ s.dependency "RCTTypeSafety"
40
+ s.dependency "ReactCommon/turbomodule/core"
41
+ end
42
+ end
43
+ end