WatchOS Compatibility
codekrafter opened this issue · 17 comments
I am working on an app that needs to use OSC on a WatchOS app. Currently you cannot use this library with WatchOS and I am wondering if there are plans to add support for it.
Not currently but I don't think it would be hard to add. I think I could easily add tvOS and watchOS.
that would be very helpful, if you want me to try to assemble a pull request to save you time I could attempt one, but I have minimal experience with CocoaPods
I just added watchOS and tvOS support. It would be helpful if you could give it a try to before I push to CocoaPods.
Unlike the iOS and macOS projects, I had to adjust the team under the signing section of the watchOS and tvOS projects. This let it compile correctly, but it leads to runtime error "code signature invalid" for the framework that makes it so the library cannot be loaded. Maybe once the change is in CocoaPods the signing issues will be fixed?
Could you send me a screenshot?
The watchOS project shows this and refuses to compile:
The iOS project shows this and compiles properly:
When I substitute my team for the watchOS project it will compile, but when adding it as a framework, it compiles correctly on my iOS app (and I can use it properly to send osc), but when I embed it in my watchOS app/extension it throws this runtime error:
dyld: Library not loaded: @rpath/SwiftOSC.framework/SwiftOSC
Referenced from: /private/var/containers/Bundle/Application/E4537D24-0690-490F-884E-F92B6CB15E3A/ConsoleBuddy Watch App.app/PlugIns/ConsoleBuddy Watch Extension.appex/ConsoleBuddy Watch Extension
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/E4537D24-0690-490F-884E-F92B6CB15E3A/ConsoleBuddy Watch App.app/PlugIns/ConsoleBuddy Watch Extension.appex/Frameworks/SwiftOSC.framework/SwiftOSC: code signature invalid for '/private/var/containers/Bundle/Application/E4537D24-0690-490F-884E-F92B6CB15E3A/ConsoleBuddy Watch App.app/PlugIns/ConsoleBuddy Watch Extension.appex/Frameworks/SwiftOSC.framework/SwiftOSC'
/private/var/containers/Bundle/Application/E4537D24-0690-490F-884E-F92B6CB15E3A/ConsoleBuddy Watch App.app/PlugIns/ConsoleBuddy Watch Extension.appex/Frameworks/SwiftOSC.framework/SwiftOSC: stat() failed with errno=1
(lldb)
Looks like a linking issue not a signing issue. I'll try to get a working example going.
If you look at the 4th line of the error it says it is rejecting the embedded library because code signature invalid
, so it could be a combination of both
Xcode is giving me some issues with github. Here's a dropbox link for now.
https://www.dropbox.com/sh/pqhkm539qj3h24s/AAD0waxD9CSoFOfcRv_ZxYCva?dl=0
That example has no reference to SwiftOSC other than in the InterfaceController (maybe because it didn't like the movement between enviroments), but I still think that the problem is a signing error because the error message is saying code signature invalid for the embedded library
I got it working in a simulator (my project works in a simulator as well, just not on an actual device) but because of apple limiting the creation of profiles I could not deploy it to an actual device. I can just have the osc client/server run on the iOS app and have everything done with communication between them, to stick with what works.
And sorry I don't own an Apple Watch to actually test it on a real device.
I think I got it working on the iOS side, so I can just communicate between them to transmit messages.
I'll push to cocoapods. Maybe it'll make a difference.