Git Product home page Git Product logo

watchfacedumper's People

Contributors

banjun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

watchfacedumper's Issues

Images in Complications

@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

Is it possible to make it compatible with Portraits faces

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.

How to change style?

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.

Library Example

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)
        }
        

adding date complication in photos face

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: [:])))`

Metadata
metadata

Face

face

Screenshot 2023-10-24 at 2 07 56 PM

no export well

hi, I tried to add photo and video but doesn't export well

can you please make an short tutorial

Ask you a question about Watchface

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.