protocol
ExtensionHostNotifying
NewvisionOSpublic protocol ExtensionHostNotifying : AnyObject
Declaration
@MainActor public protocol ExtensionHostNotifying : AnyObject {
@MainActor func notifyBeganGenerating()
@MainActor func notifyEndedGenerating()
@MainActor func notifyReadyForTermination()
@MainActor func notifyFailure()
@MainActor func notifyBeganGeneratingEnvironment(withUUID id: UUID)
}
struct
PHPickerSearchText
NewiOSmacOSpublic struct PHPickerSearchText : Equatable, Hashable, @unchecked Sendable
A search text for PHPickerViewController.
Declaration
public struct PHPickerSearchText : Equatable, Hashable, @unchecked Sendable {
/// Creates a search text from a string.
@available(watchOS, unavailable)
public init(_ string: String)
/// Returns a Boolean value indicating whether two values are equal.
///
/// Equality is the inverse of inequality. For any values `a` and `b`,
/// `a == b` implies that `a != b` is `false`.
///
/// - Parameters:
/// - lhs: A value to compare.
/// - rhs: Another value to compare.
public static func == (a: PHPickerSearchText, b: PHPickerSearchText) -> Bool
/// Hashes the essential components of this value by feeding them into the
/// given hasher.
///
/// Implement this method to conform to the `Hashable` protocol. The
/// components used for hashing must be the same as the components compared
/// in your type's `==` operator implementation. Call `hasher.combine(_:)`
/// with each of these components.
///
/// - Important: In your implementation of `hash(into:)`,
/// don't call `finalize()` on the `hasher` instance provided,
/// or replace it with a different instance.
/// Doing so may become a compile-time error in the future.
///
/// - Parameter hasher: The hasher to use when combining the components
/// of this instance.
public func hash(into hasher: inout Hasher)
/// The hash value.
///
/// Hash values are not guaranteed to be equal across different executions of
/// your program. Do not save hash values to use during a future execution.
///
/// - Important: `hashValue` is deprecated as a `Hashable` requirement. To
/// conform to `Hashable`, implement the `hash(into:)` requirement instead.
/// The compiler provides an implementation for `hashValue` for you.
public var hashValue: Int { get }
}
struct
PHSharedAlbumCreationConfiguration
NewiOSmacOSpublic struct PHSharedAlbumCreationConfiguration : Equatable, Hashable
An object used to configure a PHSharedAlbumCreationViewController.
Declaration
public struct PHSharedAlbumCreationConfiguration : Equatable, Hashable {
/// The photo library in which the shared album will be created.
public let photoLibrary: PHPhotoLibrary
/// The default title for the shared album. Useful for suggesting a relevant title to the user. Defaults to `nil`.
public var defaultTitle: String?
/// The default sharing policy of the shared album. If not specified, this defaults to `PHSharedAlbumCreationSharingPolicyPrivate`.
public var defaultPolicy: PHSharedAlbumCreationSharingPolicy
/// - Parameters:
/// - photoLibrary: The photo library in which the shared album will be created.
public init(photoLibrary: PHPhotoLibrary)
/// Returns a Boolean value indicating whether two values are equal.
///
/// Equality is the inverse of inequality. For any values `a` and `b`,
/// `a == b` implies that `a != b` is `false`.
///
/// - Parameters:
/// - lhs: A value to compare.
/// - rhs: Another value to compare.
public static func == (a: PHSharedAlbumCreationConfiguration, b: PHSharedAlbumCreationConfiguration) -> Bool
/// Hashes the essential components of this value by feeding them into the
/// given hasher.
///
/// Implement this method to conform to the `Hashable` protocol. The
/// components used for hashing must be the same as the components compared
/// in your type's `==` operator implementation. Call `hasher.combine(_:)`
/// with each of these components.
///
/// - Important: In your implementation of `hash(into:)`,
/// don't call `finalize()` on the `hasher` instance provided,
/// or replace it with a different instance.
/// Doing so may become a compile-time error in the future.
///
/// - Parameter hasher: The hasher to use when combining the components
/// of this instance.
public func hash(into hasher: inout Hasher)
/// The hash value.
///
/// Hash values are not guaranteed to be equal across different executions of
/// your program. Do not save hash values to use during a future execution.
///
/// - Important: `hashValue` is deprecated as a `Hashable` requirement. To
/// conform to `Hashable`, implement the `hash(into:)` requirement instead.
/// The compiler provides an implementation for `hashValue` for you.
public var hashValue: Int { get }
}
struct
PHSharedAlbumCreationResult
NewiOSmacOSpublic struct PHSharedAlbumCreationResult : Equatable, Hashable, Sendable
The result of a user creating a shared album.
Declaration
public struct PHSharedAlbumCreationResult : Equatable, Hashable, Sendable {
/// The identifier of the created shared album.
public var albumIdentifier: String { get }
/// The URL of the created shared album.
public var albumURL: URL { get }
/// Returns a Boolean value indicating whether two values are equal.
///
/// Equality is the inverse of inequality. For any values `a` and `b`,
/// `a == b` implies that `a != b` is `false`.
///
/// - Parameters:
/// - lhs: A value to compare.
/// - rhs: Another value to compare.
public static func == (a: PHSharedAlbumCreationResult, b: PHSharedAlbumCreationResult) -> Bool
/// Hashes the essential components of this value by feeding them into the
/// given hasher.
///
/// Implement this method to conform to the `Hashable` protocol. The
/// components used for hashing must be the same as the components compared
/// in your type's `==` operator implementation. Call `hasher.combine(_:)`
/// with each of these components.
///
/// - Important: In your implementation of `hash(into:)`,
/// don't call `finalize()` on the `hasher` instance provided,
/// or replace it with a different instance.
/// Doing so may become a compile-time error in the future.
///
/// - Parameter hasher: The hasher to use when combining the components
/// of this instance.
public func hash(into hasher: inout Hasher)
/// The hash value.
///
/// Hash values are not guaranteed to be equal across different executions of
/// your program. Do not save hash values to use during a future execution.
///
/// - Important: `hashValue` is deprecated as a `Hashable` requirement. To
/// conform to `Hashable`, implement the `hash(into:)` requirement instead.
/// The compiler provides an implementation for `hashValue` for you.
public var hashValue: Int { get }
}
extension
PHSharedAlbumCreationViewController
NewiOSmacOSextension PHSharedAlbumCreationViewController
Declaration
extension PHSharedAlbumCreationViewController {
/// Returns a view controller that allows the user to create a new shared album.
///
/// - Parameters:
/// - configuration: The configuration for creating a new shared album.
@MainActor @preconcurrency public convenience init(configuration: PHSharedAlbumCreationConfiguration)
}
extension
PHSharedAlbumPostingViewController
NewiOSmacOSextension PHSharedAlbumPostingViewController
Declaration
extension PHSharedAlbumPostingViewController {
/// Returns a view controller that allows the user to create a new shared album.
///
/// - Parameters:
/// - items: The items to be posted to the shared album.
/// - defaultAlbumIdentifier: Identifier for the shared album to be pre-selected. If none provided, the user can manually choose a shared album.
/// - photoLibrary: The photo library to choose from.
@MainActor @preconcurrency public convenience init(items: [PHPickerResult], defaultAlbumIdentifier: String?, photoLibrary: PHPhotoLibrary)
}
func
View.photosSharedAlbumPostingSheet
NewiOSmacOSnonisolated public func photosSharedAlbumPostingSheet(isPresented: Binding<Bool>, items: [PhotosPickerItem], defaultAlbumIdentifier: String? = nil, photoLibrary: PHPhotoLibrary, completion: ((Result<String, any Error>) -> Void)? = nil) -> some View
Presents an "Add to Shared Album" sheet that allows the user to post the given items to a shared album.
Parameters
isPresented- The binding to whether the sheet should be shown.
items- The items to be posted to the shared album.
defaultAlbumIdentifier- Identifier for the shared album to be pre-selected. If none provided user can manually choose the shared album in UI.
photoLibrary- Library to choose from.
completion- Called with the result on completion of the request.
func
View.photosSharedAlbumPostingSheet
NewiOSmacOSnonisolated public func photosSharedAlbumPostingSheet(isPresented: Binding<Bool>, items: [PHPickerResult], defaultAlbumIdentifier: String? = nil, photoLibrary: PHPhotoLibrary, completion: ((Result<String, any Error>) -> Void)? = nil) -> some View
Presents an "Add to Shared Album" sheet that allows the user to post the given items to a shared album.
Parameters
isPresented- The binding to whether the sheet should be shown.
items- The items to be posted to the shared album.
defaultAlbumIdentifier- Identifier for the shared album to be pre-selected. If none provided user can manually choose the shared album in UI.
photoLibrary- Library to choose from.
completion- Called with the result on completion of the request.