Summary: Installing has a convenient API, so should Uninstalling.
Reviewed By: migchez
Differential Revision: D3151068
fb-gh-sync-id: b59af6b1cb83849d232d930e3c30a468b3d50258
fbshipit-source-id: b59af6b1cb83849d232d930e3c30a468b3d50258
Summary: This is an artifact that should have been removed when `FBJSONConversion` was introduced.
Reviewed By: marekcirkos
Differential Revision: D3155608
fb-gh-sync-id: 239f11971884125d6346302c4dc14d220097a57c
fbshipit-source-id: 239f11971884125d6346302c4dc14d220097a57c
Summary: We don't need to have order-dependence in `Configuration` now that the `Accumilator` can do the hard work of applying arguments to a configuration. Makes the grammar a lot easier to understand.
Reviewed By: migchez
Differential Revision: D3150308
fb-gh-sync-id: 61000c708bb67700dec028f4daa0a994c273819e
fbshipit-source-id: 61000c708bb67700dec028f4daa0a994c273819e
Summary: Chose more appropriate defaults for Queries, dependent on what the expected state of a Simulator is.
Reviewed By: marekcirkos
Differential Revision: D3146328
fb-gh-sync-id: 90a5ffddc65202768d1f9ab8103018653748b9ea
fbshipit-source-id: 90a5ffddc65202768d1f9ab8103018653748b9ea
Summary: There are some additional annotations that we should add to make the Swift bridging of `FBSimulatorControl` smoother.
Reviewed By: nqmtuan
Differential Revision: D3146322
fb-gh-sync-id: 4ba75352f91f70976c41ae9d91bba746c8f31269
fbshipit-source-id: 4ba75352f91f70976c41ae9d91bba746c8f31269
Summary: We currently have no way to launch agents using the http relay. This diff adds the route 'launch' which currently only attempts to launch an agent using the provided JSON.
Reviewed By: lawrencelomax
Differential Revision: D3139352
fb-gh-sync-id: d0a06b45efb85b839da0f447a756b9715d0ea36d
fbshipit-source-id: d0a06b45efb85b839da0f447a756b9715d0ea36d
Summary: When xctest is bootstrapped from command line testmanagerd "hangs up" XPC connection, probobaly because of protocol differences.
Reviewed By: lawrencelomax
Differential Revision: D3144335
fb-gh-sync-id: 7a740fab46d045f516e49ba11b47e83442895db6
fbshipit-source-id: 7a740fab46d045f516e49ba11b47e83442895db6
Summary: It will readuce amount of code loaded into runtime. This is because we need DevTool* frameworks that Xcode3Core loads, not Xcode3Core it self.
Reviewed By: lawrencelomax
Differential Revision: D3144332
fb-gh-sync-id: 636dc1d1da55458c167eaa96c6176f39bfcbbd3a
fbshipit-source-id: 636dc1d1da55458c167eaa96c6176f39bfcbbd3a
Summary:This method is used by FBSimulatorControl and XCTestBoostrap so we can't used static BOOL inside it to prevent multiple loads.
Added dispatch_once in FBSimulatorControl when calling it instead.
Reviewed By: nqmtuan
Differential Revision: D3144331
fb-gh-sync-id: 0822386d20a0fa9d0c4fd23e220d86d6e4369ee3
fbshipit-source-id: 0822386d20a0fa9d0c4fd23e220d86d6e4369ee3
Summary:Process environment variables are mutable so we should not use it to determine equality.
Closes https://github.com/facebook/FBSimulatorControl/pull/252
Reviewed By: lawrencelomax
Differential Revision: D3144145
Pulled By: marekcirkos
fb-gh-sync-id: 36d693ebbe4b6490c54bfbb560d4480fbaa28e12
fbshipit-source-id: 36d693ebbe4b6490c54bfbb560d4480fbaa28e12
Summary: `List` was reporting using the Description of the Simulator, rather than using the `Format`, this fixes that as well as adds a more informational default.
Reviewed By: nqmtuan
Differential Revision: D3144143
fb-gh-sync-id: cd9cce3fedce7cb2aace8e43264ac513046f9f25
fbshipit-source-id: cd9cce3fedce7cb2aace8e43264ac513046f9f25
Summary: `XCTestBootstrap` has to load a whole bunch of Private Frameworks. Instead of requiring every time that `FBSimulatorControl` is used the Frameworks are loaded, we can load the frameworks when the `XCTestBootstrap` interaction is used. This will save on Framework loading time for invocations of `FBSimulatorControl` that don't use the `XCTestBootstrap` methods.
Reviewed By: marekcirkos
Differential Revision: D3139023
fb-gh-sync-id: e91fe2ce7b4d03a49441b42659a7fd7a39613dc3
fbshipit-source-id: e91fe2ce7b4d03a49441b42659a7fd7a39613dc3
Summary:We can fail to load private frameworks due to missing image of third library that is needed by loaded framework.
Added error handling that will try to load missing framework image from given directory list.
Reviewed By: migchez, lawrencelomax
Differential Revision: D3138802
fb-gh-sync-id: 21710a38b9baf1fce981e81e42e342e4fa0085fa
fbshipit-source-id: 21710a38b9baf1fce981e81e42e342e4fa0085fa
Summary: There are a number of reasons that the `fbsimctl` CLI is hard to use, one of them is that the output in the human-readable case is very inconsistent and verbose. This fixes these issues and simplifies the reporting mechanism.
Reviewed By: marekcirkos
Differential Revision: D3138428
fb-gh-sync-id: b8c9fab5af1c55df4fda7a356652fea76691bfed
fbshipit-source-id: b8c9fab5af1c55df4fda7a356652fea76691bfed
Summary: Since parsing of arguments to app/agent launch configuration is greedy, it's not possible to chain a command after it, by adding `--` to the chain it's now possible to terminate.
Reviewed By: nqmtuan, marekcirkos
Differential Revision: D3133589
fb-gh-sync-id: aaf4e2632e5fa9efa9c0d06bae77c6b689cdf0f2
fbshipit-source-id: aaf4e2632e5fa9efa9c0d06bae77c6b689cdf0f2
Summary: All actions apart from Boot, List, Delete apply to booted simulators so this makes a reasonable default when no UDID is provided. This eliminates some unecessary boiler-plate to just get started with `fbsimctl`
Reviewed By: nqmtuan
Differential Revision: D3133326
fb-gh-sync-id: 48cc0345cf6d3109d8cb1ed3bb6e3714a4712570
fbshipit-source-id: 48cc0345cf6d3109d8cb1ed3bb6e3714a4712570
Summary:I noticed that on xcode 7.3 tests hang on semaphore during "DTXConnection" deallocation and happens pretty often.
Probably there is race condition, during simulator termination and socket handling.
This diff disconnects testmanagerd before simulator is terminated.
Reviewed By: lawrencelomax
Differential Revision: D3115134
fb-gh-sync-id: 36c4d848a5a7ba9c16df873a2a6721c52f6fd999
fbshipit-source-id: 36c4d848a5a7ba9c16df873a2a6721c52f6fd999
Summary:This fixes issue, when iPad Pro configuration couldn't be created by name, because of missing in configurations array
Closes https://github.com/facebook/FBSimulatorControl/pull/251
Differential Revision: D3133180
Pulled By: lawrencelomax
fb-gh-sync-id: 915f57e9434f9ab8d1850fd878488b68ba19a10d
fbshipit-source-id: 915f57e9434f9ab8d1850fd878488b68ba19a10d
Summary: It is used only for testing so there is not need for other frameworks to depend on it.
Reviewed By: lawrencelomax
Differential Revision: D3126198
fb-gh-sync-id: bdab4aa38426e2a4fd2e81db7ef069e397133c78
fbshipit-source-id: bdab4aa38426e2a4fd2e81db7ef069e397133c78
Summary:We can kick off test bundle from any application so instead of forcing creating own application for that added posiibility to start test with any bundle id (our own app, or existing apple apps).
Unfortunately devices are more tricky so, this is simulator solution for now.
Reviewed By: lawrencelomax
Differential Revision: D3120820
fb-gh-sync-id: 712197ea41624947b50527c9b4db8aa8703418d0
fbshipit-source-id: 712197ea41624947b50527c9b4db8aa8703418d0
Summary:Added support for linking frameworks that requires other frameworks to link beforehand.
This is required to link 'IDEiOSSupportCore.plugin' (used by XCTestBootstrap).
Also added check for multiple classes to confirm successful framework load.
Reviewed By: lawrencelomax
Differential Revision: D3120290
fb-gh-sync-id: 95f1c064406a6965d583c85d4b16b674e68f543b
fbshipit-source-id: 95f1c064406a6965d583c85d4b16b674e68f543b
Summary: Fixes the `rpath` issues from the prior change to the project.
Reviewed By: phyllipecesar
Differential Revision: D3120943
fb-gh-sync-id: 78d8834c32f6261c437ccd763e6690be4d7e5ce2
fbshipit-source-id: 78d8834c32f6261c437ccd763e6690be4d7e5ce2
Summary: We should use the default of 10.10
Reviewed By: migchez
Differential Revision: D3120734
fb-gh-sync-id: b2f5511a741f6edbd20228b07857fba790eac49d
fbshipit-source-id: b2f5511a741f6edbd20228b07857fba790eac49d
Summary: Given that it is possible to connect a Bridge to a Simulator launched via the Simulator.app, it's also possible to connect a bridge to a Simulator that wasn't booted with FBSimulatorControl, or the Bridge wasn't connected due to changes to the launch options
Reviewed By: marekcirkos
Differential Revision: D3120277
fb-gh-sync-id: 96722880a9ccffa2e449aed6c7ea9cb22f46cc20
fbshipit-source-id: 96722880a9ccffa2e449aed6c7ea9cb22f46cc20
Summary: We can't connect the Framebuffer to an application that has been launched by Simulator.app, but it is possible to connect the bridge. This consolidates a lot of the startup path and means that Simulator.app launches can benefit from the SimulatorBridge interactions. This will also enable connecting a Bridge to a running simulator.
Reviewed By: marekcirkos
Differential Revision: D3116151
fb-gh-sync-id: 7da224d7dc39bb25259029941066f21d47dec38c
fbshipit-source-id: 7da224d7dc39bb25259029941066f21d47dec38c
Summary: The `openURL:` interaction exists in `FBSimulatorControl` we can expose this via the CLI and the HTTP API.
Reviewed By: marekcirkos
Differential Revision: D3115644
fb-gh-sync-id: 17706a9fe160746db408cfa57d6c8038ed404321
fbshipit-source-id: 17706a9fe160746db408cfa57d6c8038ed404321
Summary: Adds a 'Tap' action that will use the `SimulatorBridge` to tap an element in the same manner that `Simulator.app` does. There are success/failability semantics that mean that if an element isn't located at a given position, it will fail. Moves all bridge interactions to their own interaction category so that the failure semantics of a missing bridge exist.
Reviewed By: marekcirkos
Differential Revision: D3108835
fb-gh-sync-id: 9fd11dfe8b9b465cd8459eb0ef4a37b39bd0a621
fbshipit-source-id: 9fd11dfe8b9b465cd8459eb0ef4a37b39bd0a621
Summary: With the inclusion of `XCTBoostrap` the `LD_RUNPATH_SEARCH_PATHS` was getting burned in with the current xcode version to the framework binaries, this meant that the executables were loaded before the dynamic framework loading. This is problematic as a different `DEVELOPER_DIR` or `xcode-select` default for a previously built binary could result in Frameworks failing to load at runtime as there is an xcode version conflict.
Reviewed By: marekcirkos
Differential Revision: D3092735
fb-gh-sync-id: 0724b46a3de0635170154707af3106844df6d786
shipit-source-id: 0724b46a3de0635170154707af3106844df6d786
Summary: There's some new things to fix in Xcode 7.3, lets do it.
Reviewed By: marekcirkos
Differential Revision: D3087489
fb-gh-sync-id: c44f693a483e3fcc1716f30016dec4f287e43938
shipit-source-id: c44f693a483e3fcc1716f30016dec4f287e43938
Summary: Uploading of abitrary files is useful if you wish to pass a parameter to an Application based on the existence of a local file. If the Simulator is remotely launched with idb, this can provide a handy way of getting the file onto the Simulator host.
Reviewed By: marekcirkos
Differential Revision: D3081303
fb-gh-sync-id: 50e41b0ce3650cabaa62955cefb1999677abb08c
shipit-source-id: 50e41b0ce3650cabaa62955cefb1999677abb08c
Summary: This is needed for a direct launch of the Simulator to behave like the Simulator.app which uses a `LocationMode` to prime the Simulator's location on launch. Without this the `CLLocationManager` can have unexpectedly strange behaviour inside Applications.
Reviewed By: asm89, marekcirkos
Differential Revision: D3081301
fb-gh-sync-id: 5f84dab7c4449a0e818fc364379c921719dc594e
shipit-source-id: 5f84dab7c4449a0e818fc364379c921719dc594e
Summary: The header is public, but wasn't in the umbrella header.
Reviewed By: marekcirkos
Differential Revision: D3075629
fb-gh-sync-id: 2e8b25574591e5df1796486fdaddf0c4cb269d43
shipit-source-id: 2e8b25574591e5df1796486fdaddf0c4cb269d43
Summary: This will help ensure that the last frame is always written to file before termination completes.
Reviewed By: marekcirkos
Differential Revision: D3069244
fb-gh-sync-id: b16fdedc1ffa3f4729c64a59774801b39f60209e
shipit-source-id: b16fdedc1ffa3f4729c64a59774801b39f60209e
Summary: Timebase conversion is problematic, and ultimately unecessary if we can just use a monotonic clock that is guarded by the media queue
Reviewed By: phyllipecesar
Differential Revision: D3066671
fb-gh-sync-id: d938e4ecd0ef16361c1587dc9a97872d81a59233
shipit-source-id: d938e4ecd0ef16361c1587dc9a97872d81a59233
Summary: FBFramebufferVideo allows for videos to be in a ready state by keeping the last frame around, even when the video hasn't started yet. When the video does start, it is pushed at the current time. The problem was that we weren't updating the frame with the current time. This meant that depending on how long ago the last frame was, the timescale can go negative and screw the video up. This makes sense as the time that the frame was recieved from the framebuffer is *before* the start of the video. As a result it will have a negative time relative to the start of the video.
Reviewed By: nqmtuan
Differential Revision: D3065578
fb-gh-sync-id: 47676015f3d639bd561112c1e3d9744f755eef3d
shipit-source-id: 47676015f3d639bd561112c1e3d9744f755eef3d
Summary: This had a strange naming. Also adds parser tests
Reviewed By: nqmtuan
Differential Revision: D3058377
fb-gh-sync-id: d93708b89e5532ae7bc8997c46691d29101fc933
shipit-source-id: d93708b89e5532ae7bc8997c46691d29101fc933
Summary: It should be possible to control the output of the fbsimctl `diagnose` command depending on if the caller wants the content or just the file paths. Additional switches allows us to control this
Reviewed By: nqmtuan
Differential Revision: D3058163
fb-gh-sync-id: bded8fa2603eb3bdae95f1167e35cf91cf819d00
shipit-source-id: bded8fa2603eb3bdae95f1167e35cf91cf819d00