Companion iOS/Multiplatform app for remote control #72
Replies: 5 comments 8 replies
-
I've finally gotten around to working on this and have had pretty good initial success. I've added a NetworkManager class and initialize it in AppDelegate.applicationDidFinishLaunching. It provides a Bonjour listener and I can connect to it with a simple iOS app. The iOS app shows the current sample rate and I've set it up to be able to toggle the defaults.userPreferIconStatusBarItem option as a proof of concept. My iOS companion app can get data from LosslessSwitcher on the Mac and send requests to change a parameter, good start! I started my experiments with a vanilla clone of the main branch, and there everything has been working fine.
I realized that there was a new Xcode, Version 14.3 (14E22b). After updating, I find that I can now import the network framework just fine into the improvements-1 code. Sorry for the user error and any potential distraction. I'll report back later when I've made more progress on the remote iOS companion app! |
Beta Was this translation helpful? Give feedback.
-
It's not pretty, but it works! Initial success. |
Beta Was this translation helpful? Give feedback.
-
I have posted the initial version of my companion iOS app: LosslessSwitcherRemote: It does require a modified version of LosslessSwitcher with network support and some functional changes. This version lets you toggle whether it auto switches, shows both the current and detected sample rates, and has an option to set the current sample rate to what is currently detected. This is a fork from the main branch of LosslessSwitcher: Here's the updated menu for LosslessSwitcher running on the Mac. The status bar values for C: and D: are the Current and Detected frequency rates. In the menu you can manually apply the detected to set the current. You can also toggle the Auto Switching option: Here are some screenshots for the iOS companion app. If you start the iOS app with no servers running this is the screen you get. You can manually refresh and look for servers, but if none are running on your network this is as far as it goes: When you run the network enabled version of LosslessSwitcher, it appears on the network and the iOS app will detect it. If it is the only service discovered, the iOS app will connect to it automatically. This screen shows the Manage Connection Details screen where you can see all the discovered services and pick the one you want to connect to: This is the main UI when the app is in use:
It supports multiple devices and multiple servers. Each iOS device can select which server it wants to control and the servers do a best effort to send updates to all clients that are connected to them. |
Beta Was this translation helpful? Give feedback.
-
Here is a video showing the LosslessSwitcherRemote iOS app in use: Also, the binary has been approved for distribution through TestFlight. So you can get the source code and build it yourself: Or, use this URL to join the beta test and get the iOS application installed on your device from TestFlight: The app does require the forked/modified version of LosslessSwitcher with Network Server support: |
Beta Was this translation helpful? Give feedback.
-
@vincentneo I could really use your help. I can no longer get LosslessSwitcher to build if "import Network" is included in the project. When I started experimenting with adding the network support I saw the same issue in the improvements-1 branch where Xcode would not build and complained about 'Network/nw_object.h' file not found. At that time I was able to adjust it by changing the Target minimum macOS deployment. Then discovered that there was a new version of Xcode, and it seemed to work fine with that and the original 11.4 target. I was able to work with that and get the network features working. After some months I have come back to the project and find that with the current Xcode 14.3.1 (14E300c) I can no longer get it to build, no matter what I try. I dont know if it's something that has changed in updated versions of the package dependencies, something in the current Xcode, macOS SDKs/frameworks, or just plain user error on my part - but it's really frustrating. Repro Steps:
Can you see what needs to be done to get the project to build with the network framework? |
Beta Was this translation helpful? Give feedback.
-
I'd like a companion app to use to manually switch the sample rate and bit depth remotely, either from an iOS device or another Mac computer.
In my setup I have a Mac Mini that runs as a headless media server. I generally use the iTunes Remote app to control what its playing with my iPad.
I very much like the LosslessSwitcher features but do find it annoying to hear the hiccup when the rate switches as new songs start, particularly when listening to playlists that have media with different settings.
My idea is to extend LosslessSwitcher to support a companion app running on another device to interact with the settings. I'd like to have a manual toggle so the process on the computer running Apple Music would still monitor what is playing and show what it detects for the current media (but not necessarily switch automatically).
That way I could listen in my studio and leave it on a static setting while playing casual playlists or stuff that would often be switching rates. But if I wanted to listen to something more seriously and set the sample rate and bit depth specifically, I could do that remotely.
It would also be nice to be able to see on the app the current settings LosslessSwitcher detects and be able to double check that against what Apple Music says (without having to turn on a display and interact with the media player Mac Mini).
For my particular situation, an iOS app would be sufficient but if the companion app was Multiplatform and could run on a remote Mac computer as well that might also have value (more convenient than going into a Shared Screen remote control session).
Beta Was this translation helpful? Give feedback.
All reactions