banjun / watchfacedumper Goto Github PK
View Code? Open in Web Editor NEWmacOS viewer/editor for Apple Watch watch face file (.watchface) for the file format analysis
License: MIT License
macOS viewer/editor for Apple Watch watch face file (.watchface) for the file format analysis
License: MIT License
@banjun Hello, I hope you are doing well.
When we use images in complication they work fine with "Multicolor" selected in Watchface editor.
but with any other color selected our Image goes blank, is there any way we could fix it?
I have tried .widgetAccentable(false) but it did not work.
any help would be much appreciated. Thanks
When importing portrait faces I receive an error:
error reading <NSFileWrapper: 0x600000066a80>: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "face type", intValue: nil)], debugDescription: "Cannot initialize FaceType from invalid String value bundle", underlyingError: nil))
Is it possible to make it compatible?
Would like to create custom portrait faces with images that aren't shot on iPhone.
Can you help me? in How to change the style of the time. I am changing in init of PortraitWatchface but it doesn't work in export.
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)
}
hi, can anyone post an example how to add 'date' complication in the photos face? i have added like below but when i apply face it gives error "the date app and complication are not available on your Apple watch"
`
let faceItem = Watchface.Face.Complications.Item(app: "com.apple.DateComplicationsHost", extension: "com.apple.DateComplicationsHost", complication_descriptor: Watchface.Face.Complications.Item.ComplicationDescriptor(displayName: nil, supportedFamilies: nil, identifier: nil, kind: "com.apple.CalendarWidget.CalendarDateComplication", containerBundleIdentifier: "com.apple.DateComplicationsHost", extensionBundleIdentifier: "com.apple.DateComplicationsHost.DateComplications", type: 56))
let topComplication = PhotosWatchface.Complication.init(name: "Date", template: .utilitarianSmallFlat(Watchface.Metadata.CLKComplicationTemplateUtilitarianSmallFlat()), faceItem: faceItem)
self.watchface = Watchface.init(photosWatchface: PhotosWatchface(device_size: 2, position: .top, snapshot: jpeg!, no_borders_snapshot: jpeg!, topComplication: topComplication, bottomComplication: nil, resources: .init(images: .photos(.init(imageList: [])), files: [:])))`
Face
hi, I tried to add photo and video but doesn't export well
can you please make an short tutorial
In your watchface file, I see a lot of property definitions. What exactly do the definitions of these properties mean? I didn't find any relevant documentation from Apple developer website, where have you seen how to define watchface files?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.