Skip to content

Commit

Permalink
Merge pull request MobiVM#703 from dkimitsa/ios16.2
Browse files Browse the repository at this point in the history
CocoaTouch bindings 16.2 + fixes
  • Loading branch information
Tom-Ski authored Mar 20, 2023
2 parents b9f3ca9 + d4db561 commit 70acf42
Show file tree
Hide file tree
Showing 88 changed files with 2,958 additions and 319 deletions.
64 changes: 58 additions & 6 deletions compiler/cocoatouch/src/main/bro-gen/authservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,51 @@ typedefs: {}

enums:
ASCredentialIdentityStoreErrorCode: {nserror: true} #since 12.0
ASExtensionErrorCode: {} #since 12.0
ASExtensionErrorCode: {nserror: true} #since 12.0
ASCredentialServiceIdentifierType: {} #since 12.0
ASWebAuthenticationSessionErrorCode: {} #since 12.0
ASWebAuthenticationSessionErrorCode: {nserror: true} #since 12.0
ASUserDetectionStatus: {}
ASAuthorizationAppleIDProviderCredentialState: {prefix: ASAuthorizationAppleIDProviderCredential} #since 13.0
ASAuthorizationError: {nserror: true} #since 13.0
ASAuthorizationAppleIDButtonType: {} #since 13.0
ASAuthorizationAppleIDButtonStyle: {} #since 13.0
ASAuthorizationControllerRequestOptions: {prefix: ASAuthorizationControllerRequestOption} #since 16.0

typed_enums:
ASAuthorizationOpenIDOperation:
enum: ASAuthorizationOpenIDOperation
type: NSString
ASAuthorizationOperation(.*):
name: "#{g[0]}"
ASAuthorizationScope:
enum: ASAuthorizationScope
type: NSString
ASAuthorizationScope(.*):
name: "#{g[0]}"
ASAuthorizationPublicKeyCredentialUserVerificationPreference:
enum: ASAuthorizationPublicKeyCredentialUserVerificationPreference
type: NSString
ASAuthorizationPublicKeyCredentialUserVerificationPreference(.*):
name: "#{g[0]}"
ASAuthorizationProviderAuthorizationOperation:
enum: ASAuthorizationProviderAuthorizationOperation
type: NSString
ASAuthorizationProviderAuthorizationOperation(.*):
name: "#{g[0]}"
ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport:
enum: ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport
type: NSString
ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport(.*):
name: "#{g[0]}"
ASAuthorizationPublicKeyCredentialAttestationKind:
enum: ASAuthorizationPublicKeyCredentialAttestationKind
type: NSString
ASAuthorizationPublicKeyCredentialAttestationKind(.*):
name: "#{g[0]}"
ASAuthorizationPublicKeyCredentialResidentKeyPreference:
enum: ASAuthorizationPublicKeyCredentialResidentKeyPreference
type: NSString
ASAuthorizationPublicKeyCredentialResidentKeyPreference(.*):
name: "#{g[0]}"
classes:
ASCredentialIdentityStore: #since 12.0
methods:
Expand Down Expand Up @@ -212,8 +247,12 @@ protocols:
ASAuthorizationPublicKeyCredentialRegistrationRequest: {} #since 15.0
ASPublicKeyCredential: {} #since 15.0
functions:
ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports:
class: ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport
name: getAllSupportedPublicKeyCredentialDescriptorTransports

# Make sure we don't miss any functions if new ones are introduced in a later version
(k?ASC.*):
(k?AS.*):
class: !!!AuthServicesFixMe
name: 'Function__#{g[0]}'

Expand All @@ -224,9 +263,22 @@ values:
ASAuthorizationErrorDomain:
class: ASAuthorizationError
name: getClassDomain
ASExtensionLocalizedFailureReasonErrorKey:
class: ASExtensionErrorCode
name: getLocalizedFailureReasonErrorKey
ASExtensionErrorDomain:
class: ASExtensionErrorCode
name: getClassDomain
ASWebAuthenticationSessionErrorDomain:
class: ASWebAuthenticationSessionErrorCode
name: getClassDomain
ASAuthorizationAppleIDProviderCredentialRevokedNotification:
class: ASAuthorizationAppleIDProvider
static_class: Notifications
name: CredentialRevoked

