Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .dragon/_/Applications/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
10 changes: 10 additions & 0 deletions .dragon/_/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Package: me.kritanta.synergyclient
Name: SynergyClient
Section: Networking
Architecture: iphoneos-arm
Version: 0.1.0
Description:
Author: Kritanta
Maintainer: Kritanta
Tag: purpose::extension
Installed-Size: 27792
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ Filter = { Bundles = ( "com.apple.lowtide" ); }; }
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
Filter = {
Bundles = ("com.apple.UIKit");
Mode = "Any";
};
}
Binary file added .dragon/_/usr/local/lib/libhidsupport.dylib
Binary file not shown.
Binary file added .dragon/build/.ninja_deps
Binary file not shown.
14 changes: 14 additions & 0 deletions .dragon/build/.ninja_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ninja log v5
1 1073 1586627778176803749 .dragon/build/SynergyClient.m.o 4a6e8bcf2363bbec
1 1931 1586627779034630980 .dragon/build/main.m.o 3b9d838842347278
2 1936 1586627779040111514 .dragon/build/SynergyNavigationViewController.m.o f81a48dbf507f976
1 1943 1586627779048146093 .dragon/build/BackgroundApplication.m.o 4a2ec32f40ab3be8
1 1990 1586627779095646363 .dragon/build/ConfigurationViewController.m.o c771f980b6b552e5
0 2024 1586627779129977636 .dragon/build/AppDelegate.m.o a9ec4aea343d80b0
2024 2270 1586627779375426936 .dragon/sign/.dragon/_/Applications/SynergyClient.app/SynergyClient.unsym 3a0984916f424787
2270 2312 1586627779418607341 .dragon/sign/.dragon/_/Applications/SynergyClient.app/SynergyClient.unsigned 8722179886067fa4
2312 2327 1586627779434287526 .dragon/_/Applications/SynergyClient.app/SynergyClient e147fa95351cdd3c
2327 2338 0 .dragon/build/trash/stage b081426e6e4eeca0
0 12 0 .dragon/build/trash/stage b081426e6e4eeca0
0 13 0 .dragon/build/trash/stage b081426e6e4eeca0
0 11 0 .dragon/build/trash/stage b081426e6e4eeca0
Binary file added .dragon/build/AppDelegate.m.o
Binary file not shown.
Binary file added .dragon/build/BackgroundApplication.m.o
Binary file not shown.
Binary file added .dragon/build/ConfigurationViewController.m.o
Binary file not shown.
Binary file added .dragon/build/SynergyClient.m.o
Binary file not shown.
Binary file added .dragon/build/SynergyNavigationViewController.m.o
Binary file not shown.
Binary file added .dragon/build/main.m.o
Binary file not shown.
1 change: 1 addition & 0 deletions .dragon/last_package
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
me.kritanta.synergyclient_0.1.0_iphoneos-arm.deb
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>0.9</string>
<key>CFBundleVersion</key>
<string>2</string>
</dict>
</plist>
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.mobileprovision
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hid-support"]
path = hid-support
url = https://github.com/KritantaDev/hid-support.git
Binary file added AppBuildFiles/AppIcon60x60@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/AppIcon76x76@2x~ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Assets.car
Binary file not shown.
Binary file added AppBuildFiles/Default-568h@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-20x20@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-20x20@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-20x20@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-29x29@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-29x29@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-29x29@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-40x40@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-40x40@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-40x40@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-60x60@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-60x60@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-60x60@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-76x76@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-76x76@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Icon-App-83.5x83.5@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AppBuildFiles/Info.plist
Binary file not shown.
1 change: 1 addition & 0 deletions AppBuildFiles/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPL????
Binary file added AppBuildFiles/launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
ConfigurationViewController *configViewController;
UINavigationController *navController;
SynergyClient * synergyClient;
int _orientation;
UIInterfaceOrientation _orientation;
}

+ (AppDelegate *)sharedInstance;
- (int)getOrientation;
- (UIInterfaceOrientation)getOrientation;

