Explorar o código

Apex Mobile

Share 功能增加可以自定义的发送邮件功能
Ray Zhang %!s(int64=8) %!d(string=hai) anos
pai
achega
59fcc4f6a7

+ 20 - 0
Apex Mobile/Apex Mobile.xcodeproj/project.pbxproj

@@ -90,6 +90,8 @@
 		715709BB20215E0000EFE5C5 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 715709B320215DFF00EFE5C5 /* NSData+Base64.m */; };
 		715709BC20215E0000EFE5C5 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 715709B620215DFF00EFE5C5 /* LICENSE */; };
 		715709BD20215E0000EFE5C5 /* AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = 715709B820215DFF00EFE5C5 /* AESCrypt.m */; };
+		716027D1204D334A003CA085 /* EmailItemProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 716027D0204D334A003CA085 /* EmailItemProvider.m */; };
+		716027D4204D3D15003CA085 /* LPShareActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 716027D2204D3D15003CA085 /* LPShareActivity.m */; };
 		7162546B201C3AF1009E3A41 /* readme.txt in Resources */ = {isa = PBXBuildFile; fileRef = 7162546A201C3AF1009E3A41 /* readme.txt */; };
 		7162546D201C412E009E3A41 /* ShippingStatusCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7162546C201C412E009E3A41 /* ShippingStatusCell.xib */; };
 		71625470201C5205009E3A41 /* fake_container_list.json in Resources */ = {isa = PBXBuildFile; fileRef = 7162546F201C5205009E3A41 /* fake_container_list.json */; };
