expo-targets 0.3.0 → 0.3.2

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 (355) hide show
  1. package/README.md +5 -4
  2. package/android/build.gradle +4 -0
  3. package/android/src/main/AndroidManifest.xml +11 -0
  4. package/android/src/main/java/expo/modules/targets/extension/ExpoTargetsActivityHolder.kt +37 -0
  5. package/android/src/main/java/expo/modules/targets/extension/ExpoTargetsExtensionModule.kt +59 -8
  6. package/android/src/main/java/expo/modules/targets/extension/ExpoTargetsHarnessActivity.kt +28 -0
  7. package/android/src/main/java/expo/modules/targets/extension/ExpoTargetsReactTargetActivity.kt +123 -0
  8. package/android/src/main/java/expo/modules/targets/extension/ExpoTargetsSharedIntent.kt +89 -0
  9. package/android/src/main/java/expo/modules/targets/extension/ExpoTargetsTargetActivity.kt +363 -0
  10. package/android/src/main/java/expo/modules/targets/liveActivity/ExpoTargetsLiveActivityModule.kt +153 -0
  11. package/android/src/main/java/expo/modules/targets/notification/ExpoTargetsNotificationModule.kt +134 -0
  12. package/android/src/main/java/expo/modules/targets/notification/ExpoTargetsNotificationRouter.kt +192 -0
  13. package/android/src/main/java/expo/modules/targets/notification/ExpoTargetsNotificationService.kt +92 -0
  14. package/android/src/main/java/expo/modules/targets/storage/ExpoTargetsStorageModule.kt +127 -42
  15. package/android/src/main/java/expo/modules/targets/system/ExpoTargetsAutofillService.kt +28 -0
  16. package/android/src/main/java/expo/modules/targets/system/ExpoTargetsCallScreeningService.kt +47 -0
  17. package/android/src/main/java/expo/modules/targets/system/ExpoTargetsDocumentsProvider.kt +148 -0
  18. package/android/src/main/java/expo/modules/targets/system/ExpoTargetsFileProviderUiActivity.kt +47 -0
  19. package/android/src/main/java/expo/modules/targets/system/ExpoTargetsInputMethodService.kt +41 -0
  20. package/android/src/main/java/expo/modules/targets/system/ExpoTargetsPrintService.kt +34 -0
  21. package/android/src/main/java/expo/modules/targets/system/ExpoTargetsVpnService.kt +32 -0
  22. package/android/src/main/res/layout/expo_targets_notification_content.xml +29 -0
  23. package/android/src/main/res/xml/expo_targets_autofill_service.xml +3 -0
  24. package/android/src/main/res/xml/expo_targets_method.xml +9 -0
  25. package/android/src/main/res/xml/expo_targets_print_service.xml +4 -0
  26. package/build/metro/src/withTargets.d.ts.map +1 -1
  27. package/build/metro/src/withTargets.js +37 -11
  28. package/build/metro/src/withTargets.js.map +1 -1
  29. package/build/plugin/src/android/activationMime.d.ts +12 -0
  30. package/build/plugin/src/android/activationMime.d.ts.map +1 -0
  31. package/build/plugin/src/android/activationMime.js +47 -0
  32. package/build/plugin/src/android/activationMime.js.map +1 -0
  33. package/build/plugin/src/android/resolveUserClass.d.ts +14 -0
  34. package/build/plugin/src/android/resolveUserClass.d.ts.map +1 -0
  35. package/build/plugin/src/android/resolveUserClass.js +48 -0
  36. package/build/plugin/src/android/resolveUserClass.js.map +1 -0
  37. package/build/plugin/src/android/targetSourceSets.d.ts +9 -0
  38. package/build/plugin/src/android/targetSourceSets.d.ts.map +1 -0
  39. package/build/plugin/src/android/targetSourceSets.js +90 -0
  40. package/build/plugin/src/android/targetSourceSets.js.map +1 -0
  41. package/build/plugin/src/android/withAndroidNotification.d.ts +12 -0
  42. package/build/plugin/src/android/withAndroidNotification.d.ts.map +1 -0
  43. package/build/plugin/src/android/withAndroidNotification.js +192 -0
  44. package/build/plugin/src/android/withAndroidNotification.js.map +1 -0
  45. package/build/plugin/src/android/withAndroidShareAction.d.ts +11 -0
  46. package/build/plugin/src/android/withAndroidShareAction.d.ts.map +1 -0
  47. package/build/plugin/src/android/withAndroidShareAction.js +172 -0
  48. package/build/plugin/src/android/withAndroidShareAction.js.map +1 -0
  49. package/build/plugin/src/android/withAndroidSystemService.d.ts +12 -0
  50. package/build/plugin/src/android/withAndroidSystemService.d.ts.map +1 -0
  51. package/build/plugin/src/android/withAndroidSystemService.js +332 -0
  52. package/build/plugin/src/android/withAndroidSystemService.js.map +1 -0
  53. package/build/plugin/src/android/withAndroidTarget.d.ts +2 -1
  54. package/build/plugin/src/android/withAndroidTarget.d.ts.map +1 -1
  55. package/build/plugin/src/android/withAndroidTarget.js +25 -3
  56. package/build/plugin/src/android/withAndroidTarget.js.map +1 -1
  57. package/build/plugin/src/android/withAndroidTargetsConfig.d.ts +9 -0
  58. package/build/plugin/src/android/withAndroidTargetsConfig.d.ts.map +1 -0
  59. package/build/plugin/src/android/withAndroidTargetsConfig.js +52 -0
  60. package/build/plugin/src/android/withAndroidTargetsConfig.js.map +1 -0
  61. package/build/plugin/src/codegen/collectRuntimeConfigs.d.ts +3 -0
  62. package/build/plugin/src/codegen/collectRuntimeConfigs.d.ts.map +1 -1
  63. package/build/plugin/src/codegen/collectRuntimeConfigs.js.map +1 -1
  64. package/build/plugin/src/codegen/index.d.ts +1 -1
  65. package/build/plugin/src/codegen/index.d.ts.map +1 -1
  66. package/build/plugin/src/codegen/index.js +2 -1
  67. package/build/plugin/src/codegen/index.js.map +1 -1
  68. package/build/plugin/src/codegen/typedTargets.d.ts +11 -1
  69. package/build/plugin/src/codegen/typedTargets.d.ts.map +1 -1
  70. package/build/plugin/src/codegen/typedTargets.js +102 -12
  71. package/build/plugin/src/codegen/typedTargets.js.map +1 -1
  72. package/build/plugin/src/config.d.ts +37 -6
  73. package/build/plugin/src/config.d.ts.map +1 -1
  74. package/build/plugin/src/config.js.map +1 -1
  75. package/build/plugin/src/domain/characteristics.d.ts +8 -0
  76. package/build/plugin/src/domain/characteristics.d.ts.map +1 -1
  77. package/build/plugin/src/domain/characteristics.js +81 -10
  78. package/build/plugin/src/domain/characteristics.js.map +1 -1
  79. package/build/plugin/src/domain/index.d.ts +1 -1
  80. package/build/plugin/src/domain/index.d.ts.map +1 -1
  81. package/build/plugin/src/domain/index.js.map +1 -1
  82. package/build/plugin/src/ios/apply/podfile/podfile.d.ts.map +1 -1
  83. package/build/plugin/src/ios/apply/podfile/podfile.js +21 -4
  84. package/build/plugin/src/ios/apply/podfile/podfile.js.map +1 -1
  85. package/build/plugin/src/ios/cng/appShortcutsCodegen.d.ts +1 -1
  86. package/build/plugin/src/ios/cng/appShortcutsCodegen.d.ts.map +1 -1
  87. package/build/plugin/src/ios/cng/appShortcutsCodegen.js +1 -1
  88. package/build/plugin/src/ios/cng/appShortcutsCodegen.js.map +1 -1
  89. package/build/plugin/src/ios/plan/swiftSources.d.ts.map +1 -1
  90. package/build/plugin/src/ios/plan/swiftSources.js +10 -0
  91. package/build/plugin/src/ios/plan/swiftSources.js.map +1 -1
  92. package/build/plugin/src/ios/plan/types.d.ts +6 -0
  93. package/build/plugin/src/ios/plan/types.d.ts.map +1 -1
  94. package/build/plugin/src/ios/utils/reactNativeSwift.d.ts +3 -0
  95. package/build/plugin/src/ios/utils/reactNativeSwift.d.ts.map +1 -1
  96. package/build/plugin/src/ios/utils/reactNativeSwift.js +3 -0
  97. package/build/plugin/src/ios/utils/reactNativeSwift.js.map +1 -1
  98. package/build/plugin/src/resolveExcludedPackages.d.ts +15 -0
  99. package/build/plugin/src/resolveExcludedPackages.d.ts.map +1 -0
  100. package/build/plugin/src/resolveExcludedPackages.js +30 -0
  101. package/build/plugin/src/resolveExcludedPackages.js.map +1 -0
  102. package/build/plugin/src/withTargetsDir.d.ts +5 -0
  103. package/build/plugin/src/withTargetsDir.d.ts.map +1 -1
  104. package/build/plugin/src/withTargetsDir.js +114 -47
  105. package/build/plugin/src/withTargetsDir.js.map +1 -1
  106. package/build/src/Target.d.ts +11 -6
  107. package/build/src/Target.d.ts.map +1 -1
  108. package/build/src/Target.js +4 -1
  109. package/build/src/Target.js.map +1 -1
  110. package/build/src/generatedNames.d.ts +23 -0
  111. package/build/src/generatedNames.d.ts.map +1 -0
  112. package/build/src/generatedNames.js +3 -0
  113. package/build/src/generatedNames.js.map +1 -0
  114. package/build/src/index.d.ts +8 -0
  115. package/build/src/index.d.ts.map +1 -1
  116. package/build/src/index.js +43 -17
  117. package/build/src/index.js.map +1 -1
  118. package/build/src/modules/extension/index.d.ts +1 -0
  119. package/build/src/modules/extension/index.d.ts.map +1 -1
  120. package/build/src/modules/extension/index.js +9 -5
  121. package/build/src/modules/extension/index.js.map +1 -1
  122. package/build/src/modules/extensionBundle/ExtensionUpdates.d.ts +72 -0
  123. package/build/src/modules/extensionBundle/ExtensionUpdates.d.ts.map +1 -0
  124. package/build/src/modules/extensionBundle/ExtensionUpdates.js +165 -0
  125. package/build/src/modules/extensionBundle/ExtensionUpdates.js.map +1 -0
  126. package/build/src/modules/extensionBundle/ExtensionUpdatesApi.d.ts +33 -0
  127. package/build/src/modules/extensionBundle/ExtensionUpdatesApi.d.ts.map +1 -0
  128. package/build/src/modules/extensionBundle/ExtensionUpdatesApi.js +87 -0
  129. package/build/src/modules/extensionBundle/ExtensionUpdatesApi.js.map +1 -0
  130. package/build/src/modules/extensionBundle/constants.d.ts +21 -0
  131. package/build/src/modules/extensionBundle/constants.d.ts.map +1 -0
  132. package/build/src/modules/extensionBundle/constants.js +30 -0
  133. package/build/src/modules/extensionBundle/constants.js.map +1 -0
  134. package/build/src/modules/extensionBundle/enableExtensionUpdates.d.ts +42 -0
  135. package/build/src/modules/extensionBundle/enableExtensionUpdates.d.ts.map +1 -0
  136. package/build/src/modules/extensionBundle/enableExtensionUpdates.js +114 -0
  137. package/build/src/modules/extensionBundle/enableExtensionUpdates.js.map +1 -0
  138. package/build/src/modules/extensionBundle/fsInstall.d.ts +50 -0
  139. package/build/src/modules/extensionBundle/fsInstall.d.ts.map +1 -0
  140. package/build/src/modules/extensionBundle/fsInstall.js +180 -0
  141. package/build/src/modules/extensionBundle/fsInstall.js.map +1 -0
  142. package/build/src/modules/extensionBundle/nativeInstall.d.ts +12 -0
  143. package/build/src/modules/extensionBundle/nativeInstall.d.ts.map +1 -0
  144. package/build/src/modules/extensionBundle/nativeInstall.js +33 -0
  145. package/build/src/modules/extensionBundle/nativeInstall.js.map +1 -0
  146. package/build/src/modules/liveActivity/index.d.ts +13 -6
  147. package/build/src/modules/liveActivity/index.d.ts.map +1 -1
  148. package/build/src/modules/liveActivity/index.js +2 -2
  149. package/build/src/modules/liveActivity/index.js.map +1 -1
  150. package/build/src/modules/notification/index.d.ts +21 -0
  151. package/build/src/modules/notification/index.d.ts.map +1 -0
  152. package/build/src/modules/notification/index.js +32 -0
  153. package/build/src/modules/notification/index.js.map +1 -0
  154. package/build/src/modules/storage/index.d.ts +2 -0
  155. package/build/src/modules/storage/index.d.ts.map +1 -1
  156. package/build/src/modules/storage/index.js +11 -1
  157. package/build/src/modules/storage/index.js.map +1 -1
  158. package/cli/build/checks/easCredentials.d.ts +5 -0
  159. package/cli/build/checks/easCredentials.d.ts.map +1 -0
  160. package/cli/build/checks/easCredentials.js +150 -0
  161. package/cli/build/checks/easCredentials.js.map +1 -0
  162. package/cli/build/checks/heavyExclusions.d.ts +5 -0
  163. package/cli/build/checks/heavyExclusions.d.ts.map +1 -0
  164. package/cli/build/checks/heavyExclusions.js +186 -0
  165. package/cli/build/checks/heavyExclusions.js.map +1 -0
  166. package/cli/build/checks/nameSync.d.ts.map +1 -1
  167. package/cli/build/checks/nameSync.js +31 -2
  168. package/cli/build/checks/nameSync.js.map +1 -1
  169. package/cli/build/checks/plugin.js +1 -1
  170. package/cli/build/checks/plugin.js.map +1 -1
  171. package/cli/build/checks/updateScript.d.ts +7 -0
  172. package/cli/build/checks/updateScript.d.ts.map +1 -0
  173. package/cli/build/checks/updateScript.js +91 -0
  174. package/cli/build/checks/updateScript.js.map +1 -0
  175. package/cli/build/doctor.d.ts.map +1 -1
  176. package/cli/build/doctor.js +11 -1
  177. package/cli/build/doctor.js.map +1 -1
  178. package/cli/build/exportExtensionBundles.d.ts +21 -0
  179. package/cli/build/exportExtensionBundles.d.ts.map +1 -0
  180. package/cli/build/exportExtensionBundles.js +193 -0
  181. package/cli/build/exportExtensionBundles.js.map +1 -0
  182. package/cli/build/extensionBundle/constants.d.ts +21 -0
  183. package/cli/build/extensionBundle/constants.d.ts.map +1 -0
  184. package/cli/build/extensionBundle/constants.js +30 -0
  185. package/cli/build/extensionBundle/constants.js.map +1 -0
  186. package/cli/build/extensionBundle/fsInstall.d.ts +50 -0
  187. package/cli/build/extensionBundle/fsInstall.d.ts.map +1 -0
  188. package/cli/build/extensionBundle/fsInstall.js +180 -0
  189. package/cli/build/extensionBundle/fsInstall.js.map +1 -0
  190. package/cli/build/extensionBundle/hermesExport.d.ts +37 -0
  191. package/cli/build/extensionBundle/hermesExport.d.ts.map +1 -0
  192. package/cli/build/extensionBundle/hermesExport.js +112 -0
  193. package/cli/build/extensionBundle/hermesExport.js.map +1 -0
  194. package/cli/build/generate.d.ts.map +1 -1
  195. package/cli/build/generate.js +7 -1
  196. package/cli/build/generate.js.map +1 -1
  197. package/cli/build/index.js +53 -3
  198. package/cli/build/index.js.map +1 -1
  199. package/cli/build/scaffold/copyTemplate.d.ts +15 -0
  200. package/cli/build/scaffold/copyTemplate.d.ts.map +1 -0
  201. package/cli/build/scaffold/copyTemplate.js +109 -0
  202. package/cli/build/scaffold/copyTemplate.js.map +1 -0
  203. package/cli/build/scaffold/expoConfigIO.d.ts +15 -0
  204. package/cli/build/scaffold/expoConfigIO.d.ts.map +1 -0
  205. package/cli/build/scaffold/expoConfigIO.js +104 -0
  206. package/cli/build/scaffold/expoConfigIO.js.map +1 -0
  207. package/cli/build/scaffold/generateConfig.d.ts +13 -0
  208. package/cli/build/scaffold/generateConfig.d.ts.map +1 -0
  209. package/cli/build/scaffold/generateConfig.js +169 -0
  210. package/cli/build/scaffold/generateConfig.js.map +1 -0
  211. package/cli/build/scaffold/index.d.ts +3 -0
  212. package/cli/build/scaffold/index.d.ts.map +1 -0
  213. package/cli/build/scaffold/index.js +8 -0
  214. package/cli/build/scaffold/index.js.map +1 -0
  215. package/cli/build/scaffold/prompts.d.ts +3 -0
  216. package/cli/build/scaffold/prompts.d.ts.map +1 -0
  217. package/cli/build/scaffold/prompts.js +92 -0
  218. package/cli/build/scaffold/prompts.js.map +1 -0
  219. package/cli/build/scaffold/reactNativeTemplate.d.ts +3 -0
  220. package/cli/build/scaffold/reactNativeTemplate.d.ts.map +1 -0
  221. package/cli/build/scaffold/reactNativeTemplate.js +56 -0
  222. package/cli/build/scaffold/reactNativeTemplate.js.map +1 -0
  223. package/cli/build/scaffold/resolveAndroidPackage.d.ts +5 -0
  224. package/cli/build/scaffold/resolveAndroidPackage.d.ts.map +1 -0
  225. package/cli/build/scaffold/resolveAndroidPackage.js +42 -0
  226. package/cli/build/scaffold/resolveAndroidPackage.js.map +1 -0
  227. package/cli/build/scaffold/resolveAppGroup.d.ts +6 -0
  228. package/cli/build/scaffold/resolveAppGroup.d.ts.map +1 -0
  229. package/cli/build/scaffold/resolveAppGroup.js +68 -0
  230. package/cli/build/scaffold/resolveAppGroup.js.map +1 -0
  231. package/cli/build/scaffold/scaffoldTarget.d.ts +14 -0
  232. package/cli/build/scaffold/scaffoldTarget.d.ts.map +1 -0
  233. package/cli/build/scaffold/scaffoldTarget.js +267 -0
  234. package/cli/build/scaffold/scaffoldTarget.js.map +1 -0
  235. package/cli/build/scaffold/templates/android.d.ts +33 -0
  236. package/cli/build/scaffold/templates/android.d.ts.map +1 -0
  237. package/cli/build/scaffold/templates/android.js +117 -0
  238. package/cli/build/scaffold/templates/android.js.map +1 -0
  239. package/cli/build/scaffold/templates/ios.d.ts +20 -0
  240. package/cli/build/scaffold/templates/ios.d.ts.map +1 -0
  241. package/cli/build/scaffold/templates/ios.js +505 -0
  242. package/cli/build/scaffold/templates/ios.js.map +1 -0
  243. package/cli/build/scaffold/templates/liveActivity.d.ts +11 -0
  244. package/cli/build/scaffold/templates/liveActivity.d.ts.map +1 -0
  245. package/cli/build/scaffold/templates/liveActivity.js +71 -0
  246. package/cli/build/scaffold/templates/liveActivity.js.map +1 -0
  247. package/cli/build/scaffold/utils.d.ts +3 -0
  248. package/cli/build/scaffold/utils.d.ts.map +1 -0
  249. package/cli/build/scaffold/utils.js +15 -0
  250. package/cli/build/scaffold/utils.js.map +1 -0
  251. package/cli/build/scaffold/wireExpoConfig.d.ts +12 -0
  252. package/cli/build/scaffold/wireExpoConfig.d.ts.map +1 -0
  253. package/cli/build/scaffold/wireExpoConfig.js +49 -0
  254. package/cli/build/scaffold/wireExpoConfig.js.map +1 -0
  255. package/cli/build/scaffold/wireHost.d.ts +21 -0
  256. package/cli/build/scaffold/wireHost.d.ts.map +1 -0
  257. package/cli/build/scaffold/wireHost.js +89 -0
  258. package/cli/build/scaffold/wireHost.js.map +1 -0
  259. package/cli/build/scaffold/wireMetro.d.ts +11 -0
  260. package/cli/build/scaffold/wireMetro.d.ts.map +1 -0
  261. package/cli/build/scaffold/wireMetro.js +64 -0
  262. package/cli/build/scaffold/wireMetro.js.map +1 -0
  263. package/cli/build/scaffold/wirePackageJson.d.ts +2 -0
  264. package/cli/build/scaffold/wirePackageJson.d.ts.map +1 -0
  265. package/cli/build/scaffold/wirePackageJson.js +24 -0
  266. package/cli/build/scaffold/wirePackageJson.js.map +1 -0
  267. package/cli/build/types.d.ts +1 -0
  268. package/cli/build/types.d.ts.map +1 -1
  269. package/expo-module.config.json +4 -1
  270. package/ios/ExpoTargetsExtensionBundleModule.swift +172 -0
  271. package/ios/ExpoTargetsMessagesModule.swift +4 -3
  272. package/ios/ExpoTargetsStorage.podspec +1 -0
  273. package/ios/ExpoTargetsStorageModule.swift +13 -0
  274. package/metro/build/withTargets.d.ts.map +1 -1
  275. package/metro/build/withTargets.js +37 -11
  276. package/metro/build/withTargets.js.map +1 -1
  277. package/package.json +5 -1
  278. package/plugin/build/android/activationMime.d.ts +12 -0
  279. package/plugin/build/android/activationMime.d.ts.map +1 -0
  280. package/plugin/build/android/activationMime.js +47 -0
  281. package/plugin/build/android/activationMime.js.map +1 -0
  282. package/plugin/build/android/resolveUserClass.d.ts +14 -0
  283. package/plugin/build/android/resolveUserClass.d.ts.map +1 -0
  284. package/plugin/build/android/resolveUserClass.js +48 -0
  285. package/plugin/build/android/resolveUserClass.js.map +1 -0
  286. package/plugin/build/android/targetSourceSets.d.ts +9 -0
  287. package/plugin/build/android/targetSourceSets.d.ts.map +1 -0
  288. package/plugin/build/android/targetSourceSets.js +90 -0
  289. package/plugin/build/android/targetSourceSets.js.map +1 -0
  290. package/plugin/build/android/withAndroidNotification.d.ts +12 -0
  291. package/plugin/build/android/withAndroidNotification.d.ts.map +1 -0
  292. package/plugin/build/android/withAndroidNotification.js +192 -0
  293. package/plugin/build/android/withAndroidNotification.js.map +1 -0
  294. package/plugin/build/android/withAndroidShareAction.d.ts +11 -0
  295. package/plugin/build/android/withAndroidShareAction.d.ts.map +1 -0
  296. package/plugin/build/android/withAndroidShareAction.js +172 -0
  297. package/plugin/build/android/withAndroidShareAction.js.map +1 -0
  298. package/plugin/build/android/withAndroidSystemService.d.ts +12 -0
  299. package/plugin/build/android/withAndroidSystemService.d.ts.map +1 -0
  300. package/plugin/build/android/withAndroidSystemService.js +332 -0
  301. package/plugin/build/android/withAndroidSystemService.js.map +1 -0
  302. package/plugin/build/android/withAndroidTarget.d.ts +2 -1
  303. package/plugin/build/android/withAndroidTarget.d.ts.map +1 -1
  304. package/plugin/build/android/withAndroidTarget.js +25 -3
  305. package/plugin/build/android/withAndroidTarget.js.map +1 -1
  306. package/plugin/build/android/withAndroidTargetsConfig.d.ts +9 -0
  307. package/plugin/build/android/withAndroidTargetsConfig.d.ts.map +1 -0
  308. package/plugin/build/android/withAndroidTargetsConfig.js +52 -0
  309. package/plugin/build/android/withAndroidTargetsConfig.js.map +1 -0
  310. package/plugin/build/codegen/collectRuntimeConfigs.d.ts +3 -0
  311. package/plugin/build/codegen/collectRuntimeConfigs.d.ts.map +1 -1
  312. package/plugin/build/codegen/collectRuntimeConfigs.js.map +1 -1
  313. package/plugin/build/codegen/index.d.ts +1 -1
  314. package/plugin/build/codegen/index.d.ts.map +1 -1
  315. package/plugin/build/codegen/index.js +2 -1
  316. package/plugin/build/codegen/index.js.map +1 -1
  317. package/plugin/build/codegen/typedTargets.d.ts +11 -1
  318. package/plugin/build/codegen/typedTargets.d.ts.map +1 -1
  319. package/plugin/build/codegen/typedTargets.js +102 -12
  320. package/plugin/build/codegen/typedTargets.js.map +1 -1
  321. package/plugin/build/config.d.ts +37 -6
  322. package/plugin/build/config.d.ts.map +1 -1
  323. package/plugin/build/config.js.map +1 -1
  324. package/plugin/build/domain/characteristics.d.ts +8 -0
  325. package/plugin/build/domain/characteristics.d.ts.map +1 -1
  326. package/plugin/build/domain/characteristics.js +81 -10
  327. package/plugin/build/domain/characteristics.js.map +1 -1
  328. package/plugin/build/domain/index.d.ts +1 -1
  329. package/plugin/build/domain/index.d.ts.map +1 -1
  330. package/plugin/build/domain/index.js.map +1 -1
  331. package/plugin/build/ios/apply/podfile/podfile.d.ts.map +1 -1
  332. package/plugin/build/ios/apply/podfile/podfile.js +21 -4
  333. package/plugin/build/ios/apply/podfile/podfile.js.map +1 -1
  334. package/plugin/build/ios/cng/appShortcutsCodegen.d.ts +1 -1
  335. package/plugin/build/ios/cng/appShortcutsCodegen.d.ts.map +1 -1
  336. package/plugin/build/ios/cng/appShortcutsCodegen.js +1 -1
  337. package/plugin/build/ios/cng/appShortcutsCodegen.js.map +1 -1
  338. package/plugin/build/ios/plan/swiftSources.d.ts.map +1 -1
  339. package/plugin/build/ios/plan/swiftSources.js +10 -0
  340. package/plugin/build/ios/plan/swiftSources.js.map +1 -1
  341. package/plugin/build/ios/plan/types.d.ts +6 -0
  342. package/plugin/build/ios/plan/types.d.ts.map +1 -1
  343. package/plugin/build/ios/templates/ReactNativeViewController.swift +45 -7
  344. package/plugin/build/ios/utils/reactNativeSwift.d.ts +3 -0
  345. package/plugin/build/ios/utils/reactNativeSwift.d.ts.map +1 -1
  346. package/plugin/build/ios/utils/reactNativeSwift.js +3 -0
  347. package/plugin/build/ios/utils/reactNativeSwift.js.map +1 -1
  348. package/plugin/build/resolveExcludedPackages.d.ts +15 -0
  349. package/plugin/build/resolveExcludedPackages.d.ts.map +1 -0
  350. package/plugin/build/resolveExcludedPackages.js +30 -0
  351. package/plugin/build/resolveExcludedPackages.js.map +1 -0
  352. package/plugin/build/withTargetsDir.d.ts +5 -0
  353. package/plugin/build/withTargetsDir.d.ts.map +1 -1
  354. package/plugin/build/withTargetsDir.js +114 -47
  355. package/plugin/build/withTargetsDir.js.map +1 -1
package/README.md CHANGED
@@ -18,11 +18,11 @@ Expo config plugin and runtime for Apple app extensions Expo does not ship — s
18
18
 
19
19
  ```bash
20
20
  npm install expo-targets
21
- npx create-expo-target
21
+ npx expo-targets add
22
22
  # Share Extension → my-share → Use React Native: Yes
23
23
  ```
24
24
 
25
- `create-expo-target` wires the host by default. Install dependencies if wiring added `expo-targets` to `package.json`.
25
+ `expo-targets add` wires the host by default. Install dependencies if wiring added `expo-targets` to `package.json`.
26
26
 
27
27
  ```js
28
28
  // metro.config.js
@@ -36,7 +36,7 @@ module.exports = withTargets(getDefaultConfig(__dirname));
36
36
  import { createTarget } from "expo-targets";
37
37
  import ShareExtension from "./ShareExtension";
38
38
 
39
- export const myShare = createTarget<"share">("MyShare", ShareExtension);
39
+ export const myShare = createTarget("MyShare", ShareExtension);
40
40
  ```
41
41
 
42
42
  ## Storage
@@ -52,7 +52,8 @@ target.refresh();
52
52
 
53
53
  - [Getting started](https://github.com/csark0812/expo-targets/blob/main/docs/getting-started.md)
54
54
  - [Configuration](https://github.com/csark0812/expo-targets/blob/main/docs/configuration.md)
55
- - [API](https://github.com/csark0812/expo-targets/blob/main/docs/api.md)
55
+ - [API](https://github.com/csark0812/expo-targets/blob/main/docs/api.md) (includes [`ExtensionUpdates`](https://github.com/csark0812/expo-targets/blob/main/docs/api.md#extensionupdates))
56
+ - [React Native extensions](https://github.com/csark0812/expo-targets/blob/main/docs/react-native-extensions.md) — [App Group OTA / eas update](https://github.com/csark0812/expo-targets/blob/main/docs/react-native-extensions.md#extension-bundle-sideload-with-expo-updates)
56
57
  - [Widgets](https://github.com/csark0812/expo-targets/blob/main/docs/widgets.md)
57
58
  - [Contributing](https://github.com/csark0812/expo-targets/blob/main/CONTRIBUTING.md)
58
59
 
@@ -18,5 +18,9 @@ dependencies {
18
18
  // Glance dependencies for widget sync utilities
19
19
  implementation "androidx.glance:glance-appwidget:1.1.1"
20
20
  implementation "androidx.datastore:datastore-preferences:1.1.1"
21
+ // Wave 2 notification / LiveActivity ongoing-notif helper
22
+ implementation "androidx.core:core-ktx:1.15.0"
23
+ // RN Share/Action host (ReactActivity) — resolved from the app's RN classpath
24
+ compileOnly 'com.facebook.react:react-android'
21
25
  }
22
26
 
@@ -0,0 +1,11 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <!-- Live Activity dual (ongoing NotificationCompat) + NSE/NCE routing on API 33+. -->
3
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
4
+ <application>
5
+ <!-- Wave 0 harness: synthetic Intent surface for extension JS APIs (not a product ShareActivity). -->
6
+ <activity
7
+ android:name="expo.modules.targets.extension.ExpoTargetsHarnessActivity"
8
+ android:exported="false"
9
+ android:theme="@android:style/Theme.Translucent.NoTitleBar" />
10
+ </application>
11
+ </manifest>
@@ -0,0 +1,37 @@
1
+ package expo.modules.targets.extension
2
+
3
+ import android.app.Activity
4
+ import android.content.Intent
5
+ import java.lang.ref.WeakReference
6
+
7
+ /**
8
+ * Holds the current target Activity (harness, share, or action) so
9
+ * [ExpoTargetsExtensionModule] can finish it and read Intent extras.
10
+ */
11
+ object ExpoTargetsActivityHolder {
12
+ @Volatile
13
+ private var activityRef: WeakReference<Activity>? = null
14
+
15
+ @Volatile
16
+ var lastIntent: Intent? = null
17
+ private set
18
+
19
+ fun attach(activity: Activity) {
20
+ activityRef = WeakReference(activity)
21
+ lastIntent = activity.intent
22
+ }
23
+
24
+ fun detach(activity: Activity) {
25
+ if (activityRef?.get() === activity) {
26
+ activityRef = null
27
+ }
28
+ }
29
+
30
+ fun currentActivity(): Activity? = activityRef?.get()
31
+
32
+ fun updateIntent(intent: Intent?) {
33
+ if (intent != null) {
34
+ lastIntent = intent
35
+ }
36
+ }
37
+ }
@@ -1,27 +1,78 @@
1
1
  package expo.modules.targets.extension
2
2
 
3
+ import android.content.Intent
4
+ import android.net.Uri
3
5
  import expo.modules.kotlin.modules.Module
4
6
  import expo.modules.kotlin.modules.ModuleDefinition
7
+ import expo.modules.targets.ExpoTargetsLogger
5
8
 
6
9
  class ExpoTargetsExtensionModule : Module() {
10
+ companion object {
11
+ private const val TAG = "Extension"
12
+ }
13
+
7
14
  override fun definition() = ModuleDefinition {
8
15
  Name("ExpoTargetsExtension")
9
16
 
10
17
  Function("closeExtension") {
11
- // Android: Close the current activity/extension
12
- // Implementation depends on context - for now, stub
18
+ val activity = ExpoTargetsActivityHolder.currentActivity()
19
+ if (activity != null) {
20
+ activity.runOnUiThread { activity.finish() }
21
+ } else {
22
+ ExpoTargetsLogger.w(TAG, "closeExtension: no current target Activity")
23
+ }
13
24
  }
14
25
 
15
26
  Function("openHostApp") { path: String ->
16
- // Android: Open the host app with a specific path
17
- // Implementation will use Intent to launch main app
27
+ val activity = ExpoTargetsActivityHolder.currentActivity()
28
+ val context =
29
+ appContext.reactContext
30
+ ?: activity
31
+ if (context == null) {
32
+ ExpoTargetsLogger.w(TAG, "openHostApp: no context")
33
+ } else {
34
+ val packageName = context.packageName
35
+ val launch =
36
+ context.packageManager.getLaunchIntentForPackage(packageName)
37
+ ?: Intent(Intent.ACTION_MAIN).apply {
38
+ addCategory(Intent.CATEGORY_LAUNCHER)
39
+ setPackage(packageName)
40
+ }
41
+
42
+ launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
43
+
44
+ val trimmed = path.trim()
45
+ if (trimmed.isNotEmpty()) {
46
+ val deepLink =
47
+ when {
48
+ trimmed.contains("://") -> Uri.parse(trimmed)
49
+ trimmed.startsWith("/") ->
50
+ Uri.Builder()
51
+ .scheme("expotargets")
52
+ .authority(packageName)
53
+ .path(trimmed.removePrefix("/"))
54
+ .build()
55
+ else -> Uri.parse("expotargets://$packageName/$trimmed")
56
+ }
57
+ launch.data = deepLink
58
+ launch.putExtra("expo_targets_path", trimmed)
59
+ }
60
+
61
+ context.startActivity(launch)
62
+ // Match native Activity.openHost: dismiss the Share/Action surface.
63
+ activity?.runOnUiThread { activity.finish() }
64
+ }
18
65
  }
19
66
 
20
67
  Function("getSharedData") {
21
- // Android: Get data shared to the extension
22
- // Will extract data from Intent extras
23
- return@Function null
68
+ val intent =
69
+ ExpoTargetsActivityHolder.currentActivity()?.intent
70
+ ?: ExpoTargetsActivityHolder.lastIntent
71
+ if (intent == null) {
72
+ ExpoTargetsLogger.d(TAG, "getSharedData: no intent")
73
+ return@Function null
74
+ }
75
+ return@Function ExpoTargetsSharedIntent.extract(intent)
24
76
  }
25
77
  }
26
78
  }
27
-
@@ -0,0 +1,28 @@
1
+ package expo.modules.targets.extension
2
+
3
+ import android.app.Activity
4
+ import android.content.Intent
5
+ import android.os.Bundle
6
+
7
+ /**
8
+ * Throwaway Activity for Wave 0 DoD of getSharedData / openHostApp / close.
9
+ * Launch with ACTION_SEND (or custom extras) for synthetic share payloads.
10
+ * Product share/action Activities replace this path in Wave 1.
11
+ */
12
+ class ExpoTargetsHarnessActivity : Activity() {
13
+ override fun onCreate(savedInstanceState: Bundle?) {
14
+ super.onCreate(savedInstanceState)
15
+ ExpoTargetsActivityHolder.attach(this)
16
+ }
17
+
18
+ override fun onNewIntent(intent: Intent) {
19
+ super.onNewIntent(intent)
20
+ setIntent(intent)
21
+ ExpoTargetsActivityHolder.updateIntent(intent)
22
+ }
23
+
24
+ override fun onDestroy() {
25
+ ExpoTargetsActivityHolder.detach(this)
26
+ super.onDestroy()
27
+ }
28
+ }
@@ -0,0 +1,123 @@
1
+ package expo.modules.targets.extension
2
+
3
+ import android.content.ComponentName
4
+ import android.content.Intent
5
+ import android.content.pm.PackageManager
6
+ import android.os.Bundle
7
+ import com.facebook.react.ReactActivity
8
+ import com.facebook.react.ReactActivityDelegate
9
+ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
10
+ import com.facebook.react.defaults.DefaultReactActivityDelegate
11
+ import expo.modules.targets.ExpoTargetsLogger
12
+
13
+ /**
14
+ * React Native host for Share/Action when the target has an `entry` (USE_RN=true).
15
+ * Mirrors iOS ReactNativeViewController: AppRegistry module = config `name`,
16
+ * Intent extras → launch options (text/url/images), same process as the host app.
17
+ *
18
+ * Requires the host JS bundle to register the component (e.g. host imports
19
+ * `createTarget('Share', …)` so AppRegistry has module "Share").
20
+ *
21
+ * Note: [ReactActivity] calls [createReactActivityDelegate] from its constructor,
22
+ * before subclass fields / [onCreate] run — so MODULE_NAME is resolved from the
23
+ * Activity's manifest meta-data via [ActivityThread.currentApplication].
24
+ */
25
+ abstract class ExpoTargetsReactTargetActivity : ReactActivity() {
26
+ protected var targetName: String = "Target"
27
+ protected var moduleName: String = "Target"
28
+ protected var appGroup: String = ""
29
+
30
+ override fun onCreate(savedInstanceState: Bundle?) {
31
+ readMeta()
32
+ ExpoTargetsActivityHolder.attach(this)
33
+ // Dialog theme; no splash — share sheet budget.
34
+ super.onCreate(null)
35
+ // Give the RN ShareExtension room (default Dialog is too narrow/short).
36
+ window?.setLayout(
37
+ (resources.displayMetrics.widthPixels * 0.92f).toInt(),
38
+ (resources.displayMetrics.heightPixels * 0.75f).toInt(),
39
+ )
40
+ }
41
+
42
+ override fun onNewIntent(intent: Intent) {
43
+ super.onNewIntent(intent)
44
+ setIntent(intent)
45
+ ExpoTargetsActivityHolder.updateIntent(intent)
46
+ }
47
+
48
+ override fun onDestroy() {
49
+ ExpoTargetsActivityHolder.detach(this)
50
+ super.onDestroy()
51
+ }
52
+
53
+ override fun getMainComponentName(): String = resolveModuleName(javaClass)
54
+
55
+ override fun createReactActivityDelegate(): ReactActivityDelegate {
56
+ val self = this
57
+ val name = resolveModuleName(javaClass)
58
+ return object : DefaultReactActivityDelegate(self, name, fabricEnabled) {
59
+ override fun getLaunchOptions(): Bundle? =
60
+ ExpoTargetsSharedIntent.toLaunchOptions(self.intent)
61
+ }
62
+ }
63
+
64
+ private fun readMeta() {
65
+ try {
66
+ val info =
67
+ packageManager.getActivityInfo(
68
+ componentName,
69
+ PackageManager.GET_META_DATA,
70
+ )
71
+ val meta = info.metaData
72
+ targetName = meta?.getString("expo.targets.TARGET_NAME") ?: targetName
73
+ moduleName = meta?.getString("expo.targets.MODULE_NAME") ?: targetName
74
+ appGroup =
75
+ meta?.getString("expo.targets.APP_GROUP")
76
+ ?: "group.$packageName"
77
+ ExpoTargetsLogger.d(
78
+ "ReactTarget",
79
+ "RN Share/Action host: module=$moduleName target=$targetName",
80
+ )
81
+ } catch (e: Exception) {
82
+ ExpoTargetsLogger.w("ReactTarget", "readMeta failed: ${e.message}")
83
+ appGroup = "group.$packageName"
84
+ }
85
+ }
86
+
87
+ companion object {
88
+ /**
89
+ * Safe during [ReactActivity] construction (subclass fields not initialized yet).
90
+ */
91
+ fun resolveModuleName(activityClass: Class<*>): String {
92
+ return try {
93
+ val activityThreadClass = Class.forName("android.app.ActivityThread")
94
+ val app =
95
+ activityThreadClass
96
+ .getMethod("currentApplication")
97
+ .invoke(null) as? android.app.Application
98
+ ?: return "Target"
99
+ val component = ComponentName(app, activityClass)
100
+ val info =
101
+ app.packageManager.getActivityInfo(
102
+ component,
103
+ PackageManager.GET_META_DATA,
104
+ )
105
+ info.metaData?.getString("expo.targets.MODULE_NAME")
106
+ ?: info.metaData?.getString("expo.targets.TARGET_NAME")
107
+ ?: "Target"
108
+ } catch (e: Exception) {
109
+ ExpoTargetsLogger.w(
110
+ "ReactTarget",
111
+ "resolveModuleName failed: ${e.message}",
112
+ )
113
+ "Target"
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ /** RN Share Activity — used when config has `entry`. */
120
+ open class ExpoTargetsReactShareActivity : ExpoTargetsReactTargetActivity()
121
+
122
+ /** RN Action Activity — used when config has `entry`. */
123
+ open class ExpoTargetsReactActionActivity : ExpoTargetsReactTargetActivity()
@@ -0,0 +1,89 @@
1
+ package expo.modules.targets.extension
2
+
3
+ import android.content.Intent
4
+ import android.net.Uri
5
+ import android.os.Bundle
6
+
7
+ /**
8
+ * Shared Intent → props map for Share/Action Activities and [ExpoTargetsExtensionModule].
9
+ * Keys match iOS initialProperties / ShareExtension props: text, url, images.
10
+ */
11
+ object ExpoTargetsSharedIntent {
12
+ fun extract(intent: Intent?): Map<String, Any?>? {
13
+ if (intent == null) return null
14
+ val result = linkedMapOf<String, Any?>()
15
+ val type = intent.type
16
+
17
+ when (intent.action) {
18
+ Intent.ACTION_SEND -> {
19
+ intent.getStringExtra(Intent.EXTRA_TEXT)?.let { result["text"] = it }
20
+ intent.getStringExtra(Intent.EXTRA_SUBJECT)?.let { subject ->
21
+ if (!result.containsKey("text")) result["text"] = subject
22
+ }
23
+ @Suppress("DEPRECATION")
24
+ (intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM))?.let { uri ->
25
+ if (type?.startsWith("image/") == true) {
26
+ result["images"] = listOf(uri.toString())
27
+ } else {
28
+ result["url"] = uri.toString()
29
+ }
30
+ }
31
+ intent.dataString?.let { data ->
32
+ if (!result.containsKey("url") && data.startsWith("http")) {
33
+ result["url"] = data
34
+ }
35
+ }
36
+ }
37
+ Intent.ACTION_SEND_MULTIPLE -> {
38
+ intent.getStringExtra(Intent.EXTRA_TEXT)?.let { result["text"] = it }
39
+ @Suppress("DEPRECATION")
40
+ val streams = intent.getParcelableArrayListExtra<Uri>(Intent.EXTRA_STREAM)
41
+ if (streams != null && streams.isNotEmpty()) {
42
+ if (type?.startsWith("image/") == true) {
43
+ result["images"] = streams.map { it.toString() }
44
+ } else {
45
+ result["url"] = streams.first().toString()
46
+ }
47
+ }
48
+ }
49
+ Intent.ACTION_PROCESS_TEXT -> {
50
+ intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT)?.let { result["text"] = it }
51
+ }
52
+ else -> {
53
+ intent.getStringExtra("expo_targets_text")?.let { result["text"] = it }
54
+ intent.getStringExtra("expo_targets_url")?.let { result["url"] = it }
55
+ intent.getStringExtra(Intent.EXTRA_TEXT)?.let { result["text"] = it }
56
+ }
57
+ }
58
+
59
+ val clip = intent.clipData
60
+ if (clip != null && !result.containsKey("images") && !result.containsKey("url")) {
61
+ val images = mutableListOf<String>()
62
+ for (i in 0 until clip.itemCount) {
63
+ val item = clip.getItemAt(i)
64
+ item.uri?.let { images.add(it.toString()) }
65
+ item.text?.toString()?.let { text ->
66
+ if (!result.containsKey("text")) result["text"] = text
67
+ }
68
+ }
69
+ if (images.isNotEmpty()) {
70
+ result["images"] = images
71
+ }
72
+ }
73
+
74
+ return if (result.isEmpty()) null else result
75
+ }
76
+
77
+ /** Bundle for ReactActivityDelegate.getLaunchOptions (RN initial props). */
78
+ fun toLaunchOptions(intent: Intent?): Bundle? {
79
+ val data = extract(intent) ?: return null
80
+ val bundle = Bundle()
81
+ (data["text"] as? String)?.let { bundle.putString("text", it) }
82
+ (data["url"] as? String)?.let { bundle.putString("url", it) }
83
+ @Suppress("UNCHECKED_CAST")
84
+ (data["images"] as? List<String>)?.let { imgs ->
85
+ bundle.putStringArrayList("images", ArrayList(imgs))
86
+ }
87
+ return if (bundle.isEmpty) null else bundle
88
+ }
89
+ }