[package]
name = "objc2-foundation"
version = "0.2.2"
description = "Bindings to the Foundation framework"
edition = "2021"
rust-version = "1.60"
keywords = ["cocoa", "apple", "framework", "macos", "ios"]
categories = [
"api-bindings",
"development-tools::ffi",
"external-ffi-bindings",
"os::macos-apis",
]
repository = "https://github.com/madsmtm/objc2"
license = "MIT"
[lints]
workspace = true
[dependencies]
bitflags = { version = "2.5.0", default-features = false, optional = true }
block2 = { path = "../../crates/block2", version = "0.5.1", default-features = false, optional = true }
libc = { version = "0.2.80", default-features = false, optional = true }
objc2 = { path = "../../crates/objc2", version = "0.5.2", default-features = false }
dispatch = { version = "0.2.0", optional = true }
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["dispatch", "all"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
[features]
default = ["std"]
std = ["alloc", "bitflags?/std", "block2?/std", "libc?/std", "objc2/std"]
alloc = ["block2?/alloc", "objc2/alloc"]
apple = []
gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7"]
gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8"]
gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9", "block2?/gnustep-1-9"]
gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0", "block2?/gnustep-2-0"]
gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1", "block2?/gnustep-2-1"]
unstable-static-nsstring = []
dispatch = ["dep:dispatch"]
bitflags = ["dep:bitflags"]
block2 = ["dep:block2"]
libc = ["dep:libc"]
FoundationErrors = []
FoundationLegacySwiftCompatibility = []
NSAffineTransform = []
NSAppleEventDescriptor = ["bitflags"]
NSAppleEventManager = []
NSAppleScript = []
NSArchiver = []
NSArray = ["bitflags"]
NSAttributedString = ["bitflags"]
NSAutoreleasePool = []
NSBackgroundActivityScheduler = []
NSBundle = []
NSByteCountFormatter = ["bitflags"]
NSByteOrder = []
NSCache = []
NSCalendar = ["bitflags"]
NSCalendarDate = []
NSCharacterSet = []
NSClassDescription = []
NSCoder = []
NSComparisonPredicate = ["bitflags"]
NSCompoundPredicate = []
NSConnection = []
NSData = ["bitflags"]
NSDate = []
NSDateComponentsFormatter = ["bitflags"]
NSDateFormatter = []
NSDateInterval = []
NSDateIntervalFormatter = []
NSDecimal = []
NSDecimalNumber = []
NSDictionary = []
NSDistantObject = []
NSDistributedLock = []
NSDistributedNotificationCenter = ["bitflags"]
NSEnergyFormatter = []
NSEnumerator = []
NSError = []
NSException = []
NSExpression = []
NSExtensionContext = []
NSExtensionItem = []
NSExtensionRequestHandling = []
NSFileCoordinator = ["bitflags"]
NSFileHandle = []
NSFileManager = ["bitflags"]
NSFilePresenter = []
NSFileVersion = ["bitflags"]
NSFileWrapper = ["bitflags"]
NSFormatter = []
NSGarbageCollector = []
NSGeometry = ["bitflags"]
NSHFSFileTypes = []
NSHTTPCookie = []
NSHTTPCookieStorage = []
NSHashTable = []
NSHost = []
NSISO8601DateFormatter = ["bitflags"]
NSIndexPath = []
NSIndexSet = []
NSInflectionRule = []
NSInvocation = []
NSItemProvider = ["bitflags"]
NSJSONSerialization = ["bitflags"]
NSKeyValueCoding = []
NSKeyValueObserving = ["bitflags"]
NSKeyedArchiver = []
NSLengthFormatter = []
NSLinguisticTagger = ["bitflags"]
NSListFormatter = []
NSLocale = []
NSLock = []
NSMapTable = []
NSMassFormatter = []
NSMeasurement = []
NSMeasurementFormatter = ["bitflags"]
NSMetadata = []
NSMetadataAttributes = []
NSMethodSignature = []
NSMorphology = []
NSNetServices = ["bitflags"]
NSNotification = []
NSNotificationQueue = ["bitflags"]
NSNull = []
NSNumberFormatter = []
NSObjCRuntime = ["bitflags"]
NSObject = []
NSObjectScripting = []
NSOperation = []
NSOrderedCollectionChange = []
NSOrderedCollectionDifference = ["bitflags"]
NSOrderedSet = []
NSOrthography = []
NSPathUtilities = ["bitflags"]
NSPersonNameComponents = []
NSPersonNameComponentsFormatter = ["bitflags"]
NSPointerArray = []
NSPointerFunctions = ["bitflags"]
NSPort = ["bitflags"]
NSPortCoder = []
NSPortMessage = []
NSPortNameServer = []
NSPredicate = []
NSProcessInfo = ["bitflags"]
NSProgress = []
NSPropertyList = ["bitflags"]
NSProtocolChecker = []
NSProxy = []
NSRange = []
NSRegularExpression = ["bitflags"]
NSRelativeDateTimeFormatter = []
NSRunLoop = []
NSScanner = []
NSScriptClassDescription = []
NSScriptCoercionHandler = []
NSScriptCommand = []
NSScriptCommandDescription = []
NSScriptExecutionContext = []
NSScriptKeyValueCoding = []
NSScriptObjectSpecifiers = []
NSScriptStandardSuiteCommands = []
NSScriptSuiteRegistry = []
NSScriptWhoseTests = []
NSSet = []
NSSortDescriptor = []
NSSpellServer = []
NSStream = ["bitflags"]
NSString = ["bitflags"]
NSTask = []
NSTermOfAddress = []
NSTextCheckingResult = ["bitflags"]
NSThread = []
NSTimeZone = []
NSTimer = []
NSURL = ["bitflags"]
NSURLAuthenticationChallenge = []
NSURLCache = []
NSURLConnection = []
NSURLCredential = []
NSURLCredentialStorage = []
NSURLDownload = []
NSURLError = []
NSURLHandle = []
NSURLProtectionSpace = []
NSURLProtocol = []
NSURLRequest = []
NSURLResponse = []
NSURLSession = []
NSUUID = []
NSUbiquitousKeyValueStore = []
NSUndoManager = []
NSUnit = []
NSUserActivity = []
NSUserDefaults = []
NSUserNotification = []
NSUserScriptTask = []
NSValue = []
NSValueTransformer = []
NSXMLDTD = []
NSXMLDTDNode = []
NSXMLDocument = []
NSXMLElement = []
NSXMLNode = []
NSXMLNodeOptions = ["bitflags"]
NSXMLParser = []
NSXPCConnection = ["bitflags"]
NSZone = []
all = [
"FoundationErrors",
"FoundationLegacySwiftCompatibility",
"NSAffineTransform",
"NSAppleEventDescriptor",
"NSAppleEventManager",
"NSAppleScript",
"NSArchiver",
"NSArray",
"NSAttributedString",
"NSAutoreleasePool",
"NSBackgroundActivityScheduler",
"NSBundle",
"NSByteCountFormatter",
"NSByteOrder",
"NSCache",
"NSCalendar",
"NSCalendarDate",
"NSCharacterSet",
"NSClassDescription",
"NSCoder",
"NSComparisonPredicate",
"NSCompoundPredicate",
"NSConnection",
"NSData",
"NSDate",
"NSDateComponentsFormatter",
"NSDateFormatter",
"NSDateInterval",
"NSDateIntervalFormatter",
"NSDecimal",
"NSDecimalNumber",
"NSDictionary",
"NSDistantObject",
"NSDistributedLock",
"NSDistributedNotificationCenter",
"NSEnergyFormatter",
"NSEnumerator",
"NSError",
"NSException",
"NSExpression",
"NSExtensionContext",
"NSExtensionItem",
"NSExtensionRequestHandling",
"NSFileCoordinator",
"NSFileHandle",
"NSFileManager",
"NSFilePresenter",
"NSFileVersion",
"NSFileWrapper",
"NSFormatter",
"NSGarbageCollector",
"NSGeometry",
"NSHFSFileTypes",
"NSHTTPCookie",
"NSHTTPCookieStorage",
"NSHashTable",
"NSHost",
"NSISO8601DateFormatter",
"NSIndexPath",
"NSIndexSet",
"NSInflectionRule",
"NSInvocation",
"NSItemProvider",
"NSJSONSerialization",
"NSKeyValueCoding",
"NSKeyValueObserving",
"NSKeyedArchiver",
"NSLengthFormatter",
"NSLinguisticTagger",
"NSListFormatter",
"NSLocale",
"NSLock",
"NSMapTable",
"NSMassFormatter",
"NSMeasurement",
"NSMeasurementFormatter",
"NSMetadata",
"NSMetadataAttributes",
"NSMethodSignature",
"NSMorphology",
"NSNetServices",
"NSNotification",
"NSNotificationQueue",
"NSNull",
"NSNumberFormatter",
"NSObjCRuntime",
"NSObject",
"NSObjectScripting",
"NSOperation",
"NSOrderedCollectionChange",
"NSOrderedCollectionDifference",
"NSOrderedSet",
"NSOrthography",
"NSPathUtilities",
"NSPersonNameComponents",
"NSPersonNameComponentsFormatter",
"NSPointerArray",
"NSPointerFunctions",
"NSPort",
"NSPortCoder",
"NSPortMessage",
"NSPortNameServer",
"NSPredicate",
"NSProcessInfo",
"NSProgress",
"NSPropertyList",
"NSProtocolChecker",
"NSProxy",
"NSRange",
"NSRegularExpression",
"NSRelativeDateTimeFormatter",
"NSRunLoop",
"NSScanner",
"NSScriptClassDescription",
"NSScriptCoercionHandler",
"NSScriptCommand",
"NSScriptCommandDescription",
"NSScriptExecutionContext",
"NSScriptKeyValueCoding",
"NSScriptObjectSpecifiers",
"NSScriptStandardSuiteCommands",
"NSScriptSuiteRegistry",
"NSScriptWhoseTests",
"NSSet",
"NSSortDescriptor",
"NSSpellServer",
"NSStream",
"NSString",
"NSTask",
"NSTermOfAddress",
"NSTextCheckingResult",
"NSThread",
"NSTimeZone",
"NSTimer",
"NSURL",
"NSURLAuthenticationChallenge",
"NSURLCache",
"NSURLConnection",
"NSURLCredential",
"NSURLCredentialStorage",
"NSURLDownload",
"NSURLError",
"NSURLHandle",
"NSURLProtectionSpace",
"NSURLProtocol",
"NSURLRequest",
"NSURLResponse",
"NSURLSession",
"NSUUID",
"NSUbiquitousKeyValueStore",
"NSUndoManager",
"NSUnit",
"NSUserActivity",
"NSUserDefaults",
"NSUserNotification",
"NSUserScriptTask",
"NSValue",
"NSValueTransformer",
"NSXMLDTD",
"NSXMLDTDNode",
"NSXMLDocument",
"NSXMLElement",
"NSXMLNode",
"NSXMLNodeOptions",
"NSXMLParser",
"NSXPCConnection",
"NSZone",
"bitflags",
"block2",
"libc",
]
[dev-dependencies]
static_assertions = "1.1.0"
[[example]]
name = "basic_usage"
required-features = [
"NSArray",
"NSDictionary",
"NSEnumerator",
"NSRange",
"NSObject",
]
[[example]]
name = "speech_synthesis"
required-features = [
"NSString",
"NSObject",
]