Sfoglia il codice sorgente

Add sample app README

Adam Pritchard 9 anni fa
parent
commit
40eb3d9455

+ 3 - 1
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel.xcodeproj/project.pbxproj

@@ -251,7 +251,7 @@
 		66BDB0171DA6BFCC0079384C /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0800;
+				LastUpgradeCheck = 0810;
 				ORGANIZATIONNAME = "Psiphon Inc.";
 				TargetAttributes = {
 					66BDB01F1DA6BFCC0079384C = {
@@ -356,6 +356,7 @@
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_SUSPICIOUS_MOVES = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -407,6 +408,7 @@
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_SUSPICIOUS_MOVES = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

+ 24 - 0
MobileLibrary/iOS/SampleApps/TunneledWebRequest/README.md

@@ -0,0 +1,24 @@
+# iOS Library Sample App: TunneledWebRequest
+
+## Configuring, Building, Running
+
+The sample app requires some extra files and configuration before building.
+
+### Get the framework.
+
+1. Get the latest iOS release from the project's [Releases](https://github.com/Psiphon-Labs/psiphon-tunnel-core/releases) page.
+2. Extract the archive. 
+2. Copy `PsiphonTunnel.framework` into the `TunneledWebRequest` directory.
+
+### Get the configuration.
+
+1. Contact Psiphon Inc. to obtain configuration values to use in your app. 
+   (This is requried to use the Psiphon network.)
+2. Make a copy of `TunneledWebRequest/psiphon-config.json.stub`, 
+   removing the `.stub` extension.
+3. Edit `psiphon-config.json`. Remove the comments and fill in the values with 
+   those received from Psiphon Inc. The `"ClientVersion"` value is up to you.
+
+### Ready!
+
+TunneledWebRequest should now compile and run.

+ 7 - 5
MobileLibrary/iOS/USAGE.md

@@ -18,15 +18,17 @@ This code is a canonical guide for integrating the Library.
 
 ### Setting up your project
 
-1. Add `PsiphonTunnel.framework` to project (drag into project tree).
+1. Get the latest iOS release from the project's [Releases](https://github.com/Psiphon-Labs/psiphon-tunnel-core/releases) page.
 
-2. In the "General" settings for the target, set "Deployment Target" to 9.3.
+2. Add `PsiphonTunnel.framework` to project (drag into project tree).
 
-3. In the "Build Settings" for the target, under "Build Options", set "Enable Bitcode" to "No".
+3. In the "General" settings for the target, set "Deployment Target" to 9.3.
 
-4. In the "Build Settings" for the target, click the `+` at the top, then "Add User-Defined Setting". Name the new setting `STRIP_BITCODE_FROM_COPIED_FILES` and set it to `NO`.
+4. In the "Build Settings" for the target, under "Build Options", set "Enable Bitcode" to "No".
 
-5. In target Build Phases, add a "Copy Files" phase. Set "Destination" to "Frameworks". Add `PsiphonTunnel.framework` to the list. Ensure "Code Sign on Copy" is checked.
+5. In the "Build Settings" for the target, click the `+` at the top, then "Add User-Defined Setting". Name the new setting `STRIP_BITCODE_FROM_COPIED_FILES` and set it to `NO`.
+
+6. In target Build Phases, add a "Copy Files" phase. Set "Destination" to "Frameworks". Add `PsiphonTunnel.framework` to the list. Ensure "Code Sign on Copy" is checked.
 
 ## Compiling and testing