├── .gitignore
├── LICENSE
├── README.md
├── Screenshot
├── 1.png
├── 2.1.png
└── 3.png
├── XCSandboxViewer.podspec
└── XCSandboxViewer
├── XCSandboxViewer.h
└── XCSandboxViewer.m
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 |
20 | ## Other
21 | *.xccheckout
22 | *.moved-aside
23 | *.xcuserstate
24 | *.xcscmblueprint
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 | node_modules/
43 | Carthage/Build
44 | .DS_Store
45 | XCDemo/
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 XingCheng
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # XCSandboxViewer
2 | iOS sandbox viewer .
3 |
4 | iOS真机沙盒查看器 !在Finder中操作、查看文件 。
5 |
6 | ## Installation
7 |
8 | - using CocoaPods
9 |
10 | ### Podfile
11 | ```
12 | pod 'XCSandboxViewer'
13 |
14 | ```
15 |
16 | ```
17 | pod install
18 | ```
19 |
20 | ## Usage
21 |
22 | 1. Start viewer .
23 |
24 | >In AppDelegate.m application:didFinishLaunchingWithOptions:
25 | ```
26 | #ifdef DEBUG
27 | [[XCSandboxViewer shareViewer] start];
28 | #endif
29 |
30 | ```
31 | 2.Run App
32 |
33 |
34 | 3.Open "Finder" , press [ ⌘ + K ] , enter URL .
35 |
36 |
37 |
38 |
39 |
40 | 4.Enjoy!
41 |
42 |
43 |
44 |
45 | ## MIT License
46 |
47 | Copyright (c) 2017 XingCheng
48 |
49 | Permission is hereby granted, free of charge, to any person obtaining a copy
50 | of this software and associated documentation files (the "Software"), to deal
51 | in the Software without restriction, including without limitation the rights
52 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53 | copies of the Software, and to permit persons to whom the Software is
54 | furnished to do so, subject to the following conditions:
55 |
56 | The above copyright notice and this permission notice shall be included in all
57 | copies or substantial portions of the Software.
58 |
59 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65 | SOFTWARE.
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Screenshot/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/follyxing/XCSandboxViewer/49754956dd36638087a2478e46d86b7305c671df/Screenshot/1.png
--------------------------------------------------------------------------------
/Screenshot/2.1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/follyxing/XCSandboxViewer/49754956dd36638087a2478e46d86b7305c671df/Screenshot/2.1.png
--------------------------------------------------------------------------------
/Screenshot/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/follyxing/XCSandboxViewer/49754956dd36638087a2478e46d86b7305c671df/Screenshot/3.png
--------------------------------------------------------------------------------
/XCSandboxViewer.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |s|
3 | s.name = "XCSandboxViewer"
4 | s.version = "0.1.1"
5 | s.ios.deployment_target = '7.0'
6 | s.summary = "iOS sandbox viewer in the real phone !"
7 | s.homepage = "https://github.com/follyxing/XCSandboxViewer"
8 | s.license = "MIT"
9 | s.author = { "follyxing" => "i@xingcheng.me" }
10 | s.social_media_url = "https://www.xingcheng.me"
11 | s.source = { :git => "https://github.com/follyxing/XCSandboxViewer.git", :tag => s.version }
12 | s.source_files = "XCSandboxViewer/**/*.{h,m}"
13 | s.dependency "GCDWebServer/WebDAV"
14 | s.requires_arc = true
15 | end
16 |
--------------------------------------------------------------------------------
/XCSandboxViewer/XCSandboxViewer.h:
--------------------------------------------------------------------------------
1 | //
2 | // XCSandboxViewer.h
3 | // Pods
4 | //
5 | // Created by 邢程 on 2017/7/20.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface XCSandboxViewer : NSObject
12 | +(instancetype)shareViewer;
13 | -(void)start;
14 | -(void)startWithPort:(NSUInteger)port;
15 | -(void)stop;
16 | @end
17 |
--------------------------------------------------------------------------------
/XCSandboxViewer/XCSandboxViewer.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCSandboxViewer.m
3 | // Pods
4 | //
5 | // Created by 邢程 on 2017/7/20.
6 | //
7 | //
8 |
9 | #import "XCSandboxViewer.h"
10 | #import "GCDWebDAVServer.h"
11 | #import "GCDWebServer.h"
12 | @interface XCSandboxViewer()
13 | @property(nonatomic,strong) GCDWebDAVServer * davServer;
14 | @end
15 | @implementation XCSandboxViewer
16 |
17 | +(instancetype)shareViewer{
18 | static XCSandboxViewer * viewer;
19 | static dispatch_once_t onceToken;
20 | dispatch_once(&onceToken, ^{
21 | viewer = [[XCSandboxViewer alloc] init];
22 | });
23 | return viewer;
24 | }
25 |
26 | -(void)start{
27 | [self startWithPort:8888];
28 | }
29 | -(void)startWithPort:(NSUInteger)port{
30 | [self.davServer startWithPort:port bonjourName:@"XCSandboxViewer"];
31 | NSLog(@"\n 🐳 Visit %@ in your WebDAV client 🐳 \n", _davServer.serverURL);
32 | }
33 | -(void)stop{
34 | if (self.davServer) {
35 | [self.davServer stop];
36 | }
37 | }
38 |
39 | -(GCDWebDAVServer *)davServer{
40 | if (!_davServer) {
41 | NSString * homePath = NSHomeDirectory();
42 | _davServer = [[GCDWebDAVServer alloc] initWithUploadDirectory:homePath];
43 | [GCDWebDAVServer setLogLevel:5];
44 | }
45 | return _davServer;
46 | }
47 | @end
48 |
--------------------------------------------------------------------------------