hamzasood / CustomWatchFaceTest

Custom watch faces on Apple Watch
349 stars 56 forks source link

#import <NanoTimeKit/NanoTimeKit.h> #1

Open matthijsotterloo opened 9 years ago

matthijsotterloo commented 9 years ago

How can I import this file? I don't understand what you mean with import carousel into the dylib

ph1ps commented 9 years ago

@CrazyJailHacker Still shows me the same error... Do I have to add this somewhere to the linking targets or add this framework to the header search paths?

ghost commented 9 years ago

@iPh1ps99 Make sure you pointing Framework Search Path to /Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/PrivateFrameworks

ph1ps commented 9 years ago

@CrazyJailHacker This brings me back to some error I had before. It says it can't find UIView and UILabel (They don't exist in the UIKit from the WatchKit right?)

onethousandcats commented 8 years ago

Any movement on this? I'm still fighting the UIKit issue.

zlelik commented 8 years ago

Hi to Everybody, I am new in xcode development. I read all this topic before ask this question. Can you tell me that I correctly understand how this particular CustomWatchFaceTest project works?

This CustomWatchFaceTest requires some hack (jailbreak or something like this). Even if I can compile and run this project I will need to make some non standard changes to my apple watch. And it will not be possible of course to officially publish this CustomWatchFace in the Apple Store.

Is everything mentioned by me above correct or not?

digitalhoax commented 8 years ago

Anyone who can share how this works now that watchOS 2.0 is official?

an20olives commented 8 years ago

OK so new here hey, been following this for a little while, I have managed to get the framework into Xcode but still getting the error any ideas on what could be causing this still if everything is there?