# Make sure we don't miss any values if new ones are introduced in a later version
(k?ASC.*):
(k?AS.*):
class: !!!AuthServicesFixMe
name: 'Value__#{g[0]}'

Expand All @@ -236,6 +288,6 @@ constants:
name: '#{g[0]}'

# Make sure we don't miss any constants if new ones are introduced in a later version
(k?ASC.*):
(k?AS.*):
class: !!!AuthServicesFixMe
name: 'Constant__#{g[0]}'
4 changes: 1 addition & 3 deletions compiler/cocoatouch/src/main/bro-gen/corelocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ classes:
methods:
'-initWithCenter:radius:identifier:':
name: init
'-initCircularRegionWithCenter:radius:identifier:':
exclude: true # as this method is deprecated and conflicts with initWithCenter:radius:identifier:
'-containsCoordinate:': # Overrides a method in CLRegion
exclude: true
CLFloor: {} # DONE
Expand Down Expand Up @@ -177,7 +175,7 @@ classes:
name: notifiesOnExit
methods:
'-initCircularRegionWithCenter:radius:identifier:':
name: init
exclude: true # as this method is deprecated and conflicts with initWithCenter:radius:identifier:
'-containsCoordinate:':
trim_after_first_colon: true
CLVisit: {} # DONE
Expand Down
15 changes: 14 additions & 1 deletion compiler/cocoatouch/src/main/bro-gen/coremotion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,22 @@ classes:
CMAbsoluteAltitudeData: {} #since 15.0
CMAmbientPressureData: {} #since 10.0
CMRecordedPressureData: {} #since 12.0
CMWaterSubmersionEvent: {}
CMWaterSubmersionManager: {}
CMWaterSubmersionMeasurement: {}
CMWaterTemperature: {}
protocols:
CMHeadphoneMotionManagerDelegate: {} #since 14.0

