Posts

Post not yet marked as solved
5 Replies
1.8k Views
Hi, I'm trying out Xcode Cloud but can't get it to build in my scenario. The use case is the following: My project has multiple swift packages that depend on each other. "App" has a local package dependency called "SPMKit". "SPMKit" has a local package dependency called "SPMKit2". The issue I run into is if "SPMKit2" has any dependencies, it doesn't resolve in Xcode Cloud. Are local dependencies like this not supported in Xcode Cloud? All the packages are in the same directory as my app. I'd like to not have to put each package in it's own git..
Posted
by Joebayld.
Last updated
.
Post not yet marked as solved
0 Replies
575 Views
I'm working on feeding a AVPlayer into a Metal view. The current test video I'm playing is ProRes 422. If I read the buffer as RGB pixels (kCVPixelFormatType_32BGRA), then all works as expected. But this pixel format uses more processing on the ProRes decoder, and per Apple's WWDC session the preferred format is kCVPixelFormatType_422YpCbCr16. So there's a couple issues I'm running into when using the YpCbCr format.. Issues / Questions: Is there a set of fragment shader code to convert the texture from YpCbCr to RGB? When changing the pixel format, everything becomes grainy / distorted. I assume I need a function in the Metal pipeline to convert it. Is a fragment shader even the best way to handle converting it? I need it to get to RGB for rendering to a view. Is there a major difference between kCVPixelFormatType_422YpCbCr16 and kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange. I know the latter brings the texture in as two planes (which seems easier and more performant per activity monitor), but Apple recommended traditional kCVPixelFormatType_422YpCbCr16 with a single plane. Just curious what the best option to use is.
Posted
by Joebayld.
Last updated
.
Post not yet marked as solved
8 Replies
1.7k Views
Hi,I'm trying to send text via the Network protocol to a websocket. I have the following code: func send(data: Data) { let metaData = NWProtocolWebSocket.Metadata(opcode: .text) let context = NWConnection.ContentContext (identifier: "context", metadata: [metaData]) self.connection.send(content: data, contentContext: context, isComplete: true, completion: .contentProcessed( { error in if let error = error { self.connectionDidFail(error: error) return } print("connection \(self.id) did send") })) }This sends the text to the NWConnection, however it logs an error: __nw_frame_claim Claiming bytes failed because start (7) is beyond end (0 - 0)(with 7 being the length of the data). Is there something I'm doing wrong here? Any ideas?
Posted
by Joebayld.
Last updated
.
Post not yet marked as solved
1 Replies
739 Views
I have an app that uses HomeKit. I want to give the ability for the user to update a HMAccessory name. I used the following function and it works properly and updates the HMAccessory name, but when I open the Home app, it never get's updated. I implemented the HMAccessoryDelegate to observe changes and that properly works. If I rename an accessory in the Home app, that propagates to my app. But if I perform the rename from my app it doesn't send the change to the Home app. It's as if the Home app doesn't use the HMAccessoryDelegate. Is this a known issue?     func updateName(to: String) {       hmAccessory.updateName(to) { (error) in           if let error = error {               print(error)           } else {               print("Changed Name to", to)             }         }     }
Posted
by Joebayld.
Last updated
.