Is there any way to add iCal event to the iPhone Calendar from the custom App?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
Update for swift 4 for Dashrath answer
also don't forget to add permission for calendar usage
Working code in Swift-4.2
Now we will get the event screen and here you can also modify your settings:
Now add delegate method to handle Cancel and add the event button action of event screen:
Note: Don't forget to add NSCalendarsUsageDescription key into info plist.
The Google idea is a nice one, but has problems.
I can successfully open a Google calendar event screen - but only on the main desktop version, and it doesn't display properly on iPhone Safari. The Google mobile calendar, which does display properly on Safari, doesn't seem to work with the API to add events.
For the moment, I can't see a good way out of this one.
You can do this using the Event Kit framework in OS 4.0.
Right click on the FrameWorks group in the Groups and Files Navigator on the left of the window. Select 'Add' then 'Existing FrameWorks' then 'EventKit.Framework'.
Then you should be able to add events with code like this:
Calendar access is being added in iPhone OS 4.0:
You can add the event using the Event API like Tristan outlined and you can also add a Google Calendar event which shows up in the iOS calendar.
using Google's API Objective-C Client