CMWaterSubmersionManagerDelegate:
methods:
'-manager:didUpdateEvent:':
name: didUpdateEvent
'-manager:didUpdateMeasurement:':
name: didUpdateMeasurement
'-manager:didUpdateTemperature:':
name: didUpdateTemperature
'-manager:errorOccurred:':
name: errorOccurred
functions:
# Make sure we don't miss any functions if new ones are introduced in a later version
(k?CM.*):
Expand Down
3 changes: 3 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ default_class: Dispatch
header: /usr/include/dispatch/dispatch.h
path_match: ^.*/usr/include/dispatch/.*$
force_types: [timespec]
clang_args: ['-x', 'objective-c', '-DOS_OBJECT_USE_OBJC=0']
private_typedefs:
qos_class_t: int
typedefs:
_NSZone: void
'Protocol *': ObjCProtocol
Expand Down
14 changes: 14 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/foundation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,12 @@ classes:
parameters:
locale:
type: NSLocale
'-initWithMantissa:exponent:isNegative:':
name: init
'-initWithDecimal:':
name: init
'-initWithString:':
name: init
NSDecimalNumberHandler: # DONE
skip_def_constructor: true
methods:
Expand Down Expand Up @@ -3339,6 +3345,14 @@ classes:
parameters:
characters:
type: '@Pointer long'
'-initWithData:encoding:':
name: init
'-initWithContentsOfURL:encoding:error:':
name: init
throws: NSErrorException
'-initWithContentsOfFile:encoding:error:':
name: init
throws: NSErrorException
'-init': {}
'-init.*': { exclude: true }
'-characterAtIndex:':
Expand Down
2 changes: 2 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/gamekit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ classes:
name: startNearbyPlayersBrowsing
'+sharedMatchmaker':
property: true
'-startGroupActivityWithPlayerHandler:':
name: startGroupActivity
GKMatchmakerViewController: # DONE
methods:
'-addPlayersToMatch:':
Expand Down
30 changes: 30 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/intents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ enums:
INStartCallCallRecordToCallBackUnsupportedReason: {} #since 14.0
INShareFocusStatusIntentResponseCode: {} #since 15.0
INFocusStatusAuthorizationStatus: {} #since 15.0
INAnswerCallIntentResponseCode: { } #since 16.2
INHangUpCallIntentResponseCode: { } #since 16.2
typed_enums:
INCarChargingConnectorType:
enum: INCarChargingConnectorType
Expand Down Expand Up @@ -1725,6 +1727,22 @@ classes:
methods:
'-initWithCode:userActivity:':
name: init
INAnswerCallIntent: #since 16.2
methods:
'-initWithAudioRoute:callIdentifier:':
name: init
INAnswerCallIntentResponse: #since 16.2
methods:
'-initWithCode:userActivity:':
name: init
INHangUpCallIntent: #since 16.2
methods:
'-initWithCallIdentifier:':
name: init
INHangUpCallIntentResponse: #since 16.2
methods:
'-initWithCode:userActivity:':
name: init
protocols:
INActivateCarSignalIntentHandling: #since 10.3
methods:
Expand Down Expand Up @@ -2443,6 +2461,18 @@ protocols:
name: handleShareFocusStatus
'-confirmShareFocusStatus:completion:':
name: confirmShareFocusStatus
INAnswerCallIntentHandling: #since 16.2
methods:
'-handleAnswerCall:completion:':
name: handleAnswerCall
'-confirmAnswerCall:completion:':
name: confirmAnswerCall
INHangUpCallIntentHandling: #since 16.2
methods:
'-handleHangUpCall:completion:':
name: handleHangUpCall
'-confirmHangUpCall:completion:':
name: confirmHangUpCall
functions:
# Make sure we don't miss any functions if new ones are introduced in a later version
(IN.*):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,8 @@ classes:
methods:
'-initForReadingWithData:device:':
name: init
'-initWithDevice:':
name: init
'+unarchiveObjectWithData:device:':
name: unarchiveObject
'+unarchiveTopLevelObjectWithData:device:error:':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,54 @@ classes:
name: sort
'-transposeTensor:permutation:name:':
name: transposeTensor
'-bitwiseNOTWithTensor:name:':
name: bitwiseNOT
'-bitwisePopulationCountWithTensor:name:':
name: bitwisePopulationCount
'-bitwiseANDWithPrimaryTensor:secondaryTensor:name:':
name: bitwiseAND
'-bitwiseORWithPrimaryTensor:secondaryTensor:name:':
name: bitwiseOR
'-bitwiseXORWithPrimaryTensor:secondaryTensor:name:':
name: bitwiseXOR
'-bitwiseLeftShiftWithPrimaryTensor:secondaryTensor:name:':
name: bitwiseLeftShift
'-bitwiseRightShiftWithPrimaryTensor:secondaryTensor:name:':
name: bitwiseRightShift
'-inverseOfTensor:name:':
name: inverseOfTensor
'-quantizeTensor:scale:zeroPoint:dataType:name:':
name: quantizeTensor
'-dequantizeTensor:scale:zeroPoint:dataType:name:':
name: dequantizeTensor
'-quantizeTensor:scaleTensor:zeroPoint:dataType:axis:name:':
name: quantizeTensor
'-dequantizeTensor:scaleTensor:zeroPoint:dataType:axis:name:':
name: dequantizeTensor
'-quantizeTensor:scaleTensor:zeroPointTensor:dataType:axis:name:':
name: quantizeTensor
'-dequantizeTensor:scaleTensor:zeroPointTensor:dataType:axis:name:':
name: dequantizeTensor
'-sampleGridWithSourceTensor:coordinateTensor:layout:normalizeCoordinates:relativeCoordinates:alignCorners:paddingMode:samplingMode:constantValue:name:':
name: sampleGrid
'-sampleGridWithSourceTensor:coordinateTensor:layout:normalizeCoordinates:relativeCoordinates:alignCorners:paddingMode:nearestRoundingMode:constantValue:name:':
name: sampleGrid
'-argSortWithTensor:axis:descending:name:':
name: argSort
'-argSortWithTensor:axisTensor:descending:name:':
name: argSort
'-argSortWithTensor:axis:name:':
name: argSort
'-argSortWithTensor:axisTensor:name:':
name: argSort
'-spaceToBatchTensor:spatialAxes:batchAxis:blockDimensions:usePixelShuffleOrder:name:':
name: spaceToBatch
'-spaceToBatchTensor:spatialAxesTensor:batchAxisTensor:blockDimensionsTensor:usePixelShuffleOrder:name:':
name: spaceToBatch
'-batchToSpaceTensor:spatialAxes:batchAxis:blockDimensions:usePixelShuffleOrder:name:':
name: batchToSpace
'-batchToSpaceTensor:spatialAxesTensor:batchAxisTensor:blockDimensionsTensor:usePixelShuffleOrder:name:':
name: batchToSpace
MPSGraphConvolution2DOpDescriptor:
methods:
'-setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom:':
Expand Down
1 change: 1 addition & 0 deletions compiler/cocoatouch/src/main/bro-gen/sensorkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ classes:
SRWebUsage: {} #since 14.0
SRWristDetection: {} #since 14.0
SRTextInputSession: {} #since 15.0
SRSupplementalCategory: {} #since 16.0
protocols:
SRSensorReaderDelegate: #since 14.0
methods:
Expand Down
10 changes: 10 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/storekit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ enums:
SKProductDiscountType: {} #since 12.2
SKOverlayPosition: {} #since 14.0
SKANError: { nserror: true } #since 15.4
typed_enums:
SKAdNetworkCoarseConversionValue:
enum: SKAdNetworkCoarseConversionValue
prefix: SKAdNetworkCoarseConversionValue
type: NSString

