Skip to content

CarPlay iOS xcode14.0 beta1

Manuel de la Pena edited this page Jul 6, 2022 · 3 revisions

#CarPlay.framework https://github.com/xamarin/xamarin-macios/pull/15403

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CarPlay.framework/Headers/CPAlertAction.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CarPlay.framework/Headers/CPAlertAction.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CarPlay.framework/Headers/CPAlertAction.h	2022-02-23 08:00:06.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CarPlay.framework/Headers/CPAlertAction.h	2022-05-31 14:52:38.000000000 -0400
@@ -6,13 +6,14 @@
 //
 
 #import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
 typedef NS_ENUM(NSUInteger, CPAlertActionStyle) {
     CPAlertActionStyleDefault = 0, // A style that indicates a default action.
-    CPAlertActionStyleCancel,     // A style that indicates the action will cancel and leave data unchanged.
-    CPAlertActionStyleDestructive // A style that indicates the button might change or delete data.
+    CPAlertActionStyleCancel,      // A style that indicates the action will cancel and leave data unchanged.
+    CPAlertActionStyleDestructive, // A style that indicates the button might change or delete data.
 } API_AVAILABLE(ios(12.0)) API_UNAVAILABLE(macos, watchos, tvos);
 
 /**
@@ -40,9 +41,23 @@
                         style:(CPAlertActionStyle)style
                       handler:(CPAlertActionHandler)handler;
 
+/**
+ Create an alert action with a title, a custom action color, and a callback handler that is invoked
+ when the user taps this action.
+ 
+ The system will automatically determine if the provided color meets contrast requirements.
+ If the provided color does not meet contrast requirements, the system default will be used.
+ Font color will automatically be adjusted by the system to correspond with this color.
+ Alpha values will be ignored.
+ */
+- (instancetype)initWithTitle:(NSString *)title
+                        color:(UIColor *)color
+                      handler:(CPAlertActionHandler)handler API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macos, watchos, tvos);
+
 @property (nonatomic, copy, readonly) NSString *title;
 @property (nonatomic, assign, readonly) CPAlertActionStyle style;
 @property (nonatomic, copy, readonly) CPAlertActionHandler handler;
+@property (nonatomic, copy, readonly, nullable) UIColor *color API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macos, watchos, tvos);
 
 @end
 
Clone this wiki locally