Before the "Add to Calendar" feature will work, you need to add a calendar permission description to your Xcode project.
-
Open the project in Xcode:
open messAI.xcodeproj
-
Select the messAI target:
- Click on the project name in the left sidebar
- Select "messAI" under TARGETS (not the project)
-
Go to the Info tab:
- Look for tabs at the top: General, Signing & Capabilities, Resource Tags, Info, Build Settings, Build Phases
-
Add the calendar permission:
- Click the + button to add a new key
- Select "Privacy - Calendars Full Access Usage Description"
- Or manually type:
NSCalendarsFullAccessUsageDescription
-
Set the description (shown to users when requesting permission):
messAI needs calendar access to add events you RSVP to -
Build and run - Done! ✅
If your project has a separate Info.plist file:
- Open
messAI/Info.plist - Add this key-value pair:
<key>NSCalendarsFullAccessUsageDescription</key>
<string>messAI needs calendar access to add events you RSVP to</string>cd messAI
# Run in Xcode or via command line- User A: Send "Soccer on Friday at 2PM"
- User A: Tap "Create & Organize"
- User B: See invitation, tap "Yes, I'll attend"
- iOS will show permission alert: "messAI Would Like to Access Your Calendar"
- Tap "Allow"
- Open Calendar app
- Event should appear with:
- Title: "Soccer" (or your event name)
- Date: Tomorrow (simplified for now)
- Duration: 1 hour
- Location: (if provided)
- Notes: "Created from messAI"
- User taps "Add to Calendar"
- iOS permission alert appears
- User grants permission
- Event added to Calendar ✅
- Ambient Bar dismisses
- User taps "Add to Calendar"
- No alert (permission already granted)
- Event added immediately ✅
- Ambient Bar dismisses
Cause: User denied permission or it wasn't requested properly
Fix:
- Go to Settings → Privacy & Security → Calendars
- Find messAI
- Toggle ON
- Restart the app
Cause: NSCalendarsFullAccessUsageDescription not set in Info.plist
Fix:
- Follow setup instructions above
- Clean build:
Cmd+Shift+K - Rebuild and run
Check:
- Console logs - look for "✅ Event added to calendar"
- Open Calendar app - check tomorrow's date
- Check default calendar (it uses the user's default)
- ✅ Calendar permission request (iOS 17+)
- ✅ Event creation with title, date, time, location
- ✅ Saves to user's default calendar
- ✅ Error handling for denied permissions
- ✅ Ambient Bar dismisses after adding
- Better date parsing: Currently uses "tomorrow" as fallback
- Parse time strings: "2PM" → actual time
- Add reminders: 15 min before, 1 hour before, etc.
- Add participants: Set event attendees from RSVP list
- Handle timezones: Proper timezone conversion
- Custom calendar selection: Let user choose which calendar
-
Date Parsing:
- Currently uses tomorrow as default
- Need to parse strings like "Friday", "next week", "Dec 15"
-
Time Parsing:
- Need to parse strings like "2PM", "14:00", "afternoon"
-
Duration:
- Currently hardcoded to 1 hour
- Could extract from context ("2-4pm" = 2 hours)
Once you've added the NSCalendarsFullAccessUsageDescription key:
- Run the app
- RSVP to an event
- Tap "Add to Calendar"
- Grant permission
- Check Calendar app ✅
The event will be there! 🎉