change more com.timesafari to org.timesafari
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
# Consuming App Migration: com.timesafari → org.timesafari
|
# Consuming App Migration: org.timesafari → org.timesafari
|
||||||
|
|
||||||
Use this document in your **consuming app** repo (e.g. with Cursor or as a checklist) to migrate from `com.timesafari.dailynotification` to `org.timesafari.dailynotification` after the daily-notification-plugin has been updated.
|
Use this document in your **consuming app** repo (e.g. with Cursor or as a checklist) to migrate from `org.timesafari.dailynotification` to `org.timesafari.dailynotification` after the daily-notification-plugin has been updated.
|
||||||
|
|
||||||
## Summary of plugin changes
|
## Summary of plugin changes
|
||||||
|
|
||||||
The plugin’s package/namespace and public identifiers were renamed:
|
The plugin’s package/namespace and public identifiers were renamed:
|
||||||
|
|
||||||
- **Package/namespace**: `com.timesafari.dailynotification` → `org.timesafari.dailynotification`
|
- **Package/namespace**: `org.timesafari.dailynotification` → `org.timesafari.dailynotification`
|
||||||
- **Intent action (Android)**: `com.timesafari.daily.NOTIFICATION` → `org.timesafari.daily.NOTIFICATION`
|
- **Intent action (Android)**: `org.timesafari.daily.NOTIFICATION` → `org.timesafari.daily.NOTIFICATION`
|
||||||
- **Dismiss action (Android)**: `com.timesafari.daily.DISMISS` → `org.timesafari.daily.DISMISS`
|
- **Dismiss action (Android)**: `org.timesafari.daily.DISMISS` → `org.timesafari.daily.DISMISS`
|
||||||
- **iOS BGTask identifiers**: `com.timesafari.dailynotification.fetch` / `.notify` / `.prefetch` → `org.timesafari.dailynotification.*`
|
- **iOS BGTask identifiers**: `org.timesafari.dailynotification.fetch` / `.notify` / `.prefetch` → `org.timesafari.dailynotification.*`
|
||||||
- **Capacitor plugin class**: `com.timesafari.dailynotification.DailyNotificationPlugin` → `org.timesafari.dailynotification.DailyNotificationPlugin`
|
- **Capacitor plugin class**: `org.timesafari.dailynotification.DailyNotificationPlugin` → `org.timesafari.dailynotification.DailyNotificationPlugin`
|
||||||
|
|
||||||
Your app must align with these so the plugin loads and receivers/intents work.
|
Your app must align with these so the plugin loads and receivers/intents work.
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ The plugin is registered by **class name**. Update every place that references t
|
|||||||
|
|
||||||
**Change:**
|
**Change:**
|
||||||
|
|
||||||
- From: `"class": "com.timesafari.dailynotification.DailyNotificationPlugin"` or `"classpath": "com.timesafari.dailynotification.DailyNotificationPlugin"`
|
- From: `"class": "org.timesafari.dailynotification.DailyNotificationPlugin"` or `"classpath": "org.timesafari.dailynotification.DailyNotificationPlugin"`
|
||||||
- To: `"class": "org.timesafari.dailynotification.DailyNotificationPlugin"` or `"classpath": "org.timesafari.dailynotification.DailyNotificationPlugin"`
|
- To: `"class": "org.timesafari.dailynotification.DailyNotificationPlugin"` or `"classpath": "org.timesafari.dailynotification.DailyNotificationPlugin"`
|
||||||
|
|
||||||
If you use a script (e.g. `fix-capacitor-plugins.js`) that injects this class name, update the script to use `org.timesafari.dailynotification.DailyNotificationPlugin`.
|
If you use a script (e.g. `fix-capacitor-plugins.js`) that injects this class name, update the script to use `org.timesafari.dailynotification.DailyNotificationPlugin`.
|
||||||
@@ -45,16 +45,16 @@ If you use a script (e.g. `fix-capacitor-plugins.js`) that injects this class na
|
|||||||
|
|
||||||
**Receiver class names** (must match the plugin’s new package):
|
**Receiver class names** (must match the plugin’s new package):
|
||||||
|
|
||||||
- `com.timesafari.dailynotification.DailyNotificationReceiver` → `org.timesafari.dailynotification.DailyNotificationReceiver`
|
- `org.timesafari.dailynotification.DailyNotificationReceiver` → `org.timesafari.dailynotification.DailyNotificationReceiver`
|
||||||
- `com.timesafari.dailynotification.NotifyReceiver` → `org.timesafari.dailynotification.NotifyReceiver`
|
- `org.timesafari.dailynotification.NotifyReceiver` → `org.timesafari.dailynotification.NotifyReceiver`
|
||||||
- `com.timesafari.dailynotification.BootReceiver` → `org.timesafari.dailynotification.BootReceiver`
|
- `org.timesafari.dailynotification.BootReceiver` → `org.timesafari.dailynotification.BootReceiver`
|
||||||
- Any other `com.timesafari.dailynotification.*` receiver → `org.timesafari.dailynotification.*`
|
- Any other `org.timesafari.dailynotification.*` receiver → `org.timesafari.dailynotification.*`
|
||||||
|
|
||||||
**Intent action** (must match plugin’s `DailyNotificationConstants.ACTION_NOTIFICATION`):
|
**Intent action** (must match plugin’s `DailyNotificationConstants.ACTION_NOTIFICATION`):
|
||||||
|
|
||||||
- `<action android:name="com.timesafari.daily.NOTIFICATION" />` → `<action android:name="org.timesafari.daily.NOTIFICATION" />`
|
- `<action android:name="org.timesafari.daily.NOTIFICATION" />` → `<action android:name="org.timesafari.daily.NOTIFICATION" />`
|
||||||
|
|
||||||
Search the manifest for `com.timesafari` and replace with `org.timesafari` for these plugin-related entries.
|
Search the manifest for `org.timesafari` and replace with `org.timesafari` for these plugin-related entries.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -62,9 +62,9 @@ Search the manifest for `com.timesafari` and replace with `org.timesafari` for t
|
|||||||
|
|
||||||
If you have custom keep rules that reference the plugin package:
|
If you have custom keep rules that reference the plugin package:
|
||||||
|
|
||||||
- `com.timesafari.dailynotification` → `org.timesafari.dailynotification`
|
- `org.timesafari.dailynotification` → `org.timesafari.dailynotification`
|
||||||
|
|
||||||
(e.g. `-keep class com.timesafari.dailynotification.**` → `-keep class org.timesafari.dailynotification.**`).
|
(e.g. `-keep class org.timesafari.dailynotification.**` → `-keep class org.timesafari.dailynotification.**`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -74,27 +74,27 @@ The plugin uses these background task identifiers. Your app’s `Info.plist` mus
|
|||||||
|
|
||||||
**In `BGTaskSchedulerPermittedIdentifiers` (or equivalent):**
|
**In `BGTaskSchedulerPermittedIdentifiers` (or equivalent):**
|
||||||
|
|
||||||
- `com.timesafari.dailynotification.fetch` → `org.timesafari.dailynotification.fetch`
|
- `org.timesafari.dailynotification.fetch` → `org.timesafari.dailynotification.fetch`
|
||||||
- `com.timesafari.dailynotification.notify` → `org.timesafari.dailynotification.notify`
|
- `org.timesafari.dailynotification.notify` → `org.timesafari.dailynotification.notify`
|
||||||
|
|
||||||
If you use the prefetch identifier:
|
If you use the prefetch identifier:
|
||||||
|
|
||||||
- `com.timesafari.dailynotification.prefetch` → `org.timesafari.dailynotification.prefetch`
|
- `org.timesafari.dailynotification.prefetch` → `org.timesafari.dailynotification.prefetch`
|
||||||
|
|
||||||
Update any other `com.timesafari.dailynotification.*` task IDs to `org.timesafari.dailynotification.*`.
|
Update any other `org.timesafari.dailynotification.*` task IDs to `org.timesafari.dailynotification.*`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 6. App ID / Bundle ID (optional; breaking for installs)
|
## 6. App ID / Bundle ID (optional; breaking for installs)
|
||||||
|
|
||||||
- **Plugin package/namespace** change does **not** require you to change your app’s **applicationId** (Android) or **Bundle ID** (iOS).
|
- **Plugin package/namespace** change does **not** require you to change your app’s **applicationId** (Android) or **Bundle ID** (iOS).
|
||||||
- If you **do** change your app’s id from `com.timesafari.*` to `org.timesafari.*`, the store and OS will treat it as a **new app** (new install, no in-place update). Only change this if you intend that.
|
- If you **do** change your app’s id from `org.timesafari.*` to `org.timesafari.*`, the store and OS will treat it as a **new app** (new install, no in-place update). Only change this if you intend that.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 7. Custom intent actions / deep links
|
## 7. Custom intent actions / deep links
|
||||||
|
|
||||||
If your app or backend uses custom actions that included the old prefix (e.g. `com.timesafari.dailynotification.REFRESH_DATA` or `OPEN_SETTINGS`), update them to `org.timesafari.dailynotification.*` so they still match what the plugin or your code expects.
|
If your app or backend uses custom actions that included the old prefix (e.g. `org.timesafari.dailynotification.REFRESH_DATA` or `OPEN_SETTINGS`), update them to `org.timesafari.dailynotification.*` so they still match what the plugin or your code expects.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -117,12 +117,12 @@ If your app or backend uses custom actions that included the old prefix (e.g. `c
|
|||||||
|
|
||||||
Use with care; prefer updating specific files as above. Suggested patterns:
|
Use with care; prefer updating specific files as above. Suggested patterns:
|
||||||
|
|
||||||
- **Plugin class**: `com.timesafari.dailynotification.DailyNotificationPlugin` → `org.timesafari.dailynotification.DailyNotificationPlugin`
|
- **Plugin class**: `org.timesafari.dailynotification.DailyNotificationPlugin` → `org.timesafari.dailynotification.DailyNotificationPlugin`
|
||||||
- **Receiver/package references**: `com.timesafari.dailynotification.` → `org.timesafari.dailynotification.`
|
- **Receiver/package references**: `org.timesafari.dailynotification.` → `org.timesafari.dailynotification.`
|
||||||
- **Notification intent action**: `com.timesafari.daily.NOTIFICATION` → `org.timesafari.daily.NOTIFICATION`
|
- **Notification intent action**: `org.timesafari.daily.NOTIFICATION` → `org.timesafari.daily.NOTIFICATION`
|
||||||
- **BGTask identifiers**: `com.timesafari.dailynotification.fetch` / `.notify` / `.prefetch` → `org.timesafari.dailynotification.fetch` / `.notify` / `.prefetch`
|
- **BGTask identifiers**: `org.timesafari.dailynotification.fetch` / `.notify` / `.prefetch` → `org.timesafari.dailynotification.fetch` / `.notify` / `.prefetch`
|
||||||
|
|
||||||
Do **not** blindly replace `com.timesafari` in your **app’s own** applicationId/Bundle ID unless you intend to ship as a new app.
|
Do **not** blindly replace `org.timesafari` in your **app’s own** applicationId/Bundle ID unless you intend to ship as a new app.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1492,14 +1492,14 @@ main() {
|
|||||||
timeout_found=false
|
timeout_found=false
|
||||||
timeout_protection_found=false
|
timeout_protection_found=false
|
||||||
|
|
||||||
if grep -q "RECOVERY_TIMEOUT_SECONDS.*2L" "${PROJECT_ROOT}/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt" 2>/dev/null; then
|
if grep -q "RECOVERY_TIMEOUT_SECONDS.*2L" "${PROJECT_ROOT}/android/src/main/java/org/timesafari/dailynotification/ReactivationManager.kt" 2>/dev/null; then
|
||||||
ok "Timeout is set to 2 seconds"
|
ok "Timeout is set to 2 seconds"
|
||||||
timeout_found=true
|
timeout_found=true
|
||||||
else
|
else
|
||||||
error "Timeout not found in code"
|
error "Timeout not found in code"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "withTimeout" "${PROJECT_ROOT}/android/src/main/java/com/timesafari/dailynotification/ReactivationManager.kt" 2>/dev/null; then
|
if grep -q "withTimeout" "${PROJECT_ROOT}/android/src/main/java/org/timesafari/dailynotification/ReactivationManager.kt" 2>/dev/null; then
|
||||||
ok "Timeout protection is implemented"
|
ok "Timeout protection is implemented"
|
||||||
timeout_protection_found=true
|
timeout_protection_found=true
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user