@property (nonatomic, strong) IBOutlet UIWindow *window;
@property (nonatomic, strong) UINavigationController *navController;
Expand Down
53 changes: 3 additions & 50 deletions AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

// create config view controller
configViewController = [[ConfigurationViewController alloc] initWithStyle:UITableViewStyleGrouped];
[configViewController setTitle:[NSString stringWithFormat:@"iSynergyClient %@", @VERSION]];
[configViewController setTitle:[NSString stringWithFormat:@"Synergy 1 Client"]];
// [configViewController setDelegate:self];

navController = [[UINavigationController alloc] initWithRootViewController:configViewController];
Expand All @@ -81,41 +81,15 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[synergyClient setDelegate:configViewController];
CGRect screenBound = [[UIScreen mainScreen] bounds];
// NSLog(@"Screen width = %f, height = %f", screenBound.size.width, screenBound.size.height);
[synergyClient setScreenWidth:screenBound.size.width andHeight:screenBound.size.height];

//saiyen
//Detect orientation change
/*
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detectOrientation) name:@"UIDeviceOrientationDidChangeNotification" object:nil];
*/
//saiyen

//register for distributed messages from orientationnotification.dylib
CPDistributedMessagingCenter *messagingCenter;
// Center name must be globally unique
messagingCenter = [CPDistributedMessagingCenter centerNamed:@"com.northoverby.orientationnotification"];
[messagingCenter runServerOnCurrentThread];

// Register Message Handlers
[messagingCenter registerForMessageName:@"interfaceOrientationChanged" target:self
selector:@selector(handleDylibMessageOrientationChanged:withUserInfo:)];
[synergyClient setScreenWidth:screenBound.size.width*3 andHeight:screenBound.size.height*3];


//initial orientation
_orientation = [UIApplication sharedApplication].statusBarOrientation;

return YES;
}

- (NSDictionary *)handleDylibMessageOrientationChanged:(NSString *)name withUserInfo:(NSDictionary *)userinfo
{
_orientation = [(NSNumber *)[userinfo objectForKey:@"interfaceOrientation"] intValue];
NSLog(@"Received orientationnotification.dylib message orientation changed %u", _orientation);
[self updateForOrientation];

return nil;
}

-(void)updateForOrientation
{
UIScreen *screen = [UIScreen mainScreen];
Expand All @@ -134,27 +108,6 @@ -(void)updateForOrientation
[self.synergyClient sendResetOptionsMessage];
}

//saiyen
/*
-(void)detectOrientation{
UIScreen *screen = [UIScreen mainScreen];
CGRect fullScreenRect = screen.bounds; //implicitly in Portrait orientation.

// detect changes where device is oriented landscape or portrait
if (UIInterfaceOrientationIsLandscape([[UIDevice currentDevice] orientation]))
{
CGRect temp;
temp.size.width = fullScreenRect.size.height;
temp.size.height = fullScreenRect.size.width;
fullScreenRect = temp;
}

[self.synergyClient setScreenWidth:fullScreenRect.size.width andHeight:fullScreenRect.size.height];
[self.synergyClient sendResetOptionsMessage];
}
*/
//saiyen

