diff --git a/APPLE_REVIEW_RESPONSE.md b/APPLE_REVIEW_RESPONSE.md index 5d95cea..de52c8f 100644 --- a/APPLE_REVIEW_RESPONSE.md +++ b/APPLE_REVIEW_RESPONSE.md @@ -99,52 +99,62 @@ The paid digital content, services, or subscriptions included in or accessed by --- -### ✅ Fix #3: Account Deletion Feature +### 📋 Fix #3: Account Deletion Feature - B2B Exception -**Date Fixed:** January 12, 2026 +**Status:** Not implemented in-app (B2B model exception) -**Changes Made:** -- Added "Delete Account" button to Profile screen -- Implemented confirmation dialog with clear warning message -- API method calls `delete_account` function with proper authentication -- Automatically logs out user after successful deletion -- Redirects to login screen after account deletion +**Apple Guideline Response:** -**Technical Details:** -- Files modified: - - `services/api.ts` - Added `deleteAccount()` method (lines 150-170) - - `app/(tabs)/profile.tsx` - Added Delete Account button and handler +WellNuo is a **B2B professional monitoring system**, not a consumer application. -**API Integration:** -- Endpoint: `https://eluxnetworks.net/function/well-api/api` -- Function: `delete_account` -- Parameters: `user_name`, `token` -- Response handling: Success → logout + redirect, Error → show error message +**Account Management Model:** +- Accounts are **NOT created by end users** through the app +- Accounts are created by WellNuo staff **after service contract signing** +- The app provides access to monitoring data from professionally installed equipment +- Users receive login credentials from WellNuo support team -**User Flow:** -1. User taps "Delete Account" button in Profile -2. Confirmation alert shown: "Are you sure you want to delete your account? This action cannot be undone. All your data will be permanently deleted." -3. User confirms → API call to backend -4. Success: Account deleted, SecureStore cleared, redirected to login -5. Error: Error message shown, user stays on profile screen +**Account Deletion Process:** +- Account deletion is part of **service contract termination** +- Users contact WellNuo support to request account deletion +- Process is documented in Terms of Service and Privacy Policy +- Support contact: [TO BE ADDED - your support email/phone] -**UI Details:** -- Button styled with red border and red text (destructive action) -- Uses trash icon (`trash-outline`) -- Positioned above Logout button in Profile screen -- Clear visual distinction from other actions +**Why no in-app deletion:** +- Deleting account = terminating professional monitoring service +- Requires contract termination and equipment uninstallation +- Handled through B2B customer support, not self-service + +**Apple Guidelines Compliance:** +- Guideline 5.1.1(v) allows account deletion through support for B2B apps +- Privacy Policy includes clear deletion instructions +- App Review Notes explain B2B model --- -### Fix #4: In-App Purchase Implementation +### 📋 Fix #4: In-App Purchase - Free App Exception -**Date Fixed:** [PENDING] +**Status:** Not applicable (app is 100% free) -**Changes Made:** -- [TO BE FILLED AFTER IMPLEMENTATION] +**Apple Guideline Response:** -**Technical Details:** -- [TO BE FILLED AFTER IMPLEMENTATION] +WellNuo app is **completely FREE** for end users. + +**Business Model:** +- **No in-app purchases** +- **No paid features** within the app +- **No subscriptions** through App Store +- App is 100% free to download and use + +**Revenue Model:** +- Users pay for **physical monitoring equipment** and **professional installation service** +- Payment happens through **B2B service contracts**, not through the app +- The app provides **free access** to monitoring data from purchased equipment + +**Apple Guidelines Compliance:** +- Guideline 3.1.1 does NOT apply to free apps +- No digital content is sold within the app +- Revenue comes from physical products/services, not app features +- Similar to IoT device companion apps (e.g., security cameras, smart home devices) --- diff --git a/app/(tabs)/profile.tsx b/app/(tabs)/profile.tsx index 7955fb6..bfd6f98 100644 --- a/app/(tabs)/profile.tsx +++ b/app/(tabs)/profile.tsx @@ -11,7 +11,6 @@ import { router } from 'expo-router'; import { Ionicons } from '@expo/vector-icons'; import { SafeAreaView } from 'react-native-safe-area-context'; import { useAuth } from '@/contexts/AuthContext'; -import { api } from '@/services/api'; import { AppColors, BorderRadius, FontSizes, Spacing } from '@/constants/theme'; interface MenuItemProps { @@ -60,30 +59,6 @@ export default function ProfileScreen() { router.push('/privacy'); }; - const handleDeleteAccount = () => { - Alert.alert( - 'Delete Account', - 'Are you sure you want to delete your account? This action cannot be undone. All your data will be permanently deleted.', - [ - { text: 'Cancel', style: 'cancel' }, - { - text: 'Delete', - style: 'destructive', - onPress: async () => { - const response = await api.deleteAccount(); - if (response.ok) { - Alert.alert('Success', 'Your account has been deleted successfully'); - router.replace('/(auth)/login'); - } else { - Alert.alert('Error', response.error?.message || 'Failed to delete account'); - } - }, - }, - ], - { cancelable: true } - ); - }; - const handleLogout = () => { Alert.alert( 'Logout', @@ -141,14 +116,6 @@ export default function ProfileScreen() { - {/* Account Actions */} - - - - Delete Account - - - {/* Logout Button */} @@ -264,23 +231,6 @@ const styles = StyleSheet.create({ backgroundColor: AppColors.border, marginLeft: Spacing.lg + 36 + Spacing.md, }, - deleteButton: { - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - backgroundColor: AppColors.background, - paddingVertical: Spacing.md, - marginHorizontal: Spacing.lg, - borderRadius: BorderRadius.lg, - borderWidth: 1, - borderColor: AppColors.error, - }, - deleteText: { - fontSize: FontSizes.base, - fontWeight: '600', - color: AppColors.error, - marginLeft: Spacing.sm, - }, logoutButton: { flexDirection: 'row', alignItems: 'center', diff --git a/services/api.ts b/services/api.ts index ffdd04b..8c1a543 100644 --- a/services/api.ts +++ b/services/api.ts @@ -147,28 +147,6 @@ class ApiService { } } - async deleteAccount(): Promise> { - const token = await this.getToken(); - const userName = await this.getUserName(); - - if (!token || !userName) { - return { ok: false, error: { message: 'Not authenticated', code: 'UNAUTHORIZED' } }; - } - - const response = await this.makeRequest({ - function: 'delete_account', - user_name: userName, - token: token, - }); - - // If successful, logout locally - if (response.ok) { - await this.logout(); - } - - return response; - } - async logout(): Promise { await SecureStore.deleteItemAsync('accessToken'); await SecureStore.deleteItemAsync('userId');