@@ -311,6 +313,10 @@
 		715709B620215DFF00EFE5C5 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE; path = "../../RedAnt ERP Mobile/common/AES/LICENSE"; sourceTree = "<group>"; };
 		715709B720215DFF00EFE5C5 /* NSData+CommonCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+CommonCrypto.h"; path = "../../RedAnt ERP Mobile/common/AES/NSData+CommonCrypto.h"; sourceTree = "<group>"; };
 		715709B820215DFF00EFE5C5 /* AESCrypt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AESCrypt.m; path = "../../RedAnt ERP Mobile/common/AES/AESCrypt.m"; sourceTree = "<group>"; };
+		716027CF204D334A003CA085 /* EmailItemProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EmailItemProvider.h; sourceTree = "<group>"; };
+		716027D0204D334A003CA085 /* EmailItemProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EmailItemProvider.m; sourceTree = "<group>"; };
+		716027D2204D3D15003CA085 /* LPShareActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LPShareActivity.m; sourceTree = "<group>"; };
+		716027D3204D3D15003CA085 /* LPShareActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LPShareActivity.h; sourceTree = "<group>"; };
 		7162546A201C3AF1009E3A41 /* readme.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = readme.txt; sourceTree = "<group>"; };
 		7162546C201C412E009E3A41 /* ShippingStatusCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShippingStatusCell.xib; sourceTree = "<group>"; };
 		7162546F201C5205009E3A41 /* fake_container_list.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = fake_container_list.json; sourceTree = "<group>"; };
@@ -578,6 +584,7 @@
 		715643B820198A6000B04267 /* new */ = {
 			isa = PBXGroup;
 			children = (
+				716027CE204D3302003CA085 /* share */,
 				7162546A201C3AF1009E3A41 /* readme.txt */,
 				7157099A2021591F00EFE5C5 /* config.h */,
 				715709932021576A00EFE5C5 /* const.h */,
@@ -683,6 +690,17 @@
 			name = AES;
 			sourceTree = "<group>";
 		};
+		716027CE204D3302003CA085 /* share */ = {
+			isa = PBXGroup;
+			children = (
+				716027D3204D3D15003CA085 /* LPShareActivity.h */,
+				716027D2204D3D15003CA085 /* LPShareActivity.m */,
+				716027CF204D334A003CA085 /* EmailItemProvider.h */,
+				716027D0204D334A003CA085 /* EmailItemProvider.m */,
+			);
+			name = share;
+			sourceTree = "<group>";
+		};
 		7162546E201C51DC009E3A41 /* fake data */ = {
 			isa = PBXGroup;
 			children = (
@@ -1212,6 +1230,7 @@
 				71BA50371908F21500D0BD31 /* HistoryData.m in Sources */,
 				71A541D418D151C70017E2BD /* WebViewController.m in Sources */,
 				71330C2018BCC4DA0048956C /* FunctionSelectViewController.m in Sources */,
+				716027D4204D3D15003CA085 /* LPShareActivity.m in Sources */,
 				715643D02019BCCE00B04267 /* MylistViewController.m in Sources */,
 				715709B920215E0000EFE5C5 /* NSData+CommonCrypto.m in Sources */,
 				718BE8B4190F9D970046EA6A /* MySuggestion.m in Sources */,
@@ -1255,6 +1274,7 @@
 				71B7999B2021B22D00F8685E /* AMResultViewController.m in Sources */,
 				425CF097201EB2B500750E32 /* JLRefreshHeader.m in Sources */,
 				711DC6B218C30A4800FB1749 /* TableCellEdit.m in Sources */,
+				716027D1204D334A003CA085 /* EmailItemProvider.m in Sources */,
 				71A01D8218C9BA67003307A9 /* DetailContent.m in Sources */,
 				71A003FC18D680560057CDFD /* RetrievePasswordViewController.m in Sources */,
 				71FCDE0720492B5E00B0746B /* MyQLPreviewController.m in Sources */,

BIN=BIN
Apex Mobile/Apex Mobile.xcodeproj/project.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 10 - 474
Apex Mobile/Apex Mobile.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -9,13 +9,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "541666700.8247679"
+            filePath = "Apex Mobile/LPShareActivity.m"
+            timestampString = "541990789.8043621"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "849"
-            endingLineNumber = "849"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            startingLineNumber = "156"
+            endingLineNumber = "156"
+            landmarkName = "-performActivity"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -25,477 +25,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.5085551"
+            filePath = "Apex Mobile/LPShareActivity.m"
+            timestampString = "541990789.804967"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "419"
-            endingLineNumber = "419"
-            landmarkName = "-setHtmlText:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "541666700.824916"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "502"
-            endingLineNumber = "502"
-            landmarkName = "-webViewDidFinishLoad:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "541666700.824995"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "519"
-            endingLineNumber = "519"
-            landmarkName = "-sectionSwitchClick:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "541666700.825062"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "525"
-            endingLineNumber = "525"
-            landmarkName = "-sectionSwitchClick:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "541666700.825128"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "528"
-            endingLineNumber = "528"
-            landmarkName = "DetailPageViewController"
-            landmarkType = "3">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "541666700.825192"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "853"
-            endingLineNumber = "853"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/MylistViewController.m"
-            timestampString = "540119188.901276"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "87"
-            endingLineNumber = "87"
-            landmarkName = "-PerformAction:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.656579"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "380"
-            endingLineNumber = "380"
-            landmarkName = "ResultViewController"
-            landmarkType = "3">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.65666"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "386"
-            endingLineNumber = "386"
-            landmarkName = "ResultViewController"
-            landmarkType = "3">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.656715"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "379"
-            endingLineNumber = "379"
-            landmarkName = "ResultViewController"
-            landmarkType = "3">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.6567661"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "509"
-            endingLineNumber = "509"
-            landmarkName = "-tableView:viewForHeaderInSection:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.6568151"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "677"
-            endingLineNumber = "677"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.656863"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "650"
-            endingLineNumber = "650"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.656909"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "668"
-            endingLineNumber = "668"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.514539"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1033"
-            endingLineNumber = "1033"
-            landmarkName = "-applyParagraphStyleToText:attributes:range:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.515177"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "938"
-            endingLineNumber = "938"
-            landmarkName = "-applyParagraphStyleToText:attributes:range:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.5156749"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1041"
-            endingLineNumber = "1041"
-            landmarkName = "-applyCenterStyleToText:attributes:range:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.516336"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "921"
-            endingLineNumber = "921"
-            landmarkName = "-applyStylesToString:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.5168819"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "806"
-            endingLineNumber = "806"
-            landmarkName = "-applyStylesToString:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.5173841"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "452"
-            endingLineNumber = "452"
-            landmarkName = "-htmlAttributedText"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.517928"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "943"
-            endingLineNumber = "943"
-            landmarkName = "-applyParagraphStyleToText:attributes:range:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.518365"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1046"
-            endingLineNumber = "1046"
-            landmarkName = "-applyCenterStyleToText:attributes:range:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540282991.519138"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1017"
-            endingLineNumber = "1017"
-            landmarkName = "-applyParagraphStyleToText:attributes:range:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/StaticModelistViewController.m"
-            timestampString = "541140691.067881"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "108"
-            endingLineNumber = "108"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/ResultViewController.m"
-            timestampString = "541668428.657082"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1136"
-            endingLineNumber = "1136"
-            landmarkName = "-previewController:previewItemAtIndex:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/AMResultViewController.m"
-            timestampString = "541668428.657138"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "74"
-            endingLineNumber = "74"
-            landmarkName = "-viewDidLoad"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/MyQLPreviewController.m"
-            timestampString = "541668428.65719"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "27"
-            endingLineNumber = "27"
-            landmarkName = "-viewDidLoad"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  shouldBeEnabled = "No"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[MyQLPreviewController viewDidLoad]"
-                  moduleName = "Apex Mobile"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/Apex%20Mobile/Apex%20Mobile/MyQLPreviewController.m"
-                  timestampString = "541666700.960372"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "21"
-                  endingLineNumber = "21"
-                  offsetFromSymbolStart = "103">
-               </Location>
-               <Location
-                  shouldBeEnabled = "No"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[MyQLPreviewController viewDidLoad]"
-                  moduleName = "Apex Mobile"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/Apex%20Mobile/Apex%20Mobile/MyQLPreviewController.m"
-                  timestampString = "541666700.9643739"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "21"
-                  endingLineNumber = "21"
-                  offsetFromSymbolStart = "111">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Apex Mobile/MyQLPreviewController.m"
-            timestampString = "541668428.657567"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "18"
-            endingLineNumber = "18"
-            landmarkName = "-viewDidLoad"
+            startingLineNumber = "90"
+            endingLineNumber = "90"
+            landmarkName = "-mailComposeController:didFinishWithResult:error:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 98 - 3
Apex Mobile/Apex Mobile/AMResultViewController.m

@@ -12,7 +12,8 @@
 #import "RAUtils.h"
 #import "DetailTabBarController.h"
 #import <QuickLook/QuickLook.h>
-
+#import "EmailItemProvider.h"
+#import "LPShareActivity.h"
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored"-Wdeprecated-declarations"
 
@@ -587,6 +588,7 @@
 
 - (void)shareDocument {
     
+    return [self test_activity];
     // 默认为保存,取保存路径
     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
     NSString *path = [paths objectAtIndex:0];
@@ -602,12 +604,15 @@
         UIDocumentInteractionController *documentController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
         documentController.delegate = self;
         documentController.UTI = @"com.adobe.pdf";
+//        [documentController setName:@"abc test subject"];
         self.documentController = documentController;
     } else {
         self.documentController.URL = fileURL;
     }
-    self.documentController.annotation = @{@"_toRecipients" : @[@"676034647@qq.com"]};
-    self.documentController.name = @"Test";
+    self.documentController.annotation = @{@"recipt" : @[@"676034647@qq.com"],@"subject" : @"annotation subject",@"content" : @"annotation content"};
+//    self.documentController.name = @"Test";
+    
+//    [self.documentController setValue:@"test subject" forKey:@"subject"];
     
 //    [self.documentController presentOpenInMenuFromRect:self.navigationController.topViewController.view.bounds
 //                                                inView:self.navigationController.topViewController.view
@@ -618,6 +623,96 @@
                                                animated:YES];
 }
 
+-(void) test_activity
+{
+    // 设置分享内容
+    //    NSString *text = @"分享内容";
+    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+    NSString *path = [paths objectAtIndex:0];
+    NSString *filePath = [path stringByAppendingPathComponent:[self.documentPath lastPathComponent]];
+    
+    // 没有保存的情况
+    if ([[NSFileManager defaultManager] fileExistsAtPath:self.documentPath]) {
+        filePath = self.documentPath;
+    }
+    
+    NSURL *url = [NSURL fileURLWithPath:filePath];
+    
+    NSArray *activityItems = @[url];
+    
+    LPShareActivity *share = [[LPShareActivity alloc] init];
+    share.to = @[@"676767@qq.com"];
+    share.subject = @"test subject";
+    share.body = @"body";
+    share.filePath = filePath;
+    share.handle = ^(UIViewController *vc) {
+        [self presentViewController:vc animated:YES completion:^{
+//                [share activityDidFinish:YES];
+            // ...
+        }];
+    };
+    
+    // 服务类型控制器
+    UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:@[share]];
+//    _activityViewController = activityViewController;
+    //    activityViewController.excludedActivityTypes = @[UIActivityTypeMail];
+    activityViewController.modalInPopover = true;
+    [self presentViewController:activityViewController animated:YES completion:nil];
+    
+    // 选中分享类型
+    [activityViewController setCompletionWithItemsHandler:^(NSString * __nullable activityType, BOOL completed, NSArray * __nullable returnedItems, NSError * __nullable activityError){
+        
+        // 显示选中的分享类型
+        NSLog(@"act type %@",activityType);
+        
+        if (completed) {
+            NSLog(@"ok");
+        }else {
+            NSLog(@"not ok");
+        }
+        
+    }];
+
+    
+    
+    /*
+    // 默认为保存,取保存路径
+    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+    NSString *path = [paths objectAtIndex:0];
+    NSString *filePath = [path stringByAppendingPathComponent:[self.documentPath lastPathComponent]];
+    
+    // 没有保存的情况
+    if ([[NSFileManager defaultManager] fileExistsAtPath:self.documentPath]) {
+        filePath = self.documentPath;
+    }
+    
+    EmailItemProvider *emailItem = [EmailItemProvider new];
+    emailItem.subject = @"Subject";
+    emailItem.body = @"Body";
+    NSURL *recipients = [NSURL URLWithString:@"mailto:foo@bar.com"];
+    NSURL *fileURL = [NSURL fileURLWithPath:filePath];
+    UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:@[fileURL,emailItem,recipients] applicationActivities:@[[[UIActivity alloc] init]]];
+    
+    [activity setValue:@"test subject" forKey:@"subject"];
+//    [activity setValue:@"test content" forKey:@"body"];
+//    [activity setValue:@[@"isbcd@hotmail.com"] forKey:@"to"];
+    
+    // hide AirDrop
+    // activity.excludedActivityTypes = @[UIActivityTypeAirDrop];
+    
+    // incorrect usage
+    // [self.navigationController pushViewController:activity animated:YES];
+    
+    UIPopoverPresentationController *popover = activity.popoverPresentationController;
+    if (popover) {
+//        popover.sourceView = self.activityButton;
+        popover.permittedArrowDirections = UIPopoverArrowDirectionUp;
+    }
+    
+    [self presentViewController:activity animated:YES completion:NULL];
+     */
+}
+
 - (void)quickLookMenuClick:(id)sender {
     
     UIAlertController *menuAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];