- (void)applicationWillTerminate:(UIApplication *)application{
[configViewController updateDefaultsFromView];
[BackgroundApplication setRunInBackground:NO];
Expand Down
55 changes: 55 additions & 0 deletions DragonMake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
package_name: SynergyClient
install_command: killall -9 backboardd
SynergyClient:
type: app
cflags: -w -I./hid-support
ldflags: ./hid-support/libhidsupport/libhidsupport.tbd
frameworks:
- AppSupport
- UIKit
- CoreGraphics
- Foundation
files:
- AppDelegate.m
- main.m
- SynergyClient.m
- ConfigurationViewController.m
- BackgroundApplication.m
- SynergyClient/SynergyNavigationViewController.m
stage:
- cp -R AppBuildFiles/* .dragon/_/Applications/$name.app/
libhidsupport:
type: lib
install_location: /usr/local/lib/
dir: hid-support/libhidsupport
cc: clang
files:
- client.c
cflags: -I../3rdParty/RocketBootstrap/include
ldflags: -L../3rdParty/RocketBootstrap/lib
libs:
- substrate
- rocketbootstrap
stage:
- cp .dragon/_/usr/local/lib/libhidsupport.dylib ./
- xcrun tapi stubify --delete-input-file libhidsupport.dylib
hidspringboard:
type: tweak
dir: hid-support/hidspringboard/
logos_files:
- Tweak.xm
cflags: -I../3rdParty/RocketBootstrap/include -I../3rdParty
arc: -w
framework_search_dirs:
- ../Frameworks/
frameworks:
- GraphicsServices
- IOKit
hidlowtide:
type: tweak
dir: hid-support/hidlowtide
logos_files:
- Tweak.xm
cflags: -I../3rdParty/RocketBootstrap/include/
arc: -w
Binary file added IMG_0744.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Synergy for iOS

A Synergy client for iOS (a.k.a. iSynergyClient) that provides an independent client of the Synergy protocol for the iOS. In this implementation, middle and right mouse buttons can be assigned using Activator.
This client is an update and partial rewrite of "iSynergyClient," an unfortunately abandoned project.

To install, search for "iSynergyClient" is in Cydia's default repos. [Cydia](https://en.wikipedia.org/wiki/Cydia) is an alternative to Apple's App Store for "jailbroken" devices.
It has basic support for iOS 13. Many things are still unfinished.

![iSynergyClient for iOS](https://user-images.githubusercontent.com/313427/54129684-b5142680-4406-11e9-8d39-e35e36463efc.png)
This package used to depend on hid-support, mouse-support(?), apparently some bluetooth keyboard tweak, and other things i'm sure I haven't found yet.

I've added hid-support as a submodule to this project, (partially) fixed it for iOS 13, and added a very basic cursor to it.

Sensitivity is rough due to a high pixel ratio.

This package is avaliable in .deb form on the releases page here, or on https://repo.openpack.io/

* Install a Synergy server on your computer as normal
* Configure server to have one additional screen (client) called "iPhone" (or the hostname)
* Start iSynergyClient on your iOS device
* Enter IP-Address of your Mac/PC in "Server Address"
* Enter "iPhone"(or the hostname) as "Client Name"
* Start SynergyClient on your iOS device
* Enter IP-Address or name of your Mac/PC in "Server Address"
* Enter "iPhone" (or the hostname) as "Client Name"
* Tap the ON switch and move mouse over from Mac/PC
* Done. Your mouse is on your device!

## Demo Video on YouTube

[![iSynergyClient for iOS](https://img.youtube.com/vi/R0gOlkGAFNc/0.jpg)](https://www.youtube.com/watch?v=R0gOlkGAFNc)
Binary file removed Resources/Icon-57.png
Binary file not shown.
Binary file removed Resources/Icon-72.png
Binary file not shown.
Binary file added Resources/Icon-App-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Icon-App-20x20@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Icon-App-20x20@2x.png
Binary file added Resources/Icon-App-20x20@3x.png
Binary file added Resources/Icon-App-29x29@1x.png
Binary file added Resources/Icon-App-29x29@2x.png
Binary file added Resources/Icon-App-29x29@3x.png
Binary file added Resources/Icon-App-40x40@1x.png
Binary file added Resources/Icon-App-40x40@2x.png
Binary file added Resources/Icon-App-40x40@3x.png
Binary file added Resources/Icon-App-60x60@1x.png
Binary file added Resources/Icon-App-60x60@2x.png
Binary file added Resources/Icon-App-60x60@3x.png
Binary file added Resources/Icon-App-76x76@1x.png
Binary file added Resources/Icon-App-76x76@2x.png
Binary file added Resources/Icon-App-83.5x83.5@2x.png
11 changes: 4 additions & 7 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@
<key>CFBundleExecutable</key>
<string>SynergyClient</string>
<key>CFBundleIconFile</key>
<string>Icon-57.png</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-57.png</string>
<string>Icon-72.png</string>
</array>
<string>Icon-App-1024x1024.png</string>
<key>CFBundleIdentifier</key>
<string>ch.ringwald.synergyclient</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down Expand Up @@ -46,6 +41,8 @@
<array>
<string>continuous</string>
</array>
<key>UILaunchStoryboardName</key>
<string>Resources/launch</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
Expand Down
Binary file added Resources/launch.png
Binary file modified Resources/libhidsupport.dylib
100644 → 100755
Binary file not shown.
35 changes: 19 additions & 16 deletions SynergyClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <unistd.h>
#include <dlfcn.h>

#include "mouse_msgs.h"
//#import "../libactivator/libactivator.h"
#include "hid-support.h"

Expand Down Expand Up @@ -104,7 +103,12 @@ static void socketDataCallback (CFSocketRef s,
[synergyClient handleSocketCallback];
}
}

enum {
NSBackspaceKey = 8,
NSCarriageReturnKey = 13,
NSDeleteKey = 0x7f,
NSBacktabKey = 25
};
@implementation SynergyClient

@synthesize delegate;
Expand Down Expand Up @@ -198,7 +202,6 @@ -(id) init {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:keyActivatorDefautsApplied];
}
*/

return self;
}

