# Generate bindings for the ObjC headers.
# Regenerate bindings with `dart run tool/generate_code.dart`.
name: ObjectiveCBindings
language: objc
output:
  bindings: 'lib/src/objective_c_bindings_generated.dart'
  objc-bindings: 'src/objective_c_bindings_generated.m'
headers:
  entry-points:
    - 'src/foundation.h'
    - 'src/input_stream_adapter.h'
    - 'src/ns_number.h'
    - 'src/observer.h'
    - 'src/protocol.h'
ffi-native:
  asset-id: 'package:objective_c/objective_c.dylib'
exclude-all-by-default: true
include-transitive-objc-categories: false
generate-for-package-objective-c: true
sort: true
library-imports:
  collection: 'dart:collection'
external-versions:
  # See https://docs.flutter.dev/reference/supported-platforms.
  ios:
    min: 12.0.0
  macos:
    min: 10.14.0
objc-interfaces:
  # Keep in sync with FFIgen's ObjCBuiltInFunctions.builtInInterfaces.
  include:
    - DOBJCDartInputStreamAdapter
    - DOBJCDartInputStreamAdapterWeakHolder
    - DOBJCObservation
    - DOBJCDartProtocolBuilder
    - DOBJCDartProtocol
    - NSArray
    - NSAttributedString
    - NSAttributedStringMarkdownParsingOptions
    - NSBundle
    - NSCharacterSet
    - NSCoder
    - NSData
    - NSDate
    - NSDictionary
    - NSEnumerator
    - NSError
    - NSIndexSet
    - NSInputStream
    - NSInvocation
    - NSItemProvider
    - NSLocale
    - NSMethodSignature
    - NSMutableArray
    - NSMutableData
    - NSMutableDictionary
    - NSMutableIndexSet
    - NSMutableOrderedSet
    - NSMutableSet
    - NSMutableString
    - NSNotification
    - NSNull
    - NSNumber
    - NSObject
    - NSOutputStream
    - NSOrderedCollectionChange
    - NSOrderedCollectionDifference
    - NSOrderedSet
    - NSPort
    - NSPortMessage
    - NSProgress
    - NSRunLoop
    - NSSet
    - NSStream
    - NSString
    - NSTimer
    - NSURL
    - NSURLHandle
    - NSValue
    - Protocol
  rename:
    'DOBJCDartInputStreamAdapter': 'DartInputStreamAdapter'
    'DOBJCDartInputStreamAdapterWeakHolder' : 'DartInputStreamAdapterWeakHolder'
    'DOBJCDartProtocolBuilder': 'DartProtocolBuilder'
    'DOBJCDartProtocol': 'DartProtocol'
  member-filter:
    NSBundle:
      exclude:
        # This method is only present in some SDKs, leading to inconsistent
        # code generation.
        - 'localizedStringForKey:value:table:localizations:'
objc-protocols:
  include:
    - NSCoding
    - NSCopying
    - NSFastEnumeration
    - NSItemProviderReading
    - NSItemProviderWriting
    - NSMutableCopying
    - NSObject
    - NSPortDelegate
    - NSSecureCoding
    - NSStreamDelegate
    - Observer
  rename:
    'NSObject': 'NSObjectProtocol'
objc-categories:
  include:
    - NSDataCreation
    - NSExtendedArray
    - NSExtendedData
    - NSExtendedDate
    - NSExtendedDictionary
    - NSExtendedEnumerator
    - NSExtendedMutableArray
    - NSExtendedMutableData
    - NSExtendedMutableDictionary
    - NSExtendedMutableOrderedSet
    - NSExtendedMutableSet
    - NSExtendedOrderedSet
    - NSExtendedSet
    - NSNumberCreation
    - NSNumberIsFloat
    - NSStringExtensionMethods
structs:
  include:
    - AEDesc
    - __CFRunLoop
    - __CFString
    - CGPoint
    - CGRect
    - CGSize
    - NSEdgeInsets
    - NSFastEnumerationState
    - _NSRange
    - _NSZone
    - OpaqueAEDataStorageType
  rename:
    __CFRunLoop: CFRunLoop
    __CFString: CFString
    _NSRange: NSRange
    _NSZone: NSZone
enums:
  include:
    - NSAppleEventSendOptions
    - NSAttributedStringEnumerationOptions
    - NSAttributedStringFormattingOptions
    - NSAttributedStringMarkdownInterpretedSyntax
    - NSAttributedStringMarkdownParsingFailurePolicy
    - NSBinarySearchingOptions
    - NSCollectionChangeType
    - NSComparisonResult
    - NSDataBase64DecodingOptions
    - NSDataBase64EncodingOptions
    - NSDataCompressionAlgorithm
    - NSDataReadingOptions
    - NSDataSearchOptions
    - NSDataWritingOptions
    - NSDecodingFailurePolicy
    - NSEnumerationOptions
    - NSItemProviderFileOptions
    - NSItemProviderRepresentationVisibility
    - NSKeyValueChange
    - NSKeyValueObservingOptions
    - NSKeyValueSetMutationKind
    - NSLinguisticTaggerOptions
    - NSLocaleLanguageDirection
    - NSOrderedCollectionDifferenceCalculationOptions
    - NSPropertyListFormat
    - NSQualityOfService
    - NSSortOptions
    - NSStreamEvent
    - NSStreamStatus
    - NSStringCompareOptions
    - NSStringEncodingConversionOptions
    - NSStringEnumerationOptions
    - NSURLBookmarkCreationOptions
    - NSURLBookmarkResolutionOptions
    - NSURLHandleStatus
typedefs:
  include:
    - 'CFStringRef'
preamble: |
  // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
  // for details. All rights reserved. Use of this source code is governed by a
  // BSD-style license that can be found in the LICENSE file.

  // Bindings for package:objective_c's ObjC code and the Foundation framework.
  // Regenerate bindings with `dart run tool/generate_code.dart`.

  // coverage:ignore-file