+ 14 - 0
Apex Mobile/Apex Mobile/EmailItemProvider.h

@@ -0,0 +1,14 @@
+//
+//  EmailItemProvider.h
+//  Apex Mobile
+//
+//  Created by Ray on 05/03/2018.
+//  Copyright © 2018 United Software Applications, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface EmailItemProvider : NSObject <UIActivityItemSource>
+@property (nonatomic, strong) NSString *subject;
+@property (nonatomic, strong) NSString *body;
+@end

+ 27 - 0
Apex Mobile/Apex Mobile/EmailItemProvider.m

@@ -0,0 +1,27 @@
+//
+//  EmailItemProvider.m
+//  Apex Mobile
+//
+//  Created by Ray on 05/03/2018.
+//  Copyright © 2018 United Software Applications, Inc. All rights reserved.
+//
+
+#import "EmailItemProvider.h"
+
+@implementation EmailItemProvider
+- (id)activityViewControllerPlaceholderItem:(UIActivityViewController *)activityViewController {
+    return _body;
+}
+
+- (id)activityViewController:(UIActivityViewController *)activityViewController itemForActivityType:(NSString *)activityType {
+    return _body;
+}
+
+- (NSString *)activityViewController:(UIActivityViewController *)activityViewController subjectForActivityType:(NSString *)activityType {
+    return _subject;
+}
+//- (NSString *)activityViewController:(UIActivityViewController *)activityViewController dataTypeIdentifierForActivityType:(UIActivityType)activityType;
+//{
+//    
+//}
+@end

