Flipper plug-in that can send TouchEvent and Keyboard events from PC to iPhone
FlipperControlUIPlugin-iOS
Flipper plug-in that can send TouchEvent and Keyboard events from PC to iPhone..(iOS client) Desktop Plugin is Here
Installation
CocoaPods
Put the following in your Podfile
pod 'FlipperControlUIPlugin', :git => 'https://github.com/p-x9/FlipperControlUIPlugin-iOS.git'
pod 'HammerTests', :git => "https://github.com/p-x9/Hammer.git", :branch => "flipper"
Swift Package
Currently not supported
Usage
Setup for iOS project
For UIKit-made apps, write the following.
import FlipperKit
import FlipperControlUIPlugin
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene),
let keyWindow = windowScene.keyWindow else {
return
}
let client = FlipperClient.shared()
client?.add(FlipperControlUIPlugin(for: keyWindow))
client?.start()
}
}
If you are using SwiftUI, write as follows.
@main
struct flipper_testApp: App { // Your Application
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate // use AppDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
class AppDelegate: NSObject, UIApplicationDelegate, UIWindowSceneDelegate {
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
let config = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role)
config.delegateClass = SceneDelegate.self // use SceneDelegate
return config
}
}
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene),
let keyWindow = windowScene.keyWindow else {
return
}
let client = FlipperClient.shared()
client?.add(FlipperControlUIPlugin(for: keyWindow))
client?.start()
}
}
Send Touch event and Keyboard Event with Flipper
-
Download Flipper App to your PC. Flipper’s GitHub Page is Here Flipper Document Page is Here
In the case of Mac, the Homebrew can be used for easy installation.
brew install flipper
-
install p-x9/flipper-plugin-control-ui (plugin for PC) Please download the PC plug-in from the release section of the Github page below. Once downloaded, install the software from the Flipper application.
-
Connect iPhone to PC and launch application If the connection is successful, a section called ‘Control UI’ will be added to the left side tab. Check it as it may be in the ‘Disabled’ section.
-
Use
License
FlipperControlUIPlugin-iOS is released under the MIT License. See LICENSE