@tyrads.com/tyrads-sdk 2.0.0-beta.2 → 2.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.
Files changed (122) hide show
  1. package/LICENSE +11 -11
  2. package/android/build.gradle +117 -117
  3. package/android/gradle.properties +5 -5
  4. package/android/src/main/AndroidManifest.xml +3 -3
  5. package/android/src/main/AndroidManifestNew.xml +2 -2
  6. package/android/src/main/java/com/tyradssdk/TyradsSdkComposeViewManager.kt +112 -112
  7. package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +56 -56
  8. package/android/src/main/java/com/tyradssdk/TyradsSdkPackage.kt +18 -21
  9. package/ios/Tyrads/AcmoConfig.swift +32 -31
  10. package/ios/Tyrads/ApiHeaders.swift +12 -0
  11. package/ios/Tyrads/InitModel.swift +48 -46
  12. package/ios/Tyrads/Tyrads.swift +199 -176
  13. package/ios/TyradsSdk-Bridging-Header.h +2 -2
  14. package/ios/TyradsSdk.mm +14 -11
  15. package/ios/TyradsSdk.swift +47 -27
  16. package/lib/commonjs/acmo/core/marquee.js.map +1 -1
  17. package/lib/commonjs/acmo/core/storage/storage.js.map +1 -1
  18. package/lib/commonjs/acmo/core/types/types.d.js.map +1 -1
  19. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js.map +1 -1
  20. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +1 -1
  21. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js +3 -5
  22. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js.map +1 -1
  23. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js +3 -8
  24. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js.map +1 -1
  25. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js +3 -3
  26. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +1 -1
  27. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js +2 -7
  28. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js.map +1 -1
  29. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js +4 -6
  30. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js.map +1 -1
  31. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js +4 -6
  32. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js.map +1 -1
  33. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js +5 -6
  34. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js.map +1 -1
  35. package/lib/commonjs/acmo/modules/dashboard/repository.js.map +1 -1
  36. package/lib/commonjs/acmo/modules/dashboard/top_offers.js +23 -7
  37. package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +1 -1
  38. package/lib/commonjs/i18n.js.map +1 -1
  39. package/lib/commonjs/index.js +12 -2
  40. package/lib/commonjs/index.js.map +1 -1
  41. package/lib/module/acmo/core/marquee.js.map +1 -1
  42. package/lib/module/acmo/core/storage/storage.js.map +1 -1
  43. package/lib/module/acmo/core/types/types.d.js.map +1 -1
  44. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js.map +1 -1
  45. package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +1 -1
  46. package/lib/module/acmo/modules/dashboard/components/my_games_button.js +3 -5
  47. package/lib/module/acmo/modules/dashboard/components/my_games_button.js.map +1 -1
  48. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js +3 -8
  49. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js.map +1 -1
  50. package/lib/module/acmo/modules/dashboard/components/premium_header.js +3 -3
  51. package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +1 -1
  52. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js +2 -7
  53. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js.map +1 -1
  54. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js +4 -6
  55. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js.map +1 -1
  56. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js +4 -6
  57. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js.map +1 -1
  58. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js +5 -6
  59. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js.map +1 -1
  60. package/lib/module/acmo/modules/dashboard/repository.js.map +1 -1
  61. package/lib/module/acmo/modules/dashboard/top_offers.js +23 -7
  62. package/lib/module/acmo/modules/dashboard/top_offers.js.map +1 -1
  63. package/lib/module/i18n.js.map +1 -1
  64. package/lib/module/index.js +12 -2
  65. package/lib/module/index.js.map +1 -1
  66. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts +1 -0
  68. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts +1 -0
  70. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts +1 -0
  72. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts +1 -0
  74. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts +1 -0
  76. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts +1 -0
  78. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts +1 -0
  80. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts +1 -0
  83. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  85. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts.map +1 -1
  86. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts +1 -0
  87. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +1 -1
  88. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts +1 -0
  89. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +1 -1
  90. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts +1 -0
  91. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -1
  92. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts +1 -0
  93. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +1 -1
  94. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts +1 -0
  95. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +1 -1
  96. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts +1 -0
  97. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +1 -1
  98. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts +1 -0
  99. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +1 -1
  100. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
  101. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts +1 -0
  102. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
  103. package/lib/typescript/module/src/index.d.ts.map +1 -1
  104. package/package.json +197 -197
  105. package/readme.md +95 -97
  106. package/src/acmo/core/marquee.tsx +61 -61
  107. package/src/acmo/core/storage/storage.ts +27 -27
  108. package/src/acmo/core/types/types.d.ts +93 -93
  109. package/src/acmo/modules/dashboard/components/auto_scroller.tsx +84 -84
  110. package/src/acmo/modules/dashboard/components/custom_card.tsx +30 -30
  111. package/src/acmo/modules/dashboard/components/my_games_button.tsx +39 -39
  112. package/src/acmo/modules/dashboard/components/offer_info_section.tsx +138 -143
  113. package/src/acmo/modules/dashboard/components/premium_header.tsx +80 -80
  114. package/src/acmo/modules/dashboard/components/premium_option_1.tsx +155 -160
  115. package/src/acmo/modules/dashboard/components/premium_option_2.tsx +99 -103
  116. package/src/acmo/modules/dashboard/components/premium_option_3.tsx +41 -45
  117. package/src/acmo/modules/dashboard/components/premium_option_4.tsx +184 -183
  118. package/src/acmo/modules/dashboard/repository.ts +94 -94
  119. package/src/acmo/modules/dashboard/top_offers.tsx +144 -131
  120. package/src/i18n.ts +114 -114
  121. package/src/index.tsx +89 -81
  122. package/tyrads-sdk.podspec +41 -41
package/package.json CHANGED
@@ -1,197 +1,197 @@
1
- {
2
- "name": "@tyrads.com/tyrads-sdk",
3
- "version": "2.0.0-beta.2",
4
- "description": "Tyrads SDK for React Native ",
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
- "!ios/build",
28
- "!android/build",
29
- "!android/app/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 tyrads-sdk-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+https://github.com/tyrads-com/tyrads-sdk-reactnative.git"
56
- },
57
- "author": "dev@acmo.in <dev@acmo.in> (https://tyrads.com)",
58
- "license": " BSD-3-Clause",
59
- "bugs": {
60
- "url": "https://github.com/tyrads-com/tyrads-sdk-reactnative/issues"
61
- },
62
- "homepage": "https://github.com/tyrads-com/tyrads-sdk-reactnative#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/eslint-config": "^0.73.1",
70
- "@release-it/conventional-changelog": "^5.0.0",
71
- "@types/jest": "^29.5.5",
72
- "@types/numeral": "^2.0.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.2.0",
82
- "react-native": "0.74.5",
83
- "react-native-builder-bob": "^0.29.0",
84
- "release-it": "^15.0.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.40.0"
188
- },
189
- "dependencies": {
190
- "@react-native-async-storage/async-storage": "^2.1.2",
191
- "axios": "^1.8.1",
192
- "i18next": "^24.2.2",
193
- "numeral": "^2.0.6",
194
- "react-i18next": "^15.4.1",
195
- "react-native-text-ticker": "^1.14.0"
196
- }
197
- }
1
+ {
2
+ "name": "@tyrads.com/tyrads-sdk",
3
+ "version": "2.0.0",
4
+ "description": "Tyrads SDK for React Native ",
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
+ "!ios/build",
28
+ "!android/build",
29
+ "!android/app/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 tyrads-sdk-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+https://github.com/tyrads-com/tyrads-sdk-reactnative.git"
56
+ },
57
+ "author": "dev@acmo.in <dev@acmo.in> (https://tyrads.com)",
58
+ "license": " BSD-3-Clause",
59
+ "bugs": {
60
+ "url": "https://github.com/tyrads-com/tyrads-sdk-reactnative/issues"
61
+ },
62
+ "homepage": "https://github.com/tyrads-com/tyrads-sdk-reactnative#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/eslint-config": "^0.73.1",
70
+ "@release-it/conventional-changelog": "^5.0.0",
71
+ "@types/jest": "^29.5.5",
72
+ "@types/numeral": "^2.0.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.2.0",
82
+ "react-native": "0.74.5",
83
+ "react-native-builder-bob": "^0.29.0",
84
+ "release-it": "^15.0.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.40.0"
188
+ },
189
+ "dependencies": {
190
+ "@react-native-async-storage/async-storage": "^2.1.2",
191
+ "axios": "^1.8.1",
192
+ "i18next": "^24.2.2",
193
+ "numeral": "^2.0.6",
194
+ "react-i18next": "^15.4.1",
195
+ "react-native-text-ticker": "^1.14.0"
196
+ }
197
+ }
package/readme.md CHANGED
@@ -1,97 +1,95 @@
1
- # tyrads-sdk
2
-
3
- Tyrads SDK for React Native
4
-
5
- ## Installation
6
-
7
- ```sh
8
- npm install @tyrads.com/tyrads-sdk
9
- # or
10
- yarn add @tyrads.com/tyrads-sdk
11
- ```
12
-
13
- ## Usage
14
-
15
-
16
- ```js
17
- import Tyrads from '@tyrads.com/tyrads-sdk';
18
-
19
- // ...
20
-
21
-
22
- Tyrads.init('', '');
23
- Tyrads.loginUser('');
24
- Tyrads.showOffers();
25
- ```
26
-
27
-
28
- </br>
29
- <details>
30
- <summary><strong>Launch Mode</strong></summary>
31
-
32
-
33
- </br>
34
-
35
- ##### Min SDK version required: v1.1.6
36
- ##### Works only for iOS
37
-
38
- </br>
39
-
40
- Tyrads SDK provides the ability to open the Offerwall in a webkit view that is embedded in the app to provide a seamless user experience. Also, it provides the ability to open the Offerwall in an external browser (Safari) if Apple's app store policy does not approve the in-app rewards system for the app.
41
-
42
- Available launch modes:
43
- - `launchMode: 3` - opens the Offerwall in an external browser (Safari)
44
- - `launchMode: 2` - opens the Offerwall in a webkit view that is embedded in the app
45
-
46
- ```js
47
-
48
- // Note: The launchMode parameter is optional, if not specified the default would be opening the Offerwall in an external browser (Safari)
49
-
50
- Tyrads.showOffers({ launchMode: 3 });// provide launchMode: 2 to open the Offerwall in a webkit view that is embedded in the app
51
-
52
- ```
53
- </details>
54
-
55
-
56
-
57
- </br>
58
- <details>
59
- <summary><strong>Deeplinking Routes</strong></summary>
60
-
61
-
62
- </br>
63
-
64
- ##### Min SDK version required: v1.1.6
65
-
66
- </br>
67
-
68
- The Tyrads SDK supports deeplinking to specific sections of the offerwall. When initializing or interacting with the SDK, you can specify a route to open a particular page. For campaign-specific routes, you'll need to provide the campaignID as well.
69
-
70
- Available routes and their usage:
71
- - `campaigns` - opens the Campaigns Page
72
- - `campaigns-activated` - opens the Activated Campaigns Page
73
- - `campaign-details` - opens the Campaign Details Page (requires campaignID)
74
- - `campaign-tickets` - opens the Campaign Tickets Page (requires campaignID)
75
-
76
- ```js
77
-
78
- // Default route (Campaigns Page)
79
- Tyrads.showOffers();
80
-
81
- // Explicitly specifying the Campaigns Page
82
- Tyrads.showOffers({ route: "campaigns" });
83
-
84
- // Activated Campaigns Page
85
- Tyrads.showOffers({ route: "campaigns-activated" });
86
-
87
- // Campaign Details Page (requires campaignID)
88
- Tyrads.showOffers({ route: "campaign-details", campaignID: "your_campaign_id_here" });
89
-
90
- // Campaign Tickets Page (requires campaignID)
91
- Tyrads.showOffers({ route: "campaign-tickets", campaignID: "your_campaign_id_here" });
92
-
93
- ```
94
- </details>
95
-
96
- </br></br>
97
-
1
+ # tyrads-sdk
2
+
3
+ Tyrads SDK for React Native
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install @tyrads.com/tyrads-sdk
9
+ ```
10
+
11
+ ## Usage
12
+
13
+
14
+ ```js
15
+ import Tyrads from '@tyrads.com/tyrads-sdk';
16
+
17
+ // ...
18
+
19
+
20
+ Tyrads.init('', '');
21
+ Tyrads.loginUser('');
22
+ Tyrads.showOffers();
23
+ ```
24
+
25
+
26
+ </br>
27
+ <details>
28
+ <summary><strong>Launch Mode</strong></summary>
29
+
30
+
31
+ </br>
32
+
33
+ ##### Min SDK version required: v1.1.6
34
+ ##### Works only for iOS
35
+
36
+ </br>
37
+
38
+ Tyrads SDK provides the ability to open the Offerwall in a webkit view that is embedded in the app to provide a seamless user experience. Also, it provides the ability to open the Offerwall in an external browser (Safari) if Apple's app store policy does not approve the in-app rewards system for the app.
39
+
40
+ Available launch modes:
41
+ - `launchMode: 3` - opens the Offerwall in an external browser (Safari)
42
+ - `launchMode: 2` - opens the Offerwall in a webkit view that is embedded in the app
43
+
44
+ ```js
45
+
46
+ // Note: The launchMode parameter is optional, if not specified the default would be opening the Offerwall in an external browser (Safari)
47
+
48
+ Tyrads.showOffers({ launchMode: 3 });// provide launchMode: 2 to open the Offerwall in a webkit view that is embedded in the app
49
+
50
+ ```
51
+ </details>
52
+
53
+
54
+
55
+ </br>
56
+ <details>
57
+ <summary><strong>Deeplinking Routes</strong></summary>
58
+
59
+
60
+ </br>
61
+
62
+ ##### Min SDK version required: v1.1.6
63
+
64
+ </br>
65
+
66
+ The Tyrads SDK supports deeplinking to specific sections of the offerwall. When initializing or interacting with the SDK, you can specify a route to open a particular page. For campaign-specific routes, you'll need to provide the campaignID as well.
67
+
68
+ Available routes and their usage:
69
+ - `campaigns` - opens the Campaigns Page
70
+ - `campaigns-activated` - opens the Activated Campaigns Page
71
+ - `campaign-details` - opens the Campaign Details Page (requires campaignID)
72
+ - `campaign-tickets` - opens the Campaign Tickets Page (requires campaignID)
73
+
74
+ ```js
75
+
76
+ // Default route (Campaigns Page)
77
+ Tyrads.showOffers();
78
+
79
+ // Explicitly specifying the Campaigns Page
80
+ Tyrads.showOffers({ route: "campaigns" });
81
+
82
+ // Activated Campaigns Page
83
+ Tyrads.showOffers({ route: "campaigns-activated" });
84
+
85
+ // Campaign Details Page (requires campaignID)
86
+ Tyrads.showOffers({ route: "campaign-details", campaignID: "your_campaign_id_here" });
87
+
88
+ // Campaign Tickets Page (requires campaignID)
89
+ Tyrads.showOffers({ route: "campaign-tickets", campaignID: "your_campaign_id_here" });
90
+
91
+ ```
92
+ </details>
93
+
94
+ </br></br>
95
+