Skip to content
New issue

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

i have a watchapp that is companion app of ios app. i make complications and added in iphone watch app. now please tell how can i directly set the custom complication. example what i write on top compliation in watchfile.complication.top = ? #9

Open
zoraiz-WOL opened this issue Jul 13, 2023 · 10 comments

Comments

@zoraiz-WOL
Copy link

No description provided.

@zoraiz-WOL
Copy link
Author

please reply.

@banjun
Copy link
Owner

banjun commented Jul 13, 2023

You can try taking a real watchface file by sharing from your Watch or iPhone, and opening it in WatchFaceDumper.app in order to know real values for your usecase. And then you might be able to copy that values and/or fake a part of that into a WatchFace struct.

public struct Item: Codable {
/// "date", "weather", "heartrate", "com.apple.shortcuts.watch"
public var app: String
/// "com.apple.shortcuts.watch"
public var `extension`: String?
public var complication_descriptor: ComplicationDescriptor?
private enum CodingKeys: String, CodingKey {
case app, `extension`
case complication_descriptor = "complication descriptor"
}
public struct ComplicationDescriptor: Codable {
public var displayName: String
/// [0, 1, ..., 12]
public var supportedFamilies: [Int]
/// UUID
public var identifier: String
/// Base64 encoded NSKeyedArchiver archived UAUserActivityInfo
public var userActivity: String?

public init(version: Int = 2, complication_sample_templates: ComplicationPositionDictionary<ComplicationTemplate>, complications_names: ComplicationPositionDictionary<String>, complications_item_ids: ComplicationPositionDictionary<Int>, complications_bundle_ids: ComplicationPositionDictionary<String>? = nil) {
self.version = version
self.complication_sample_templates = complication_sample_templates
self.complications_names = complications_names
self.complications_item_ids = complications_item_ids
self.complications_bundle_ids = complications_bundle_ids
}

@zoraiz-WOL
Copy link
Author

zoraiz-WOL commented Jul 17, 2023 via email

@zoraiz-WOL
Copy link
Author

zoraiz-WOL commented Jul 17, 2023 via email

@banjun
Copy link
Owner

banjun commented Jul 17, 2023

is there any other way to send data even app is suspended and complication reloads?

I think I don't know about that. A watchface file is a static file format that don't have dynamic aspects. I think you can get a watchface file via watchface sharing functionality of watchOS and/or iOS after the complication and its latest data are set to the watchface.

modular duo is not open .

As pod WatchFace and WatchFaceDumper is an analysis project for private Apple watchface file format, a structure that has not yet analyzed in WatchFaceDumper is need to be analyzed in any way. It's a tough part but theoretically we can do an analysis on top of WatchFaceDumper...

@zoraiz-WOL
Copy link
Author

zoraiz-WOL commented Jul 24, 2023 via email

@zoraiz-WOL
Copy link
Author

zoraiz-WOL commented Jul 24, 2023 via email

@blackfly57
Copy link

@zoraiz-WOL Hi, I am also working on a similar project. At this point I have nearly 100+ complications in my watch app. You stated you are adding complications dynamically in your watch app. (also seen in Facer App).
Can you please help me here or show me how you are doing it?

Currently I am adding complications through WidgetBundle.

@zoraiz-WOL
Copy link
Author

zoraiz-WOL commented Sep 19, 2023 via email

@zoraiz-WOL
Copy link
Author

zoraiz-WOL commented Sep 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants