We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please include an example on how to use the Library to generate .watchface file from. swiftui. Thanks
This is the code that am currently using. But it says watch face sharing is not available.
do { let localIdentity = "\(UUID().uuidString)/L0/001" let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] var faceURL = paths.appendingPathComponent("\(name).watchface") let fullImage = UIImage(named:"owl") let owl = fullImage!.resized(toWidth: 384)!.pngData()! let item = Watchface.Resources.Metadata.Item(imageURL: "owl.png", irisVideoURL: "", localIdentifier: localIdentity, originalCropH: 0, originalCropW: 0, originalCropX: 0, originalCropY: 0) let meta = Watchface.Resources.Metadata(imageList: [item],version: 4) let resources = Watchface.Resources(images: meta, files:["owl.png":owl]) let position = PhotosWatchface.Position.top let utility = Watchface.Metadata.CLKComplicationTemplateUtilitarianSmallFlat() let facer = PhotosWatchface(device_size:6 ,position: .top, snapshot: snapshot, no_borders_snapshot: no_borders_snapshot, resources: resources) var watchy = Watchface(photosWatchface: facer) let fw = try FileWrapper(watchface: watchy) try fw.write(to: faceURL, originalContentsURL:nil) let data = try Data(contentsOf: faceURL) UIPasteboard.general.setData(data, forPasteboardType: "com.apple.watchface") } catch { print(error.localizedDescription) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please include an example on how to use the Library to generate .watchface file from. swiftui. Thanks
This is the code that am currently using. But it says watch face sharing is not available.
The text was updated successfully, but these errors were encountered: