Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of the feature to add attendees (email) interactively and silently at the event creation. #529

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paolocarrara
Copy link

Hi, here is the feature I said I was going to work with.

With this pull request users will be able to add attendees to events passing the "attendees" option key in the options object. The value of this key must be an array of strings, those strings must be the participants e-mails. Interactively, silently, with and without options, everything worked just fine.

I tested on my iPhone 8 with iOS version 13.3.1 and on a Samsung Galaxy A10 with Android version 9.

Please review my changes and let me know if there is anything else I can do to make this feature come to main line.

Thanks!

@DaveLomber
Copy link

DaveLomber commented Oct 25, 2022

Getting this error when press Add button

2022-10-25 13:23:53.761188+0300 MyApp[3773:606305] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKeyedSubscript:]: key cannot be nil'

@andrerds
Copy link

Folks,

I'm thrilled to share the breakthrough I achieved after days of extensive research.

The challenge I was facing revolved around missing or incorrect information. In earlier iOS versions, this issue might not have been as noticeable, possibly because it seemed to be disregarded. However, with iOS 16, I discovered that providing a valid UUID (Universally Unique Identifier) was crucial.

After implementing the addition of a unique UUID for each attendee, I witnessed a successful resolution without any unwanted crashes. I had the opportunity to test this on the iPhone X running iOS 16.5.

Here's the solution I adopted:

NSMutableArray *attendeesObjectsList = [NSMutableArray new]; if (attendees != (id)[NSNull null]) { NSUInteger size = [attendees count]; for (int i = 0; i < size; i++) { Class className = NSClassFromString(@"EKAttendee"); id attendee = [className new]; NSUUID *uuid = [NSUUID UUID]; NSString *uuidString = [uuid UUIDString]; [attendee setValue:uuidString forKey:@"UUID"]; [attendee setValue:[NSString stringWithFormat:@"%@", [attendees objectAtIndex:i]] forKey:@"emailAddress"]; [attendeesObjectsList addObject:attendee]; } [myEvent setValue:attendeesObjectsList forKey:@"attendees"]; }

I hope this also proves helpful to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants