{"id":13992663,"url":"https://github.com/ole/RemoteViewControllers","last_synced_at":"2025-07-22T16:31:05.504Z","repository":{"id":4892548,"uuid":"6048089","full_name":"ole/RemoteViewControllers","owner":"ole","description":"Introspection of the private and undocumented remote view controllers feature in iOS 6","archived":true,"fork":false,"pushed_at":"2018-02-11T02:32:02.000Z","size":327,"stargazers_count":45,"open_issues_count":0,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-29T13:39:55.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"gocd/gocd","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ole.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-02T16:52:38.000Z","updated_at":"2023-01-28T09:12:28.000Z","dependencies_parsed_at":"2022-09-13T02:52:47.426Z","dependency_job_id":null,"html_url":"https://github.com/ole/RemoteViewControllers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ole/RemoteViewControllers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FRemoteViewControllers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FRemoteViewControllers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FRemoteViewControllers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FRemoteViewControllers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ole","download_url":"https://codeload.github.com/ole/RemoteViewControllers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FRemoteViewControllers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266530884,"owners_count":23944002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:02:04.925Z","updated_at":"2025-07-22T16:31:04.159Z","avatar_url":"https://github.com/ole.png","language":"Objective-C","funding_links":[],"categories":["Objective-C"],"sub_categories":[],"readme":"# Remote View Controllers in iOS 6\n\nWritten by Ole Begemann, September/October 2012.\n\nThis is a test app for investigating the new private and undocumented feature of _remote view controllers_ in iOS 6. The app is accompanied by two extensive blog articles on the topic, [part 1](http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/) and [part 2](http://oleb.net/blog/2012/10/more-on-remote-view-controllers/). Please read them for further documentation.\n\n## Overview\n\n\u003cimg src=\"https://raw.github.com/ole/RemoteViewControllers/master/test-app-screenshot.png\"\u003e\n\nThe main screen consists of several buttons. Tapping one of them creates one of several of iOS's built-in view controllers and presents it on screen. Examples include the mail or SMS compose view and Twitter/Facebook sharing.\n\nWhile the UIs for these controllers have mostly not changed in iOS 6, they have changed considerably under the hood. Using the Activity Monitor instrument in Instruments and the log messages in the app, you can see that most of these sharing views now run in separate processes, using XPC for communicating with the host app.\n\nHave a look at the app's code to follow what's going on.\n\n## Remote Web View Controller\n\nThe bottom-most button, _Open Remote Web View_, uses the findings made in the two blog articles in an attempt to create an instance of the undocumented `_WebViewController` class and present it on screen. The hope is that this class is the entry point for the creation of a `_UIRemoteWebViewController` and a corresponding XPC service in which the actual web view would run.\n\nThe code looks like this:\n\n    - (IBAction)openWebView:(id)sender\n    {\n        _UIWebViewController *controller = [[_UIWebViewController alloc] init];\n        controller.delegate = self;\n\n        NSURL *url = [NSURL URLWithString:@\"http://google.com\"];\n        NSURLRequest *request = [NSURLRequest requestWithURL:url];\n        [controller loadRequest:request];\n    \n        [self presentViewController:controller animated:YES completion:^{\n            // Log the view hierarchy here to see what's going on\n            //NSLog(@\"View hierarchy: %@\", [controller.view recursiveDescription]);\n        }];\n    }\n\nUnfortunately, this does not work, though we seem to be on the right track. The log messages in the swizzled  `+requestViewController:fromServiceWithBundleIdentifier:connectionHandler:` method prove that the method is being called with seemingly the correct arguments:\n\n    self: _UIRemoteWebViewController\n    arg1: __NSCFConstantString _UIServiceWebViewController\n    arg2: __NSCFConstantString com.apple.WebViewService\n    arg3: __NSStackBlock__ \u003c__NSStackBlock__: 0x2fdaa6bc\u003e\n    Return Value: _UIAsyncInvocation \u003c_UIAsyncInvocation: 0x1e0376f0\u003e\n\nSadly, the `connectionHandler` block returns an error rather than a valid `_UIRemoteWebViewController` instance:\n\n    blockArg1: (null) (null)\n    blockArg2: NSError Error Domain=XPCObjectsErrorDomain Code=2 \"The operation couldn’t be completed. (XPCObjectsErrorDomain error 2.)\"\n    Failed to get remote view controller with error: Error Domain=XPCObjectsErrorDomain Code=2 \"The operation couldn’t be completed. (XPCObjectsErrorDomain error 2.)\"\n    \nI'd love to hear from you if you have any idea what else I could try.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fole%2FRemoteViewControllers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fole%2FRemoteViewControllers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fole%2FRemoteViewControllers/lists"}