+ 20 - 0
Apex Mobile/Apex Mobile/LPShareActivity.h

@@ -0,0 +1,20 @@
+//
+//  LPShareViewController.h
+//  ShareDemo
+//
+//  Created by Jack on 2018/3/5.
+//  Copyright © 2018年 Jack. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <MessageUI/MessageUI.h>
+@interface LPShareActivity : UIActivity<MFMailComposeViewControllerDelegate>
+
+@property (nonatomic,strong) NSArray *to;
+@property (nonatomic,copy) NSString *subject;
+@property (nonatomic,copy) NSString *filePath;
+@property (nonatomic,copy) NSString *body;
+
+@property (nonatomic,copy) void(^handle)(UIViewController *vc);
+
+@end

+ 157 - 0
Apex Mobile/Apex Mobile/LPShareActivity.m

@@ -0,0 +1,157 @@
+//
+//  LPShareViewController.m
+//  ShareDemo
+//
+//  Created by Jack on 2018/3/5.
+//  Copyright © 2018年 Jack. All rights reserved.
+//
+
+#import "LPShareActivity.h"
+#import <MessageUI/MessageUI.h>
+#import "AppDelegate.h"
+NSString *const LPActivityType = @"com.emerys.www.share.activity";
+
+@interface LPShareActivity ()
+
+@end
+
+@implementation LPShareActivity
+
+/**
+ *  标示自定义服务的字符串
+ */
+- (NSString *)activityType {
+    
+    // 这里就迎合苹果官方的命名
+    return LPActivityType;
+}
+
+
+/**
+ *  服务的显示内容
+ */
+- (NSString *)activityTitle {
+    return @"Email";
+}
+
+/**
+ *  服务显示图标
+ */
+- (UIImage *)activityImage {
+    return [UIImage imageNamed:@"AppIcon"];
+}
+
+
+/**
+ *  指定空运处理的数据类型,如果可以则返回YES
+ *  当用户选择展示UIActivityViewController的自定义服务时,在调用相应处理方法之前的准备工作都在该方法中执行
+ */
+- (BOOL)canPerformWithActivityItems:(NSArray *)activityItems {
+    return YES;
+}
+
+/**
+ *  UIActivityCategoryAction:表示在UIActivityViewController最下面一栏的操作型服务
+ *  UIActivityCategoryShare:表示在UIActivityViewController中间一栏的分享型服务(社交分享)
+ */
++ (UIActivityCategory)activityCategory {
+    return UIActivityCategoryShare;
+}
+
+- (UIViewController *)activityViewController
+{
+//    return nil;
+    NSLog(@"选中了自定义服务");
+    
+    MFMailComposeViewController *mailComposeViewController = [[MFMailComposeViewController alloc] init];
+    
+    [mailComposeViewController setToRecipients:self.to];
+    [mailComposeViewController setSubject:self.subject];
+    [mailComposeViewController setMessageBody:[NSString stringWithFormat:@"<html><p>%@</p></html>",self.body] isHTML:YES];
+    
+    if (self.filePath.length) {
+        NSData *data = [NSData dataWithContentsOfFile:self.filePath];
+        NSString *fileName = [[self.filePath stringByDeletingPathExtension] lastPathComponent];
+        [mailComposeViewController addAttachmentData:data mimeType:@"application/pdf" fileName:fileName];
+    }
+    
+    mailComposeViewController.mailComposeDelegate = self;
+//    [self activityDidFinish:YES];
+    return mailComposeViewController;
+//    if (_handle) {
+//        _handle(mailComposeViewController);
+//    }
+}
+#pragma mark -MFMailComposeViewControllerDelegate delegate
+
+- (void)mailComposeController:(MFMailComposeViewController*)controller
+          didFinishWithResult:(MFMailComposeResult)result
+                        error:(NSError*)error {
+    switch (result)
+    {
+        case MFMailComposeResultCancelled:
+            NSLog(@"Mail send canceled...");
+            break;
+        case MFMailComposeResultSaved:
+            NSLog(@"Mail saved...");
+            break;
+        case MFMailComposeResultSent:
+            NSLog(@"Mail sent...");
+            break;
+        case MFMailComposeResultFailed:
+            NSLog(@"Mail send errored: %@...", [error localizedDescription]);
+            break;
+        default:
+            break;
+    }
+//    [self dismissModalViewControllerAnimated:YES];
+    [self activityDidFinish:YES];
+}
+/**
+ *  点击自定义服务之后的操作
+ */
+- (void)performActivity {
+    
+    MFMailComposeViewController *mailComposer = [MFMailComposeViewController new];
+    
+    [mailComposer setToRecipients:self.to];
+    [mailComposer setSubject:self.subject];
+    [mailComposer setMessageBody:[NSString stringWithFormat:@"<html><p>%@</p></html>",self.body] isHTML:YES];
+    
+    if (self.filePath.length) {
+        NSData *data = [NSData dataWithContentsOfFile:self.filePath];
+        NSString *fileName = [[self.filePath stringByDeletingPathExtension] lastPathComponent];
+        [mailComposer addAttachmentData:data mimeType:@"application/pdf" fileName:fileName];
+    }
+    
+    mailComposer.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
+    
+    mailComposer.modalPresentationStyle = UIModalPresentationFormSheet;
+    
+    AppDelegate *delagate =(AppDelegate *) [[UIApplication sharedApplication]delegate];
+    
+    mailComposer.mailComposeDelegate = [[(UINavigationController *)delagate.window.rootViewController viewControllers] lastObject]; // Set the delegate
+    
+    
+    [(UIViewController *)[[(UINavigationController *)delagate.window.rootViewController viewControllers] lastObject] presentViewController:mailComposer animated:YES completion:nil];
+
+//    NSLog(@"选中了自定义服务");
+//
+//    MFMailComposeViewController *mailComposeViewController = [[MFMailComposeViewController alloc] init];
+//
+//    [mailComposeViewController setToRecipients:self.to];
+//    [mailComposeViewController setSubject:self.subject];
+//    [mailComposeViewController setMessageBody:[NSString stringWithFormat:@"<html><p>%@</p></html>",self.body] isHTML:YES];
+//
+//    if (self.filePath.length) {
+//        NSData *data = [NSData dataWithContentsOfFile:self.filePath];
+//        NSString *fileName = [[self.filePath stringByDeletingPathExtension] lastPathComponent];
+//        [mailComposeViewController addAttachmentData:data mimeType:@"application/pdf" fileName:fileName];
+//    }
+    [self activityDidFinish:YES];
+////    return mailComposeViewController;
+//        if (_handle) {
+//            _handle(mailComposeViewController);
+//        }
+}
+@end