在我的flutter iOS应用程序中,我使用包add_2_calendar向用户日历添加一些事件。更新到iOS 17后,我注意到此功能不再工作。在我的Info.plist中,我有以下内容
<key>NSCalendarsUsageDescription</key>
<string>$(PRODUCT_NAME) user your calendar</string>
<key>NSContactsUsageDescription</key>
<string>$(PRODUCT_NAME) user your calendar</string>
字符串
我尝试将NSCalendarsWriteOnlyAccessUsageDescription
作为弃用的NSCalendarsUsageDescription
包括在内,但没有任何变化
<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
<string>Add event to calendar</string>
型
在终端上,我刚刚收到消息XPC connection was invalidated
我如何在下面的flutter代码中使用它:
final Event calendarEvent = Event(
title: '$homeTeamName vs $awayTeamName',
description: '$leagueName ($round)\nReferee: $referee',
location: stadium,
startDate: matchTimestamp,
endDate: matchTimestamp.add(const Duration(hours: 2)),
iosParams: const IOSParams(
reminder: Duration(hours: 1),
url: 'https://hadjimamas.github.io/',
),
androidParams: const AndroidParams(emailInvites: []),
);
..some code
InkWell(
onTap: () {
Add2Calendar.addEvent2Cal(calendarEvent);
},
型
封装文档add_2_calendar
1条答案
按热度按时间ohfgkhjo1#
在下面的链接中,您可以找到与此问题Quick Fix相关的快速修复程序
实际编辑
add_2_calendar/ios/Classes/SwiftAdd2CalendarPlugin.swift
如下:字符串