peachsim 0.1.1728 → 0.1.1738
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/control.ts +1 -0
- package/cli/commands/coverage-swift.ts +112 -4
- package/cli/commands/package.ts +11 -1
- package/cli/commands/shell-url.ts +4 -0
- package/cli/scene-video.ts +24 -7
- package/detox/index.ts +9 -1
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +3592 -1918
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +13 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1329 -1022
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +2 -2
- package/dist-lib/home-paths.cjs +7 -2
- package/dist-lib/host/bridge-host.cjs +3773 -2149
- package/dist-lib/host/fetch-proxy-handler.cjs +16 -5
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +97 -68
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +209 -32
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +93 -65
- package/dist-lib/native-app-identity-project.cjs +37 -31
- package/dist-lib/native-app-identity-project.mjs +37 -31
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +5 -2
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +23 -23
- package/dist-lib/public-origins-lib.json +79 -53
- package/dist-lib/react-native-host-modules.cjs +5 -2
- package/dist-lib/react-native-host-modules.mjs +5 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +4486 -2789
- package/dist-lib/swift-compile.cjs +53 -60
- package/dist-lib/swift-compile.mjs +52 -60
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +17 -17
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1056 -870
- package/dist-lib/vite.cjs +20 -8
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -2
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +13 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -3
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +636 -37
- package/sdk/ios/usr/include/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/peach-debug/SKILL.md +0 -1
- package/skills/peach-perf/SKILL.md +0 -1
- package/skills/peach-setup/SKILL.md +0 -1
- package/skills/peach-test/SKILL.md +0 -1
- package/skills/peach-visual/SKILL.md +0 -1
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/appPackageContract.ts +2 -0
- package/src/bundle-channel.mjs +20 -2
- package/src/cli-runtime.ts +9 -5
- package/src/expo-discovery-cache.ts +7 -3
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-native-workspace.ts +135 -40
- package/src/expo-swift-host.ts +93 -20
- package/src/expo-swift-ready.ts +5 -1
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +9 -2
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +6 -1
- package/src/host/bridge-host.ts +5 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/kotlin-host.ts +204 -30
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +7 -0
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +251 -251
- package/src/nitro-adapter.ts +56 -50
- package/src/nitro-bundle.ts +84 -74
- package/src/nitro-compile.ts +10 -5
- package/src/nitro-dependencies.ts +43 -28
- package/src/nitro-source.ts +60 -26
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +64 -21
- package/src/react-native-bridge-modules.ts +2 -0
- package/src/react-native-host-modules.ts +4 -1
- package/src/settingsContract.ts +11 -0
- package/src/storageSnapshotContract.ts +29 -81
- package/src/swift-compile.ts +49 -50
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode.ts +9 -1
- package/src/swift-distribution.lock.json +15 -12
- package/src/swift-host.ts +3 -0
- package/src/swift-standin-emit.ts +6 -1
- package/src/swift-standins.ts +172 -10
- package/src/swift-submit.ts +5 -1
- package/src/swift-toolchain.ts +16 -16
- package/src/turbo-bundle.ts +81 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +4 -3
|
@@ -1610,6 +1610,7 @@ __attribute__((swift_bridge("URLRequest")))
|
|
|
1610
1610
|
@property (nullable, copy) NSData *HTTPBody;
|
|
1611
1611
|
@end
|
|
1612
1612
|
NS_SWIFT_NAME(URLResponse)
|
|
1613
|
+
NS_SWIFT_SENDABLE
|
|
1613
1614
|
@interface NSURLResponse : NSObject <NSCopying, NSSecureCoding>
|
|
1614
1615
|
- (instancetype)initWithURL:(NSURL *)URL MIMEType:(nullable NSString *)MIMEType expectedContentLength:(NSInteger)length textEncodingName:(nullable NSString *)name;
|
|
1615
1616
|
@property (nullable, readonly, copy) NSString *textEncodingName;
|
|
@@ -1619,6 +1620,7 @@ NS_SWIFT_NAME(URLResponse)
|
|
|
1619
1620
|
@property (nullable, readonly, copy) NSURL *URL;
|
|
1620
1621
|
@end
|
|
1621
1622
|
NS_SWIFT_NAME(HTTPURLResponse)
|
|
1623
|
+
NS_SWIFT_SENDABLE
|
|
1622
1624
|
@interface NSHTTPURLResponse : NSURLResponse
|
|
1623
1625
|
+ (NSString *)localizedStringForStatusCode:(NSInteger)statusCode;
|
|
1624
1626
|
- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
|
|
@@ -1702,10 +1704,20 @@ __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=
|
|
|
1702
1704
|
- (void)storeCookies:(NSArray<NSHTTPCookie *> *)cookies forTask:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
1703
1705
|
- (void)getCookiesForTask:(NSURLSessionTask *)task completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSArray<NSHTTPCookie *> * _Nullable cookies))completionHandler __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
1704
1706
|
@end
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1707
|
+
@class NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, NSURLCredential, NSInputStream, NSOutputStream, NSURLSessionTaskMetrics, NSHTTPURLResponse, NSURLSessionDataTask, NSURLSessionDownloadTask, NSURLSessionStreamTask, NSCachedURLResponse, NSURLSessionUploadTask, NSURLSessionWebSocketTask, NSURLSessionConfiguration, NSURLSessionTaskTransactionMetrics, NSProgress, NSURLCredentialStorage;
|
|
1708
|
+
typedef NS_ENUM(NSInteger, NSURLSessionWebSocketCloseCode);
|
|
1709
|
+
typedef NS_ENUM(NSUInteger, NSURLRequestNetworkServiceType)
|
|
1710
|
+
{
|
|
1711
|
+
NSURLNetworkServiceTypeDefault = 0,
|
|
1712
|
+
NSURLNetworkServiceTypeVoIP API_DEPRECATED("Use PushKit for VoIP control purposes", macos(10.7,10.15), ios(4.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0)) = 1,
|
|
1713
|
+
NSURLNetworkServiceTypeVideo = 2,
|
|
1714
|
+
NSURLNetworkServiceTypeBackground = 3,
|
|
1715
|
+
NSURLNetworkServiceTypeVoice = 4,
|
|
1716
|
+
NSURLNetworkServiceTypeResponsiveData = 6,
|
|
1717
|
+
NSURLNetworkServiceTypeAVStreaming API_AVAILABLE(macosx(10.9), ios(7.0), watchos(2.0), tvos(9.0)) = 8 ,
|
|
1718
|
+
NSURLNetworkServiceTypeResponsiveAV API_AVAILABLE(macosx(10.9), ios(7.0), watchos(2.0), tvos(9.0)) = 9,
|
|
1719
|
+
NSURLNetworkServiceTypeCallSignaling API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) = 11,
|
|
1720
|
+
};
|
|
1709
1721
|
typedef NS_ENUM(NSInteger, NSURLSessionAuthChallengeDisposition) {
|
|
1710
1722
|
NSURLSessionAuthChallengeUseCredential = 0,
|
|
1711
1723
|
NSURLSessionAuthChallengePerformDefaultHandling = 1,
|
|
@@ -1722,8 +1734,17 @@ typedef NS_ENUM(NSInteger, NSURLSessionDelayedRequestDisposition) {
|
|
|
1722
1734
|
NSURLSessionDelayedRequestContinueLoading = 0,
|
|
1723
1735
|
NSURLSessionDelayedRequestUseNewRequest = 1,
|
|
1724
1736
|
NSURLSessionDelayedRequestCancel = 2,
|
|
1725
|
-
} __attribute__((availability(macos,introduced=10.13), availability(ios,introduced=11.0), availability(watchos,introduced=4.0), availability(tvos,introduced=11.0)));
|
|
1726
|
-
|
|
1737
|
+
} NS_SWIFT_NAME(URLSession.DelayedRequestDisposition) __attribute__((availability(macos,introduced=10.13), availability(ios,introduced=11.0), availability(watchos,introduced=4.0), availability(tvos,introduced=11.0)));
|
|
1738
|
+
NS_SWIFT_NAME(URLSessionDelegate)
|
|
1739
|
+
NS_SWIFT_SENDABLE
|
|
1740
|
+
API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
|
|
1741
|
+
@protocol NSURLSessionDelegate <NSObject>
|
|
1742
|
+
@optional
|
|
1743
|
+
- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(nullable NSError *)error;
|
|
1744
|
+
- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
|
|
1745
|
+
completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler;
|
|
1746
|
+
- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session API_AVAILABLE(macos(11.0), ios(7.0), watchos(2.0), tvos(9.0));
|
|
1747
|
+
@end
|
|
1727
1748
|
@protocol NSURLSessionTaskDelegate <NSURLSessionDelegate>
|
|
1728
1749
|
@optional
|
|
1729
1750
|
- (void)URLSession:(NSURLSession *)session didCreateTask:(NSURLSessionTask *)task
|
|
@@ -1745,7 +1766,7 @@ typedef NS_ENUM(NSInteger, NSURLSessionDelayedRequestDisposition) {
|
|
|
1745
1766
|
needNewBodyStream:(void (NS_SWIFT_SENDABLE ^)(NSInputStream * _Nullable bodyStream))completionHandler NS_SWIFT_ASYNC_NAME(urlSession(_:needNewBodyStreamForTask:));
|
|
1746
1767
|
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
|
|
1747
1768
|
needNewBodyStreamFromOffset:(int64_t)offset
|
|
1748
|
-
completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSInputStream * _Nullable bodyStream))completionHandler
|
|
1769
|
+
completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSInputStream * _Nullable bodyStream))completionHandler NS_SWIFT_NAME(urlSession(_:task:needNewBodyStreamFrom:completionHandler:)) NS_SWIFT_ASYNC_NAME(urlSession(_:needNewBodyStreamForTask:from:)) __attribute__((availability(macos,introduced=14.0), availability(ios,introduced=17.0), availability(watchos,introduced=10.0), availability(tvos,introduced=17.0)));
|
|
1749
1770
|
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
|
|
1750
1771
|
didSendBodyData:(int64_t)bytesSent
|
|
1751
1772
|
totalBytesSent:(int64_t)totalBytesSent
|
|
@@ -1772,42 +1793,488 @@ NS_SWIFT_NAME(URLSessionDataDelegate)
|
|
|
1772
1793
|
willCacheResponse:(NSCachedURLResponse *)proposedResponse
|
|
1773
1794
|
completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSCachedURLResponse * _Nullable cachedResponse))completionHandler;
|
|
1774
1795
|
@end
|
|
1796
|
+
@protocol NSURLSessionDownloadDelegate <NSURLSessionTaskDelegate>
|
|
1797
|
+
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
|
1798
|
+
didFinishDownloadingToURL:(NSURL *)location;
|
|
1799
|
+
@optional
|
|
1800
|
+
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
|
1801
|
+
didWriteData:(int64_t)bytesWritten
|
|
1802
|
+
totalBytesWritten:(int64_t)totalBytesWritten
|
|
1803
|
+
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite;
|
|
1804
|
+
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
|
1805
|
+
didResumeAtOffset:(int64_t)fileOffset
|
|
1806
|
+
expectedTotalBytes:(int64_t)expectedTotalBytes;
|
|
1807
|
+
@end
|
|
1808
|
+
@protocol NSURLSessionStreamDelegate <NSURLSessionTaskDelegate>
|
|
1809
|
+
@optional
|
|
1810
|
+
- (void)URLSession:(NSURLSession *)session readClosedForStreamTask:(NSURLSessionStreamTask *)streamTask;
|
|
1811
|
+
- (void)URLSession:(NSURLSession *)session writeClosedForStreamTask:(NSURLSessionStreamTask *)streamTask;
|
|
1812
|
+
- (void)URLSession:(NSURLSession *)session betterRouteDiscoveredForStreamTask:(NSURLSessionStreamTask *)streamTask;
|
|
1813
|
+
- (void)URLSession:(NSURLSession *)session streamTask:(NSURLSessionStreamTask *)streamTask
|
|
1814
|
+
didBecomeInputStream:(NSInputStream *)inputStream
|
|
1815
|
+
outputStream:(NSOutputStream *)outputStream;
|
|
1816
|
+
@end
|
|
1817
|
+
@protocol NSURLSessionWebSocketDelegate <NSURLSessionTaskDelegate>
|
|
1818
|
+
@optional
|
|
1819
|
+
- (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask didOpenWithProtocol:(nullable NSString *)protocol;
|
|
1820
|
+
- (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(nullable NSData *)reason;
|
|
1821
|
+
@end
|
|
1775
1822
|
@class NSURLSessionDataTask;
|
|
1823
|
+
@class NSNetService;
|
|
1776
1824
|
NS_SWIFT_NAME(URLSession)
|
|
1777
1825
|
NS_SWIFT_SENDABLE
|
|
1778
|
-
|
|
1826
|
+
API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
|
|
1779
1827
|
@interface NSURLSession : NSObject
|
|
1780
|
-
|
|
1828
|
+
|
|
1829
|
+
@property (class, readonly, strong) NSURLSession *sharedSession;
|
|
1830
|
+
|
|
1831
|
+
+ (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration;
|
|
1832
|
+
|
|
1833
|
+
+ (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration delegate:(nullable id <NSURLSessionDelegate>)delegate delegateQueue:(nullable NSOperationQueue *)queue;
|
|
1834
|
+
|
|
1835
|
+
@property (readonly, retain) NSOperationQueue *delegateQueue;
|
|
1836
|
+
|
|
1781
1837
|
@property (nullable, readonly, retain) id <NSURLSessionDelegate> delegate;
|
|
1838
|
+
|
|
1839
|
+
@property (readonly, copy) NSURLSessionConfiguration *configuration;
|
|
1840
|
+
|
|
1841
|
+
@property (nullable, copy) NSString *sessionDescription;
|
|
1842
|
+
|
|
1782
1843
|
- (void)finishTasksAndInvalidate;
|
|
1844
|
+
|
|
1845
|
+
- (void)invalidateAndCancel;
|
|
1846
|
+
|
|
1847
|
+
- (void)resetWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(void))completionHandler;
|
|
1848
|
+
|
|
1849
|
+
- (void)flushWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(void))completionHandler;
|
|
1850
|
+
|
|
1851
|
+
- (void)getTasksWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSArray<NSURLSessionDataTask *> *dataTasks, NSArray<NSURLSessionUploadTask *> *uploadTasks, NSArray<NSURLSessionDownloadTask *> *downloadTasks))completionHandler NS_SWIFT_ASYNC_NAME(getter:tasks());
|
|
1852
|
+
|
|
1853
|
+
- (void)getAllTasksWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSArray<__kindof NSURLSessionTask *> *tasks))completionHandler NS_SWIFT_ASYNC_NAME(getter:allTasks()) API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
|
|
1854
|
+
|
|
1855
|
+
|
|
1783
1856
|
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request;
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
- (
|
|
1857
|
+
|
|
1858
|
+
- (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url;
|
|
1859
|
+
|
|
1860
|
+
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL;
|
|
1861
|
+
|
|
1862
|
+
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(NSData *)bodyData;
|
|
1863
|
+
|
|
1864
|
+
- (NSURLSessionUploadTask *)uploadTaskWithResumeData:(NSData *)resumeData API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
|
|
1865
|
+
|
|
1866
|
+
- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request;
|
|
1867
|
+
|
|
1868
|
+
- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request;
|
|
1869
|
+
|
|
1870
|
+
- (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url;
|
|
1871
|
+
|
|
1872
|
+
- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData;
|
|
1873
|
+
|
|
1874
|
+
- (NSURLSessionStreamTask *)streamTaskWithHostName:(NSString *)hostname port:(NSInteger)port API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
|
|
1875
|
+
|
|
1876
|
+
- (NSURLSessionStreamTask *)streamTaskWithNetService:(NSNetService *)service API_DEPRECATED("Use nw_connection_t in Network framework instead", macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(watchos);
|
|
1877
|
+
|
|
1878
|
+
- (NSURLSessionWebSocketTask *)webSocketTaskWithURL:(NSURL *)url API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
1879
|
+
|
|
1880
|
+
- (NSURLSessionWebSocketTask *)webSocketTaskWithURL:(NSURL *)url protocols:(NSArray<NSString *>*)protocols API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
1881
|
+
|
|
1882
|
+
- (NSURLSessionWebSocketTask *)webSocketTaskWithRequest:(NSURLRequest *)request API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
- (instancetype)init API_DEPRECATED("Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1886
|
+
+ (instancetype)new API_DEPRECATED("Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1887
|
+
|
|
1788
1888
|
@end
|
|
1889
|
+
@interface NSURLSession (NSURLSessionAsynchronousConvenience)
|
|
1890
|
+
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
|
1891
|
+
|
|
1892
|
+
- (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
|
1893
|
+
|
|
1894
|
+
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
|
1895
|
+
|
|
1896
|
+
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(nullable NSData *)bodyData completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
|
1897
|
+
|
|
1898
|
+
- (NSURLSessionUploadTask *)uploadTaskWithResumeData:(NSData *)resumeData completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
|
|
1899
|
+
|
|
1900
|
+
- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
|
1901
|
+
|
|
1902
|
+
- (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
|
1903
|
+
|
|
1904
|
+
- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
|
1905
|
+
|
|
1906
|
+
@end
|
|
1907
|
+
@protocol NSProgressReporting <NSObject>
|
|
1908
|
+
@property (readonly, strong) NSProgress *progress;
|
|
1909
|
+
@end
|
|
1910
|
+
typedef NS_ENUM(NSInteger, NSURLSessionTaskState) {
|
|
1911
|
+
NSURLSessionTaskStateRunning = 0,
|
|
1912
|
+
NSURLSessionTaskStateSuspended = 1,
|
|
1913
|
+
NSURLSessionTaskStateCanceling = 2,
|
|
1914
|
+
NSURLSessionTaskStateCompleted = 3,
|
|
1915
|
+
} API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
|
|
1789
1916
|
NS_SWIFT_NAME(URLSessionTask)
|
|
1790
1917
|
NS_SWIFT_SENDABLE
|
|
1791
|
-
|
|
1792
|
-
@interface NSURLSessionTask : NSObject <NSCopying>
|
|
1793
|
-
|
|
1918
|
+
API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
|
|
1919
|
+
@interface NSURLSessionTask : NSObject <NSCopying, NSProgressReporting>
|
|
1920
|
+
|
|
1921
|
+
@property (readonly) NSInteger taskIdentifier;
|
|
1922
|
+
|
|
1923
|
+
@property (nullable, readonly, copy) NSURLRequest *originalRequest;
|
|
1924
|
+
|
|
1925
|
+
@property (nullable, readonly, copy) NSURLRequest *currentRequest;
|
|
1926
|
+
|
|
1927
|
+
@property (nullable, readonly, copy) NSURLResponse *response;
|
|
1928
|
+
|
|
1929
|
+
@property (nullable, retain) id <NSURLSessionTaskDelegate> delegate API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
|
|
1930
|
+
|
|
1931
|
+
@property (readonly, strong) NSProgress *progress API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
|
1932
|
+
|
|
1933
|
+
@property (nullable, copy) NSDate *earliestBeginDate API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
|
1934
|
+
|
|
1935
|
+
@property int64_t countOfBytesClientExpectsToSend API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
|
1936
|
+
|
|
1937
|
+
@property int64_t countOfBytesClientExpectsToReceive API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
|
1938
|
+
|
|
1939
|
+
|
|
1940
|
+
@property (readonly) int64_t countOfBytesSent;
|
|
1941
|
+
|
|
1942
|
+
@property (readonly) int64_t countOfBytesReceived;
|
|
1943
|
+
|
|
1944
|
+
@property (readonly) int64_t countOfBytesExpectedToSend;
|
|
1945
|
+
|
|
1946
|
+
@property (readonly) int64_t countOfBytesExpectedToReceive;
|
|
1947
|
+
|
|
1948
|
+
@property (nullable, copy) NSString *taskDescription;
|
|
1949
|
+
|
|
1794
1950
|
- (void)cancel;
|
|
1795
|
-
|
|
1951
|
+
|
|
1952
|
+
@property (readonly) NSURLSessionTaskState state;
|
|
1953
|
+
|
|
1954
|
+
@property (nullable, readonly, copy) NSError *error;
|
|
1955
|
+
|
|
1956
|
+
- (void)suspend;
|
|
1957
|
+
|
|
1796
1958
|
- (void)resume;
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1959
|
+
|
|
1960
|
+
@property float priority API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
1961
|
+
|
|
1962
|
+
@property BOOL prefersIncrementalDelivery API_AVAILABLE(macos(11.3), ios(14.5), watchos(7.4), tvos(14.5));
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
- (instancetype)init API_DEPRECATED("Not supported", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1966
|
+
+ (instancetype)new API_DEPRECATED("Not supported", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1967
|
+
|
|
1800
1968
|
@end
|
|
1801
1969
|
NS_SWIFT_NAME(URLSessionDataTask)
|
|
1802
1970
|
NS_SWIFT_SENDABLE
|
|
1803
|
-
|
|
1971
|
+
API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
|
|
1804
1972
|
@interface NSURLSessionDataTask : NSURLSessionTask
|
|
1973
|
+
|
|
1974
|
+
- (instancetype)init API_DEPRECATED("Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1975
|
+
+ (instancetype)new API_DEPRECATED("Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1976
|
+
|
|
1977
|
+
@end
|
|
1978
|
+
NS_SWIFT_SENDABLE
|
|
1979
|
+
API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
|
|
1980
|
+
@interface NSURLSessionUploadTask : NSURLSessionDataTask
|
|
1981
|
+
|
|
1982
|
+
- (instancetype)init API_DEPRECATED("Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1983
|
+
+ (instancetype)new API_DEPRECATED("Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1984
|
+
|
|
1985
|
+
- (void)cancelByProducingResumeData:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable resumeData))completionHandler API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
|
|
1986
|
+
|
|
1987
|
+
@end
|
|
1988
|
+
NS_SWIFT_SENDABLE
|
|
1989
|
+
API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
|
|
1990
|
+
@interface NSURLSessionDownloadTask : NSURLSessionTask
|
|
1991
|
+
|
|
1992
|
+
- (void)cancelByProducingResumeData:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable resumeData))completionHandler;
|
|
1993
|
+
|
|
1994
|
+
|
|
1995
|
+
- (instancetype)init API_DEPRECATED("Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1996
|
+
+ (instancetype)new API_DEPRECATED("Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
1997
|
+
|
|
1998
|
+
@end
|
|
1999
|
+
NS_SWIFT_SENDABLE
|
|
2000
|
+
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
|
|
2001
|
+
@interface NSURLSessionStreamTask : NSURLSessionTask
|
|
2002
|
+
|
|
2003
|
+
- (void)readDataOfMinLength:(NSInteger)minBytes maxLength:(NSInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
|
|
2004
|
+
|
|
2005
|
+
- (void)writeData:(NSData *)data timeout:(NSTimeInterval)timeout completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSError * _Nullable error))completionHandler;
|
|
2006
|
+
|
|
2007
|
+
- (void)captureStreams;
|
|
2008
|
+
|
|
2009
|
+
- (void)closeWrite;
|
|
2010
|
+
|
|
2011
|
+
- (void)closeRead;
|
|
2012
|
+
|
|
2013
|
+
- (void)startSecureConnection;
|
|
2014
|
+
|
|
2015
|
+
- (void)stopSecureConnection API_DEPRECATED("TLS cannot be disabled once it is enabled", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
- (instancetype)init API_DEPRECATED("Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
2019
|
+
+ (instancetype)new API_DEPRECATED("Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
2020
|
+
|
|
2021
|
+
@end
|
|
2022
|
+
typedef NS_ENUM(NSInteger, NSURLSessionWebSocketMessageType) {
|
|
2023
|
+
NSURLSessionWebSocketMessageTypeData = 0,
|
|
2024
|
+
NSURLSessionWebSocketMessageTypeString = 1,
|
|
2025
|
+
} API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2026
|
+
NS_SWIFT_SENDABLE
|
|
2027
|
+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
|
|
2028
|
+
@interface NSURLSessionWebSocketMessage : NSObject
|
|
2029
|
+
|
|
2030
|
+
- (instancetype)initWithData:(NSData *)data NS_DESIGNATED_INITIALIZER;
|
|
2031
|
+
|
|
2032
|
+
- (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER;
|
|
2033
|
+
|
|
2034
|
+
@property (readonly) NSURLSessionWebSocketMessageType type;
|
|
2035
|
+
@property (nullable, readonly, copy) NSData *data;
|
|
2036
|
+
@property (nullable, readonly, copy) NSString *string;
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
2040
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
2041
|
+
|
|
2042
|
+
@end
|
|
2043
|
+
typedef NS_ENUM(NSInteger, NSURLSessionWebSocketCloseCode)
|
|
2044
|
+
{
|
|
2045
|
+
NSURLSessionWebSocketCloseCodeInvalid = 0,
|
|
2046
|
+
NSURLSessionWebSocketCloseCodeNormalClosure = 1000,
|
|
2047
|
+
NSURLSessionWebSocketCloseCodeGoingAway = 1001,
|
|
2048
|
+
NSURLSessionWebSocketCloseCodeProtocolError = 1002,
|
|
2049
|
+
NSURLSessionWebSocketCloseCodeUnsupportedData = 1003,
|
|
2050
|
+
NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005,
|
|
2051
|
+
NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006,
|
|
2052
|
+
NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007,
|
|
2053
|
+
NSURLSessionWebSocketCloseCodePolicyViolation = 1008,
|
|
2054
|
+
NSURLSessionWebSocketCloseCodeMessageTooBig = 1009,
|
|
2055
|
+
NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = 1010,
|
|
2056
|
+
NSURLSessionWebSocketCloseCodeInternalServerError = 1011,
|
|
2057
|
+
NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015,
|
|
2058
|
+
} API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2059
|
+
NS_SWIFT_SENDABLE
|
|
2060
|
+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
|
|
2061
|
+
@interface NSURLSessionWebSocketTask : NSURLSessionTask
|
|
2062
|
+
|
|
2063
|
+
- (void)sendMessage:(NSURLSessionWebSocketMessage *)message completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * _Nullable error))completionHandler;
|
|
2064
|
+
|
|
2065
|
+
- (void)receiveMessageWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURLSessionWebSocketMessage * _Nullable message, NSError * _Nullable error))completionHandler;
|
|
2066
|
+
|
|
2067
|
+
- (void)sendPingWithPongReceiveHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * _Nullable error))pongReceiveHandler;
|
|
2068
|
+
|
|
2069
|
+
- (void)cancelWithCloseCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(nullable NSData *)reason;
|
|
2070
|
+
|
|
2071
|
+
@property NSInteger maximumMessageSize;
|
|
2072
|
+
|
|
2073
|
+
@property (readonly) NSURLSessionWebSocketCloseCode closeCode;
|
|
2074
|
+
|
|
2075
|
+
@property (nullable, readonly, copy) NSData *closeReason;
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
2079
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
2080
|
+
|
|
2081
|
+
@end
|
|
2082
|
+
typedef NS_ENUM(NSInteger, NSURLSessionMultipathServiceType)
|
|
2083
|
+
{
|
|
2084
|
+
NSURLSessionMultipathServiceTypeNone = 0,
|
|
2085
|
+
NSURLSessionMultipathServiceTypeHandover = 1,
|
|
2086
|
+
NSURLSessionMultipathServiceTypeInteractive = 2,
|
|
2087
|
+
NSURLSessionMultipathServiceTypeAggregate = 3
|
|
2088
|
+
} API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos) NS_SWIFT_NAME(URLSessionConfiguration.MultipathServiceType);
|
|
2089
|
+
typedef NS_ENUM(NSInteger, NSURLSessionTaskMetricsResourceFetchType) {
|
|
2090
|
+
NSURLSessionTaskMetricsResourceFetchTypeUnknown,
|
|
2091
|
+
NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad,
|
|
2092
|
+
NSURLSessionTaskMetricsResourceFetchTypeServerPush API_DEPRECATED("Server push is no longer supported as of iOS 17 and aligned releases", macos(10.12,15.4), ios(10.0,18.4), watchos(3.0,11.4), tvos(10.0,18.4), visionos(1.0,2.4)),
|
|
2093
|
+
NSURLSessionTaskMetricsResourceFetchTypeLocalCache,
|
|
2094
|
+
} API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
|
|
2095
|
+
typedef NS_ENUM(NSInteger, NSURLSessionTaskMetricsDomainResolutionProtocol) {
|
|
2096
|
+
NSURLSessionTaskMetricsDomainResolutionProtocolUnknown,
|
|
2097
|
+
NSURLSessionTaskMetricsDomainResolutionProtocolUDP, /* Resolution used DNS over UDP. */
|
|
2098
|
+
NSURLSessionTaskMetricsDomainResolutionProtocolTCP, /* Resolution used DNS over TCP. */
|
|
2099
|
+
NSURLSessionTaskMetricsDomainResolutionProtocolTLS, /* Resolution used DNS over TLS. */
|
|
2100
|
+
NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, /* Resolution used DNS over HTTPS. */
|
|
2101
|
+
} API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
|
|
2102
|
+
NS_SWIFT_SENDABLE
|
|
2103
|
+
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
2104
|
+
@interface NSURLSessionTaskTransactionMetrics : NSObject
|
|
2105
|
+
|
|
2106
|
+
@property (copy, readonly) NSURLRequest *request;
|
|
2107
|
+
|
|
2108
|
+
@property (nullable, copy, readonly) NSURLResponse *response;
|
|
2109
|
+
|
|
2110
|
+
|
|
2111
|
+
@property (nullable, copy, readonly) NSDate *fetchStartDate;
|
|
2112
|
+
|
|
2113
|
+
@property (nullable, copy, readonly) NSDate *domainLookupStartDate;
|
|
2114
|
+
|
|
2115
|
+
@property (nullable, copy, readonly) NSDate *domainLookupEndDate;
|
|
2116
|
+
|
|
2117
|
+
@property (nullable, copy, readonly) NSDate *connectStartDate;
|
|
2118
|
+
|
|
2119
|
+
@property (nullable, copy, readonly) NSDate *secureConnectionStartDate;
|
|
2120
|
+
|
|
2121
|
+
@property (nullable, copy, readonly) NSDate *secureConnectionEndDate;
|
|
2122
|
+
|
|
2123
|
+
@property (nullable, copy, readonly) NSDate *connectEndDate;
|
|
2124
|
+
|
|
2125
|
+
@property (nullable, copy, readonly) NSDate *requestStartDate;
|
|
2126
|
+
|
|
2127
|
+
@property (nullable, copy, readonly) NSDate *requestEndDate;
|
|
2128
|
+
|
|
2129
|
+
@property (nullable, copy, readonly) NSDate *responseStartDate;
|
|
2130
|
+
|
|
2131
|
+
@property (nullable, copy, readonly) NSDate *responseEndDate;
|
|
2132
|
+
|
|
2133
|
+
@property (nullable, copy, readonly) NSString *networkProtocolName;
|
|
2134
|
+
|
|
2135
|
+
@property (assign, readonly, getter=isProxyConnection) BOOL proxyConnection;
|
|
2136
|
+
|
|
2137
|
+
@property (assign, readonly, getter=isReusedConnection) BOOL reusedConnection;
|
|
2138
|
+
|
|
2139
|
+
@property (assign, readonly) NSURLSessionTaskMetricsResourceFetchType resourceFetchType;
|
|
2140
|
+
|
|
2141
|
+
@property (readonly) int64_t countOfRequestHeaderBytesSent API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2142
|
+
|
|
2143
|
+
@property (readonly) int64_t countOfRequestBodyBytesSent API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2144
|
+
|
|
2145
|
+
@property (readonly) int64_t countOfRequestBodyBytesBeforeEncoding API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2146
|
+
|
|
2147
|
+
@property (readonly) int64_t countOfResponseHeaderBytesReceived API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2148
|
+
|
|
2149
|
+
@property (readonly) int64_t countOfResponseBodyBytesReceived API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2150
|
+
|
|
2151
|
+
@property (readonly) int64_t countOfResponseBodyBytesAfterDecoding API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2152
|
+
|
|
2153
|
+
@property (nullable, copy, readonly) NSString *localAddress API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2154
|
+
|
|
2155
|
+
@property (nullable, copy, readonly) NSNumber *localPort API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2156
|
+
|
|
2157
|
+
@property (nullable, copy, readonly) NSString *remoteAddress API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2158
|
+
|
|
2159
|
+
@property (nullable, copy, readonly) NSNumber *remotePort API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2160
|
+
|
|
2161
|
+
@property (nullable, copy, readonly) NSNumber *negotiatedTLSProtocolVersion API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2162
|
+
|
|
2163
|
+
@property (nullable, copy, readonly) NSNumber *negotiatedTLSCipherSuite API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2164
|
+
|
|
2165
|
+
@property (readonly, getter=isCellular) BOOL cellular API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2166
|
+
|
|
2167
|
+
@property (readonly, getter=isExpensive) BOOL expensive API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2168
|
+
|
|
2169
|
+
@property (readonly, getter=isConstrained) BOOL constrained API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2170
|
+
|
|
2171
|
+
@property (readonly, getter=isMultipath) BOOL multipath API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2172
|
+
|
|
2173
|
+
@property (readonly) NSURLSessionTaskMetricsDomainResolutionProtocol domainResolutionProtocol API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
|
|
2174
|
+
|
|
2175
|
+
|
|
2176
|
+
- (instancetype)init API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
|
|
2177
|
+
+ (instancetype)new API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
|
|
2178
|
+
|
|
2179
|
+
@end
|
|
2180
|
+
NS_SWIFT_NAME(URLSessionTaskMetrics)
|
|
2181
|
+
NS_SWIFT_SENDABLE
|
|
2182
|
+
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
2183
|
+
@interface NSURLSessionTaskMetrics : NSObject
|
|
2184
|
+
|
|
2185
|
+
@property (copy, readonly) NSArray<NSURLSessionTaskTransactionMetrics *> *transactionMetrics;
|
|
2186
|
+
|
|
2187
|
+
@property (copy, readonly) NSDateInterval *taskInterval;
|
|
2188
|
+
|
|
2189
|
+
@property (assign, readonly) NSInteger redirectCount;
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
- (instancetype)init API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
|
|
2193
|
+
+ (instancetype)new API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
|
|
2194
|
+
|
|
1805
2195
|
@end
|
|
1806
2196
|
NS_SWIFT_NAME(URLSessionConfiguration)
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
@
|
|
2197
|
+
NS_SWIFT_SENDABLE
|
|
2198
|
+
API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
|
|
2199
|
+
@interface NSURLSessionConfiguration : NSObject <NSCopying>
|
|
2200
|
+
|
|
1810
2201
|
@property (class, readonly, strong) NSURLSessionConfiguration *defaultSessionConfiguration;
|
|
2202
|
+
|
|
2203
|
+
@property (class, readonly, strong) NSURLSessionConfiguration *ephemeralSessionConfiguration;
|
|
2204
|
+
|
|
2205
|
+
+ (NSURLSessionConfiguration *)backgroundSessionConfigurationWithIdentifier:(NSString *)identifier API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
2206
|
+
|
|
2207
|
+
@property (nullable, readonly, copy) NSString *identifier;
|
|
2208
|
+
|
|
2209
|
+
@property NSURLRequestCachePolicy requestCachePolicy;
|
|
2210
|
+
|
|
2211
|
+
@property NSTimeInterval timeoutIntervalForRequest;
|
|
2212
|
+
|
|
2213
|
+
@property NSTimeInterval timeoutIntervalForResource;
|
|
2214
|
+
|
|
2215
|
+
@property NSURLRequestNetworkServiceType networkServiceType;
|
|
2216
|
+
|
|
2217
|
+
@property BOOL allowsCellularAccess;
|
|
2218
|
+
|
|
2219
|
+
@property BOOL allowsExpensiveNetworkAccess API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2220
|
+
|
|
2221
|
+
@property BOOL allowsConstrainedNetworkAccess API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2222
|
+
|
|
2223
|
+
@property BOOL allowsUltraConstrainedNetworkAccess API_AVAILABLE(macos(26.1), ios(26.1), watchos(26.1), tvos(26.1), visionos(26.1));
|
|
2224
|
+
|
|
2225
|
+
@property BOOL requiresDNSSECValidation API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0));
|
|
2226
|
+
|
|
2227
|
+
@property BOOL waitsForConnectivity API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
|
2228
|
+
|
|
2229
|
+
@property (getter=isDiscretionary) BOOL discretionary API_AVAILABLE(macos(10.10), ios(7.0), watchos(2.0), tvos(9.0));
|
|
2230
|
+
|
|
2231
|
+
@property (nullable, copy) NSString *sharedContainerIdentifier API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
2232
|
+
|
|
2233
|
+
@property BOOL sessionSendsLaunchEvents API_AVAILABLE(macos(11.0), ios(7.0), watchos(2.0), tvos(9.0));
|
|
2234
|
+
|
|
2235
|
+
@property (nullable, copy) NSDictionary *connectionProxyDictionary;
|
|
2236
|
+
|
|
2237
|
+
@property SSLProtocol TLSMinimumSupportedProtocol API_DEPRECATED_WITH_REPLACEMENT("TLSMinimumSupportedProtocolVersion", macos(10.9, API_TO_BE_DEPRECATED), ios(7.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
|
|
2238
|
+
|
|
2239
|
+
@property SSLProtocol TLSMaximumSupportedProtocol API_DEPRECATED_WITH_REPLACEMENT("TLSMaximumSupportedProtocolVersion", macos(10.9, API_TO_BE_DEPRECATED), ios(7.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
|
|
2240
|
+
|
|
2241
|
+
@property tls_protocol_version_t TLSMinimumSupportedProtocolVersion API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2242
|
+
|
|
2243
|
+
@property tls_protocol_version_t TLSMaximumSupportedProtocolVersion API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
2244
|
+
|
|
2245
|
+
@property BOOL HTTPShouldUsePipelining API_DEPRECATED("Only supported in the classic loader, please adopt HTTP/2 and HTTP/3 instead", macos(10.9,15.4), ios(7.0,18.4), watchos(2.0,11.4), tvos(9.0,18.4), visionos(1.0,2.4));
|
|
2246
|
+
|
|
2247
|
+
@property BOOL HTTPShouldSetCookies;
|
|
2248
|
+
|
|
2249
|
+
@property NSHTTPCookieAcceptPolicy HTTPCookieAcceptPolicy;
|
|
2250
|
+
|
|
2251
|
+
@property (nullable, copy) NSDictionary *HTTPAdditionalHeaders;
|
|
2252
|
+
|
|
2253
|
+
@property NSInteger HTTPMaximumConnectionsPerHost;
|
|
2254
|
+
|
|
2255
|
+
@property (nullable, retain) NSHTTPCookieStorage *HTTPCookieStorage;
|
|
2256
|
+
|
|
2257
|
+
@property (nullable, retain) NSURLCredentialStorage *URLCredentialStorage;
|
|
2258
|
+
|
|
2259
|
+
@property (nullable, retain) NSURLCache *URLCache;
|
|
2260
|
+
|
|
2261
|
+
@property BOOL shouldUseExtendedBackgroundIdleMode API_DEPRECATED("Not supported", macos(10.11,15.4), ios(9.0,18.4), watchos(2.0,11.4), tvos(9.0,18.4), visionos(1.0,2.4));
|
|
2262
|
+
|
|
2263
|
+
@property (nullable, copy) NSArray<Class> *protocolClasses;
|
|
2264
|
+
|
|
2265
|
+
@property NSURLSessionMultipathServiceType multipathServiceType API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
|
|
2266
|
+
|
|
2267
|
+
@property BOOL usesClassicLoadingMode API_AVAILABLE(macos(15.4), ios(18.4), watchos(11.4), tvos(18.4), visionos(2.4));
|
|
2268
|
+
|
|
2269
|
+
@property BOOL enablesEarlyData API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
- (instancetype)init API_DEPRECATED("Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
2273
|
+
+ (instancetype)new API_DEPRECATED("Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
|
|
2274
|
+
|
|
2275
|
+
@end
|
|
2276
|
+
@interface NSURLSessionConfiguration (NSURLSessionDeprecated)
|
|
2277
|
+
+ (NSURLSessionConfiguration *)backgroundSessionConfiguration:(NSString *)identifier API_DEPRECATED_WITH_REPLACEMENT("-backgroundSessionConfigurationWithIdentifier:", macos(10.9, 10.10), ios(7.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
|
|
1811
2278
|
@end
|
|
1812
2279
|
__attribute__((swift_bridge("UUID")))
|
|
1813
2280
|
@interface NSUUID : NSObject <NSCopying, NSSecureCoding>
|
|
@@ -1833,7 +2300,22 @@ __attribute__((swift_bridge("IndexSet")))
|
|
|
1833
2300
|
@end
|
|
1834
2301
|
__attribute__((swift_bridge("CharacterSet")))
|
|
1835
2302
|
@interface NSCharacterSet : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
|
|
2303
|
+
@property (readonly, class, copy) NSCharacterSet *controlCharacterSet;
|
|
2304
|
+
@property (readonly, class, copy) NSCharacterSet *whitespaceCharacterSet;
|
|
2305
|
+
@property (readonly, class, copy) NSCharacterSet *whitespaceAndNewlineCharacterSet;
|
|
1836
2306
|
@property (readonly, class, copy) NSCharacterSet *decimalDigitCharacterSet;
|
|
2307
|
+
@property (readonly, class, copy) NSCharacterSet *letterCharacterSet;
|
|
2308
|
+
@property (readonly, class, copy) NSCharacterSet *lowercaseLetterCharacterSet;
|
|
2309
|
+
@property (readonly, class, copy) NSCharacterSet *uppercaseLetterCharacterSet;
|
|
2310
|
+
@property (readonly, class, copy) NSCharacterSet *nonBaseCharacterSet;
|
|
2311
|
+
@property (readonly, class, copy) NSCharacterSet *alphanumericCharacterSet;
|
|
2312
|
+
@property (readonly, class, copy) NSCharacterSet *decomposableCharacterSet;
|
|
2313
|
+
@property (readonly, class, copy) NSCharacterSet *illegalCharacterSet;
|
|
2314
|
+
@property (readonly, class, copy) NSCharacterSet *punctuationCharacterSet;
|
|
2315
|
+
@property (readonly, class, copy) NSCharacterSet *capitalizedLetterCharacterSet;
|
|
2316
|
+
@property (readonly, class, copy) NSCharacterSet *symbolCharacterSet;
|
|
2317
|
+
@property (readonly, class, copy) NSCharacterSet *newlineCharacterSet API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
|
|
2318
|
+
- (BOOL)characterIsMember:(unichar)aCharacter;
|
|
1837
2319
|
+ (NSCharacterSet *)characterSetWithCharactersInString:(NSString *)aString;
|
|
1838
2320
|
@property (readonly, copy) NSCharacterSet *invertedSet;
|
|
1839
2321
|
@end
|
|
@@ -1912,6 +2394,7 @@ __attribute__((swift_bridge("TimeZone")))
|
|
|
1912
2394
|
@interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
|
|
1913
2395
|
+ (nullable instancetype)timeZoneWithName:(NSString *)tzName;
|
|
1914
2396
|
@property (class, readonly, copy) NSTimeZone *localTimeZone;
|
|
2397
|
+
@property (readonly, copy) NSString *name;
|
|
1915
2398
|
@property (nullable, readonly, copy) NSString *abbreviation;
|
|
1916
2399
|
+ (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
|
|
1917
2400
|
@end
|
|
@@ -2034,7 +2517,33 @@ typedef NS_OPTIONS(NSUInteger, NSCalendarUnit) {
|
|
|
2034
2517
|
};
|
|
2035
2518
|
|
|
2036
2519
|
typedef NSString * NSCalendarIdentifier NS_TYPED_EXTENSIBLE_ENUM;
|
|
2520
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierBangla API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2521
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierBuddhist API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2522
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierChinese API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2523
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierCoptic API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2524
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierDangi API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2525
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierEthiopicAmeteAlem API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2526
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierEthiopicAmeteMihret API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2037
2527
|
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierGregorian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2528
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierGujarati API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2529
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierHebrew API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2530
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierISO8601 API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2531
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIndian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2532
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamic API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2533
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamicCivil API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2534
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamicTabular API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
2535
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamicUmmAlQura API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
2536
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierJapanese API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2537
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierKannada API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2538
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierMalayalam API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2539
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierMarathi API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2540
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierOdia API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2541
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierPersian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2542
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierRepublicOfChina API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2543
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierTamil API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2544
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierTelugu API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2545
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierVietnamese API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2546
|
+
FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierVikram API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
|
|
2038
2547
|
__attribute__((swift_bridge("Calendar")))
|
|
2039
2548
|
@interface NSCalendar : NSObject <NSCopying, NSSecureCoding>
|
|
2040
2549
|
- (nullable id)initWithCalendarIdentifier:(NSCalendarIdentifier)ident NS_DESIGNATED_INITIALIZER;
|
|
@@ -2185,6 +2694,7 @@ NS_SWIFT_NAME(Bundle)
|
|
|
2185
2694
|
@property (nullable, readonly, copy) NSDictionary<NSString *, id> *infoDictionary;
|
|
2186
2695
|
@property (class, readonly, strong) NSBundle *mainBundle;
|
|
2187
2696
|
- (nullable NSURL *)URLForResource:(nullable NSString *)name withExtension:(nullable NSString *)ext __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
2697
|
+
+ (nullable instancetype)bundleWithPath:(NSString *)path;
|
|
2188
2698
|
- (nullable instancetype)initWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
2189
2699
|
+ (nullable instancetype)bundleWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
2190
2700
|
+ (NSBundle *)bundleForClass:(Class)aClass;
|
|
@@ -2567,8 +3077,18 @@ NS_SWIFT_NAME(FileHandle)
|
|
|
2567
3077
|
- (void)synchronizeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:")));
|
|
2568
3078
|
- (void)closeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:")));
|
|
2569
3079
|
@end
|
|
3080
|
+
typedef struct NS_SWIFT_SENDABLE {
|
|
3081
|
+
/// The major release number, such as 10 in version 10.9.3.
|
|
3082
|
+
NSInteger majorVersion;
|
|
3083
|
+
/// The minor release number, such as 9 in version 10.9.3.
|
|
3084
|
+
NSInteger minorVersion;
|
|
3085
|
+
/// The update release number, such as 3 in version 10.9.3.
|
|
3086
|
+
NSInteger patchVersion;
|
|
3087
|
+
} NSOperatingSystemVersion NS_SWIFT_NAME(OperatingSystemVersion);
|
|
2570
3088
|
NS_SWIFT_NAME(ProcessInfo)
|
|
2571
3089
|
@interface NSProcessInfo : NSObject
|
|
3090
|
+
@property (readonly, copy) NSArray<NSString *> *arguments;
|
|
3091
|
+
@property (readonly) NSTimeInterval systemUptime API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
2572
3092
|
@property (readonly, copy) NSString *globallyUniqueString;
|
|
2573
3093
|
@property (readonly) NSUInteger activeProcessorCount __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
2574
3094
|
@property (readonly) unsigned long long physicalMemory __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
@@ -2578,6 +3098,10 @@ NS_SWIFT_NAME(ProcessInfo)
|
|
|
2578
3098
|
@property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
|
|
2579
3099
|
@property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
|
|
2580
3100
|
@end
|
|
3101
|
+
@interface NSProcessInfo (NSProcessInfoVersion)
|
|
3102
|
+
@property (readonly) NSOperatingSystemVersion operatingSystemVersion API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
3103
|
+
- (BOOL) isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
3104
|
+
@end
|
|
2581
3105
|
@interface NSProcessInfo (NSProcessInfoPlatform)
|
|
2582
3106
|
@property (readonly, getter=isiOSAppOnMac) BOOL iOSAppOnMac __attribute__((availability(macos,introduced=11.0), availability(ios,introduced=14.0), availability(watchos,introduced=7.0), availability(tvos,introduced=14.0)));
|
|
2583
3107
|
@end
|
|
@@ -3048,6 +3572,13 @@ typedef NS_OPTIONS(NSUInteger, NSStreamEvent) {
|
|
|
3048
3572
|
@optional
|
|
3049
3573
|
- (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode;
|
|
3050
3574
|
@end
|
|
3575
|
+
typedef NS_ENUM(NSUInteger, NSDateFormatterStyle) {
|
|
3576
|
+
NSDateFormatterNoStyle = 0,
|
|
3577
|
+
NSDateFormatterShortStyle = 1,
|
|
3578
|
+
NSDateFormatterMediumStyle = 2,
|
|
3579
|
+
NSDateFormatterLongStyle = 3,
|
|
3580
|
+
NSDateFormatterFullStyle = 4
|
|
3581
|
+
};
|
|
3051
3582
|
typedef NS_ENUM(NSUInteger, NSDateFormatterBehavior) { NSDateFormatterBehaviorDefault = 0, NSDateFormatterBehavior10_4 = 1040 };
|
|
3052
3583
|
NS_SWIFT_NAME(Formatter)
|
|
3053
3584
|
@interface NSFormatter : NSObject <NSCopying, NSCoding>
|
|
@@ -3056,11 +3587,57 @@ NS_SWIFT_NAME(DateFormatter)
|
|
|
3056
3587
|
@interface NSDateFormatter : NSFormatter
|
|
3057
3588
|
@property NSDateFormatterBehavior formatterBehavior;
|
|
3058
3589
|
@property (null_resettable, copy) NSString *dateFormat;
|
|
3590
|
+
@property NSDateFormatterStyle dateStyle;
|
|
3591
|
+
@property NSDateFormatterStyle timeStyle;
|
|
3059
3592
|
@property (null_resettable, copy) NSLocale *locale;
|
|
3060
3593
|
@property (null_resettable, copy) NSTimeZone *timeZone;
|
|
3061
3594
|
- (NSString *)stringFromDate:(NSDate *)date;
|
|
3062
3595
|
- (nullable NSDate *)dateFromString:(NSString *)string;
|
|
3063
3596
|
@end
|
|
3597
|
+
typedef NS_ENUM(NSInteger, NSFormattingUnitStyle) {
|
|
3598
|
+
NSFormattingUnitStyleShort = 1,
|
|
3599
|
+
NSFormattingUnitStyleMedium,
|
|
3600
|
+
NSFormattingUnitStyleLong,
|
|
3601
|
+
} API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
|
|
3602
|
+
typedef NS_OPTIONS(NSUInteger, NSMeasurementFormatterUnitOptions) {
|
|
3603
|
+
NSMeasurementFormatterUnitOptionsProvidedUnit = (1UL << 0),
|
|
3604
|
+
NSMeasurementFormatterUnitOptionsNaturalScale = (1UL << 1),
|
|
3605
|
+
NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit = (1UL << 2),
|
|
3606
|
+
} API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
|
|
3607
|
+
NS_SWIFT_SENDABLE
|
|
3608
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
3609
|
+
@interface NSUnit : NSObject <NSCopying, NSSecureCoding>
|
|
3610
|
+
@property (readonly, copy) NSString *symbol;
|
|
3611
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
3612
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
3613
|
+
- (instancetype)initWithSymbol:(NSString *)symbol NS_DESIGNATED_INITIALIZER;
|
|
3614
|
+
@end
|
|
3615
|
+
NS_SWIFT_SENDABLE
|
|
3616
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
3617
|
+
@interface NSDimension : NSUnit <NSSecureCoding>
|
|
3618
|
+
@end
|
|
3619
|
+
NS_SWIFT_SENDABLE
|
|
3620
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
3621
|
+
@interface NSUnitTemperature : NSDimension
|
|
3622
|
+
@property (class, readonly, copy) NSUnitTemperature *kelvin;
|
|
3623
|
+
@property (class, readonly, copy) NSUnitTemperature *celsius;
|
|
3624
|
+
@property (class, readonly, copy) NSUnitTemperature *fahrenheit;
|
|
3625
|
+
@end
|
|
3626
|
+
NS_SWIFT_SENDABLE
|
|
3627
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
3628
|
+
@interface NSMeasurement<__covariant UnitType : NSUnit *> : NSObject <NSCopying, NSSecureCoding>
|
|
3629
|
+
@property (readonly, copy) UnitType unit;
|
|
3630
|
+
@property (readonly) double doubleValue;
|
|
3631
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
3632
|
+
- (instancetype)initWithDoubleValue:(double)doubleValue unit:(UnitType)unit NS_DESIGNATED_INITIALIZER;
|
|
3633
|
+
@end
|
|
3634
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
3635
|
+
@interface NSMeasurementFormatter : NSFormatter <NSSecureCoding>
|
|
3636
|
+
@property NSMeasurementFormatterUnitOptions unitOptions;
|
|
3637
|
+
@property NSFormattingUnitStyle unitStyle;
|
|
3638
|
+
@property (null_resettable, copy) NSLocale *locale;
|
|
3639
|
+
- (NSString *)stringFromMeasurement:(NSMeasurement *)measurement;
|
|
3640
|
+
@end
|
|
3064
3641
|
NS_SWIFT_NAME(NumberFormatter)
|
|
3065
3642
|
@interface NSNumberFormatter : NSObject
|
|
3066
3643
|
@end
|
|
@@ -3200,6 +3777,7 @@ FOUNDATION_EXPORT NSString *NSStringFromSelector(SEL aSelector);
|
|
|
3200
3777
|
FOUNDATION_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
|
|
3201
3778
|
FOUNDATION_EXPORT NSString *NSStringFromClass(Class aClass);
|
|
3202
3779
|
FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2) NS_SWIFT_UNAVAILABLE("Use print or os_log");
|
|
3780
|
+
FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0) NS_SWIFT_UNAVAILABLE("Use print or os_log");
|
|
3203
3781
|
#define NSLocalizedStringFromTableInBundle(key, tbl, bundle, comment) [bundle localizedStringForKey:(key) value:@"" table:(tbl)]
|
|
3204
3782
|
FOUNDATION_EXPORT NSLocaleKey const NSLocaleCountryCode;
|
|
3205
3783
|
FOUNDATION_EXPORT NSLocaleKey const NSLocaleLanguageCode;
|
|
@@ -3264,14 +3842,6 @@ typedef NS_OPTIONS(NSUInteger, NSMatchingFlags) {
|
|
|
3264
3842
|
+ (nullable NSRegularExpression *)regularExpressionWithPattern:(NSString *)pattern options:(NSRegularExpressionOptions)options error:(NSError **)error;
|
|
3265
3843
|
- (void)enumerateMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range usingBlock:(void (NS_NOESCAPE ^)(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL *stop))block;
|
|
3266
3844
|
@end
|
|
3267
|
-
typedef struct NS_SWIFT_SENDABLE {
|
|
3268
|
-
/// The major release number, such as 10 in version 10.9.3.
|
|
3269
|
-
NSInteger majorVersion;
|
|
3270
|
-
/// The minor release number, such as 9 in version 10.9.3.
|
|
3271
|
-
NSInteger minorVersion;
|
|
3272
|
-
/// The update release number, such as 3 in version 10.9.3.
|
|
3273
|
-
NSInteger patchVersion;
|
|
3274
|
-
} NSOperatingSystemVersion NS_SWIFT_NAME(OperatingSystemVersion);
|
|
3275
3845
|
@interface NSComparisonPredicate : NSPredicate
|
|
3276
3846
|
@end
|
|
3277
3847
|
NS_SWIFT_NAME(LengthFormatter)
|
|
@@ -3376,10 +3946,43 @@ NS_ROOT_CLASS
|
|
|
3376
3946
|
@interface NSBlockOperation : NSOperation
|
|
3377
3947
|
+ (instancetype)blockOperationWithBlock:(void (NS_SWIFT_SENDABLE ^)(void))block;
|
|
3378
3948
|
@end
|
|
3949
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
3950
|
+
typedef NS_ENUM(NSUInteger, NSURLCacheStoragePolicy)
|
|
3951
|
+
{
|
|
3952
|
+
NSURLCacheStorageAllowed,
|
|
3953
|
+
NSURLCacheStorageAllowedInMemoryOnly,
|
|
3954
|
+
NSURLCacheStorageNotAllowed,
|
|
3955
|
+
};
|
|
3956
|
+
NS_SWIFT_SENDABLE
|
|
3957
|
+
@interface NSCachedURLResponse : NSObject <NSSecureCoding, NSCopying>
|
|
3958
|
+
- (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data;
|
|
3959
|
+
- (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data userInfo:(nullable NSDictionary *)userInfo storagePolicy:(NSURLCacheStoragePolicy)storagePolicy;
|
|
3960
|
+
@property (readonly, copy) NSURLResponse *response;
|
|
3961
|
+
@property (readonly, copy) NSData *data;
|
|
3962
|
+
@property (nullable, readonly, copy) NSDictionary *userInfo;
|
|
3963
|
+
@property (readonly) NSURLCacheStoragePolicy storagePolicy;
|
|
3964
|
+
@end
|
|
3965
|
+
NS_SWIFT_SENDABLE
|
|
3379
3966
|
@interface NSURLCache : NSObject
|
|
3380
|
-
- (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request;
|
|
3381
3967
|
@property (class, strong) NSURLCache *sharedURLCache;
|
|
3968
|
+
- (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity diskPath:(nullable NSString *)path API_DEPRECATED_WITH_REPLACEMENT("initWithMemoryCapacity:diskCapacity:directoryURL:", macos(10.2, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
|
|
3969
|
+
- (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity directoryURL:(nullable NSURL *)directoryURL API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
|
|
3970
|
+
- (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request;
|
|
3971
|
+
- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request;
|
|
3972
|
+
- (void)removeCachedResponseForRequest:(NSURLRequest *)request;
|
|
3973
|
+
- (void)removeAllCachedResponses;
|
|
3974
|
+
- (void)removeCachedResponsesSinceDate:(NSDate *)date API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
3975
|
+
@property NSUInteger memoryCapacity;
|
|
3976
|
+
@property NSUInteger diskCapacity;
|
|
3977
|
+
@property (readonly) NSUInteger currentMemoryUsage;
|
|
3978
|
+
@property (readonly) NSUInteger currentDiskUsage;
|
|
3979
|
+
@end
|
|
3980
|
+
@interface NSURLCache (NSURLSessionTaskAdditions)
|
|
3981
|
+
- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forDataTask:(NSURLSessionDataTask *)dataTask API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
3982
|
+
- (void)getCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSCachedURLResponse * _Nullable cachedResponse))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
3983
|
+
- (void)removeCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
|
|
3382
3984
|
@end
|
|
3985
|
+
NS_ASSUME_NONNULL_END
|
|
3383
3986
|
FOUNDATION_EXPORT const float NSURLSessionTaskPriorityDefault __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
3384
3987
|
FOUNDATION_EXPORT const float NSURLSessionTaskPriorityLow __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
3385
3988
|
FOUNDATION_EXPORT const float NSURLSessionTaskPriorityHigh __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
@@ -3389,10 +3992,6 @@ FOUNDATION_EXPORT NSString * const NSKeyedArchiveRootObjectKey __attribute__((av
|
|
|
3389
3992
|
FOUNDATION_EXPORT NSURLResourceKey const NSURLFileSizeKey __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
3390
3993
|
FOUNDATION_EXPORT NSURLResourceKey const NSURLTotalFileAllocatedSizeKey __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=5.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
|
|
3391
3994
|
#define NSURLResponseUnknownLength ((long long)-1)
|
|
3392
|
-
@interface NSCachedURLResponse : NSObject <NSSecureCoding, NSCopying>
|
|
3393
|
-
@property (readonly, copy) NSURLResponse *response;
|
|
3394
|
-
@property (readonly, copy) NSData *data;
|
|
3395
|
-
@end
|
|
3396
3995
|
#if TARGET_OS_IPHONE
|
|
3397
3996
|
#if __has_include(<CFNetwork/CFNetwork.h>)
|
|
3398
3997
|
#ifndef __swift__
|