@appzung/react-native-code-push 10.0.0-rc1 → 10.0.1

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 (322) hide show
  1. package/CodePush.podspec +1 -0
  2. package/LICENSE.md +2 -2
  3. package/README.md +74 -95
  4. package/android/app/build.gradle +62 -18
  5. package/android/app/src/main/AndroidManifest.xml +2 -3
  6. package/android/app/src/main/AndroidManifestNew.xml +3 -0
  7. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePush.java +21 -89
  8. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java +32 -3
  9. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateManager.java +2 -2
  10. package/android/build.gradle +1 -11
  11. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  12. package/android/gradle.properties +4 -20
  13. package/docs/advanced-usage.md +2 -2
  14. package/docs/api-android.md +12 -10
  15. package/docs/api-ios.md +5 -5
  16. package/docs/api-js.md +180 -178
  17. package/docs/code-signing.md +62 -0
  18. package/docs/migrating-to-v10.md +31 -0
  19. package/docs/setup-android.md +52 -79
  20. package/docs/setup-ios.md +31 -28
  21. package/docs/setup-windows.md +1 -0
  22. package/ios/CodePush/CodePush.m +13 -57
  23. package/lib/commonjs/CodePush.js +90 -0
  24. package/lib/commonjs/CodePush.js.map +1 -0
  25. package/lib/commonjs/allowRestart.js +12 -0
  26. package/lib/commonjs/allowRestart.js.map +1 -0
  27. package/lib/commonjs/checkForUpdates.js +105 -0
  28. package/lib/commonjs/checkForUpdates.js.map +1 -0
  29. package/lib/commonjs/clearUpdates.js +15 -0
  30. package/lib/commonjs/clearUpdates.js.map +1 -0
  31. package/lib/commonjs/disallowRestart.js +12 -0
  32. package/lib/commonjs/disallowRestart.js.map +1 -0
  33. package/lib/commonjs/enums/CheckFrequency.enum.js +25 -0
  34. package/lib/commonjs/enums/CheckFrequency.enum.js.map +1 -0
  35. package/lib/commonjs/enums/DeploymentStatus.enum.js +21 -0
  36. package/lib/commonjs/enums/DeploymentStatus.enum.js.map +1 -0
  37. package/lib/commonjs/enums/InstallMode.enum.js +35 -0
  38. package/lib/commonjs/enums/InstallMode.enum.js.map +1 -0
  39. package/lib/commonjs/enums/SyncStatus.enum.js +53 -0
  40. package/lib/commonjs/enums/SyncStatus.enum.js.map +1 -0
  41. package/lib/commonjs/enums/UpdateState.enum.js +29 -0
  42. package/lib/commonjs/enums/UpdateState.enum.js.map +1 -0
  43. package/lib/commonjs/getUpdateMetadata.js +25 -0
  44. package/lib/commonjs/getUpdateMetadata.js.map +1 -0
  45. package/lib/commonjs/index.js +195 -0
  46. package/lib/commonjs/index.js.map +1 -0
  47. package/lib/commonjs/internals/AcquisitionSdk.js +9 -0
  48. package/lib/commonjs/internals/AcquisitionSdk.js.map +1 -0
  49. package/lib/commonjs/internals/LocalPackageImplementation.js +29 -0
  50. package/lib/commonjs/internals/LocalPackageImplementation.js.map +1 -0
  51. package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js +8 -0
  52. package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js.map +1 -0
  53. package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js +6 -0
  54. package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
  55. package/lib/commonjs/internals/RemotePackageImplementation.js +49 -0
  56. package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -0
  57. package/lib/commonjs/internals/getConfiguration.js +15 -0
  58. package/lib/commonjs/internals/getConfiguration.js.map +1 -0
  59. package/lib/commonjs/internals/getCurrentPackage.js +12 -0
  60. package/lib/commonjs/internals/getCurrentPackage.js.map +1 -0
  61. package/lib/commonjs/internals/getPromisifiedSdk.js +49 -0
  62. package/lib/commonjs/internals/getPromisifiedSdk.js.map +1 -0
  63. package/lib/commonjs/internals/shouldUpdateBeIgnored.js +62 -0
  64. package/lib/commonjs/internals/shouldUpdateBeIgnored.js.map +1 -0
  65. package/lib/commonjs/internals/types.js +6 -0
  66. package/lib/commonjs/internals/types.js.map +1 -0
  67. package/lib/commonjs/internals/utils/log.js +11 -0
  68. package/lib/commonjs/internals/utils/log.js.map +1 -0
  69. package/lib/commonjs/internals/utils/request-fetch-adapter.js +50 -0
  70. package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +1 -0
  71. package/lib/commonjs/internals/version.js +9 -0
  72. package/lib/commonjs/internals/version.js.map +1 -0
  73. package/lib/commonjs/notifyAppReady.js +83 -0
  74. package/lib/commonjs/notifyAppReady.js.map +1 -0
  75. package/lib/commonjs/reactNative.d.js +2 -0
  76. package/lib/commonjs/reactNative.d.js.map +1 -0
  77. package/lib/commonjs/restartApp.js +16 -0
  78. package/lib/commonjs/restartApp.js.map +1 -0
  79. package/lib/commonjs/sync.js +219 -0
  80. package/lib/commonjs/sync.js.map +1 -0
  81. package/lib/commonjs/types.js +6 -0
  82. package/lib/commonjs/types.js.map +1 -0
  83. package/lib/module/CodePush.js +84 -0
  84. package/lib/module/CodePush.js.map +1 -0
  85. package/lib/module/allowRestart.js +9 -0
  86. package/lib/module/allowRestart.js.map +1 -0
  87. package/lib/module/checkForUpdates.js +101 -0
  88. package/lib/module/checkForUpdates.js.map +1 -0
  89. package/lib/module/clearUpdates.js +12 -0
  90. package/lib/module/clearUpdates.js.map +1 -0
  91. package/lib/module/disallowRestart.js +9 -0
  92. package/lib/module/disallowRestart.js.map +1 -0
  93. package/lib/module/enums/CheckFrequency.enum.js +21 -0
  94. package/lib/module/enums/CheckFrequency.enum.js.map +1 -0
  95. package/lib/module/enums/DeploymentStatus.enum.js +17 -0
  96. package/lib/module/enums/DeploymentStatus.enum.js.map +1 -0
  97. package/lib/module/enums/InstallMode.enum.js +32 -0
  98. package/lib/module/enums/InstallMode.enum.js.map +1 -0
  99. package/lib/module/enums/SyncStatus.enum.js +49 -0
  100. package/lib/module/enums/SyncStatus.enum.js.map +1 -0
  101. package/lib/module/enums/UpdateState.enum.js +26 -0
  102. package/lib/module/enums/UpdateState.enum.js.map +1 -0
  103. package/lib/module/getUpdateMetadata.js +21 -0
  104. package/lib/module/getUpdateMetadata.js.map +1 -0
  105. package/lib/module/index.js +19 -0
  106. package/lib/module/index.js.map +1 -0
  107. package/lib/module/internals/AcquisitionSdk.js +5 -0
  108. package/lib/module/internals/AcquisitionSdk.js.map +1 -0
  109. package/lib/module/internals/LocalPackageImplementation.js +24 -0
  110. package/lib/module/internals/LocalPackageImplementation.js.map +1 -0
  111. package/lib/module/internals/NativeRNAppZungCodePushModule.js +4 -0
  112. package/lib/module/internals/NativeRNAppZungCodePushModule.js.map +1 -0
  113. package/lib/module/internals/RNAppZungCodePushModuleSpec.js +4 -0
  114. package/lib/module/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
  115. package/lib/module/internals/RemotePackageImplementation.js +44 -0
  116. package/lib/module/internals/RemotePackageImplementation.js.map +1 -0
  117. package/lib/module/internals/getConfiguration.js +11 -0
  118. package/lib/module/internals/getConfiguration.js.map +1 -0
  119. package/lib/module/internals/getCurrentPackage.js +8 -0
  120. package/lib/module/internals/getCurrentPackage.js.map +1 -0
  121. package/lib/module/internals/getPromisifiedSdk.js +45 -0
  122. package/lib/module/internals/getPromisifiedSdk.js.map +1 -0
  123. package/lib/module/internals/shouldUpdateBeIgnored.js +58 -0
  124. package/lib/module/internals/shouldUpdateBeIgnored.js.map +1 -0
  125. package/lib/module/internals/types.js +4 -0
  126. package/lib/module/internals/types.js.map +1 -0
  127. package/lib/module/internals/utils/log.js +7 -0
  128. package/lib/module/internals/utils/log.js.map +1 -0
  129. package/lib/module/internals/utils/request-fetch-adapter.js +46 -0
  130. package/lib/module/internals/utils/request-fetch-adapter.js.map +1 -0
  131. package/lib/module/internals/version.js +5 -0
  132. package/lib/module/internals/version.js.map +1 -0
  133. package/lib/module/notifyAppReady.js +79 -0
  134. package/lib/module/notifyAppReady.js.map +1 -0
  135. package/lib/module/reactNative.d.js +2 -0
  136. package/lib/module/reactNative.d.js.map +1 -0
  137. package/lib/module/restartApp.js +13 -0
  138. package/lib/module/restartApp.js.map +1 -0
  139. package/lib/module/sync.js +215 -0
  140. package/lib/module/sync.js.map +1 -0
  141. package/lib/module/types.js +4 -0
  142. package/lib/module/types.js.map +1 -0
  143. package/lib/typescript/commonjs/package.json +1 -0
  144. package/lib/typescript/commonjs/src/CodePush.d.ts +24 -0
  145. package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/src/allowRestart.d.ts +5 -0
  147. package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/src/checkForUpdates.d.ts +9 -0
  149. package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/src/clearUpdates.d.ts +8 -0
  151. package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/src/disallowRestart.d.ts +5 -0
  153. package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +18 -0
  155. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +14 -0
  157. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +27 -0
  159. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +46 -0
  161. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +21 -0
  163. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts +9 -0
  165. package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/src/index.d.ts +17 -0
  167. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +3 -0
  169. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts +17 -0
  171. package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
  173. package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
  175. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +18 -0
  177. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +3 -0
  179. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts +2 -0
  181. package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +13 -0
  183. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
  185. package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/src/internals/types.d.ts +16 -0
  187. package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/src/internals/utils/log.d.ts +2 -0
  189. package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +3 -0
  191. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/src/internals/version.d.ts +2 -0
  193. package/lib/typescript/commonjs/src/internals/version.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/src/notifyAppReady.d.ts +6 -0
  195. package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/src/restartApp.d.ts +7 -0
  197. package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/src/sync.d.ts +17 -0
  199. package/lib/typescript/commonjs/src/sync.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/src/types.d.ts +196 -0
  201. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  202. package/lib/typescript/module/package.json +1 -0
  203. package/lib/typescript/module/src/CodePush.d.ts +24 -0
  204. package/lib/typescript/module/src/CodePush.d.ts.map +1 -0
  205. package/lib/typescript/module/src/allowRestart.d.ts +5 -0
  206. package/lib/typescript/module/src/allowRestart.d.ts.map +1 -0
  207. package/lib/typescript/module/src/checkForUpdates.d.ts +9 -0
  208. package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -0
  209. package/lib/typescript/module/src/clearUpdates.d.ts +8 -0
  210. package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -0
  211. package/lib/typescript/module/src/disallowRestart.d.ts +5 -0
  212. package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -0
  213. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +18 -0
  214. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts.map +1 -0
  215. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +14 -0
  216. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
  217. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +27 -0
  218. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -0
  219. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +46 -0
  220. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts.map +1 -0
  221. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +21 -0
  222. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -0
  223. package/lib/typescript/module/src/getUpdateMetadata.d.ts +9 -0
  224. package/lib/typescript/module/src/getUpdateMetadata.d.ts.map +1 -0
  225. package/lib/typescript/module/src/index.d.ts +17 -0
  226. package/lib/typescript/module/src/index.d.ts.map +1 -0
  227. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +3 -0
  228. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +1 -0
  229. package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts +17 -0
  230. package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts.map +1 -0
  231. package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
  232. package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
  233. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
  234. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
  235. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +18 -0
  236. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -0
  237. package/lib/typescript/module/src/internals/getConfiguration.d.ts +3 -0
  238. package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -0
  239. package/lib/typescript/module/src/internals/getCurrentPackage.d.ts +2 -0
  240. package/lib/typescript/module/src/internals/getCurrentPackage.d.ts.map +1 -0
  241. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +13 -0
  242. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +1 -0
  243. package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
  244. package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
  245. package/lib/typescript/module/src/internals/types.d.ts +16 -0
  246. package/lib/typescript/module/src/internals/types.d.ts.map +1 -0
  247. package/lib/typescript/module/src/internals/utils/log.d.ts +2 -0
  248. package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -0
  249. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +3 -0
  250. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
  251. package/lib/typescript/module/src/internals/version.d.ts +2 -0
  252. package/lib/typescript/module/src/internals/version.d.ts.map +1 -0
  253. package/lib/typescript/module/src/notifyAppReady.d.ts +6 -0
  254. package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -0
  255. package/lib/typescript/module/src/restartApp.d.ts +7 -0
  256. package/lib/typescript/module/src/restartApp.d.ts.map +1 -0
  257. package/lib/typescript/module/src/sync.d.ts +17 -0
  258. package/lib/typescript/module/src/sync.d.ts.map +1 -0
  259. package/lib/typescript/module/src/types.d.ts +196 -0
  260. package/lib/typescript/module/src/types.d.ts.map +1 -0
  261. package/package.json +58 -11
  262. package/react-native.config.js +8 -8
  263. package/src/CodePush.tsx +108 -0
  264. package/src/allowRestart.ts +6 -0
  265. package/src/checkForUpdates.ts +109 -0
  266. package/src/clearUpdates.ts +9 -0
  267. package/src/disallowRestart.ts +6 -0
  268. package/src/enums/CheckFrequency.enum.ts +19 -0
  269. package/src/enums/DeploymentStatus.enum.ts +14 -0
  270. package/src/enums/InstallMode.enum.ts +31 -0
  271. package/src/enums/SyncStatus.enum.ts +53 -0
  272. package/src/enums/UpdateState.enum.ts +24 -0
  273. package/src/getUpdateMetadata.ts +23 -0
  274. package/src/index.ts +18 -0
  275. package/src/internals/AcquisitionSdk.ts +3 -0
  276. package/src/internals/LocalPackageImplementation.ts +45 -0
  277. package/src/internals/NativeRNAppZungCodePushModule.ts +3 -0
  278. package/src/internals/RNAppZungCodePushModuleSpec.ts +54 -0
  279. package/src/internals/RemotePackageImplementation.ts +69 -0
  280. package/src/internals/getConfiguration.ts +12 -0
  281. package/src/internals/getCurrentPackage.ts +6 -0
  282. package/src/internals/getPromisifiedSdk.ts +72 -0
  283. package/src/internals/shouldUpdateBeIgnored.ts +76 -0
  284. package/src/internals/types.ts +18 -0
  285. package/{logging.js → src/internals/utils/log.ts} +1 -3
  286. package/src/internals/utils/request-fetch-adapter.ts +58 -0
  287. package/src/internals/version.ts +2 -0
  288. package/src/notifyAppReady.ts +94 -0
  289. package/src/reactNative.d.ts +34 -0
  290. package/src/restartApp.ts +10 -0
  291. package/src/sync.ts +272 -0
  292. package/src/types.ts +237 -0
  293. package/tsconfig.build.json +4 -0
  294. package/tsconfig.json +29 -12
  295. package/AlertAdapter.js +0 -24
  296. package/CONTRIBUTING.md +0 -134
  297. package/CodePush.js +0 -674
  298. package/android/app/.gradle/config.properties +0 -2
  299. package/android/app/local.properties +0 -8
  300. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
  301. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +0 -102
  302. package/package-mixins.js +0 -68
  303. package/request-fetch-adapter.js +0 -52
  304. package/tslint.json +0 -32
  305. package/typings/react-native-code-push.d.ts +0 -455
  306. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushConstants.java +0 -0
  307. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInstallMode.java +0 -0
  308. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidPublicKeyException.java +0 -0
  309. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidUpdateException.java +0 -0
  310. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushMalformedDataException.java +0 -0
  311. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNotInitializedException.java +0 -0
  312. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushTelemetryManager.java +0 -0
  313. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUnknownException.java +0 -0
  314. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateState.java +0 -0
  315. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateUtils.java +0 -0
  316. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUtils.java +0 -0
  317. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgress.java +0 -0
  318. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgressCallback.java +0 -0
  319. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/FileUtils.java +0 -0
  320. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/ReactInstanceHolder.java +0 -0
  321. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/SettingsManager.java +0 -0
  322. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/TLSSocketFactory.java +0 -0