I also got this (don't know if it means anything of importance) "in file included from /(Directorywherestored)/CustomWatchFaceTest-master/CustomWatchFaceTest/OnozOmgFace.m:9:"

This is in relation to the NanoTimeKit.h file not found error.

Now with multiple UIview, and UIlables errors

jpenilla commented 8 years ago

@hamzasood Is there a reason this can't be shared?

MobWiMetro commented 8 years ago

@zlelik Yes. This is a hack.

zlelik commented 8 years ago

@MobWiMetro Thank you

StevenTLBF commented 8 years ago

Any progress?

angelovAlex commented 8 years ago

very sad :(

volgin328 commented 8 years ago

Anyone has succeeded?

SObS commented 8 years ago

https://github.com/iPh1ps99/NanoTimeKit-Headers ?

an20olives commented 8 years ago

@SObS Believe we already tried NanoTimeKit-Headers still gave the same error, does anyone know if this can still work or if its even possible with the recent WatchOS updates?

Baddaboo commented 8 years ago

Since I saw these messages and realized that nobody had still figured this out, I revisited the project and tried a few little hacks here and there but I can't tell if I cleared up all the compiler errors or if there's a bigger problem I'm not seeing. Basically, you have to clean up the header files and create a tbd file for Xcode to recognize them. But now I'm at a point where Xcode attempts to compile the project, stall at linking and then crash

screen shot 2016-05-01 at 6 24 54 pm
an20olives commented 8 years ago

@Baddaboo Ok just started this back up again got the frameworks that are needed loaded in, I'm still stuck at the NanoTimeKit not found (Got passed before but idk how lol), would we call this progress?

Baddaboo commented 8 years ago

@RepoEliteARO I'd say make sure that the NanoTimeKit headers you're using are for whatever version of WatchOS you're trying to compile for. I haven't tried the one that @SObS linked to, because the dump I'm using works just fine, but I think some others are running into issues because their headers are for WatchOS 1.0 and they're compiling for 2.0+. Other than that, make sure that your search path is set, the NanoTimeKit framework is included, and, uh, pray.

I'm at the point where ld keeps crashing and throwing:

clang: error: unable to execute command: Killed: 9
an20olives commented 8 years ago

@Baddaboo Alright thanks ill check out @SObS links and see what I can do, ill get back to you when things work. Ill fix my search paths and see what else I can get done. Any idea what would be causing that?

Update: Just did that fixed the missing "Nano not found" error (starting to remember now :P) now its spewing out a bunch of errors, think most are UIKit errors from what I'm seeing I may have missed something so...

screen shot 2016-05-02 at 5 51 53 pm
SObS commented 8 years ago

About UIKit(UIView) and etc: "Missing Headers & Frameworks: … For the most part, you just need to copy the tbd files from the iPhoneOS SDK into the appropriate places in the WatchOS SDK, as well as their headers, then edit the tbd files to include ‘armv7k’. I’m sure somebody will automate this repetitive and thankless job" from here http://blog.steventroughtonsmith.com/post/128957959685/native-uikit-apps-on-apple-watch Not tried yet.

angelovAlex commented 8 years ago

What's the point you all try to compile it when it won't work? The main idea is that this code should be executed by carousel app, without it this code and project are useless. You can just comment out everything and compile an empty dylib to play with, and only after figuring out of how to load that dylib into carousel, it is worth to compile the whole code.

ph1ps commented 8 years ago

@angelovAlex The bad thing is that we can't inject the compiled dylib into a real Watch without some tricks. Though I think we can inject the code into a simulator which would be pretty cool too :)

StevenTLBF commented 8 years ago

any progress? :-/ its been almost a year since this was posted :(

Shugabuga commented 8 years ago

It's been a year since this issue first appeared. Has there been anyone with a solution, or can @hamzasood shed some light on this topic?

DominikBucher12 commented 7 years ago

What is the big deal? You can class-dump files on your own from iOS Simulator. I already did that few minutes ago and I will post the project when it's ready and fully working. 👍

StevenTLBF commented 7 years ago

@DominikBucher12 YES!!! FINALLY!! Please share once you get it working!!!

lellis2k commented 7 years ago

@DominikBucher12 Excellent, could we see a proof of concept? How far along do you think you are with it?

Baddaboo commented 7 years ago

Not sure what all the hubbub is with @DominikBucher12 but he is right: it's not that hard to class-dump the sim headers and get the project to compile. If you need any proof, you can grab the dylib I compiled. Since my school's on Thanksgiving break, I decided to pick up the project again to try to figure out how to inject the library into Carousel. All I've been able to do so far is make my watch crash. I pushed a new repo with the patched frameworks and project I'm working on if you want to see what I'm up to: https://github.com/Baddaboo/WatchYourFaceTest

StevenTLBF commented 7 years ago

Any progress?

Baddaboo commented 7 years ago

Progress has been very hit-and-miss. I've tried to get Carousel to load the dylib, but debugserver has very little documentation on what it can actually do and there are many points at which I do something that causes my watch to lock up and stop responding to Xcode's debugger until I restart it

Baddaboo commented 7 years ago

FWIW I even tried swizzling a clockkit function to see if I could get Carousel to execute a dlopen through a complication, but that route seems like a dead-end :/

oit63 commented 7 years ago

@Baddaboo Thanks, your route now is a kind of good way.

DominikBucher12 commented 7 years ago

Few tips on injecting dylibs, a bit old perhaps http://blog.timac.org/?p=761

a bit of theory:

http://www.programering.com/a/MTN2MzMwATY.html

StevenTLBF commented 7 years ago

Anything us noobs can do to help?

As a designer, I have great watch faces I could share with everyone if we get this to work!

Shugabuga commented 7 years ago

Anything us noobs can do to help?

@StevenTLBF Likely no. Plus I doubt that this will be usable on a physical device unless we see a watchOS "jailbreak."

StevenTLBF commented 7 years ago

@Shugabuga Hamza demoed it on a physical device though.. fingers crossed that we can figure this out!

Shugabuga commented 7 years ago

@StevenTLBF I think he has an exploit, as his former projects that also required a jailbreak (especially his live wallpaper example) was demoed on actual devices before a JB if I recall.

Plus, how else would we modify Carousel, because if Carousel can be modified without a jailbreak, then that means that SpringBoard could be too.

StevenTLBF commented 7 years ago

@hamzasood any light you can shed?

StevenTLBF commented 7 years ago

:(

Is this of any help? https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/UsingDynamicLibraries.html

StevenTLBF commented 7 years ago

@Baddaboo @Shugabuga Is this of any help? https://forums.macrumors.com/threads/including-dylib-in-application-bundle-carbon.609963/

Shugabuga commented 7 years ago

I don't think so. We need to include them in Carousel.app, which can't be modified AFAIK.

I know recently a dev was able to get the Hermés watchface running on a normal Apple Watch with only a jailbreak, but we'll see...

StevenTLBF commented 7 years ago

@Shugabuga Where did you see the Hermés watch face on a normal Apple Watch? I'm intrigued.

Shugabuga commented 7 years ago

Here.

justMaku commented 5 years ago

Not sure if anyone is still interested but here's the updated/working repo for use with Simulator.

https://github.com/justMaku/NTKCustomFace

Shugabuga commented 5 years ago

@justMaku I am interested, so thanks for the link!