Xcode Error : Building a custom peer-to-peer protocol

Unable to launch this sample project. Xcode says it cannot open the file.

Building a custom peer-to-peer protocol

I'm trying to build iPhone as a mouse. I am not planning on releasing it but more like a practice for myself.

I have one other question, how to use a mac app to receive mouse data while it's in background as it's required by my app.

Is Background Tasks the right way ?

I am planning to use Network framework for networking but there is not much documentation available.

Pardon me if it's a basic question.

Replies

Unable to launch this sample project.

Can you be more specific about that issue? I downloaded the sample, opened the TicTacToe.xcodeproj project in Xcode 14.3, selected an iOS simulator a the run destination, and it built just fine.

Building it for a device is a bit trickier because of the embedded watchOS app. Unless you care about the other platforms I recommend that you remove the tvOS and watchOS targets then, in the remaining iOS target, select your team in the Signing & Capabilities editor and that should build just fine too.

how to use a mac app to receive mouse data while it's in background

macOS has a lot fewer limitations on background execution than iOS. Typically you’d do this sort of thing by constructed two apps, one nested within the other. Mark the nested app as a UI element and then set it up to run at login using SMAppService.

I am planning to use Network framework for networking

That’s what I’d recommend. A good place to start is the sample code you referenced.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"