@@ -5,7 +5,6 @@ import android.content.SharedPreferences;
5
5
  import android.os.AsyncTask;
6
6
  import android.os.Handler;
7
7
  import android.os.Looper;
8
- import android.provider.Settings;
9
8
  import android.view.View;
10
9
 
11
10
  import com.facebook.react.ReactApplication;
@@ -20,9 +19,11 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
20
19
  import com.facebook.react.bridge.ReactMethod;
21
20
  import com.facebook.react.bridge.ReadableMap;
22
21
  import com.facebook.react.bridge.WritableMap;
22
+ import com.facebook.react.devsupport.interfaces.DevSupportManager;
23
23
  import com.facebook.react.modules.core.ChoreographerCompat;
24
24
  import com.facebook.react.modules.core.DeviceEventManagerModule;
25
25
  import com.facebook.react.modules.core.ReactChoreographer;
26
+ import com.facebook.react.modules.debug.interfaces.DeveloperSettings;
26
27
 
27
28
  import org.json.JSONArray;
28
29
  import org.json.JSONException;
@@ -30,6 +31,7 @@ import org.json.JSONObject;
30
31
 
31
32
  import java.io.IOException;
32
33
  import java.lang.reflect.Field;
34
+ import java.lang.reflect.Method;
33
35
  import java.util.ArrayList;
