All Projects → johnno1962 → Remote

johnno1962 / Remote

Licence: mit
Control your iPhone from inside Xcode for end-to-end testing.

Projects that are alternatives of or similar to Remote

Rtimageassets
A Xcode plugin to automatically generate 2x, 1x image from 3x image for you, or upscale to 3x from 2x
Stars: ✭ 2,490 (+240.16%)
Mutual labels:  xcode-plugin
SCXcodeTabSwitcher
Enables changing Xcode tabs using the ⌘cmd + [1..9] keys
Stars: ✭ 42 (-94.26%)
Mutual labels:  xcode-plugin
Xprobeplugin
Live Memory Browser for Apps & Xcode
Stars: ✭ 382 (-47.81%)
Mutual labels:  xcode-plugin
Showingithub
Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.
Stars: ✭ 243 (-66.8%)
Mutual labels:  xcode-plugin
AMLocalizedStringBuilder-Xcode-Plugin
AMLocalizedStringBuilder is the localized string helper which help you build your "Localizable.strings" file to class with shortcut ctrl+f.
Stars: ✭ 29 (-96.04%)
Mutual labels:  xcode-plugin
Clangformat Xcode
Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
Stars: ✭ 2,852 (+289.62%)
Mutual labels:  xcode-plugin
Xcodeequatablegenerator
Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.
Stars: ✭ 188 (-74.32%)
Mutual labels:  xcode-plugin
Scxcodeswitchexpander
Xcode plugin that enables switch cases autocompletion
Stars: ✭ 662 (-9.56%)
Mutual labels:  xcode-plugin
AMEGetterMaker
A lazyload getter maker without resign for Xcode
Stars: ✭ 42 (-94.26%)
Mutual labels:  xcode-plugin
Tulsi
An Xcode Project Generator For Bazel
Stars: ✭ 365 (-50.14%)
Mutual labels:  xcode-plugin
TrickerX
An Xcode9+ Extension which make CodingKeys automatically.
Stars: ✭ 90 (-87.7%)
Mutual labels:  xcode-plugin
ViewGenerator
⚒ ViewGenerator generates view code from variable name automatically in iOS development
Stars: ✭ 75 (-89.75%)
Mutual labels:  xcode-plugin
Xalign
An amazing Xcode Source Editor extension to align regular code. It can align Xnything in any way you want.
Stars: ✭ 2,898 (+295.9%)
Mutual labels:  xcode-plugin
Awesome Xcode Extensions
Awesome native Xcode extensions.
Stars: ✭ 2,628 (+259.02%)
Mutual labels:  xcode-plugin
Swiftai
SwiftAI, write Swift code smart. SwiftAI can generate Model class from JSON now. Codable and HandyJSON is supported. More features will be add.
Stars: ✭ 470 (-35.79%)
Mutual labels:  xcode-plugin
Linex
Feature packed Xcode extension
Stars: ✭ 210 (-71.31%)
Mutual labels:  xcode-plugin
Dxxcodeconsoleunicodeplugin
转换Xcode控制台中一些不可阅读的字符,比如 \u22AD 这种
Stars: ✭ 268 (-63.39%)
Mutual labels:  xcode-plugin
Peckham
Add #import-s from anywhere in the code.
Stars: ✭ 719 (-1.78%)
Mutual labels:  xcode-plugin
Swiftmockgeneratorforxcode
An Xcode extension (plugin) to generate Swift test doubles automatically.
Stars: ✭ 522 (-28.69%)
Mutual labels:  xcode-plugin
Xcode Wakatime
Xcode plugin for automatic time tracking and metrics generated from your programming activity.
Stars: ✭ 360 (-50.82%)
Mutual labels:  xcode-plugin

Remote - Control your iPhone from Xcode

"Remote" is a plugin for Xcode that allows you to control an iPhone from a window on your Mac during development. Originally created to avoid having to pick up a device during testing you can record "macros" of device touches and replay them. It will also compare the resulting screen output against a snapshot for end-to-end testing. The Macro log is an editable WebView that can be modified at will. Finally, you can now record and save all display output into a quicktime movie.

Stop Press

Remote is now available as part of the Injection standalone App available here and as a SPM Swift Package. Use RemoteCapture.start("list of host names") to start capture once you have used the menu item Remote Control/Start Server in the InjectionIII App.

Icon

(The gif shows the recording of a macro, saving it and then playing it back - testing the screen is as expected in the snapshot.)

To use, download the zipped source for this plugin, build and restart Xcode. You can then patch your project's main.m to include the Remote client header using "Product/Remote/Patch App" or it can load from a bundle on the fly if using the simulator. When using a device check that the correct IP address has been patched into main.m so the device can connect. To use with Swift, add an empty main.m to your project so it can be patched.

The display shadowing window will not display by default. Use the Menu item "Product/Remote/Load" to have it appear. Thereafter, touches on the shadow display or device applied and recorded. To save a macro or a sequence of touches, enter a name into the textfield towards the bottom of the touch display and click the save button. You can then replay the macro either by loading it using the pulldown menu at the top of the touch display and clicking replay or directly from the "Product/Remote/" Menu.

For end-to-end testing, include a snapshot in a macro by clicking the "Snapshot" button. On replay, the macro will pause until the screen matches the snapshot within the specified tolerance or it will timeout asking if you would like to update the snapshot or the tolerance used (remember to save the updated macro.) The units of tolerance are the number of bytes the screen image differs after the run length encoding of simular pixel values.

Macro entries logged/replayed:

  • Hardware <hw.machine> - device type from sysctlbyname()

  • Device <screen width> <screen height> <snapshot scale> <device scale>

  • Begin <wait time> <x> <y> [<x2> <y2>] - touch(s) start

  • Moved/Ended <ditto> touches moved/ended - two touches maximum

  • Expect timeout:<seconds> tolerance:<bytes different>.. <snapshot>

Implementation Classes

UI:

  • RMPluginController - interface between the Remote display and Xcode

  • RMWindowController - macro re-player and overall nib controller

  • RMMacroManager - controls display, saving and loading of macros

Internal (connected by protocol RMDeviceDelegate):

  • RMImageView - subclass of NSImageView for event capture/device display

  • RMDeviceController - interface between remote display and device

  • RemoteCapture.h - #imported into application's main.m to connect to Xcode

RemoteCapture.h requires a patched main.m to be compiled using ARC.

Limitations

Remote uses [UIWindow.layer renderInContext:] so most activity on the device is captured including the keyboard but excepting video replay and openGL layers. UIAlertView prompts are also not captured as they seem to render outside the window hierarchy. Finally, UIDatePickers are not rendered correctly at all although they will respond to events. To preserve network bandwidth to the device animations are not played.

Remote performs better with swipe events if you make an initial tap on the device.

Please note: for some reason it takes about a minute before Xcode will accept remote connections on it's server socket (firewall complications?). After restarting Xcode you may need to wait a while before being able to use the Remote plugin from a device.

Thanks

AVFoundation code for video capture adapted from: https://github.com/acj/TimeLapseBuilder-Swift

MIT license. Please see the LICENSE file for the particulars.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].