Expand Down Expand Up @@ -467,18 +470,18 @@ -(BOOL) openConnection:(NSString *) remote {

- (void) activateMouse {
if (!mouseShown) {
mouseOpen();
//mouseOpen();
NSLog(@"Connection to mouse opened");
mouseShown = YES;
//mouseShown = YES;
}

}

- (void) deactivateMouse {
if (mouseShown) {
mouseClose();
//mouseClose();
NSLog(@"Connection to mouse closed");
mouseShown = NO;
//mouseShown = NO;
}
}

Expand Down Expand Up @@ -614,9 +617,9 @@ - (void) handleMessageWithLen:(uint16_t)len {
int x, y;
[self parseMessage:kMsgDMouseMove, &x, &y];
mouseX = x; mouseY = y;
//hid_inject_mouse_abs_move(mouseButton, mouseX, mouseY);
mouseSendEvent( mouseX, mouseY, mouseButton);
//NSLog(@"Mouse button %u at %f,%f\n", mouseButton, mouseX, mouseY);
hid_inject_mouse_abs_move(mouseButton, mouseX/3, mouseY/3);
//mouseSendEvent( mouseX, mouseY, mouseButton);
NSLog(@"Mouse button %u at %f,%f\n", mouseButton, mouseX, mouseY);
}
if (strncmp(kMsgDMouseDown, (char*)message, 4) == 0){

Expand Down Expand Up @@ -646,17 +649,17 @@ - (void) handleMessageWithLen:(uint16_t)len {
}


//hid_inject_mouse_abs_move(mouseButton, mouseX, mouseY);
mouseSendEvent( mouseX, mouseY, mouseButton);
// NSLog(@"Mouse down %u at %f,%f\n", button, mouseX, mouseY);
hid_inject_mouse_abs_move(mouseButton, mouseX/3, mouseY/3);
//mouseSendEvent( mouseX, mouseY, mouseButton);
NSLog(@"Mouse down %u at %f,%f\n", button, mouseX, mouseY);
}
if (strncmp(kMsgDMouseUp, (char*)message, 4) == 0){
int i;
[self parseMessage:kMsgDMouseUp, &i];
mouseButton = 0;
//hid_inject_mouse_abs_move(mouseButton, mouseX, mouseY);
mouseSendEvent( mouseX, mouseY, mouseButton);
// NSLog(@"Mouse up %u at %f,%f\n", i, mouseX, mouseY);
hid_inject_mouse_abs_move(mouseButton, mouseX/3, mouseY/3);
//mouseSendEvent( mouseX, mouseY, mouseButton);
NSLog(@"Mouse up %u at %f,%f\n", i, mouseX, mouseY);
}
if (strncmp(kMsgCEnter, (char*)message, 4) == 0){
// connected
Expand Down
Loading