classes:
SKCloudServiceController: #since 9.3
methods:
Expand Down Expand Up @@ -149,6 +155,10 @@ classes:
name: endImpression
'+updatePostbackConversionValue:completionHandler:':
name: updatePostbackConversionValue
'+updatePostbackConversionValue:coarseValue:completionHandler:':
name: updatePostbackConversionValue
'+updatePostbackConversionValue:coarseValue:lockWindow:completionHandler:':
name: updatePostbackConversionValue
SKProductDiscount: {} #since 11.2
SKProductSubscriptionPeriod: {} #since 11.2
SKPaymentDiscount: #since 12.2
Expand Down
2 changes: 2 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/uikit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6746,6 +6746,8 @@ protocols:
methods:
'-calendarView:decorationForDateComponents:':
name: getDecoration
'-calendarView:didChangeVisibleDateComponentsFrom:':
name: didChangeVisibleDateComponents
UIEditMenuInteractionAnimating: {} #since 16.0
UIEditMenuInteractionDelegate: #since 16.0
methods:
Expand Down
3 changes: 3 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/webkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ values:
class: WKPreviewActionItemIdentifiers
name: '#{g[0]}'

NSReadAccessURLDocumentOption:
exclude: true # FIXME: it extends NSAttributedStringDocumentReadingOptionKey that is defined in different framework

# Make sure we don't miss any values if new ones are introduced in a later version
(k?WK.*):
class: WebKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public enum /*<name>*/AUType/*</name>*/ implements ValuedEnum {
Generator(1635084142L),
OfflineEffect(1635086188L),
MIDIProcessor(1635085673L),
/**
* @since Available in iOS 16.0 and later.
*/
SpeechSynthesizer(1635087216L),
RemoteEffect(1635086968L),
RemoteGenerator(1635086951L),
RemoteInstrument(1635086953L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ public ASAuthorizationAppleIDProvider() {}
/*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
@Library("AuthenticationServices")
public static class Notifications {
static { Bro.bind(Notifications.class); }

/**
* @since Available in iOS 13.0 and later.
*/
@GlobalValue(symbol="ASAuthorizationAppleIDProviderCredentialRevokedNotification", optional=true)
public static native String CredentialRevoked();
}

@Method(selector = "createRequest")
public native ASAuthorizationAppleIDRequest createRequest();
@Method(selector = "getCredentialStateForUserID:completion:")
Expand Down
Loading

0 comments on commit 70acf42

Please sign in to comment.