The issue arises from the iOS Calendar function that automatically sends any calendar or Photo Sharing invitation to each of those apps respectively, bypassing the user's inbox. This allows spammers to avoid the spam-fighting filters of email inboxes by continually sending messages via calendar or Photo Sharing notification, regardless of whether users accept or decline the invitation.
Apple users have been hitting the forums discussing ways around the issue. The programming forum StackExchange crowd-sourced solutions and came up with the following workaround: Using a desktop computer, log into the iOS Calendar function, select "preferences," then "advanced," then switch how invitations are received in the"invitations" section by clicking away from "in-app notifications" to the"email to" option. This will turn off the function that automatically pushes event invitations into the Calendar app and forces them into the regular inbox, meaning that users can delete the invitation rather than being forced to accept or decline it.
Alternatively, a TechCrunch tutorial recommends creating a new and separate calendar to filter spam events into, just like how a spam filter works in most email inboxes. Unwanted messages can be directed to this new spam-specific calendar by opening the invitation and selecting the new calendar destination, then repeating for all invitations from the spam senders. From there, users can delete the spam calendar invitations without notifying the spammer that their address is valid. The key is to hit "delete and don't notify" to make sure that spammers don't receive the message.
For Photo Sharing, the only way to fix the issue is by turning off iCloud syncing features, as 9to5Mac explains. Users can navigate to the "settings" menu and hit "disable" for the iCloud Photo Sharing feature.