34
36
  import java.util.Date;
35
37
  import java.util.HashMap;
@@ -132,10 +134,17 @@ public class CodePushNativeModule extends ReactContextBaseJavaModule {
132
134
  private void loadBundle() {
133
135
  clearLifecycleEventListener();
134
136
  try {
135
- mCodePush.clearDebugCacheIfNeeded(resolveInstanceManager());
137
+ DevSupportManager devSupportManager = null;
138
+ ReactInstanceManager reactInstanceManager = resolveInstanceManager();
139
+ if (reactInstanceManager != null) {
140
+ devSupportManager = reactInstanceManager.getDevSupportManager();
141
+ }
142
+ boolean isLiveReloadEnabled = isLiveReloadEnabled(devSupportManager);
143
+
144
+ mCodePush.clearDebugCacheIfNeeded(isLiveReloadEnabled);
136
145
  } catch(Exception e) {
137
146
  // If we got error in out reflection we should clear debug cache anyway.
138
- mCodePush.clearDebugCacheIfNeeded(null);
147
+ mCodePush.clearDebugCacheIfNeeded(false);
139
148
  }
140
149
 
141
150
  try {
@@ -179,6 +188,26 @@ public class CodePushNativeModule extends ReactContextBaseJavaModule {
179
188
  }
180
189
  }
181
190
 
191
+ private boolean isLiveReloadEnabled(DevSupportManager devSupportManager) {
192
+ if (devSupportManager == null) {
193
+ return false;
194
+ }
195
+
196
+ DeveloperSettings devSettings = devSupportManager.getDevSettings();
197
+ Method[] methods = devSettings.getClass().getMethods();
198
+ for (Method m : methods) {
199
+ if (m.getName().equals("isReloadOnJSChangeEnabled")) {
200
+ try {
201
+ return (boolean) m.invoke(devSettings);
202
+ } catch (Exception x) {
203
+ return false;
204
+ }
205
+ }
206
+ }
207
+
208
+ return false;
209
+ }
210
+
182
211
  // This workaround has been implemented in order to fix https://github.com/facebook/react-native/issues/14533
183
212
  // resetReactRootViews allows to call recreateReactContextInBackground without any exceptions
184
213
  // This fix also relates to https://github.com/microsoft/react-native-code-push/issues/878
@@ -278,8 +278,8 @@ public class CodePushUpdateManager {
278
278
  throw new CodePushInvalidUpdateException(
279
279
  "Error! Public key was provided but there is no JWT signature within app bundle to verify. " +
280
280
  "Possible reasons, why that might happen: \n" +
281
- "1. You've been released CodePush bundle update using version of CodePush CLI that is not support code signing.\n" +
282
- "2. You've been released CodePush bundle update without providing --privateKeyPath option."
281
+ "1. You released a CodePush bundle update using version of CodePush CLI that does not support code signing.\n" +
282
+ "2. You released a CodePush bundle update without providing --privateKeyPath option."
283
283
  );
284
284
  }
285
285
  } else {
@@ -6,19 +6,9 @@ buildscript {
6
6
  mavenCentral()
7
7
  }
8
8
  dependencies {
9
- classpath 'com.android.tools.build:gradle:1.3.0'
9
+ classpath "com.android.tools.build:gradle:7.2.1"
10
10
 
11
11
  // NOTE: Do not place your application dependencies here; they belong
12
12
  // in the individual module build.gradle files
13
13
  }
14
14
  }
15
-
16
- allprojects {
17
- android {
18
- namespace "com.appzung.codepush.react"
19
- }
20
- repositories {
21
- mavenLocal()
22
- mavenCentral()
23
- }
24
- }
@@ -1,5 +1,5 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
3
4
  zipStoreBase=GRADLE_USER_HOME
4
5
  zipStorePath=wrapper/dists
5
- distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
@@ -1,20 +1,4 @@
1
- # Project-wide Gradle settings.
2
-
3
- # IDE (e.g. Android Studio) users:
4
- # Gradle settings configured through the IDE *will override*
5
- # any settings specified in this file.
6
-
7
- # For more details on how to configure your build environment visit
8
- # http://www.gradle.org/docs/current/userguide/build_environment.html
9
-
10
- # Specifies the JVM arguments used for the daemon process.
11
- # The setting is particularly useful for tweaking memory settings.
12
- # Default value: -Xmx10248m -XX:MaxPermSize=256m
13
- # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14
-
15
- # When configured, Gradle will run in incubating parallel mode.
16
- # This option should only be used with decoupled projects. More details, visit
17
- # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
- # org.gradle.parallel=true
19
-
20
- android.useDeprecatedNdk=true
1
+ CodePush_minSdkVersion=16
2
+ CodePush_targetSdkVersion=31
3
+ CodePush_compileSdkVersion=31
4
+ # CodePush_development=true # enable this when developing on the module outside a React Native app
@@ -32,7 +32,7 @@ In the case where you have a `QA` environment that is completely iso-prod (meani
32
32
  2. Let QA test the build
33
33
  3. Promote the tested release from `QA` to `Production` using the `appzung releases promote` command
34
34
 
35
- *NOTE: If you want to take a more cautious approach, you can even choose to perform a "staged rollout" as part of #3, which allows you to mitigate additional potential risk with the update (like did your testing in #2 touch all possible devices/conditions?) by only making the production update available to a percentage of your users (for example `appzung releases promote -r 20`). Then, after waiting for a reasonable amount of time to see if any crash reports or customer feedback comes in, you can expand it to your entire audience by running `appzung releases edit -r 100`.*
35
+ _NOTE: If you want to take a more cautious approach, you can even choose to perform a "staged rollout" as part of #3, which allows you to mitigate additional potential risk with the update (like did your testing in #2 touch all possible devices/conditions?) by only making the production update available to a percentage of your users (for example `appzung releases promote -r 20`). Then, after waiting for a reasonable amount of time to see if any crash reports or customer feedback comes in, you can expand it to your entire audience by running `appzung releases edit -r 100`._
36
36
 
37
37
  ### Dynamic release channel assignment
38
38
 
@@ -51,6 +51,6 @@ With that change in place, now it's just a matter of choosing how your app deter
51
51
  1. Expose a user-visible mechanism for changing release channels at any time. For example, your settings page could have a toggle for enabling "beta" access. This model works well if you're not concerned with the privacy of your pre-production updates, and you have power users that may want to opt-in to earlier (and potentially buggy) updates at their own will (kind of like Chrome channels). However, this solution puts the decision in the hands of your users, which doesn't help you perform A/B tests transparently.
52
52
  2. Annotate the server-side profile of your users with an additional piece of metadata that indicates the release channel they should sync with. By default, your app could just use the binary-embedded key, but after a user has authenticated, your server can choose to "redirect" them to a different release channel, which allows you to incrementally place certain users or groups in different release channels as needed. You could even choose to store the server-response in local storage so that it becomes the new default. How you store the key alongside your user's profiles is entirely up to your authentication solution (for example Auth0, Firebase, custom DB + REST API), but is generally pretty trivial to do.
53
53
 
54
- *NOTE: If needed, you could also implement a hybrid solution that allowed your end-users to toggle between different release channels, while also allowing your server to override that decision. This way, you have a hierarchy of "release channel resolution" that ensures your app has the ability to update itself out-of-the-box, your end users can feel rewarded by getting early access to bits, but you also have the ability to run A/B tests on your users as needed.*
54
+ _NOTE: If needed, you could also implement a hybrid solution that allowed your end-users to toggle between different release channels, while also allowing your server to override that decision. This way, you have a hierarchy of "release channel resolution" that ensures your app has the ability to update itself out-of-the-box, your end users can feel rewarded by getting early access to bits, but you also have the ability to run A/B tests on your users as needed._
55
55
 
56
56
  Are you using dynamic release channel assignments? Contact us at hello@appzung.com so that we may provide better integration.
@@ -2,19 +2,21 @@
2
2
 
3
3
  You can customize CodePush by placing these values in string resources.
4
4
 
5
- * __Release channel Public ID__ - The default release channel's **public ID** that will be used to check updates. For example:
6
- ```xml
7
- <string moduleConfig="true" name="CodePushReleaseChannelPublicId">sU0Eikse9JFCDLZmAT-_lUSwDWACrSGgTKCXyWqcE0</string>
8
- ```
5
+ - **Release channel Public ID** - The default release channel's **public ID** that will be used to check updates. For example:
9
6
 
10
- * __Public Key__ - used for bundle verification in the Code Signing Feature. Please refer to [Code Signing](setup-android.md#code-signing-setup) section for more details about the Code Signing Feature.
7
+ ```xml
8
+ <string moduleConfig="true" name="CodePushReleaseChannelPublicId">sU0Eikse9JFCDLZmAT-_lUSwDWACrSGgTKCXyWqcE0</string>
9
+ ```
10
+
11
+ - **Public Key** - used for bundle verification in the Code Signing Feature. Please refer to [Code Signing](setup-android.md#code-signing-setup) section for more details about the Code Signing Feature.
11
12
  To set the public key, you should add the content of the public key to `strings.xml` with name `CodePushSigningPublicKey`. CodePush automatically gets this property and enables the Code Signing feature. For example:
13
+
12
14
  ```xml
13
15
  <string moduleConfig="true" name="CodePushSigningPublicKey">your-public-key</string>
14
16
  ```
15
17
 
16
- * __Server Url__ - used for specifying CodePush Server Url (as an Enterprise customer we may setup a custom infra for your needs).
17
- The Default value: "https://codepush.appzung.com/" is overridden by adding your path to `strings.xml` with name `CodePushServerUrl`. CodePush automatically gets this property and will use this path to send requests. For example:
18
- ```xml
19
- <string moduleConfig="true" name="CodePushServerUrl">https://codepush.yourdomain.com</string>
20
- ```
18
+ - **Server Url** - used for specifying CodePush Server Url (as an Enterprise customer we may setup a custom infra for your needs).
19
+ The Default value: "https://codepush.appzung.com/" is overridden by adding your path to `strings.xml` with name `CodePushServerUrl`. CodePush automatically gets this property and will use this path to send requests. For example:
20
+ ```xml
21
+ <string moduleConfig="true" name="CodePushServerUrl">https://codepush.yourdomain.com</string>
22
+ ```
package/docs/api-ios.md CHANGED
@@ -8,12 +8,12 @@ Contains static methods for retrieving the `NSURL` that represents the most rece
8
8
 
9
9
  #### Methods
10
10
 
11
- - __(NSURL \*)bundleURL__ - Returns the most recent JS bundle `NSURL` as described above. This method assumes that the name of the JS bundle contained within your app binary is `main.jsbundle`.
11
+ - **(NSURL \*)bundleURL** - Returns the most recent JS bundle `NSURL` as described above. This method assumes that the name of the JS bundle contained within your app binary is `main.jsbundle`.
12
12
 
13
- - __(NSURL \*)bundleURLForResource:(NSString \*)resourceName__ - Equivalent to the `bundleURL` method, but also allows customizing the name of the JS bundle that is looked for within the app binary. This is useful if you aren't naming this file `main` (which is the default convention). This method assumes that the JS bundle's extension is `*.jsbundle`.
13
+ - **(NSURL \*)bundleURLForResource:(NSString \*)resourceName** - Equivalent to the `bundleURL` method, but also allows customizing the name of the JS bundle that is looked for within the app binary. This is useful if you aren't naming this file `main` (which is the default convention). This method assumes that the JS bundle's extension is `*.jsbundle`.
14
14
 
15
- - __(NSURL \*)bundleURLForResource:(NSString \*)resourceName withExtension:(NSString \*)resourceExtension__: Equivalent to the `bundleURLForResource:` method, but also allows customizing the extension used by the JS bundle that is looked for within the app binary. This is useful if you aren't naming this file `*.jsbundle` (which is the default convention).
15
+ - **(NSURL \*)bundleURLForResource:(NSString \*)resourceName withExtension:(NSString \*)resourceExtension**: Equivalent to the `bundleURLForResource:` method, but also allows customizing the extension used by the JS bundle that is looked for within the app binary. This is useful if you aren't naming this file `*.jsbundle` (which is the default convention).
16
16
 
17
- - __(void)overrideAppVersion:(NSString \*)appVersionOverride__ - Sets the version of the application's binary interface, which would otherwise default to the App Store version specified as the `CFBundleShortVersionString` in the `Info.plist`. This should be called a single time, before the bundle URL is loaded.
17
+ - **(void)overrideAppVersion:(NSString \*)appVersionOverride** - Sets the version of the application's binary interface, which would otherwise default to the App Store version specified as the `CFBundleShortVersionString` in the `Info.plist`. This should be called a single time, before the bundle URL is loaded.
18
18
 
19
- - __(void)setReleaseChannelPublicId:(NSString \*)releaseChannelPublicId__ - Sets the release channel public ID that the app should use when querying for updates. This is a dynamic alternative to setting the release channel in your `Info.plist` and/or specifying a release channel in JS when calling `checkForUpdate` or `sync`.
19
+ - **(void)setReleaseChannelPublicId:(NSString \*)releaseChannelPublicId** - Sets the release channel public ID that the app should use when querying for updates. This is a dynamic alternative to setting the release channel in your `Info.plist` and/or specifying a release channel in JS when calling `checkForUpdate` or `sync`.