Browse Source

no message

Fenix Wang 8 years ago
commit
81d3959705
100 changed files with 17932 additions and 0 deletions
  1. 13 0
      NIMDemo/NIM.xcworkspace/contents.xcworkspacedata
  2. 30 0
      NIMDemo/NIM.xcworkspace/xcshareddata/NIM.xcscmblueprint
  3. BIN
      NIMDemo/NIM.xcworkspace/xcuserdata/Fenix.xcuserdatad/UserInterfaceState.xcuserstate
  4. 5 0
      NIMDemo/NIM.xcworkspace/xcuserdata/Fenix.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. BIN
      NIMDemo/NIM.xcworkspace/xcuserdata/fenric.xcuserdatad/UserInterfaceState.xcuserstate
  6. 631 0
      NIMDemo/NIM.xcworkspace/xcuserdata/fenric.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  7. 1319 0
      NIMDemo/NIMDemo.xcodeproj/NIMDemo.xcodeproj/project.pbxproj
  8. 7 0
      NIMDemo/NIMDemo.xcodeproj/NIMDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  9. 41 0
      NIMDemo/NIMDemo.xcodeproj/NIMDemo.xcodeproj/project.xcworkspace/xcshareddata/NIMDemo.xccheckout
  10. 2324 0
      NIMDemo/NIMDemo.xcodeproj/project.pbxproj
  11. 7 0
      NIMDemo/NIMDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  12. BIN
      NIMDemo/NIMDemo.xcodeproj/project.xcworkspace/xcuserdata/fenric.xcuserdatad/UserInterfaceState.xcuserstate
  13. 133 0
      NIMDemo/NIMDemo.xcodeproj/xcshareddata/xcschemes/NIM.xcscheme
  14. 22 0
      NIMDemo/NIMDemo.xcodeproj/xcuserdata/Fenix.xcuserdatad/xcschemes/xcschememanagement.plist
  15. 22 0
      NIMDemo/NIMDemo.xcodeproj/xcuserdata/fenric.xcuserdatad/xcschemes/xcschememanagement.plist
  16. 304 0
      NIMDemo/NIMDemo/AFNetworking/AFHTTPSessionManager.h
  17. 372 0
      NIMDemo/NIMDemo/AFNetworking/AFHTTPSessionManager.m
  18. 213 0
      NIMDemo/NIMDemo/AFNetworking/AFNetworkReachabilityManager.h
  19. 263 0
      NIMDemo/NIMDemo/AFNetworking/AFNetworkReachabilityManager.m
  20. 41 0
      NIMDemo/NIMDemo/AFNetworking/AFNetworking.h
  21. 154 0
      NIMDemo/NIMDemo/AFNetworking/AFSecurityPolicy.h
  22. 344 0
      NIMDemo/NIMDemo/AFNetworking/AFSecurityPolicy.m
  23. 479 0
      NIMDemo/NIMDemo/AFNetworking/AFURLRequestSerialization.h
  24. 1393 0
      NIMDemo/NIMDemo/AFNetworking/AFURLRequestSerialization.m
  25. 308 0
      NIMDemo/NIMDemo/AFNetworking/AFURLResponseSerialization.h
  26. 817 0
      NIMDemo/NIMDemo/AFNetworking/AFURLResponseSerialization.m
  27. 500 0
      NIMDemo/NIMDemo/AFNetworking/AFURLSessionManager.h
  28. 1221 0
      NIMDemo/NIMDemo/AFNetworking/AFURLSessionManager.m
  29. 20 0
      NIMDemo/NIMDemo/AppDelegate.h
  30. 291 0
      NIMDemo/NIMDemo/AppDelegate.m
  31. 31 0
      NIMDemo/NIMDemo/Base.lproj/LaunchScreen.storyboard
  32. 1203 0
      NIMDemo/NIMDemo/Base.lproj/Main.storyboard
  33. 13 0
      NIMDemo/NIMDemo/CityPickerViewController.h
  34. 124 0
      NIMDemo/NIMDemo/CityPickerViewController.m
  35. 13 0
      NIMDemo/NIMDemo/Classes/Category/NSData+NTES.h
  36. 28 0
      NIMDemo/NIMDemo/Classes/Category/NSData+NTES.m
  37. 25 0
      NIMDemo/NIMDemo/Classes/Category/NSDictionary+NTESJson.h
  38. 109 0
      NIMDemo/NIMDemo/Classes/Category/NSDictionary+NTESJson.m
  39. 23 0
      NIMDemo/NIMDemo/Classes/Category/NSString+NTES.h
  40. 62 0
      NIMDemo/NIMDemo/Classes/Category/NSString+NTES.m
  41. 15 0
      NIMDemo/NIMDemo/Classes/Category/UIActionSheet+NTESBlock.h
  42. 84 0
      NIMDemo/NIMDemo/Classes/Category/UIActionSheet+NTESBlock.m
  43. 15 0
      NIMDemo/NIMDemo/Classes/Category/UIAlertView+NTESBlock.h
  44. 39 0
      NIMDemo/NIMDemo/Classes/Category/UIAlertView+NTESBlock.m
  45. 19 0
      NIMDemo/NIMDemo/Classes/Category/UIImage+NTES.h
  46. 218 0
      NIMDemo/NIMDemo/Classes/Category/UIImage+NTES.m
  47. 17 0
      NIMDemo/NIMDemo/Classes/Category/UIImage+NTESColor.h
  48. 82 0
      NIMDemo/NIMDemo/Classes/Category/UIImage+NTESColor.m
  49. 17 0
      NIMDemo/NIMDemo/Classes/Category/UIResponder+NTESFirstResponder.h
  50. 39 0
      NIMDemo/NIMDemo/Classes/Category/UIResponder+NTESFirstResponder.m
  51. 30 0
      NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESDirection.h
  52. 81 0
      NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESDirection.m
  53. 58 0
      NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESPullToRefresh.h
  54. 722 0
      NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESPullToRefresh.m
  55. 95 0
      NIMDemo/NIMDemo/Classes/Category/UIView+NTES.h
  56. 320 0
      NIMDemo/NIMDemo/Classes/Category/UIView+NTES.m
  57. 24 0
      NIMDemo/NIMDemo/Classes/Common/Addons/SwizzlingDefine.h
  58. 13 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationBar+Swizzling.h
  59. 66 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationBar+Swizzling.m
  60. 13 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationController+Swizzling.h
  61. 38 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationController+Swizzling.m
  62. 13 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationItem+Swizzling.h
  63. 53 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationItem+Swizzling.m
  64. 13 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UIView+Swizzling.h
  65. 34 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UIView+Swizzling.m
  66. 13 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UIViewController+Swizzling.h
  67. 105 0
      NIMDemo/NIMDemo/Classes/Common/Addons/UIViewController+Swizzling.m
  68. 15 0
      NIMDemo/NIMDemo/Classes/Common/Controller/NTESMainTabController.h
  69. 270 0
      NIMDemo/NIMDemo/Classes/Common/Controller/NTESMainTabController.m
  70. 39 0
      NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationAnimator.h
  71. 149 0
      NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationAnimator.m
  72. 17 0
      NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationHandler.h
  73. 184 0
      NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationHandler.m
  74. 34 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESAvatarImageView.h
  75. 163 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESAvatarImageView.m
  76. 18 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESBadgeView.h
  77. 165 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESBadgeView.m
  78. 15 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESFPSLabel.h
  79. 61 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESFPSLabel.m
  80. 13 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESMarginButton.h
  81. 28 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESMarginButton.m
  82. 44 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESPageView.h
  83. 327 0
      NIMDemo/NIMDemo/Classes/Common/View/NTESPageView.m
  84. 14 0
      NIMDemo/NIMDemo/Classes/LayoutConfig/NTESCellLayoutConfig.h
  85. 218 0
      NIMDemo/NIMDemo/Classes/LayoutConfig/NTESCellLayoutConfig.m
  86. 14 0
      NIMDemo/NIMDemo/Classes/LayoutConfig/NTESChatroomTextContentConfig.h
  87. 59 0
      NIMDemo/NIMDemo/Classes/LayoutConfig/NTESChatroomTextContentConfig.m
  88. 13 0
      NIMDemo/NIMDemo/Classes/LayoutConfig/NTESSessionCustomContentConfig.h
  89. 43 0
      NIMDemo/NIMDemo/Classes/LayoutConfig/NTESSessionCustomContentConfig.m
  90. 14 0
      NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESCardPortraitCell.h
  91. 117 0
      NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESCardPortraitCell.m
  92. 31 0
      NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESColorButtonCell.h
  93. 110 0
      NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESColorButtonCell.m
  94. 15 0
      NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESJionTeamViewController.h
  95. 86 0
      NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESJionTeamViewController.m
  96. 62 0
      NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESJionTeamViewController.xib
  97. 19 0
      NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESPersonalCardViewController.h
  98. 365 0
      NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESPersonalCardViewController.m
  99. 13 0
      NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESSearchTeamViewController.h
  100. 56 0
      NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESSearchTeamViewController.m

+ 13 - 0
NIMDemo/NIM.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:/Users/Fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:../NIMKit/NIMKit.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
+</Workspace>

+ 30 - 0
NIMDemo/NIM.xcworkspace/xcshareddata/NIM.xcscmblueprint

@@ -0,0 +1,30 @@
+{
+  "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "FFEF9F5BFA6676D6938C6FA00316030C6F649FF4",
+  "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
+
+  },
+  "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
+    "FFEF9F5BFA6676D6938C6FA00316030C6F649FF4" : 9223372036854775807,
+    "5DA897B2CF6787DA5F7A57996317E5269E088741" : 9223372036854775807
+  },
+  "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "D4DB7178-74E4-46B8-AE53-F29997AB3B53",
+  "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
+    "FFEF9F5BFA6676D6938C6FA00316030C6F649FF4" : "NIM\/",
+    "5DA897B2CF6787DA5F7A57996317E5269E088741" : "NIM\/NIMAVChat\/NIMAVChat\/Vendors\/"
+  },
+  "DVTSourceControlWorkspaceBlueprintNameKey" : "NIM",
+  "DVTSourceControlWorkspaceBlueprintVersion" : 204,
+  "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "NIMDemo\/NIM.xcworkspace",
+  "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
+    {
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "ssh:\/\/g.hz.netease.com:22222\/nim_ios\/NIMAVChatVendors.git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5DA897B2CF6787DA5F7A57996317E5269E088741"
+    },
+    {
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/g.hz.netease.com\/nim_ios\/NIM.git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "FFEF9F5BFA6676D6938C6FA00316030C6F649FF4"
+    }
+  ]
+}

BIN
NIMDemo/NIM.xcworkspace/xcuserdata/Fenix.xcuserdatad/UserInterfaceState.xcuserstate


+ 5 - 0
NIMDemo/NIM.xcworkspace/xcuserdata/Fenix.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+   type = "0"
+   version = "2.0">
+</Bucket>

BIN
NIMDemo/NIM.xcworkspace/xcuserdata/fenric.xcuserdatad/UserInterfaceState.xcuserstate


+ 631 - 0
NIMDemo/NIM.xcworkspace/xcuserdata/fenric.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -0,0 +1,631 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+   type = "0"
+   version = "2.0">
+   <Breakpoints>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../nvs/nvs/NVS/Classes/Audio/Util/NVSAudioUnitCenter.m"
+            timestampString = "486289779.264783"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "340"
+            endingLineNumber = "340"
+            landmarkName = "-initAUGraph"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../nvs/nvsnet/nvsnet_svn/client/session_thread.cpp"
+            timestampString = "486281401.154897"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "626"
+            endingLineNumber = "626"
+            landmarkName = "SessionThread::handle_login(const InetAddress&amp; addr, const SUPER_HEADER&amp; header, Unpack&amp; up)"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../nvs/nvsnet/nvsnet_svn/client/session_thread.cpp"
+            timestampString = "486281462.806743"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "496"
+            endingLineNumber = "496"
+            landmarkName = "SessionThread::start_session_udp_io()"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "NIMDemo/Classes/Sections/Session/ViewController/NTESSessionViewController.m"
+            timestampString = "487421824.944191"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "617"
+            endingLineNumber = "617"
+            landmarkName = "-revokeMessage:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../ijk/ijkplayer-ios/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m"
+            timestampString = "494217392.725282"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "42"
+            endingLineNumber = "42"
+            landmarkName = "vout_create_overlay_l()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../ijk/ijkplayer-ios/ijkmedia/ijksdl/ijksdl_vout.c"
+            timestampString = "494217535.745934"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "72"
+            endingLineNumber = "72"
+            landmarkName = "SDL_Vout_CreateOverlay()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "NIMDemo/Classes/Sections/Session/ViewController/VideoChat/NTESVideoChatViewController.m"
+            timestampString = "514436324.528877"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "290"
+            endingLineNumber = "290"
+            landmarkName = "-localRecord:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Link/biz/service/notify/notify_service.cpp"
+            timestampString = "503839658.499273"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "92"
+            endingLineNumber = "92"
+            landmarkName = "NotifyService::OnpacketGetNotify(LinkFrame &amp;lf, const nbase::Unpack &amp;up)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Classes/Device/NIMFeedbackCenter.mm"
+            timestampString = "503906998.381664"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "72"
+            endingLineNumber = "72"
+            landmarkName = "-feedbackFiles"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Classes/Device/NIMFeedbackCenter.mm"
+            timestampString = "503907019.871378"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "34"
+            endingLineNumber = "34"
+            landmarkName = "-feedback"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChat/Classes/NetCall/Manager/NIMNetCallManager.mm"
+            timestampString = "513594448.979758"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1562"
+            endingLineNumber = "1562"
+            landmarkName = "-nimErrorCode:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "NIMDemo/Classes/Sections/Session/ViewController/VideoChat/NTESNetChatViewController.m"
+            timestampString = "514435922.495359"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "391"
+            endingLineNumber = "391"
+            landmarkName = "-recordWithAudioConversation:myMedia:otherSideMedia:video:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Link/biz/service/netcall/netcall_service.cpp"
+            timestampString = "506326921.252819"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "36"
+            endingLineNumber = "36"
+            landmarkName = "NetcallService::OnPacket(LinkFrame &amp;lf, const nbase::Unpack &amp;up)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChat/Classes/NetCall/Manager/NIMNetCallManager.mm"
+            timestampString = "513594448.979758"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2141"
+            endingLineNumber = "2141"
+            landmarkName = "CallbackReceiveOtherAckNotify(IAsynCallbackParam *param)"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "NIMDemo/Classes/Sections/Session/ViewController/VideoChat/NTESNetChatViewController.m"
+            timestampString = "514435922.495359"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "345"
+            endingLineNumber = "345"
+            landmarkName = "-startOtherSideRecording"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "NIMDemo/Classes/Sections/Session/ViewController/VideoChat/NTESVideoChatViewController.m"
+            timestampString = "514436324.528877"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "320"
+            endingLineNumber = "320"
+            landmarkName = "-onRecordWithAudioConversation:myMedia:otherSideMedia:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "NIMDemo/Classes/Sections/Session/ViewController/VideoChat/NTESVideoChatViewController.m"
+            timestampString = "514436324.528877"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "321"
+            endingLineNumber = "321"
+            landmarkName = "-onRecordWithAudioConversation:myMedia:otherSideMedia:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChat/Classes/RealtimeNIO/NIMNVSManager.mm"
+            timestampString = "515642262.272923"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "116"
+            endingLineNumber = "116"
+            landmarkName = "-start:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChatTests/Manager/Netcall/NIMNetcallManagerTest.mm"
+            timestampString = "509855565.243874"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "139"
+            endingLineNumber = "139"
+            landmarkName = "-testControlNetcall_NormalCase"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChatTests/Manager/Netcall/NIMNetcallManagerTest.mm"
+            timestampString = "509855045.202777"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "60"
+            endingLineNumber = "60"
+            landmarkName = "-testStartNetcall_NormalCase_WithoutOption"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Classes/Audio/AMRDecoder/NIMAMRDecoder.mm"
+            timestampString = "511672333.721975"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "18"
+            endingLineNumber = "18"
+            landmarkName = "+decode:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChat/Classes/RealtimeNIO/NIMNVSManager.mm"
+            timestampString = "515642262.272923"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "201"
+            endingLineNumber = "201"
+            landmarkName = "-startVideoCapture:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvs/NVS/Classes/Video/VideoCapture/NVSVideoCaputreManager.mm"
+            timestampString = "513411776.586129"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "534"
+            endingLineNumber = "534"
+            landmarkName = "-createVideoPreviewLayer"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvs/NVS/Classes/Video/VideoCapture/NVSVideoCaputreManager.mm"
+            timestampString = "513411776.586129"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "547"
+            endingLineNumber = "547"
+            landmarkName = "-createVideoPreviewLayer"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvs/NVS/Classes/Session/NVSVideoChatSender.mm"
+            timestampString = "512632928.469196"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "451"
+            endingLineNumber = "451"
+            landmarkName = "-videoOnCapturedPack:isBackCamera:isKeyFrame:timetag:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvs/NVS/Classes/Session/NVSVideoChatSender.mm"
+            timestampString = "512632928.469196"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "319"
+            endingLineNumber = "319"
+            landmarkName = "-sendVideoData:withSize:isKeyFrame:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvsnet/src/AVChatSession.mm"
+            timestampString = "512273708.911512"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "281"
+            endingLineNumber = "281"
+            landmarkName = "send_video_packet(const char *data, uint32_t size, bool key_frame)"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvsnet/src/AVChatSession.mm"
+            timestampString = "512273727.095337"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "283"
+            endingLineNumber = "283"
+            landmarkName = "send_video_packet(const char *data, uint32_t size, bool key_frame)"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvsnet/nvsnet_svn/client/session.cpp"
+            timestampString = "512273754.652054"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "191"
+            endingLineNumber = "191"
+            landmarkName = "Session::send_video_pkt(const std::string &amp;data, uint32_t type)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../NMC/Product/NRTC/nvs/NVS/Classes/Session/NVSVideoChatReceiver.mm"
+            timestampString = "512274192.4777"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "122"
+            endingLineNumber = "122"
+            landmarkName = "-onReceiveVideoData:withSize:from:packetID:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Classes/Lbs/NIMLbsManager.mm"
+            timestampString = "512319099.927173"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "121"
+            endingLineNumber = "121"
+            landmarkName = "-queryLbsForType:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Classes/Core/NIMPluginManager.m"
+            timestampString = "512295938.624362"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "132"
+            endingLineNumber = "132"
+            landmarkName = "-loadPluginByName:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Classes/Lbs/NIMLbsManager.mm"
+            timestampString = "512319099.927173"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "308"
+            endingLineNumber = "308"
+            landmarkName = "-updateSwitcher:forConfig:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Link/biz/service/netcall/netcall_protocol.h"
+            timestampString = "512363924.754901"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "90"
+            endingLineNumber = "90"
+            landmarkName = "marshal(nbase::Pack &amp;p)"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Link/biz/service/netcall/netcall_protocol.h"
+            timestampString = "512363935.372896"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "327"
+            endingLineNumber = "327"
+            landmarkName = "marshal(nbase::Pack &amp;p)"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMLib/NIMLib/Link/biz/service/netcall/netcall_protocol.h"
+            timestampString = "512363938.441494"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "518"
+            endingLineNumber = "518"
+            landmarkName = "marshal(nbase::Pack &amp;p)"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChat/Classes/NetCall/Manager/NIMNetCallManager.mm"
+            timestampString = "513594448.979758"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1592"
+            endingLineNumber = "1592"
+            landmarkName = "-raiseNetCallError:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChat/Classes/NetCall/Manager/NIMNetCallManager.mm"
+            timestampString = "512633912.049815"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "338"
+            endingLineNumber = "338"
+            landmarkName = "-setMute:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../NIMAVChat/NIMAVChat/Classes/NetCall/Manager/NIMNetCallManager.mm"
+            timestampString = "513594448.979758"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1857"
+            endingLineNumber = "1857"
+            landmarkName = "-displayLocalPreviewLayer:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+   </Breakpoints>
+</Bucket>

+ 1319 - 0
NIMDemo/NIMDemo.xcodeproj/NIMDemo.xcodeproj/project.pbxproj

@@ -0,0 +1,1319 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		6113FB5C1A846CE80014ABAB /* LoginTestListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6113FB5A1A846CE80014ABAB /* LoginTestListViewController.m */; };
+		6113FB5D1A846CE80014ABAB /* LoginTestListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6113FB5B1A846CE80014ABAB /* LoginTestListViewController.xib */; };
+		613DBA0A1A848EAA00E4A676 /* SessionMsgConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 613DBA041A848EAA00E4A676 /* SessionMsgConverter.m */; };
+		613DBA0B1A848EAA00E4A676 /* SessionMsgDatasource.m in Sources */ = {isa = PBXBuildFile; fileRef = 613DBA061A848EAA00E4A676 /* SessionMsgDatasource.m */; };
+		613DBA0C1A848EAA00E4A676 /* SessionMsgModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 613DBA081A848EAA00E4A676 /* SessionMsgModel.m */; };
+		615EDC3E1A7F815B00C4E133 /* SessionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 615EDC331A7F815B00C4E133 /* SessionListViewController.m */; };
+		615EDC3F1A7F815B00C4E133 /* SessionListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 615EDC341A7F815B00C4E133 /* SessionListViewController.xib */; };
+		615EDC411A7F815B00C4E133 /* SessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 615EDC391A7F815B00C4E133 /* SessionViewController.m */; };
+		615EDC421A7F815B00C4E133 /* SessionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 615EDC3A1A7F815B00C4E133 /* SessionViewController.xib */; };
+		615EDC431A7F815B00C4E133 /* MainTabController.m in Sources */ = {isa = PBXBuildFile; fileRef = 615EDC3C1A7F815B00C4E133 /* MainTabController.m */; };
+		615EDC481A7F819700C4E133 /* ContactViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 615EDC461A7F819700C4E133 /* ContactViewController.m */; };
+		615EDC491A7F819700C4E133 /* ContactViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 615EDC471A7F819700C4E133 /* ContactViewController.xib */; };
+		6195CD1C1A8C473B00F3E239 /* BadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6195CD1B1A8C473A00F3E239 /* BadgeView.m */; };
+		6195CD201A8C4D3C00F3E239 /* NSString+NIMDemo.m in Sources */ = {isa = PBXBuildFile; fileRef = 6195CD1F1A8C4D3C00F3E239 /* NSString+NIMDemo.m */; };
+		6195CD311A8C71E000F3E239 /* tabbar_chats.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD251A8C71E000F3E239 /* tabbar_chats.png */; };
+		6195CD321A8C71E000F3E239 /* tabbar_chats@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD261A8C71E000F3E239 /* tabbar_chats@2x.png */; };
+		6195CD331A8C71E000F3E239 /* tabbar_chatsHL.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD271A8C71E000F3E239 /* tabbar_chatsHL.png */; };
+		6195CD341A8C71E000F3E239 /* tabbar_chatsHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD281A8C71E000F3E239 /* tabbar_chatsHL@2x.png */; };
+		6195CD351A8C71E000F3E239 /* tabbar_contacts.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD291A8C71E000F3E239 /* tabbar_contacts.png */; };
+		6195CD361A8C71E000F3E239 /* tabbar_contacts@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD2A1A8C71E000F3E239 /* tabbar_contacts@2x.png */; };
+		6195CD371A8C71E000F3E239 /* tabbar_contactsHL.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD2B1A8C71E000F3E239 /* tabbar_contactsHL.png */; };
+		6195CD381A8C71E000F3E239 /* tabbar_contactsHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD2C1A8C71E000F3E239 /* tabbar_contactsHL@2x.png */; };
+		6195CD391A8C71E000F3E239 /* tabbar_setting.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD2D1A8C71E000F3E239 /* tabbar_setting.png */; };
+		6195CD3A1A8C71E000F3E239 /* tabbar_setting@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD2E1A8C71E000F3E239 /* tabbar_setting@2x.png */; };
+		6195CD3B1A8C71E000F3E239 /* tabbar_settingHL.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD2F1A8C71E000F3E239 /* tabbar_settingHL.png */; };
+		6195CD3C1A8C71E000F3E239 /* tabbar_settingHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD301A8C71E000F3E239 /* tabbar_settingHL@2x.png */; };
+		6195CD431A8C78CE00F3E239 /* SettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6195CD411A8C78CE00F3E239 /* SettingViewController.m */; };
+		6195CD441A8C78CE00F3E239 /* SettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD421A8C78CE00F3E239 /* SettingViewController.xib */; };
+		6195CD491A8C7CF900F3E239 /* CustomLeftBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6195CD481A8C7CF900F3E239 /* CustomLeftBarView.m */; };
+		6195CD4C1A8C934200F3E239 /* btn_back_normal@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD4A1A8C934200F3E239 /* btn_back_normal@2x.png */; };
+		6195CD4D1A8C934200F3E239 /* btn_back_normal@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6195CD4B1A8C934200F3E239 /* btn_back_normal@3x.png */; };
+		61CAD1E61A89A163003D1C23 /* SessionListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61CAD1E51A89A163003D1C23 /* SessionListCell.m */; };
+		61CAD1EC1A89A24E003D1C23 /* AvatarImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61CAD1EB1A89A24E003D1C23 /* AvatarImageView.m */; };
+		61CAD1EF1A89A5D3003D1C23 /* DefaultAvatar@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61CAD1ED1A89A5D3003D1C23 /* DefaultAvatar@2x.png */; };
+		61CAD1F01A89A5D3003D1C23 /* DefaultAvatar@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61CAD1EE1A89A5D3003D1C23 /* DefaultAvatar@3x.png */; };
+		61CF576B1A787D6C00B43072 /* libNIMLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AE5899531A6F82910070536A /* libNIMLib.a */; };
+		61CF576D1A787D9A00B43072 /* libsqlite3.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 61CF576C1A787D9A00B43072 /* libsqlite3.0.dylib */; };
+		61CF576F1A787DB000B43072 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61CF576E1A787DB000B43072 /* MobileCoreServices.framework */; };
+		61F728611A7B23A40076C096 /* UIResponder+Router.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F7282B1A7B23A40076C096 /* UIResponder+Router.m */; };
+		61F728681A7B23A40076C096 /* SessionUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F7283D1A7B23A40076C096 /* SessionUtil.m */; };
+		61F728691A7B23A40076C096 /* InputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F728411A7B23A40076C096 /* InputView.m */; };
+		61F7286A1A7B23A40076C096 /* InputView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61F728421A7B23A40076C096 /* InputView.xib */; };
+		61F7286B1A7B23A40076C096 /* NIMTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F728451A7B23A40076C096 /* NIMTextView.m */; };
+		61F7286C1A7B23A40076C096 /* LoadProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F728471A7B23A40076C096 /* LoadProgressView.m */; };
+		AE2887AC1A83863B00F93159 /* SessionViewLayoutManager.m in Sources */ = {isa = PBXBuildFile; fileRef = AE2887AB1A83863B00F93159 /* SessionViewLayoutManager.m */; };
+		AE2AA6851A7CD35C00CFF013 /* UIView+NIMDemo.m in Sources */ = {isa = PBXBuildFile; fileRef = AE2AA6841A7CD35C00CFF013 /* UIView+NIMDemo.m */; };
+		AE2AA6891A7CEB3500CFF013 /* UITableView+ScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = AE2AA6881A7CEB3500CFF013 /* UITableView+ScrollToBottom.m */; };
+		AE2AA6921A7F174000CFF013 /* SessionCellActionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = AE2AA68F1A7F174000CFF013 /* SessionCellActionHandler.m */; };
+		AE4325761A7B4F7200FCCCBA /* SessionImageBubbleView.m in Sources */ = {isa = PBXBuildFile; fileRef = AE4325681A7B4F7200FCCCBA /* SessionImageBubbleView.m */; };
+		AE4325771A7B4F7200FCCCBA /* SessionMessageContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = AE43256A1A7B4F7200FCCCBA /* SessionMessageContentView.m */; };
+		AE4325791A7B4F7200FCCCBA /* SessionTextContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = AE43256E1A7B4F7200FCCCBA /* SessionTextContentView.m */; };
+		AE43257A1A7B4F7200FCCCBA /* SessionMsgModel+SessionCellLayoutProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = AE4325701A7B4F7200FCCCBA /* SessionMsgModel+SessionCellLayoutProtocol.m */; };
+		AE43257B1A7B4F7200FCCCBA /* SessionTimeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AE4325721A7B4F7200FCCCBA /* SessionTimeCell.m */; };
+		AE43257C1A7B4F7200FCCCBA /* SessionTimeCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = AE4325731A7B4F7200FCCCBA /* SessionTimeCell.xib */; };
+		AE43257D1A7B4F7200FCCCBA /* SessionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AE4325751A7B4F7200FCCCBA /* SessionViewCell.m */; };
+		AE4325811A7B4FAD00FCCCBA /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AE43257F1A7B4FAD00FCCCBA /* LoginViewController.m */; };
+		AE4325821A7B4FAD00FCCCBA /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AE4325801A7B4FAD00FCCCBA /* LoginViewController.xib */; };
+		AE4325851A7B5A7800FCCCBA /* InputMoreContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = AE4325841A7B5A7800FCCCBA /* InputMoreContainerView.m */; };
+		AE5882EB1A6F47E10070536A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AE5882EA1A6F47E10070536A /* main.m */; };
+		AE5882EE1A6F47E10070536A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AE5882ED1A6F47E10070536A /* AppDelegate.m */; };
+		AE5882F61A6F47E10070536A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AE5882F51A6F47E10070536A /* Images.xcassets */; };
+		AE5882F91A6F47E10070536A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = AE5882F71A6F47E10070536A /* LaunchScreen.xib */; };
+		AE58995A1A6FA7AC0070536A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE5899591A6FA7AC0070536A /* SystemConfiguration.framework */; };
+		AE58995C1A6FA7BD0070536A /* libstdc++.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AE58995B1A6FA7BD0070536A /* libstdc++.6.dylib */; };
+		AE58995E1A6FA7E90070536A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AE58995D1A6FA7E90070536A /* libz.dylib */; };
+		AE7DA7E91A8063C300F54B59 /* btn_message_cell_error@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AE7DA7E81A8063C300F54B59 /* btn_message_cell_error@2x.png */; };
+		AE7DA7F11A8097D400F54B59 /* GalleryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AE7DA7EF1A8097D400F54B59 /* GalleryViewController.m */; };
+		AE7DA7F21A8097D400F54B59 /* GalleryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AE7DA7F01A8097D400F54B59 /* GalleryViewController.xib */; };
+		AE7DA7F51A80C8C700F54B59 /* SessionAudioContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = AE7DA7F41A80C8C700F54B59 /* SessionAudioContentView.m */; };
+		AEA7EF9C1A8AF9FD00BA0F23 /* session_time_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEA7EF9B1A8AF9FD00BA0F23 /* session_time_bg@2x.png */; };
+		AEA87FDB1A81C3A100ACC3BA /* VoiceBtn_Black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEA87FD61A81C3A100ACC3BA /* VoiceBtn_Black@2x.png */; };
+		AEA87FDC1A81C3A100ACC3BA /* VoiceBtn_Black@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEA87FD71A81C3A100ACC3BA /* VoiceBtn_Black@3x.png */; };
+		AEA87FDD1A81C3A100ACC3BA /* VoiceBtn_BlackHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEA87FD81A81C3A100ACC3BA /* VoiceBtn_BlackHL@2x.png */; };
+		AEA87FDE1A81C3A100ACC3BA /* VoiceBtn_BlackHL@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEA87FD91A81C3A100ACC3BA /* VoiceBtn_BlackHL@3x.png */; };
+		AEA87FDF1A81C3A100ACC3BA /* VoiceBtnDisable_Black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEA87FDA1A81C3A100ACC3BA /* VoiceBtnDisable_Black@2x.png */; };
+		AEA87FE11A81CAD600ACC3BA /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEA87FE01A81CAD500ACC3BA /* AVFoundation.framework */; };
+		AEA87FE51A81CECC00ACC3BA /* AudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = AEA87FE41A81CECC00ACC3BA /* AudioManager.m */; };
+		AEB836291A7633D000E7493E /* MessageVideoDownload@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB835FC1A7633D000E7493E /* MessageVideoDownload@2x.png */; };
+		AEB8362A1A7633D000E7493E /* MessageVideoDownload@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB835FD1A7633D000E7493E /* MessageVideoDownload@3x.png */; };
+		AEB8362B1A7633D000E7493E /* MessageVideoPlay@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB835FE1A7633D000E7493E /* MessageVideoPlay@2x.png */; };
+		AEB8362C1A7633D000E7493E /* MessageVideoPlay@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB835FF1A7633D000E7493E /* MessageVideoPlay@3x.png */; };
+		AEB8362D1A7633D000E7493E /* ReceiverAppNodeBkg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836001A7633D000E7493E /* ReceiverAppNodeBkg@2x.png */; };
+		AEB8362E1A7633D000E7493E /* ReceiverAppNodeBkg@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836011A7633D000E7493E /* ReceiverAppNodeBkg@3x.png */; };
+		AEB8362F1A7633D000E7493E /* ReceiverAppNodeBkg_HL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836021A7633D000E7493E /* ReceiverAppNodeBkg_HL@2x.png */; };
+		AEB836301A7633D000E7493E /* ReceiverAppNodeBkg_HL@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836031A7633D000E7493E /* ReceiverAppNodeBkg_HL@3x.png */; };
+		AEB836311A7633D000E7493E /* ReceiverVoiceNodePlaying001@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836041A7633D000E7493E /* ReceiverVoiceNodePlaying001@2x.png */; };
+		AEB836321A7633D000E7493E /* ReceiverVoiceNodePlaying001@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836051A7633D000E7493E /* ReceiverVoiceNodePlaying001@3x.png */; };
+		AEB836331A7633D000E7493E /* ReceiverVoiceNodePlaying002@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836061A7633D000E7493E /* ReceiverVoiceNodePlaying002@2x.png */; };
+		AEB836341A7633D000E7493E /* ReceiverVoiceNodePlaying002@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836071A7633D000E7493E /* ReceiverVoiceNodePlaying002@3x.png */; };
+		AEB836351A7633D000E7493E /* ReceiverVoiceNodePlaying003@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836081A7633D000E7493E /* ReceiverVoiceNodePlaying003@2x.png */; };
+		AEB836361A7633D000E7493E /* ReceiverVoiceNodePlaying003@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836091A7633D000E7493E /* ReceiverVoiceNodePlaying003@3x.png */; };
+		AEB836371A7633D000E7493E /* ReceiverVoiceNodePlaying@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8360A1A7633D000E7493E /* ReceiverVoiceNodePlaying@2x.png */; };
+		AEB836381A7633D000E7493E /* ReceiverVoiceNodePlaying@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8360B1A7633D000E7493E /* ReceiverVoiceNodePlaying@3x.png */; };
+		AEB836391A7633D000E7493E /* Record_voice_disable@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8360C1A7633D000E7493E /* Record_voice_disable@2x.png */; };
+		AEB8363A1A7633D000E7493E /* SenderAppNodeBkg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8360D1A7633D000E7493E /* SenderAppNodeBkg@2x.png */; };
+		AEB8363B1A7633D000E7493E /* SenderAppNodeBkg@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8360E1A7633D000E7493E /* SenderAppNodeBkg@3x.png */; };
+		AEB8363C1A7633D000E7493E /* SenderTextNodeBkg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8360F1A7633D000E7493E /* SenderTextNodeBkg@2x.png */; };
+		AEB8363D1A7633D000E7493E /* SenderTextNodeBkg@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836101A7633D000E7493E /* SenderTextNodeBkg@3x.png */; };
+		AEB8363E1A7633D000E7493E /* sharemore_location@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836111A7633D000E7493E /* sharemore_location@2x.png */; };
+		AEB8363F1A7633D000E7493E /* sharemore_location@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836121A7633D000E7493E /* sharemore_location@3x.png */; };
+		AEB836401A7633D000E7493E /* sharemore_pic@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836131A7633D000E7493E /* sharemore_pic@2x.png */; };
+		AEB836411A7633D000E7493E /* sharemore_pic@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836141A7633D000E7493E /* sharemore_pic@3x.png */; };
+		AEB836421A7633D000E7493E /* sharemore_video@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836151A7633D000E7493E /* sharemore_video@2x.png */; };
+		AEB836431A7633D000E7493E /* sharemore_video@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836161A7633D000E7493E /* sharemore_video@3x.png */; };
+		AEB836441A7633D000E7493E /* ToolViewEmotion@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836171A7633D000E7493E /* ToolViewEmotion@2x.png */; };
+		AEB836451A7633D000E7493E /* ToolViewEmotion@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836181A7633D000E7493E /* ToolViewEmotion@3x.png */; };
+		AEB836461A7633D000E7493E /* ToolViewEmotionHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836191A7633D000E7493E /* ToolViewEmotionHL@2x.png */; };
+		AEB836471A7633D000E7493E /* ToolViewEmotionHL@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8361A1A7633D000E7493E /* ToolViewEmotionHL@3x.png */; };
+		AEB836481A7633D000E7493E /* ToolViewInputVoice@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8361B1A7633D000E7493E /* ToolViewInputVoice@2x.png */; };
+		AEB836491A7633D000E7493E /* ToolViewInputVoice@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8361C1A7633D000E7493E /* ToolViewInputVoice@3x.png */; };
+		AEB8364A1A7633D000E7493E /* ToolViewInputVoiceHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8361D1A7633D000E7493E /* ToolViewInputVoiceHL@2x.png */; };
+		AEB8364B1A7633D000E7493E /* ToolViewInputVoiceHL@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8361E1A7633D000E7493E /* ToolViewInputVoiceHL@3x.png */; };
+		AEB8364C1A7633D000E7493E /* ToolViewKeyboard@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8361F1A7633D000E7493E /* ToolViewKeyboard@2x.png */; };
+		AEB8364D1A7633D000E7493E /* ToolViewKeyboard@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836201A7633D000E7493E /* ToolViewKeyboard@3x.png */; };
+		AEB8364E1A7633D000E7493E /* ToolViewKeyboardHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836211A7633D000E7493E /* ToolViewKeyboardHL@2x.png */; };
+		AEB8364F1A7633D000E7493E /* ToolViewKeyboardHL@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836221A7633D000E7493E /* ToolViewKeyboardHL@3x.png */; };
+		AEB836501A7633D000E7493E /* TypeSelectorBtn_Black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836231A7633D000E7493E /* TypeSelectorBtn_Black@2x.png */; };
+		AEB836511A7633D000E7493E /* TypeSelectorBtn_Black@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836241A7633D000E7493E /* TypeSelectorBtn_Black@3x.png */; };
+		AEB836521A7633D000E7493E /* TypeSelectorBtnHL_Black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836251A7633D000E7493E /* TypeSelectorBtnHL_Black@2x.png */; };
+		AEB836531A7633D000E7493E /* TypeSelectorBtnHL_Black@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836261A7633D000E7493E /* TypeSelectorBtnHL_Black@3x.png */; };
+		AEB8365A1A76359D00E7493E /* SendTextViewBkg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836571A76359C00E7493E /* SendTextViewBkg@2x.png */; };
+		AEB8365B1A76359D00E7493E /* SendTextViewBkg@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836581A76359C00E7493E /* SendTextViewBkg@3x.png */; };
+		AEB8365C1A76359D00E7493E /* Text_BG@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836591A76359C00E7493E /* Text_BG@2x.png */; };
+		AEB8365F1A76392300E7493E /* sharemore_videovoip@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8365D1A76392300E7493E /* sharemore_videovoip@2x.png */; };
+		AEB836601A76392300E7493E /* sharemore_videovoip@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8365E1A76392300E7493E /* sharemore_videovoip@3x.png */; };
+		AEB8366B1A76425600E7493E /* btn_launch_button_normal_0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836661A76425600E7493E /* btn_launch_button_normal_0@2x.png */; };
+		AEB8366C1A76425600E7493E /* btn_launch_button_normal@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836671A76425600E7493E /* btn_launch_button_normal@2x.png */; };
+		AEB8366D1A76425600E7493E /* btn_launch_button_pressed_0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836681A76425600E7493E /* btn_launch_button_pressed_0@2x.png */; };
+		AEB8366E1A76425600E7493E /* btn_launch_button_pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836691A76425600E7493E /* btn_launch_button_pressed@2x.png */; };
+		AEB8366F1A76425600E7493E /* login_input@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB8366A1A76425600E7493E /* login_input@2x.png */; };
+		AEB836711A76671500E7493E /* icon_account@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836701A76671500E7493E /* icon_account@2x.png */; };
+		AEB836731A76672F00E7493E /* icon_password@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836721A76672F00E7493E /* icon_password@2x.png */; };
+		AEB836891A773DB900E7493E /* Session_Multi_Delete_HL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836851A773DB900E7493E /* Session_Multi_Delete_HL@2x.png */; };
+		AEB8368A1A773DB900E7493E /* Session_Multi_Delete_HL@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836861A773DB900E7493E /* Session_Multi_Delete_HL@3x.png */; };
+		AEB8368B1A773DB900E7493E /* Session_Multi_Delete@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836871A773DB900E7493E /* Session_Multi_Delete@2x.png */; };
+		AEB8368C1A773DB900E7493E /* Session_Multi_Delete@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AEB836881A773DB900E7493E /* Session_Multi_Delete@3x.png */; };
+		AEC04CF61A833BF4003B5818 /* SessionMsgCellFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = AEC04CF51A833BF4003B5818 /* SessionMsgCellFactory.m */; };
+		C4E43434FD003E69D8A1CE98 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 16AF9898D58E36D61F8B0727 /* libPods.a */; };
+		E447AFD31A8C4E67005F3000 /* PageView.m in Sources */ = {isa = PBXBuildFile; fileRef = E447AFD21A8C4E67005F3000 /* PageView.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		AE5882FF1A6F47E10070536A /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = AE5882DD1A6F47E10070536A /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = AE5882E41A6F47E10070536A;
+			remoteInfo = NIMDemo;
+		};
+		AE5899521A6F82910070536A /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = AE58994E1A6F82900070536A /* NIMLib.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = E4910BB41A6C9CC700B70B67;
+			remoteInfo = NIMLib;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		16AF9898D58E36D61F8B0727 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		3CB9917FFA15BA7164D3339E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
+		6113FB591A846CE80014ABAB /* LoginTestListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginTestListViewController.h; sourceTree = "<group>"; };
+		6113FB5A1A846CE80014ABAB /* LoginTestListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginTestListViewController.m; sourceTree = "<group>"; };
+		6113FB5B1A846CE80014ABAB /* LoginTestListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginTestListViewController.xib; sourceTree = "<group>"; };
+		6113FB5E1A84705F0014ABAB /* UserTestListDefine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserTestListDefine.h; sourceTree = "<group>"; };
+		613DBA021A848EAA00E4A676 /* SessionFileStatusProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionFileStatusProtocol.h; sourceTree = "<group>"; };
+		613DBA031A848EAA00E4A676 /* SessionMsgConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionMsgConverter.h; sourceTree = "<group>"; };
+		613DBA041A848EAA00E4A676 /* SessionMsgConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionMsgConverter.m; sourceTree = "<group>"; };
+		613DBA051A848EAA00E4A676 /* SessionMsgDatasource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionMsgDatasource.h; sourceTree = "<group>"; };
+		613DBA061A848EAA00E4A676 /* SessionMsgDatasource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionMsgDatasource.m; sourceTree = "<group>"; };
+		613DBA071A848EAA00E4A676 /* SessionMsgModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionMsgModel.h; sourceTree = "<group>"; };
+		613DBA081A848EAA00E4A676 /* SessionMsgModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionMsgModel.m; sourceTree = "<group>"; };
+		615EDC321A7F815B00C4E133 /* SessionListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionListViewController.h; sourceTree = "<group>"; };
+		615EDC331A7F815B00C4E133 /* SessionListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionListViewController.m; sourceTree = "<group>"; };
+		615EDC341A7F815B00C4E133 /* SessionListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SessionListViewController.xib; sourceTree = "<group>"; };
+		615EDC371A7F815B00C4E133 /* SessionLogicDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SessionLogicDelegate.h; path = ../ViewController/Session/SessionLogicDelegate.h; sourceTree = "<group>"; };
+		615EDC381A7F815B00C4E133 /* SessionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionViewController.h; sourceTree = "<group>"; };
+		615EDC391A7F815B00C4E133 /* SessionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = "<group>"; };
+		615EDC3A1A7F815B00C4E133 /* SessionViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SessionViewController.xib; sourceTree = "<group>"; };
+		615EDC3C1A7F815B00C4E133 /* MainTabController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainTabController.m; sourceTree = "<group>"; };
+		615EDC3D1A7F815B00C4E133 /* MainTabController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainTabController.h; sourceTree = "<group>"; };
+		615EDC451A7F819700C4E133 /* ContactViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactViewController.h; sourceTree = "<group>"; };
+		615EDC461A7F819700C4E133 /* ContactViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactViewController.m; sourceTree = "<group>"; };
+		615EDC471A7F819700C4E133 /* ContactViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ContactViewController.xib; sourceTree = "<group>"; };
+		6195CD1A1A8C473A00F3E239 /* BadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BadgeView.h; sourceTree = "<group>"; };
+		6195CD1B1A8C473A00F3E239 /* BadgeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BadgeView.m; sourceTree = "<group>"; };
+		6195CD1E1A8C4D3C00F3E239 /* NSString+NIMDemo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+NIMDemo.h"; sourceTree = "<group>"; };
+		6195CD1F1A8C4D3C00F3E239 /* NSString+NIMDemo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+NIMDemo.m"; sourceTree = "<group>"; };
+		6195CD251A8C71E000F3E239 /* tabbar_chats.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabbar_chats.png; sourceTree = "<group>"; };
+		6195CD261A8C71E000F3E239 /* tabbar_chats@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tabbar_chats@2x.png"; sourceTree = "<group>"; };
+		6195CD271A8C71E000F3E239 /* tabbar_chatsHL.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabbar_chatsHL.png; sourceTree = "<group>"; };
+		6195CD281A8C71E000F3E239 /* tabbar_chatsHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tabbar_chatsHL@2x.png"; sourceTree = "<group>"; };
+		6195CD291A8C71E000F3E239 /* tabbar_contacts.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabbar_contacts.png; sourceTree = "<group>"; };
+		6195CD2A1A8C71E000F3E239 /* tabbar_contacts@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tabbar_contacts@2x.png"; sourceTree = "<group>"; };
+		6195CD2B1A8C71E000F3E239 /* tabbar_contactsHL.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabbar_contactsHL.png; sourceTree = "<group>"; };
+		6195CD2C1A8C71E000F3E239 /* tabbar_contactsHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tabbar_contactsHL@2x.png"; sourceTree = "<group>"; };
+		6195CD2D1A8C71E000F3E239 /* tabbar_setting.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabbar_setting.png; sourceTree = "<group>"; };
+		6195CD2E1A8C71E000F3E239 /* tabbar_setting@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tabbar_setting@2x.png"; sourceTree = "<group>"; };
+		6195CD2F1A8C71E000F3E239 /* tabbar_settingHL.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabbar_settingHL.png; sourceTree = "<group>"; };
+		6195CD301A8C71E000F3E239 /* tabbar_settingHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tabbar_settingHL@2x.png"; sourceTree = "<group>"; };
+		6195CD3E1A8C74DB00F3E239 /* GlobalMacro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GlobalMacro.h; sourceTree = "<group>"; };
+		6195CD401A8C78CE00F3E239 /* SettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingViewController.h; sourceTree = "<group>"; };
+		6195CD411A8C78CE00F3E239 /* SettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingViewController.m; sourceTree = "<group>"; };
+		6195CD421A8C78CE00F3E239 /* SettingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SettingViewController.xib; sourceTree = "<group>"; };
+		6195CD471A8C7CF900F3E239 /* CustomLeftBarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomLeftBarView.h; sourceTree = "<group>"; };
+		6195CD481A8C7CF900F3E239 /* CustomLeftBarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomLeftBarView.m; sourceTree = "<group>"; };
+		6195CD4A1A8C934200F3E239 /* btn_back_normal@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_back_normal@2x.png"; sourceTree = "<group>"; };
+		6195CD4B1A8C934200F3E239 /* btn_back_normal@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_back_normal@3x.png"; sourceTree = "<group>"; };
+		61CAD1E41A89A163003D1C23 /* SessionListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionListCell.h; sourceTree = "<group>"; };
+		61CAD1E51A89A163003D1C23 /* SessionListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionListCell.m; sourceTree = "<group>"; };
+		61CAD1EA1A89A24E003D1C23 /* AvatarImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AvatarImageView.h; sourceTree = "<group>"; };
+		61CAD1EB1A89A24E003D1C23 /* AvatarImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AvatarImageView.m; sourceTree = "<group>"; };
+		61CAD1ED1A89A5D3003D1C23 /* DefaultAvatar@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "DefaultAvatar@2x.png"; sourceTree = "<group>"; };
+		61CAD1EE1A89A5D3003D1C23 /* DefaultAvatar@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "DefaultAvatar@3x.png"; sourceTree = "<group>"; };
+		61CF576C1A787D9A00B43072 /* libsqlite3.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.0.dylib; path = usr/lib/libsqlite3.0.dylib; sourceTree = SDKROOT; };
+		61CF576E1A787DB000B43072 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		61F7282A1A7B23A40076C096 /* UIResponder+Router.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIResponder+Router.h"; sourceTree = "<group>"; };
+		61F7282B1A7B23A40076C096 /* UIResponder+Router.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIResponder+Router.m"; sourceTree = "<group>"; };
+		61F7283C1A7B23A40076C096 /* SessionUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionUtil.h; sourceTree = "<group>"; };
+		61F7283D1A7B23A40076C096 /* SessionUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionUtil.m; sourceTree = "<group>"; };
+		61F728401A7B23A40076C096 /* InputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputView.h; sourceTree = "<group>"; };
+		61F728411A7B23A40076C096 /* InputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InputView.m; sourceTree = "<group>"; };
+		61F728421A7B23A40076C096 /* InputView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InputView.xib; sourceTree = "<group>"; };
+		61F728431A7B23A40076C096 /* NIMInputViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMInputViewDelegate.h; sourceTree = "<group>"; };
+		61F728441A7B23A40076C096 /* NIMTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMTextView.h; sourceTree = "<group>"; };
+		61F728451A7B23A40076C096 /* NIMTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIMTextView.m; sourceTree = "<group>"; };
+		61F728461A7B23A40076C096 /* LoadProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadProgressView.h; sourceTree = "<group>"; };
+		61F728471A7B23A40076C096 /* LoadProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoadProgressView.m; sourceTree = "<group>"; };
+		AE2887AA1A83863B00F93159 /* SessionViewLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionViewLayoutManager.h; sourceTree = "<group>"; };
+		AE2887AB1A83863B00F93159 /* SessionViewLayoutManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewLayoutManager.m; sourceTree = "<group>"; };
+		AE2AA6831A7CD35C00CFF013 /* UIView+NIMDemo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+NIMDemo.h"; sourceTree = "<group>"; };
+		AE2AA6841A7CD35C00CFF013 /* UIView+NIMDemo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+NIMDemo.m"; sourceTree = "<group>"; };
+		AE2AA6871A7CEB3500CFF013 /* UITableView+ScrollToBottom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+ScrollToBottom.h"; sourceTree = "<group>"; };
+		AE2AA6881A7CEB3500CFF013 /* UITableView+ScrollToBottom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+ScrollToBottom.m"; sourceTree = "<group>"; };
+		AE2AA68E1A7F174000CFF013 /* SessionCellActionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionCellActionHandler.h; sourceTree = "<group>"; };
+		AE2AA68F1A7F174000CFF013 /* SessionCellActionHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionCellActionHandler.m; sourceTree = "<group>"; };
+		AE4325641A7B4F7200FCCCBA /* SessionCellLayoutMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionCellLayoutMacro.h; sourceTree = "<group>"; };
+		AE4325671A7B4F7200FCCCBA /* SessionImageBubbleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionImageBubbleView.h; sourceTree = "<group>"; };
+		AE4325681A7B4F7200FCCCBA /* SessionImageBubbleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionImageBubbleView.m; sourceTree = "<group>"; };
+		AE4325691A7B4F7200FCCCBA /* SessionMessageContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionMessageContentView.h; sourceTree = "<group>"; };
+		AE43256A1A7B4F7200FCCCBA /* SessionMessageContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionMessageContentView.m; sourceTree = "<group>"; };
+		AE43256D1A7B4F7200FCCCBA /* SessionTextContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionTextContentView.h; sourceTree = "<group>"; };
+		AE43256E1A7B4F7200FCCCBA /* SessionTextContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionTextContentView.m; sourceTree = "<group>"; };
+		AE43256F1A7B4F7200FCCCBA /* SessionMsgModel+SessionCellLayoutProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SessionMsgModel+SessionCellLayoutProtocol.h"; sourceTree = "<group>"; };
+		AE4325701A7B4F7200FCCCBA /* SessionMsgModel+SessionCellLayoutProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SessionMsgModel+SessionCellLayoutProtocol.m"; sourceTree = "<group>"; };
+		AE4325711A7B4F7200FCCCBA /* SessionTimeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionTimeCell.h; sourceTree = "<group>"; };
+		AE4325721A7B4F7200FCCCBA /* SessionTimeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionTimeCell.m; sourceTree = "<group>"; };
+		AE4325731A7B4F7200FCCCBA /* SessionTimeCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SessionTimeCell.xib; sourceTree = "<group>"; };
+		AE4325741A7B4F7200FCCCBA /* SessionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionViewCell.h; sourceTree = "<group>"; };
+		AE4325751A7B4F7200FCCCBA /* SessionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewCell.m; sourceTree = "<group>"; };
+		AE43257E1A7B4FAD00FCCCBA /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
+		AE43257F1A7B4FAD00FCCCBA /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };
+		AE4325801A7B4FAD00FCCCBA /* LoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = "<group>"; };
+		AE4325831A7B5A7800FCCCBA /* InputMoreContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputMoreContainerView.h; sourceTree = "<group>"; };
+		AE4325841A7B5A7800FCCCBA /* InputMoreContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InputMoreContainerView.m; sourceTree = "<group>"; };
+		AE5882E51A6F47E10070536A /* NIMDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NIMDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		AE5882E91A6F47E10070536A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		AE5882EA1A6F47E10070536A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		AE5882EC1A6F47E10070536A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		AE5882ED1A6F47E10070536A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		AE5882F51A6F47E10070536A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+		AE5882F81A6F47E10070536A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
+		AE5882FE1A6F47E10070536A /* NIMDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NIMDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+		AE58994E1A6F82900070536A /* NIMLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = NIMLib.xcodeproj; path = ../NIMLib/NIMLib.xcodeproj; sourceTree = "<group>"; };
+		AE5899591A6FA7AC0070536A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		AE58995B1A6FA7BD0070536A /* libstdc++.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.6.dylib"; path = "usr/lib/libstdc++.6.dylib"; sourceTree = SDKROOT; };
+		AE58995D1A6FA7E90070536A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+		AE7DA7E81A8063C300F54B59 /* btn_message_cell_error@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_message_cell_error@2x.png"; sourceTree = "<group>"; };
+		AE7DA7EE1A8097D400F54B59 /* GalleryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GalleryViewController.h; sourceTree = "<group>"; };
+		AE7DA7EF1A8097D400F54B59 /* GalleryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryViewController.m; sourceTree = "<group>"; };
+		AE7DA7F01A8097D400F54B59 /* GalleryViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GalleryViewController.xib; sourceTree = "<group>"; };
+		AE7DA7F31A80C8C700F54B59 /* SessionAudioContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionAudioContentView.h; sourceTree = "<group>"; };
+		AE7DA7F41A80C8C700F54B59 /* SessionAudioContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionAudioContentView.m; sourceTree = "<group>"; };
+		AEA7EF9B1A8AF9FD00BA0F23 /* session_time_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "session_time_bg@2x.png"; sourceTree = "<group>"; };
+		AEA87FD61A81C3A100ACC3BA /* VoiceBtn_Black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "VoiceBtn_Black@2x.png"; sourceTree = "<group>"; };
+		AEA87FD71A81C3A100ACC3BA /* VoiceBtn_Black@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "VoiceBtn_Black@3x.png"; sourceTree = "<group>"; };
+		AEA87FD81A81C3A100ACC3BA /* VoiceBtn_BlackHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "VoiceBtn_BlackHL@2x.png"; sourceTree = "<group>"; };
+		AEA87FD91A81C3A100ACC3BA /* VoiceBtn_BlackHL@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "VoiceBtn_BlackHL@3x.png"; sourceTree = "<group>"; };
+		AEA87FDA1A81C3A100ACC3BA /* VoiceBtnDisable_Black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "VoiceBtnDisable_Black@2x.png"; sourceTree = "<group>"; };
+		AEA87FE01A81CAD500ACC3BA /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		AEA87FE31A81CECC00ACC3BA /* AudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioManager.h; sourceTree = "<group>"; };
+		AEA87FE41A81CECC00ACC3BA /* AudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioManager.m; sourceTree = "<group>"; };
+		AEB835FC1A7633D000E7493E /* MessageVideoDownload@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MessageVideoDownload@2x.png"; sourceTree = "<group>"; };
+		AEB835FD1A7633D000E7493E /* MessageVideoDownload@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MessageVideoDownload@3x.png"; sourceTree = "<group>"; };
+		AEB835FE1A7633D000E7493E /* MessageVideoPlay@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MessageVideoPlay@2x.png"; sourceTree = "<group>"; };
+		AEB835FF1A7633D000E7493E /* MessageVideoPlay@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MessageVideoPlay@3x.png"; sourceTree = "<group>"; };
+		AEB836001A7633D000E7493E /* ReceiverAppNodeBkg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverAppNodeBkg@2x.png"; sourceTree = "<group>"; };
+		AEB836011A7633D000E7493E /* ReceiverAppNodeBkg@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverAppNodeBkg@3x.png"; sourceTree = "<group>"; };
+		AEB836021A7633D000E7493E /* ReceiverAppNodeBkg_HL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverAppNodeBkg_HL@2x.png"; sourceTree = "<group>"; };
+		AEB836031A7633D000E7493E /* ReceiverAppNodeBkg_HL@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverAppNodeBkg_HL@3x.png"; sourceTree = "<group>"; };
+		AEB836041A7633D000E7493E /* ReceiverVoiceNodePlaying001@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying001@2x.png"; sourceTree = "<group>"; };
+		AEB836051A7633D000E7493E /* ReceiverVoiceNodePlaying001@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying001@3x.png"; sourceTree = "<group>"; };
+		AEB836061A7633D000E7493E /* ReceiverVoiceNodePlaying002@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying002@2x.png"; sourceTree = "<group>"; };
+		AEB836071A7633D000E7493E /* ReceiverVoiceNodePlaying002@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying002@3x.png"; sourceTree = "<group>"; };
+		AEB836081A7633D000E7493E /* ReceiverVoiceNodePlaying003@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying003@2x.png"; sourceTree = "<group>"; };
+		AEB836091A7633D000E7493E /* ReceiverVoiceNodePlaying003@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying003@3x.png"; sourceTree = "<group>"; };
+		AEB8360A1A7633D000E7493E /* ReceiverVoiceNodePlaying@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying@2x.png"; sourceTree = "<group>"; };
+		AEB8360B1A7633D000E7493E /* ReceiverVoiceNodePlaying@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReceiverVoiceNodePlaying@3x.png"; sourceTree = "<group>"; };
+		AEB8360C1A7633D000E7493E /* Record_voice_disable@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Record_voice_disable@2x.png"; sourceTree = "<group>"; };
+		AEB8360D1A7633D000E7493E /* SenderAppNodeBkg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SenderAppNodeBkg@2x.png"; sourceTree = "<group>"; };
+		AEB8360E1A7633D000E7493E /* SenderAppNodeBkg@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SenderAppNodeBkg@3x.png"; sourceTree = "<group>"; };
+		AEB8360F1A7633D000E7493E /* SenderTextNodeBkg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SenderTextNodeBkg@2x.png"; sourceTree = "<group>"; };
+		AEB836101A7633D000E7493E /* SenderTextNodeBkg@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SenderTextNodeBkg@3x.png"; sourceTree = "<group>"; };
+		AEB836111A7633D000E7493E /* sharemore_location@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_location@2x.png"; sourceTree = "<group>"; };
+		AEB836121A7633D000E7493E /* sharemore_location@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_location@3x.png"; sourceTree = "<group>"; };
+		AEB836131A7633D000E7493E /* sharemore_pic@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_pic@2x.png"; sourceTree = "<group>"; };
+		AEB836141A7633D000E7493E /* sharemore_pic@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_pic@3x.png"; sourceTree = "<group>"; };
+		AEB836151A7633D000E7493E /* sharemore_video@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_video@2x.png"; sourceTree = "<group>"; };
+		AEB836161A7633D000E7493E /* sharemore_video@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_video@3x.png"; sourceTree = "<group>"; };
+		AEB836171A7633D000E7493E /* ToolViewEmotion@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewEmotion@2x.png"; sourceTree = "<group>"; };
+		AEB836181A7633D000E7493E /* ToolViewEmotion@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewEmotion@3x.png"; sourceTree = "<group>"; };
+		AEB836191A7633D000E7493E /* ToolViewEmotionHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewEmotionHL@2x.png"; sourceTree = "<group>"; };
+		AEB8361A1A7633D000E7493E /* ToolViewEmotionHL@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewEmotionHL@3x.png"; sourceTree = "<group>"; };
+		AEB8361B1A7633D000E7493E /* ToolViewInputVoice@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewInputVoice@2x.png"; sourceTree = "<group>"; };
+		AEB8361C1A7633D000E7493E /* ToolViewInputVoice@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewInputVoice@3x.png"; sourceTree = "<group>"; };
+		AEB8361D1A7633D000E7493E /* ToolViewInputVoiceHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewInputVoiceHL@2x.png"; sourceTree = "<group>"; };
+		AEB8361E1A7633D000E7493E /* ToolViewInputVoiceHL@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewInputVoiceHL@3x.png"; sourceTree = "<group>"; };
+		AEB8361F1A7633D000E7493E /* ToolViewKeyboard@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewKeyboard@2x.png"; sourceTree = "<group>"; };
+		AEB836201A7633D000E7493E /* ToolViewKeyboard@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewKeyboard@3x.png"; sourceTree = "<group>"; };
+		AEB836211A7633D000E7493E /* ToolViewKeyboardHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewKeyboardHL@2x.png"; sourceTree = "<group>"; };
+		AEB836221A7633D000E7493E /* ToolViewKeyboardHL@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ToolViewKeyboardHL@3x.png"; sourceTree = "<group>"; };
+		AEB836231A7633D000E7493E /* TypeSelectorBtn_Black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TypeSelectorBtn_Black@2x.png"; sourceTree = "<group>"; };
+		AEB836241A7633D000E7493E /* TypeSelectorBtn_Black@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TypeSelectorBtn_Black@3x.png"; sourceTree = "<group>"; };
+		AEB836251A7633D000E7493E /* TypeSelectorBtnHL_Black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TypeSelectorBtnHL_Black@2x.png"; sourceTree = "<group>"; };
+		AEB836261A7633D000E7493E /* TypeSelectorBtnHL_Black@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TypeSelectorBtnHL_Black@3x.png"; sourceTree = "<group>"; };
+		AEB836571A76359C00E7493E /* SendTextViewBkg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SendTextViewBkg@2x.png"; sourceTree = "<group>"; };
+		AEB836581A76359C00E7493E /* SendTextViewBkg@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SendTextViewBkg@3x.png"; sourceTree = "<group>"; };
+		AEB836591A76359C00E7493E /* Text_BG@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Text_BG@2x.png"; sourceTree = "<group>"; };
+		AEB8365D1A76392300E7493E /* sharemore_videovoip@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_videovoip@2x.png"; sourceTree = "<group>"; };
+		AEB8365E1A76392300E7493E /* sharemore_videovoip@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sharemore_videovoip@3x.png"; sourceTree = "<group>"; };
+		AEB836661A76425600E7493E /* btn_launch_button_normal_0@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_launch_button_normal_0@2x.png"; sourceTree = "<group>"; };
+		AEB836671A76425600E7493E /* btn_launch_button_normal@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_launch_button_normal@2x.png"; sourceTree = "<group>"; };
+		AEB836681A76425600E7493E /* btn_launch_button_pressed_0@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_launch_button_pressed_0@2x.png"; sourceTree = "<group>"; };
+		AEB836691A76425600E7493E /* btn_launch_button_pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_launch_button_pressed@2x.png"; sourceTree = "<group>"; };
+		AEB8366A1A76425600E7493E /* login_input@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "login_input@2x.png"; sourceTree = "<group>"; };
+		AEB836701A76671500E7493E /* icon_account@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_account@2x.png"; sourceTree = "<group>"; };
+		AEB836721A76672F00E7493E /* icon_password@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_password@2x.png"; sourceTree = "<group>"; };
+		AEB8367F1A772C2F00E7493E /* NIMDemo-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NIMDemo-Prefix.pch"; sourceTree = "<group>"; };
+		AEB836851A773DB900E7493E /* Session_Multi_Delete_HL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Session_Multi_Delete_HL@2x.png"; sourceTree = "<group>"; };
+		AEB836861A773DB900E7493E /* Session_Multi_Delete_HL@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Session_Multi_Delete_HL@3x.png"; sourceTree = "<group>"; };
+		AEB836871A773DB900E7493E /* Session_Multi_Delete@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Session_Multi_Delete@2x.png"; sourceTree = "<group>"; };
+		AEB836881A773DB900E7493E /* Session_Multi_Delete@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Session_Multi_Delete@3x.png"; sourceTree = "<group>"; };
+		AEC04CF41A833BF4003B5818 /* SessionMsgCellFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SessionMsgCellFactory.h; path = SessionCententView/SessionMsgCellFactory.h; sourceTree = "<group>"; };
+		AEC04CF51A833BF4003B5818 /* SessionMsgCellFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SessionMsgCellFactory.m; path = SessionCententView/SessionMsgCellFactory.m; sourceTree = "<group>"; };
+		DF30F6A4FA82195516F742F7 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
+		E447AFD11A8C4E67005F3000 /* PageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageView.h; sourceTree = "<group>"; };
+		E447AFD21A8C4E67005F3000 /* PageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PageView.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		AE5882E21A6F47E10070536A /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				AEA87FE11A81CAD600ACC3BA /* AVFoundation.framework in Frameworks */,
+				61CF576F1A787DB000B43072 /* MobileCoreServices.framework in Frameworks */,
+				61CF576D1A787D9A00B43072 /* libsqlite3.0.dylib in Frameworks */,
+				AE58995C1A6FA7BD0070536A /* libstdc++.6.dylib in Frameworks */,
+				61CF576B1A787D6C00B43072 /* libNIMLib.a in Frameworks */,
+				AE58995E1A6FA7E90070536A /* libz.dylib in Frameworks */,
+				AE58995A1A6FA7AC0070536A /* SystemConfiguration.framework in Frameworks */,
+				C4E43434FD003E69D8A1CE98 /* libPods.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		AE5882FB1A6F47E10070536A /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		304B100AECEFB170E443A1D6 /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				DF30F6A4FA82195516F742F7 /* Pods.debug.xcconfig */,
+				3CB9917FFA15BA7164D3339E /* Pods.release.xcconfig */,
+			);
+			name = Pods;
+			sourceTree = "<group>";
+		};
+		5176189D0086B38FE643A26A /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				16AF9898D58E36D61F8B0727 /* libPods.a */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		613DBA011A848EAA00E4A676 /* Message */ = {
+			isa = PBXGroup;
+			children = (
+				613DBA021A848EAA00E4A676 /* SessionFileStatusProtocol.h */,
+				613DBA031A848EAA00E4A676 /* SessionMsgConverter.h */,
+				613DBA041A848EAA00E4A676 /* SessionMsgConverter.m */,
+				613DBA051A848EAA00E4A676 /* SessionMsgDatasource.h */,
+				613DBA061A848EAA00E4A676 /* SessionMsgDatasource.m */,
+				613DBA071A848EAA00E4A676 /* SessionMsgModel.h */,
+				613DBA081A848EAA00E4A676 /* SessionMsgModel.m */,
+			);
+			path = Message;
+			sourceTree = "<group>";
+		};
+		615EDC311A7F815B00C4E133 /* Session */ = {
+			isa = PBXGroup;
+			children = (
+				615EDC321A7F815B00C4E133 /* SessionListViewController.h */,
+				615EDC331A7F815B00C4E133 /* SessionListViewController.m */,
+				615EDC341A7F815B00C4E133 /* SessionListViewController.xib */,
+				615EDC381A7F815B00C4E133 /* SessionViewController.h */,
+				615EDC391A7F815B00C4E133 /* SessionViewController.m */,
+				615EDC3A1A7F815B00C4E133 /* SessionViewController.xib */,
+			);
+			path = Session;
+			sourceTree = "<group>";
+		};
+		615EDC441A7F817C00C4E133 /* Contact */ = {
+			isa = PBXGroup;
+			children = (
+				615EDC451A7F819700C4E133 /* ContactViewController.h */,
+				615EDC461A7F819700C4E133 /* ContactViewController.m */,
+				615EDC471A7F819700C4E133 /* ContactViewController.xib */,
+			);
+			path = Contact;
+			sourceTree = "<group>";
+		};
+		6195CD3F1A8C78B200F3E239 /* Setting */ = {
+			isa = PBXGroup;
+			children = (
+				6195CD401A8C78CE00F3E239 /* SettingViewController.h */,
+				6195CD411A8C78CE00F3E239 /* SettingViewController.m */,
+				6195CD421A8C78CE00F3E239 /* SettingViewController.xib */,
+			);
+			path = Setting;
+			sourceTree = "<group>";
+		};
+		61CAD1E21A89A139003D1C23 /* SessionListCell */ = {
+			isa = PBXGroup;
+			children = (
+				61CAD1E41A89A163003D1C23 /* SessionListCell.h */,
+				61CAD1E51A89A163003D1C23 /* SessionListCell.m */,
+			);
+			path = SessionListCell;
+			sourceTree = "<group>";
+		};
+		61CAD1E71A89A1E0003D1C23 /* Avatar */ = {
+			isa = PBXGroup;
+			children = (
+				61CAD1EA1A89A24E003D1C23 /* AvatarImageView.h */,
+				61CAD1EB1A89A24E003D1C23 /* AvatarImageView.m */,
+			);
+			path = Avatar;
+			sourceTree = "<group>";
+		};
+		61F728281A7B23A40076C096 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				E447AFD01A8C4E4C005F3000 /* CustomUI */,
+				AE2AA68C1A7F170900CFF013 /* Handler */,
+				AE43255A1A7B302000FCCCBA /* Login */,
+				61F728291A7B23A40076C096 /* Category */,
+				61F7282C1A7B23A40076C096 /* DataSource */,
+				61F7283B1A7B23A40076C096 /* Util */,
+				61F7283E1A7B23A40076C096 /* View */,
+				61F728591A7B23A40076C096 /* ViewController */,
+			);
+			name = Classes;
+			path = Class;
+			sourceTree = "<group>";
+		};
+		61F728291A7B23A40076C096 /* Category */ = {
+			isa = PBXGroup;
+			children = (
+				61F7282A1A7B23A40076C096 /* UIResponder+Router.h */,
+				61F7282B1A7B23A40076C096 /* UIResponder+Router.m */,
+				AE2AA6831A7CD35C00CFF013 /* UIView+NIMDemo.h */,
+				AE2AA6841A7CD35C00CFF013 /* UIView+NIMDemo.m */,
+				AE2AA6871A7CEB3500CFF013 /* UITableView+ScrollToBottom.h */,
+				AE2AA6881A7CEB3500CFF013 /* UITableView+ScrollToBottom.m */,
+				6195CD1E1A8C4D3C00F3E239 /* NSString+NIMDemo.h */,
+				6195CD1F1A8C4D3C00F3E239 /* NSString+NIMDemo.m */,
+			);
+			path = Category;
+			sourceTree = "<group>";
+		};
+		61F7282C1A7B23A40076C096 /* DataSource */ = {
+			isa = PBXGroup;
+			children = (
+				613DBA011A848EAA00E4A676 /* Message */,
+			);
+			path = DataSource;
+			sourceTree = "<group>";
+		};
+		61F7283B1A7B23A40076C096 /* Util */ = {
+			isa = PBXGroup;
+			children = (
+				AEA87FE21A81CE8900ACC3BA /* Audio */,
+				61F7283C1A7B23A40076C096 /* SessionUtil.h */,
+				61F7283D1A7B23A40076C096 /* SessionUtil.m */,
+			);
+			path = Util;
+			sourceTree = "<group>";
+		};
+		61F7283E1A7B23A40076C096 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61CAD1E71A89A1E0003D1C23 /* Avatar */,
+				61CAD1E21A89A139003D1C23 /* SessionListCell */,
+				AE4325631A7B4F7200FCCCBA /* SessionCell */,
+				61F7283F1A7B23A40076C096 /* Input */,
+				61F728461A7B23A40076C096 /* LoadProgressView.h */,
+				61F728471A7B23A40076C096 /* LoadProgressView.m */,
+				6195CD1A1A8C473A00F3E239 /* BadgeView.h */,
+				6195CD1B1A8C473A00F3E239 /* BadgeView.m */,
+				6195CD471A8C7CF900F3E239 /* CustomLeftBarView.h */,
+				6195CD481A8C7CF900F3E239 /* CustomLeftBarView.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61F7283F1A7B23A40076C096 /* Input */ = {
+			isa = PBXGroup;
+			children = (
+				61F728401A7B23A40076C096 /* InputView.h */,
+				61F728411A7B23A40076C096 /* InputView.m */,
+				61F728421A7B23A40076C096 /* InputView.xib */,
+				61F728431A7B23A40076C096 /* NIMInputViewDelegate.h */,
+				61F728441A7B23A40076C096 /* NIMTextView.h */,
+				61F728451A7B23A40076C096 /* NIMTextView.m */,
+				AE4325831A7B5A7800FCCCBA /* InputMoreContainerView.h */,
+				AE4325841A7B5A7800FCCCBA /* InputMoreContainerView.m */,
+			);
+			path = Input;
+			sourceTree = "<group>";
+		};
+		61F728591A7B23A40076C096 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				6195CD3F1A8C78B200F3E239 /* Setting */,
+				AE7DA7EC1A8094E000F54B59 /* Gallery */,
+				615EDC441A7F817C00C4E133 /* Contact */,
+				615EDC311A7F815B00C4E133 /* Session */,
+				615EDC3C1A7F815B00C4E133 /* MainTabController.m */,
+				615EDC3D1A7F815B00C4E133 /* MainTabController.h */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		AE2AA68C1A7F170900CFF013 /* Handler */ = {
+			isa = PBXGroup;
+			children = (
+				615EDC371A7F815B00C4E133 /* SessionLogicDelegate.h */,
+				AE2AA68E1A7F174000CFF013 /* SessionCellActionHandler.h */,
+				AE2AA68F1A7F174000CFF013 /* SessionCellActionHandler.m */,
+				AE2887AA1A83863B00F93159 /* SessionViewLayoutManager.h */,
+				AE2887AB1A83863B00F93159 /* SessionViewLayoutManager.m */,
+			);
+			path = Handler;
+			sourceTree = "<group>";
+		};
+		AE43255A1A7B302000FCCCBA /* Login */ = {
+			isa = PBXGroup;
+			children = (
+				AE43257E1A7B4FAD00FCCCBA /* LoginViewController.h */,
+				AE43257F1A7B4FAD00FCCCBA /* LoginViewController.m */,
+				AE4325801A7B4FAD00FCCCBA /* LoginViewController.xib */,
+				6113FB591A846CE80014ABAB /* LoginTestListViewController.h */,
+				6113FB5A1A846CE80014ABAB /* LoginTestListViewController.m */,
+				6113FB5B1A846CE80014ABAB /* LoginTestListViewController.xib */,
+				6113FB5E1A84705F0014ABAB /* UserTestListDefine.h */,
+			);
+			path = Login;
+			sourceTree = "<group>";
+		};
+		AE4325631A7B4F7200FCCCBA /* SessionCell */ = {
+			isa = PBXGroup;
+			children = (
+				AE4325661A7B4F7200FCCCBA /* SessionCententView */,
+				AE4325741A7B4F7200FCCCBA /* SessionViewCell.h */,
+				AE4325751A7B4F7200FCCCBA /* SessionViewCell.m */,
+				AEC04CF41A833BF4003B5818 /* SessionMsgCellFactory.h */,
+				AEC04CF51A833BF4003B5818 /* SessionMsgCellFactory.m */,
+				AE4325641A7B4F7200FCCCBA /* SessionCellLayoutMacro.h */,
+				AE43256F1A7B4F7200FCCCBA /* SessionMsgModel+SessionCellLayoutProtocol.h */,
+				AE4325701A7B4F7200FCCCBA /* SessionMsgModel+SessionCellLayoutProtocol.m */,
+				AE4325711A7B4F7200FCCCBA /* SessionTimeCell.h */,
+				AE4325721A7B4F7200FCCCBA /* SessionTimeCell.m */,
+				AE4325731A7B4F7200FCCCBA /* SessionTimeCell.xib */,
+			);
+			path = SessionCell;
+			sourceTree = "<group>";
+		};
+		AE4325661A7B4F7200FCCCBA /* SessionCententView */ = {
+			isa = PBXGroup;
+			children = (
+				AE4325671A7B4F7200FCCCBA /* SessionImageBubbleView.h */,
+				AE4325681A7B4F7200FCCCBA /* SessionImageBubbleView.m */,
+				AE4325691A7B4F7200FCCCBA /* SessionMessageContentView.h */,
+				AE43256A1A7B4F7200FCCCBA /* SessionMessageContentView.m */,
+				AE43256D1A7B4F7200FCCCBA /* SessionTextContentView.h */,
+				AE43256E1A7B4F7200FCCCBA /* SessionTextContentView.m */,
+				AE7DA7F31A80C8C700F54B59 /* SessionAudioContentView.h */,
+				AE7DA7F41A80C8C700F54B59 /* SessionAudioContentView.m */,
+			);
+			path = SessionCententView;
+			sourceTree = "<group>";
+		};
+		AE5882DC1A6F47E10070536A = {
+			isa = PBXGroup;
+			children = (
+				AE58994E1A6F82900070536A /* NIMLib.xcodeproj */,
+				AE5882E71A6F47E10070536A /* NIMDemo */,
+				AE5882E61A6F47E10070536A /* Products */,
+				304B100AECEFB170E443A1D6 /* Pods */,
+				5176189D0086B38FE643A26A /* Frameworks */,
+			);
+			sourceTree = "<group>";
+		};
+		AE5882E61A6F47E10070536A /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				AE5882E51A6F47E10070536A /* NIMDemo.app */,
+				AE5882FE1A6F47E10070536A /* NIMDemoTests.xctest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		AE5882E71A6F47E10070536A /* NIMDemo */ = {
+			isa = PBXGroup;
+			children = (
+				61F728281A7B23A40076C096 /* Classes */,
+				AE5882EC1A6F47E10070536A /* AppDelegate.h */,
+				AE5882ED1A6F47E10070536A /* AppDelegate.m */,
+				AE5882F51A6F47E10070536A /* Images.xcassets */,
+				AE5882F71A6F47E10070536A /* LaunchScreen.xib */,
+				AEB8367F1A772C2F00E7493E /* NIMDemo-Prefix.pch */,
+				6195CD3E1A8C74DB00F3E239 /* GlobalMacro.h */,
+				AE5882E81A6F47E10070536A /* Supporting Files */,
+			);
+			path = NIMDemo;
+			sourceTree = "<group>";
+		};
+		AE5882E81A6F47E10070536A /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				AEB835FB1A7633D000E7493E /* images */,
+				AE5882E91A6F47E10070536A /* Info.plist */,
+				AE58995B1A6FA7BD0070536A /* libstdc++.6.dylib */,
+				AE58995D1A6FA7E90070536A /* libz.dylib */,
+				61CF576C1A787D9A00B43072 /* libsqlite3.0.dylib */,
+				61CF576E1A787DB000B43072 /* MobileCoreServices.framework */,
+				AEA87FE01A81CAD500ACC3BA /* AVFoundation.framework */,
+				AE5899591A6FA7AC0070536A /* SystemConfiguration.framework */,
+				AE5882EA1A6F47E10070536A /* main.m */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		AE58994F1A6F82900070536A /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				AE5899531A6F82910070536A /* libNIMLib.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		AE7DA7EC1A8094E000F54B59 /* Gallery */ = {
+			isa = PBXGroup;
+			children = (
+				AE7DA7EE1A8097D400F54B59 /* GalleryViewController.h */,
+				AE7DA7EF1A8097D400F54B59 /* GalleryViewController.m */,
+				AE7DA7F01A8097D400F54B59 /* GalleryViewController.xib */,
+			);
+			path = Gallery;
+			sourceTree = "<group>";
+		};
+		AEA87FE21A81CE8900ACC3BA /* Audio */ = {
+			isa = PBXGroup;
+			children = (
+				AEA87FE31A81CECC00ACC3BA /* AudioManager.h */,
+				AEA87FE41A81CECC00ACC3BA /* AudioManager.m */,
+			);
+			path = Audio;
+			sourceTree = "<group>";
+		};
+		AEB835FB1A7633D000E7493E /* images */ = {
+			isa = PBXGroup;
+			children = (
+				6195CD4A1A8C934200F3E239 /* btn_back_normal@2x.png */,
+				6195CD4B1A8C934200F3E239 /* btn_back_normal@3x.png */,
+				6195CD251A8C71E000F3E239 /* tabbar_chats.png */,
+				6195CD261A8C71E000F3E239 /* tabbar_chats@2x.png */,
+				6195CD271A8C71E000F3E239 /* tabbar_chatsHL.png */,
+				6195CD281A8C71E000F3E239 /* tabbar_chatsHL@2x.png */,
+				6195CD291A8C71E000F3E239 /* tabbar_contacts.png */,
+				6195CD2A1A8C71E000F3E239 /* tabbar_contacts@2x.png */,
+				6195CD2B1A8C71E000F3E239 /* tabbar_contactsHL.png */,
+				6195CD2C1A8C71E000F3E239 /* tabbar_contactsHL@2x.png */,
+				6195CD2D1A8C71E000F3E239 /* tabbar_setting.png */,
+				6195CD2E1A8C71E000F3E239 /* tabbar_setting@2x.png */,
+				6195CD2F1A8C71E000F3E239 /* tabbar_settingHL.png */,
+				6195CD301A8C71E000F3E239 /* tabbar_settingHL@2x.png */,
+				AEA7EF9B1A8AF9FD00BA0F23 /* session_time_bg@2x.png */,
+				61CAD1ED1A89A5D3003D1C23 /* DefaultAvatar@2x.png */,
+				61CAD1EE1A89A5D3003D1C23 /* DefaultAvatar@3x.png */,
+				AE7DA7E81A8063C300F54B59 /* btn_message_cell_error@2x.png */,
+				AEB836851A773DB900E7493E /* Session_Multi_Delete_HL@2x.png */,
+				AEB836861A773DB900E7493E /* Session_Multi_Delete_HL@3x.png */,
+				AEB836871A773DB900E7493E /* Session_Multi_Delete@2x.png */,
+				AEB836881A773DB900E7493E /* Session_Multi_Delete@3x.png */,
+				AEB836721A76672F00E7493E /* icon_password@2x.png */,
+				AEB836701A76671500E7493E /* icon_account@2x.png */,
+				AEB836661A76425600E7493E /* btn_launch_button_normal_0@2x.png */,
+				AEB836671A76425600E7493E /* btn_launch_button_normal@2x.png */,
+				AEB836681A76425600E7493E /* btn_launch_button_pressed_0@2x.png */,
+				AEB836691A76425600E7493E /* btn_launch_button_pressed@2x.png */,
+				AEB8366A1A76425600E7493E /* login_input@2x.png */,
+				AEB8365D1A76392300E7493E /* sharemore_videovoip@2x.png */,
+				AEB8365E1A76392300E7493E /* sharemore_videovoip@3x.png */,
+				AEB836571A76359C00E7493E /* SendTextViewBkg@2x.png */,
+				AEB836581A76359C00E7493E /* SendTextViewBkg@3x.png */,
+				AEB836591A76359C00E7493E /* Text_BG@2x.png */,
+				AEB835FC1A7633D000E7493E /* MessageVideoDownload@2x.png */,
+				AEB835FD1A7633D000E7493E /* MessageVideoDownload@3x.png */,
+				AEB835FE1A7633D000E7493E /* MessageVideoPlay@2x.png */,
+				AEB835FF1A7633D000E7493E /* MessageVideoPlay@3x.png */,
+				AEB836001A7633D000E7493E /* ReceiverAppNodeBkg@2x.png */,
+				AEB836011A7633D000E7493E /* ReceiverAppNodeBkg@3x.png */,
+				AEB836021A7633D000E7493E /* ReceiverAppNodeBkg_HL@2x.png */,
+				AEB836031A7633D000E7493E /* ReceiverAppNodeBkg_HL@3x.png */,
+				AEB836041A7633D000E7493E /* ReceiverVoiceNodePlaying001@2x.png */,
+				AEB836051A7633D000E7493E /* ReceiverVoiceNodePlaying001@3x.png */,
+				AEB836061A7633D000E7493E /* ReceiverVoiceNodePlaying002@2x.png */,
+				AEB836071A7633D000E7493E /* ReceiverVoiceNodePlaying002@3x.png */,
+				AEB836081A7633D000E7493E /* ReceiverVoiceNodePlaying003@2x.png */,
+				AEB836091A7633D000E7493E /* ReceiverVoiceNodePlaying003@3x.png */,
+				AEB8360A1A7633D000E7493E /* ReceiverVoiceNodePlaying@2x.png */,
+				AEB8360B1A7633D000E7493E /* ReceiverVoiceNodePlaying@3x.png */,
+				AEB8360C1A7633D000E7493E /* Record_voice_disable@2x.png */,
+				AEB8360D1A7633D000E7493E /* SenderAppNodeBkg@2x.png */,
+				AEB8360E1A7633D000E7493E /* SenderAppNodeBkg@3x.png */,
+				AEB8360F1A7633D000E7493E /* SenderTextNodeBkg@2x.png */,
+				AEB836101A7633D000E7493E /* SenderTextNodeBkg@3x.png */,
+				AEB836111A7633D000E7493E /* sharemore_location@2x.png */,
+				AEB836121A7633D000E7493E /* sharemore_location@3x.png */,
+				AEB836131A7633D000E7493E /* sharemore_pic@2x.png */,
+				AEB836141A7633D000E7493E /* sharemore_pic@3x.png */,
+				AEB836151A7633D000E7493E /* sharemore_video@2x.png */,
+				AEB836161A7633D000E7493E /* sharemore_video@3x.png */,
+				AEB836171A7633D000E7493E /* ToolViewEmotion@2x.png */,
+				AEB836181A7633D000E7493E /* ToolViewEmotion@3x.png */,
+				AEB836191A7633D000E7493E /* ToolViewEmotionHL@2x.png */,
+				AEB8361A1A7633D000E7493E /* ToolViewEmotionHL@3x.png */,
+				AEB8361B1A7633D000E7493E /* ToolViewInputVoice@2x.png */,
+				AEB8361C1A7633D000E7493E /* ToolViewInputVoice@3x.png */,
+				AEB8361D1A7633D000E7493E /* ToolViewInputVoiceHL@2x.png */,
+				AEB8361E1A7633D000E7493E /* ToolViewInputVoiceHL@3x.png */,
+				AEB8361F1A7633D000E7493E /* ToolViewKeyboard@2x.png */,
+				AEB836201A7633D000E7493E /* ToolViewKeyboard@3x.png */,
+				AEB836211A7633D000E7493E /* ToolViewKeyboardHL@2x.png */,
+				AEB836221A7633D000E7493E /* ToolViewKeyboardHL@3x.png */,
+				AEB836231A7633D000E7493E /* TypeSelectorBtn_Black@2x.png */,
+				AEB836241A7633D000E7493E /* TypeSelectorBtn_Black@3x.png */,
+				AEB836251A7633D000E7493E /* TypeSelectorBtnHL_Black@2x.png */,
+				AEB836261A7633D000E7493E /* TypeSelectorBtnHL_Black@3x.png */,
+				AEA87FD61A81C3A100ACC3BA /* VoiceBtn_Black@2x.png */,
+				AEA87FD71A81C3A100ACC3BA /* VoiceBtn_Black@3x.png */,
+				AEA87FD81A81C3A100ACC3BA /* VoiceBtn_BlackHL@2x.png */,
+				AEA87FD91A81C3A100ACC3BA /* VoiceBtn_BlackHL@3x.png */,
+				AEA87FDA1A81C3A100ACC3BA /* VoiceBtnDisable_Black@2x.png */,
+			);
+			path = images;
+			sourceTree = "<group>";
+		};
+		E447AFD01A8C4E4C005F3000 /* CustomUI */ = {
+			isa = PBXGroup;
+			children = (
+				E447AFD11A8C4E67005F3000 /* PageView.h */,
+				E447AFD21A8C4E67005F3000 /* PageView.m */,
+			);
+			path = CustomUI;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		AE5882E41A6F47E10070536A /* NIMDemo */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = AE5883081A6F47E10070536A /* Build configuration list for PBXNativeTarget "NIMDemo" */;
+			buildPhases = (
+				21178737748CC5995E04AEB1 /* Check Pods Manifest.lock */,
+				AE5882E11A6F47E10070536A /* Sources */,
+				AE5882E21A6F47E10070536A /* Frameworks */,
+				AE5882E31A6F47E10070536A /* Resources */,
+				B3B34DE9D3E5DD0A80DF90FE /* Copy Pods Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = NIMDemo;
+			productName = NIMDemo;
+			productReference = AE5882E51A6F47E10070536A /* NIMDemo.app */;
+			productType = "com.apple.product-type.application";
+		};
+		AE5882FD1A6F47E10070536A /* NIMDemoTests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = AE58830B1A6F47E10070536A /* Build configuration list for PBXNativeTarget "NIMDemoTests" */;
+			buildPhases = (
+				AE5882FA1A6F47E10070536A /* Sources */,
+				AE5882FB1A6F47E10070536A /* Frameworks */,
+				AE5882FC1A6F47E10070536A /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				AE5883001A6F47E10070536A /* PBXTargetDependency */,
+			);
+			name = NIMDemoTests;
+			productName = NIMDemoTests;
+			productReference = AE5882FE1A6F47E10070536A /* NIMDemoTests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		AE5882DD1A6F47E10070536A /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0610;
+				ORGANIZATIONNAME = Netease;
+				TargetAttributes = {
+					AE5882E41A6F47E10070536A = {
+						CreatedOnToolsVersion = 6.1;
+						DevelopmentTeam = MWYKGVPTJP;
+					};
+					AE5882FD1A6F47E10070536A = {
+						CreatedOnToolsVersion = 6.1;
+						TestTargetID = AE5882E41A6F47E10070536A;
+					};
+				};
+			};
+			buildConfigurationList = AE5882E01A6F47E10070536A /* Build configuration list for PBXProject "NIMDemo" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = AE5882DC1A6F47E10070536A;
+			productRefGroup = AE5882E61A6F47E10070536A /* Products */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = AE58994F1A6F82900070536A /* Products */;
+					ProjectRef = AE58994E1A6F82900070536A /* NIMLib.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				AE5882E41A6F47E10070536A /* NIMDemo */,
+				AE5882FD1A6F47E10070536A /* NIMDemoTests */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		AE5899531A6F82910070536A /* libNIMLib.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libNIMLib.a;
+			remoteRef = AE5899521A6F82910070536A /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		AE5882E31A6F47E10070536A /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				6195CD351A8C71E000F3E239 /* tabbar_contacts.png in Resources */,
+				AEB836511A7633D000E7493E /* TypeSelectorBtn_Black@3x.png in Resources */,
+				AE7DA7F21A8097D400F54B59 /* GalleryViewController.xib in Resources */,
+				6195CD3A1A8C71E000F3E239 /* tabbar_setting@2x.png in Resources */,
+				AEB836711A76671500E7493E /* icon_account@2x.png in Resources */,
+				AEA87FDB1A81C3A100ACC3BA /* VoiceBtn_Black@2x.png in Resources */,
+				AEB836891A773DB900E7493E /* Session_Multi_Delete_HL@2x.png in Resources */,
+				AEB8362A1A7633D000E7493E /* MessageVideoDownload@3x.png in Resources */,
+				AEB836451A7633D000E7493E /* ToolViewEmotion@3x.png in Resources */,
+				615EDC3F1A7F815B00C4E133 /* SessionListViewController.xib in Resources */,
+				AEB836371A7633D000E7493E /* ReceiverVoiceNodePlaying@2x.png in Resources */,
+				6195CD4C1A8C934200F3E239 /* btn_back_normal@2x.png in Resources */,
+				AEA87FDC1A81C3A100ACC3BA /* VoiceBtn_Black@3x.png in Resources */,
+				AEB8365B1A76359D00E7493E /* SendTextViewBkg@3x.png in Resources */,
+				AE5882F91A6F47E10070536A /* LaunchScreen.xib in Resources */,
+				AEB8363A1A7633D000E7493E /* SenderAppNodeBkg@2x.png in Resources */,
+				AEB8366D1A76425600E7493E /* btn_launch_button_pressed_0@2x.png in Resources */,
+				AEB8364C1A7633D000E7493E /* ToolViewKeyboard@2x.png in Resources */,
+				AEB836341A7633D000E7493E /* ReceiverVoiceNodePlaying002@3x.png in Resources */,
+				6195CD361A8C71E000F3E239 /* tabbar_contacts@2x.png in Resources */,
+				AEB8365A1A76359D00E7493E /* SendTextViewBkg@2x.png in Resources */,
+				AEB8362B1A7633D000E7493E /* MessageVideoPlay@2x.png in Resources */,
+				AEB8365C1A76359D00E7493E /* Text_BG@2x.png in Resources */,
+				6195CD331A8C71E000F3E239 /* tabbar_chatsHL.png in Resources */,
+				AEB836441A7633D000E7493E /* ToolViewEmotion@2x.png in Resources */,
+				AEB836481A7633D000E7493E /* ToolViewInputVoice@2x.png in Resources */,
+				AEB8366C1A76425600E7493E /* btn_launch_button_normal@2x.png in Resources */,
+				6195CD4D1A8C934200F3E239 /* btn_back_normal@3x.png in Resources */,
+				AEB8368C1A773DB900E7493E /* Session_Multi_Delete@3x.png in Resources */,
+				615EDC421A7F815B00C4E133 /* SessionViewController.xib in Resources */,
+				6113FB5D1A846CE80014ABAB /* LoginTestListViewController.xib in Resources */,
+				AEA87FDE1A81C3A100ACC3BA /* VoiceBtn_BlackHL@3x.png in Resources */,
+				AEB8368B1A773DB900E7493E /* Session_Multi_Delete@2x.png in Resources */,
+				6195CD341A8C71E000F3E239 /* tabbar_chatsHL@2x.png in Resources */,
+				6195CD381A8C71E000F3E239 /* tabbar_contactsHL@2x.png in Resources */,
+				AEB836521A7633D000E7493E /* TypeSelectorBtnHL_Black@2x.png in Resources */,
+				AEB8366E1A76425600E7493E /* btn_launch_button_pressed@2x.png in Resources */,
+				AE43257C1A7B4F7200FCCCBA /* SessionTimeCell.xib in Resources */,
+				AEB836321A7633D000E7493E /* ReceiverVoiceNodePlaying001@3x.png in Resources */,
+				AEB836411A7633D000E7493E /* sharemore_pic@3x.png in Resources */,
+				AEA87FDD1A81C3A100ACC3BA /* VoiceBtn_BlackHL@2x.png in Resources */,
+				AEB8366B1A76425600E7493E /* btn_launch_button_normal_0@2x.png in Resources */,
+				6195CD391A8C71E000F3E239 /* tabbar_setting.png in Resources */,
+				AE5882F61A6F47E10070536A /* Images.xcassets in Resources */,
+				6195CD441A8C78CE00F3E239 /* SettingViewController.xib in Resources */,
+				AEB836361A7633D000E7493E /* ReceiverVoiceNodePlaying003@3x.png in Resources */,
+				AEB8364F1A7633D000E7493E /* ToolViewKeyboardHL@3x.png in Resources */,
+				61CAD1EF1A89A5D3003D1C23 /* DefaultAvatar@2x.png in Resources */,
+				AEB836381A7633D000E7493E /* ReceiverVoiceNodePlaying@3x.png in Resources */,
+				AEB836601A76392300E7493E /* sharemore_videovoip@3x.png in Resources */,
+				AE4325821A7B4FAD00FCCCBA /* LoginViewController.xib in Resources */,
+				AEB836471A7633D000E7493E /* ToolViewEmotionHL@3x.png in Resources */,
+				AEB836421A7633D000E7493E /* sharemore_video@2x.png in Resources */,
+				AEB8365F1A76392300E7493E /* sharemore_videovoip@2x.png in Resources */,
+				AEB8363F1A7633D000E7493E /* sharemore_location@3x.png in Resources */,
+				615EDC491A7F819700C4E133 /* ContactViewController.xib in Resources */,
+				AEB836461A7633D000E7493E /* ToolViewEmotionHL@2x.png in Resources */,
+				AEB836731A76672F00E7493E /* icon_password@2x.png in Resources */,
+				AEB836331A7633D000E7493E /* ReceiverVoiceNodePlaying002@2x.png in Resources */,
+				AE7DA7E91A8063C300F54B59 /* btn_message_cell_error@2x.png in Resources */,
+				AEB836401A7633D000E7493E /* sharemore_pic@2x.png in Resources */,
+				AEA7EF9C1A8AF9FD00BA0F23 /* session_time_bg@2x.png in Resources */,
+				AEB836311A7633D000E7493E /* ReceiverVoiceNodePlaying001@2x.png in Resources */,
+				61F7286A1A7B23A40076C096 /* InputView.xib in Resources */,
+				AEB8363B1A7633D000E7493E /* SenderAppNodeBkg@3x.png in Resources */,
+				6195CD3B1A8C71E000F3E239 /* tabbar_settingHL.png in Resources */,
+				AEB8366F1A76425600E7493E /* login_input@2x.png in Resources */,
+				AEB836291A7633D000E7493E /* MessageVideoDownload@2x.png in Resources */,
+				AEB836431A7633D000E7493E /* sharemore_video@3x.png in Resources */,
+				AEB836501A7633D000E7493E /* TypeSelectorBtn_Black@2x.png in Resources */,
+				AEB8368A1A773DB900E7493E /* Session_Multi_Delete_HL@3x.png in Resources */,
+				AEB836491A7633D000E7493E /* ToolViewInputVoice@3x.png in Resources */,
+				AEB8364A1A7633D000E7493E /* ToolViewInputVoiceHL@2x.png in Resources */,
+				AEA87FDF1A81C3A100ACC3BA /* VoiceBtnDisable_Black@2x.png in Resources */,
+				AEB8362F1A7633D000E7493E /* ReceiverAppNodeBkg_HL@2x.png in Resources */,
+				AEB836391A7633D000E7493E /* Record_voice_disable@2x.png in Resources */,
+				AEB8362E1A7633D000E7493E /* ReceiverAppNodeBkg@3x.png in Resources */,
+				AEB836301A7633D000E7493E /* ReceiverAppNodeBkg_HL@3x.png in Resources */,
+				AEB8364D1A7633D000E7493E /* ToolViewKeyboard@3x.png in Resources */,
+				AEB8363E1A7633D000E7493E /* sharemore_location@2x.png in Resources */,
+				AEB836351A7633D000E7493E /* ReceiverVoiceNodePlaying003@2x.png in Resources */,
+				AEB8364E1A7633D000E7493E /* ToolViewKeyboardHL@2x.png in Resources */,
+				AEB8363D1A7633D000E7493E /* SenderTextNodeBkg@3x.png in Resources */,
+				AEB836531A7633D000E7493E /* TypeSelectorBtnHL_Black@3x.png in Resources */,
+				AEB8363C1A7633D000E7493E /* SenderTextNodeBkg@2x.png in Resources */,
+				AEB8362D1A7633D000E7493E /* ReceiverAppNodeBkg@2x.png in Resources */,
+				61CAD1F01A89A5D3003D1C23 /* DefaultAvatar@3x.png in Resources */,
+				AEB8362C1A7633D000E7493E /* MessageVideoPlay@3x.png in Resources */,
+				6195CD311A8C71E000F3E239 /* tabbar_chats.png in Resources */,
+				6195CD321A8C71E000F3E239 /* tabbar_chats@2x.png in Resources */,
+				AEB8364B1A7633D000E7493E /* ToolViewInputVoiceHL@3x.png in Resources */,
+				6195CD371A8C71E000F3E239 /* tabbar_contactsHL.png in Resources */,
+				6195CD3C1A8C71E000F3E239 /* tabbar_settingHL@2x.png in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		AE5882FC1A6F47E10070536A /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		21178737748CC5995E04AEB1 /* Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Check Pods Manifest.lock";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n    cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n    exit 1\nfi\n";
+			showEnvVarsInLog = 0;
+		};
+		B3B34DE9D3E5DD0A80DF90FE /* Copy Pods Resources */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Copy Pods Resources";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		AE5882E11A6F47E10070536A /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				AE4325811A7B4FAD00FCCCBA /* LoginViewController.m in Sources */,
+				6195CD201A8C4D3C00F3E239 /* NSString+NIMDemo.m in Sources */,
+				61F728691A7B23A40076C096 /* InputView.m in Sources */,
+				AEA87FE51A81CECC00ACC3BA /* AudioManager.m in Sources */,
+				613DBA0A1A848EAA00E4A676 /* SessionMsgConverter.m in Sources */,
+				615EDC3E1A7F815B00C4E133 /* SessionListViewController.m in Sources */,
+				AE43257B1A7B4F7200FCCCBA /* SessionTimeCell.m in Sources */,
+				AE2AA6921A7F174000CFF013 /* SessionCellActionHandler.m in Sources */,
+				AE43257D1A7B4F7200FCCCBA /* SessionViewCell.m in Sources */,
+				AE43257A1A7B4F7200FCCCBA /* SessionMsgModel+SessionCellLayoutProtocol.m in Sources */,
+				AE4325771A7B4F7200FCCCBA /* SessionMessageContentView.m in Sources */,
+				AE7DA7F11A8097D400F54B59 /* GalleryViewController.m in Sources */,
+				615EDC411A7F815B00C4E133 /* SessionViewController.m in Sources */,
+				6113FB5C1A846CE80014ABAB /* LoginTestListViewController.m in Sources */,
+				AEC04CF61A833BF4003B5818 /* SessionMsgCellFactory.m in Sources */,
+				AE4325791A7B4F7200FCCCBA /* SessionTextContentView.m in Sources */,
+				6195CD1C1A8C473B00F3E239 /* BadgeView.m in Sources */,
+				AE7DA7F51A80C8C700F54B59 /* SessionAudioContentView.m in Sources */,
+				AE5882EE1A6F47E10070536A /* AppDelegate.m in Sources */,
+				AE4325761A7B4F7200FCCCBA /* SessionImageBubbleView.m in Sources */,
+				613DBA0B1A848EAA00E4A676 /* SessionMsgDatasource.m in Sources */,
+				61F7286B1A7B23A40076C096 /* NIMTextView.m in Sources */,
+				615EDC431A7F815B00C4E133 /* MainTabController.m in Sources */,
+				61CAD1E61A89A163003D1C23 /* SessionListCell.m in Sources */,
+				6195CD491A8C7CF900F3E239 /* CustomLeftBarView.m in Sources */,
+				AE5882EB1A6F47E10070536A /* main.m in Sources */,
+				61F7286C1A7B23A40076C096 /* LoadProgressView.m in Sources */,
+				61CAD1EC1A89A24E003D1C23 /* AvatarImageView.m in Sources */,
+				AE4325851A7B5A7800FCCCBA /* InputMoreContainerView.m in Sources */,
+				AE2AA6891A7CEB3500CFF013 /* UITableView+ScrollToBottom.m in Sources */,
+				61F728611A7B23A40076C096 /* UIResponder+Router.m in Sources */,
+				AE2AA6851A7CD35C00CFF013 /* UIView+NIMDemo.m in Sources */,
+				613DBA0C1A848EAA00E4A676 /* SessionMsgModel.m in Sources */,
+				615EDC481A7F819700C4E133 /* ContactViewController.m in Sources */,
+				E447AFD31A8C4E67005F3000 /* PageView.m in Sources */,
+				61F728681A7B23A40076C096 /* SessionUtil.m in Sources */,
+				6195CD431A8C78CE00F3E239 /* SettingViewController.m in Sources */,
+				AE2887AC1A83863B00F93159 /* SessionViewLayoutManager.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		AE5882FA1A6F47E10070536A /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		AE5883001A6F47E10070536A /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = AE5882E41A6F47E10070536A /* NIMDemo */;
+			targetProxy = AE5882FF1A6F47E10070536A /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		AE5882F71A6F47E10070536A /* LaunchScreen.xib */ = {
+			isa = PBXVariantGroup;
+			children = (
+				AE5882F81A6F47E10070536A /* Base */,
+			);
+			name = LaunchScreen.xib;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		AE5883061A6F47E10070536A /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 8.1;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = "";
+				SDKROOT = iphoneos;
+				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../NIMLib/NIMLib/**";
+			};
+			name = Debug;
+		};
+		AE5883071A6F47E10070536A /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 8.1;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				OTHER_LDFLAGS = "";
+				SDKROOT = iphoneos;
+				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../NIMLib/NIMLib/**";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		AE5883091A6F47E10070536A /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = DF30F6A4FA82195516F742F7 /* Pods.debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/NIMDemo/NIMDemo-Prefix.pch";
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(SRCROOT)/../NIMLib/NIMLib/ExportHeaders/**",
+					"$(SRCROOT)/../NIMLib/NIMLib/Classes/**",
+				);
+				INFOPLIST_FILE = NIMDemo/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-ObjC",
+					"-all_load",
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE = "";
+				USER_HEADER_SEARCH_PATHS = "";
+			};
+			name = Debug;
+		};
+		AE58830A1A6F47E10070536A /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 3CB9917FFA15BA7164D3339E /* Pods.release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/NIMDemo/NIMDemo-Prefix.pch";
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(SRCROOT)/../NIMLib/NIMLib/ExportHeaders/**",
+					"$(SRCROOT)/../NIMLib/NIMLib/Classes/**",
+				);
+				INFOPLIST_FILE = NIMDemo/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-ObjC",
+					"-all_load",
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE = "";
+				USER_HEADER_SEARCH_PATHS = "";
+			};
+			name = Release;
+		};
+		AE58830C1A6F47E10070536A /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(SDKROOT)/Developer/Library/Frameworks",
+					"$(inherited)",
+				);
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				INFOPLIST_FILE = NIMDemoTests/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NIMDemo.app/NIMDemo";
+			};
+			name = Debug;
+		};
+		AE58830D1A6F47E10070536A /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(SDKROOT)/Developer/Library/Frameworks",
+					"$(inherited)",
+				);
+				INFOPLIST_FILE = NIMDemoTests/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NIMDemo.app/NIMDemo";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		AE5882E01A6F47E10070536A /* Build configuration list for PBXProject "NIMDemo" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AE5883061A6F47E10070536A /* Debug */,
+				AE5883071A6F47E10070536A /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		AE5883081A6F47E10070536A /* Build configuration list for PBXNativeTarget "NIMDemo" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AE5883091A6F47E10070536A /* Debug */,
+				AE58830A1A6F47E10070536A /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		AE58830B1A6F47E10070536A /* Build configuration list for PBXNativeTarget "NIMDemoTests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AE58830C1A6F47E10070536A /* Debug */,
+				AE58830D1A6F47E10070536A /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = AE5882DD1A6F47E10070536A /* Project object */;
+}

+ 7 - 0
NIMDemo/NIMDemo.xcodeproj/NIMDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:NIMDemo.xcodeproj">
+   </FileRef>
+</Workspace>

+ 41 - 0
NIMDemo/NIMDemo.xcodeproj/NIMDemo.xcodeproj/project.xcworkspace/xcshareddata/NIMDemo.xccheckout

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDESourceControlProjectFavoriteDictionaryKey</key>
+	<false/>
+	<key>IDESourceControlProjectIdentifier</key>
+	<string>57B9AFFA-07B1-42F7-B5C8-526B167606C7</string>
+	<key>IDESourceControlProjectName</key>
+	<string>NIMDemo</string>
+	<key>IDESourceControlProjectOriginsDictionary</key>
+	<dict>
+		<key>D6418F31F93C1E3048A9C6B85688F912F4E16F4E</key>
+		<string>https://git.hz.netease.com/git/xiangwangfeng/NIM.git</string>
+	</dict>
+	<key>IDESourceControlProjectPath</key>
+	<string>NIMDemo/NIMDemo.xcodeproj</string>
+	<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
+	<dict>
+		<key>D6418F31F93C1E3048A9C6B85688F912F4E16F4E</key>
+		<string>../../..</string>
+	</dict>
+	<key>IDESourceControlProjectURL</key>
+	<string>https://git.hz.netease.com/git/xiangwangfeng/NIM.git</string>
+	<key>IDESourceControlProjectVersion</key>
+	<integer>111</integer>
+	<key>IDESourceControlProjectWCCIdentifier</key>
+	<string>D6418F31F93C1E3048A9C6B85688F912F4E16F4E</string>
+	<key>IDESourceControlProjectWCConfigurations</key>
+	<array>
+		<dict>
+			<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
+			<string>public.vcs.git</string>
+			<key>IDESourceControlWCCIdentifierKey</key>
+			<string>D6418F31F93C1E3048A9C6B85688F912F4E16F4E</string>
+			<key>IDESourceControlWCCName</key>
+			<string>NIM</string>
+		</dict>
+	</array>
+</dict>
+</plist>

+ 2324 - 0
NIMDemo/NIMDemo.xcodeproj/project.pbxproj

@@ -0,0 +1,2324 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		03A4C9FF1AC2B79700E45E03 /* UIAlertView+NTESBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 03A4C9FB1AC2B79700E45E03 /* UIAlertView+NTESBlock.m */; };
+		03A4CA001AC2B79700E45E03 /* UIActionSheet+NTESBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 03A4C9FD1AC2B79700E45E03 /* UIActionSheet+NTESBlock.m */; };
+		610B1E021AFDDE04006454EA /* video_connect_chat_tip_sender.aac in Resources */ = {isa = PBXBuildFile; fileRef = 610B1DFB1AFDDE04006454EA /* video_connect_chat_tip_sender.aac */; };
+		610B1E041AFDDE04006454EA /* video_chat_tip_HangUp.aac in Resources */ = {isa = PBXBuildFile; fileRef = 610B1DFD1AFDDE04006454EA /* video_chat_tip_HangUp.aac */; };
+		610B1E051AFDDE04006454EA /* video_chat_tip_OnCall.aac in Resources */ = {isa = PBXBuildFile; fileRef = 610B1DFE1AFDDE04006454EA /* video_chat_tip_OnCall.aac */; };
+		610B1E061AFDDE04006454EA /* video_chat_tip_onTimer.aac in Resources */ = {isa = PBXBuildFile; fileRef = 610B1DFF1AFDDE04006454EA /* video_chat_tip_onTimer.aac */; };
+		610B1E071AFDDE04006454EA /* video_chat_tip_receiver.aac in Resources */ = {isa = PBXBuildFile; fileRef = 610B1E001AFDDE04006454EA /* video_chat_tip_receiver.aac */; };
+		610B1E081AFDDE04006454EA /* video_chat_tip_sender.aac in Resources */ = {isa = PBXBuildFile; fileRef = 610B1E011AFDDE04006454EA /* video_chat_tip_sender.aac */; };
+		610B5FBF1BADCCCD001F7EFB /* NTESBirthPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 610B5FBE1BADCCCD001F7EFB /* NTESBirthPickerView.m */; };
+		6110D8A91C23E76D00805BA4 /* NTESChatroomMemberCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6110D8A81C23E76D00805BA4 /* NTESChatroomMemberCell.m */; };
+		6110D8B51C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = 6110D8B41C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.m */; };
+		6117562E1BEB6978006A1589 /* NTESAliasSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6117562D1BEB6978006A1589 /* NTESAliasSettingViewController.m */; };
+		6118F5A61C5A0FC1009AF01E /* UINavigationBar+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 6118F59D1C5A0FC1009AF01E /* UINavigationBar+Swizzling.m */; };
+		6118F5A71C5A0FC1009AF01E /* UINavigationController+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 6118F59F1C5A0FC1009AF01E /* UINavigationController+Swizzling.m */; };
+		6118F5A81C5A0FC1009AF01E /* UINavigationItem+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 6118F5A11C5A0FC1009AF01E /* UINavigationItem+Swizzling.m */; };
+		6118F5A91C5A0FC1009AF01E /* UIView+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 6118F5A31C5A0FC1009AF01E /* UIView+Swizzling.m */; };
+		6118F5AA1C5A0FC1009AF01E /* UIViewController+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 6118F5A51C5A0FC1009AF01E /* UIViewController+Swizzling.m */; };
+		611ABF001B3CF4FC00B8706C /* NTESAvatarImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 611ABEF31B3CF4FC00B8706C /* NTESAvatarImageView.m */; };
+		611ABF011B3CF4FC00B8706C /* NTESBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 611ABEF51B3CF4FC00B8706C /* NTESBadgeView.m */; };
+		611ABF041B3CF4FC00B8706C /* NTESMarginButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 611ABEFB1B3CF4FC00B8706C /* NTESMarginButton.m */; };
+		611ABF111B42321600B8706C /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 611ABF101B42321600B8706C /* Settings.bundle */; };
+		611FE9EE1BB02320005E8E45 /* (null) in Sources */ = {isa = PBXBuildFile; };
+		61206EE71C1E607B009E4C78 /* NTESChatroomListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61206EE61C1E607B009E4C78 /* NTESChatroomListCell.m */; };
+		612CACEE1BB1484C00C348B5 /* NTESContactDataMember.m in Sources */ = {isa = PBXBuildFile; fileRef = 612CACED1BB1484C00C348B5 /* NTESContactDataMember.m */; };
+		612FA9551C1EC202008956C9 /* NTESChatroomMessageDataProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 612FA9541C1EC202008956C9 /* NTESChatroomMessageDataProvider.m */; };
+		613A2FEA1C21016600508990 /* NTESChatroomSegmentedControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 613A2FE91C21016600508990 /* NTESChatroomSegmentedControl.m */; };
+		613A2FED1C21049E00508990 /* NTESLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 613A2FEC1C21049E00508990 /* NTESLiveViewController.m */; };
+		61518A4A1CA233390061C4A9 /* NTESNavigationAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = 61518A471CA233390061C4A9 /* NTESNavigationAnimator.m */; };
+		61518A4B1CA233390061C4A9 /* NTESNavigationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 61518A491CA233390061C4A9 /* NTESNavigationHandler.m */; };
+		61518A541CA233BB0061C4A9 /* NTESDemoFetchChatroomTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 61518A4E1CA233BB0061C4A9 /* NTESDemoFetchChatroomTask.m */; };
+		61518A551CA233BB0061C4A9 /* NTESDemoRegisterTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 61518A501CA233BB0061C4A9 /* NTESDemoRegisterTask.m */; };
+		61518A561CA233BB0061C4A9 /* NTESDemoService.m in Sources */ = {isa = PBXBuildFile; fileRef = 61518A521CA233BB0061C4A9 /* NTESDemoService.m */; };
+		61518A5A1CA234590061C4A9 /* NTESMainTabController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61518A591CA234590061C4A9 /* NTESMainTabController.m */; };
+		61530BE71BABAD3B00FE50CC /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 61530BE61BABAD3B00FE50CC /* libsqlite3.0.tbd */; };
+		61530BEB1BABAD8200FE50CC /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 61530BEA1BABAD8200FE50CC /* libz.tbd */; };
+		6159DF531C45F79D00E32EB4 /* NTESChatroomConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 6159DF511C45F79D00E32EB4 /* NTESChatroomConfig.m */; };
+		6159DF5A1C45FAF500E32EB4 /* NTESChatroomTextContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6159DF591C45FAF500E32EB4 /* NTESChatroomTextContentView.m */; };
+		6173AEC01BAAB91C00854D49 /* NTESNickNameSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AEBF1BAAB91C00854D49 /* NTESNickNameSettingViewController.m */; };
+		6173AEC41BAAB94400854D49 /* NTESUserInfoSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AEC21BAAB94400854D49 /* NTESUserInfoSettingViewController.m */; };
+		6173AEC51BAAB94400854D49 /* NTESUserInfoSettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6173AEC31BAAB94400854D49 /* NTESUserInfoSettingViewController.xib */; };
+		6173AEC91BAAC6CB00854D49 /* NTESGenderSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AEC71BAAC6CB00854D49 /* NTESGenderSettingViewController.m */; };
+		6173AECE1BAAC70200854D49 /* NTESBirthSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AECC1BAAC70200854D49 /* NTESBirthSettingViewController.m */; };
+		6173AED21BAAC8CF00854D49 /* NTESMobileSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AED11BAAC8CF00854D49 /* NTESMobileSettingViewController.m */; };
+		6173AED51BAAC8E700854D49 /* NTESEmailSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AED41BAAC8E700854D49 /* NTESEmailSettingViewController.m */; };
+		6173AED81BAAC8F500854D49 /* NTESSignSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AED71BAAC8F500854D49 /* NTESSignSettingViewController.m */; };
+		6173AEDB1BAAD03900854D49 /* NTESUserUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 6173AEDA1BAAD03900854D49 /* NTESUserUtil.m */; };
+		61775E931C571FE500C1DA03 /* NTESLiveActionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61775E921C571FE500C1DA03 /* NTESLiveActionView.m */; };
+		617D015D1AEDE03900C6DB77 /* UIImage+NTESColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 617D015C1AEDE03900C6DB77 /* UIImage+NTESColor.m */; };
+		61839A9B1BF9B60400702DF0 /* NTESFPSLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 61839A9A1BF9B60400702DF0 /* NTESFPSLabel.m */; };
+		6185D2991BAAFBAF0046F90F /* NTESSettingCheckCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6185D2981BAAFBAF0046F90F /* NTESSettingCheckCell.m */; };
+		619087091BABE5D400F3A0C7 /* NTESDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 619087081BABE5D400F3A0C7 /* NTESDevice.m */; };
+		619586811C19717B00858434 /* NTESChatroomListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 619586801C19717B00858434 /* NTESChatroomListViewController.m */; };
+		6195CD201A8C4D3C00F3E239 /* NSString+NTES.m in Sources */ = {isa = PBXBuildFile; fileRef = 6195CD1F1A8C4D3C00F3E239 /* NSString+NTES.m */; };
+		61A1422F1AD7B02E00DCAD88 /* NSDictionary+NTESJson.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A1422E1AD7B02E00DCAD88 /* NSDictionary+NTESJson.m */; };
+		61A18A4B1DC73B96001FD538 /* NIMKitEmoticon.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 61A18A4A1DC73B96001FD538 /* NIMKitEmoticon.bundle */; };
+		61A18A4D1DC74448001FD538 /* NIMKitResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 61A18A4C1DC74448001FD538 /* NIMKitResource.bundle */; };
+		61A8EF341BB67F0900033FB8 /* UIResponder+NTESFirstResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A8EF331BB67F0900033FB8 /* UIResponder+NTESFirstResponder.m */; };
+		61AE12861DD95947005980B5 /* libNIMKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61AE12851DD95947005980B5 /* libNIMKit.a */; };
+		61AEC12A1BD69C6E00B00F02 /* NTESSessionCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61AEC1291BD69C6E00B00F02 /* NTESSessionCardViewController.m */; };
+		61AF8CE11C55170900BFC84F /* UIScrollView+NTESDirection.m in Sources */ = {isa = PBXBuildFile; fileRef = 61AF8CE01C55170900BFC84F /* UIScrollView+NTESDirection.m */; };
+		61B2AEFD1BB9530F0093F532 /* NTESCardPortraitCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B2AEFC1BB9530F0093F532 /* NTESCardPortraitCell.m */; };
+		61B5D7EB1C21331600B52DBF /* NTESPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B5D7EA1C21331600B52DBF /* NTESPageView.m */; };
+		61C2CE521C489F0D00D76104 /* NTESChatroomManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C2CE511C489F0D00D76104 /* NTESChatroomManager.m */; };
+		61CF576F1A787DB000B43072 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61CF576E1A787DB000B43072 /* MobileCoreServices.framework */; };
+		61DA56FF1B53E33F00828B8A /* UIImage+NTES.m in Sources */ = {isa = PBXBuildFile; fileRef = 61DA56FE1B53E33F00828B8A /* UIImage+NTES.m */; };
+		61E1311D1C1A6778009AFEF1 /* NTESChatroomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E1311C1C1A6778009AFEF1 /* NTESChatroomViewController.m */; };
+		61E470F61B7D963E00F4A1BF /* NTESColorButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E46FFD1B7D963E00F4A1BF /* NTESColorButtonCell.m */; };
+		61E471021B7D963E00F4A1BF /* NTESJionTeamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470131B7D963E00F4A1BF /* NTESJionTeamViewController.m */; };
+		61E471031B7D963E00F4A1BF /* NTESJionTeamViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470141B7D963E00F4A1BF /* NTESJionTeamViewController.xib */; };
+		61E471071B7D963E00F4A1BF /* NTESSearchTeamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4701B1B7D963E00F4A1BF /* NTESSearchTeamViewController.m */; };
+		61E471081B7D963E00F4A1BF /* NTESSearchTeamViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E4701C1B7D963E00F4A1BF /* NTESSearchTeamViewController.xib */; };
+		61E4710C1B7D963E00F4A1BF /* NTESTeamListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470231B7D963E00F4A1BF /* NTESTeamListViewController.m */; };
+		61E4710D1B7D963E00F4A1BF /* NTESTeamListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470241B7D963E00F4A1BF /* NTESTeamListViewController.xib */; };
+		61E471111B7D963E00F4A1BF /* NTESCustomSysNotificationSender.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4702D1B7D963E00F4A1BF /* NTESCustomSysNotificationSender.m */; };
+		61E471131B7D963E00F4A1BF /* NTESGroupedContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470321B7D963E00F4A1BF /* NTESGroupedContacts.m */; };
+		61E471141B7D963E00F4A1BF /* NTESGroupedDataCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470341B7D963E00F4A1BF /* NTESGroupedDataCollection.m */; };
+		61E471151B7D963E00F4A1BF /* NTESGroupedUsrInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470361B7D963E00F4A1BF /* NTESGroupedUsrInfo.m */; };
+		61E471191B7D963E00F4A1BF /* NTESContactUtilCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470401B7D963E00F4A1BF /* NTESContactUtilCell.m */; };
+		61E4711A1B7D963E00F4A1BF /* NTESContactUtilItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470421B7D963E00F4A1BF /* NTESContactUtilItem.m */; };
+		61E4711D1B7D963E00F4A1BF /* NTESContactViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470491B7D963E00F4A1BF /* NTESContactViewController.m */; };
+		61E4711E1B7D963E00F4A1BF /* NTESContactViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E4704A1B7D963E00F4A1BF /* NTESContactViewController.xib */; };
+		61E4711F1B7D963E00F4A1BF /* NTESCustomNotificationDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4704E1B7D963E00F4A1BF /* NTESCustomNotificationDB.m */; };
+		61E471201B7D963E00F4A1BF /* NTESCustomNotificationObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470511B7D963E00F4A1BF /* NTESCustomNotificationObject.m */; };
+		61E471211B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470531B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.m */; };
+		61E471221B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470541B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.xib */; };
+		61E471231B7D963E00F4A1BF /* NTESSystemNotificationCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470561B7D963E00F4A1BF /* NTESSystemNotificationCell.m */; };
+		61E471241B7D963E00F4A1BF /* NTESSystemNotificationCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470571B7D963E00F4A1BF /* NTESSystemNotificationCell.xib */; };
+		61E471251B7D963E00F4A1BF /* NTESSystemNotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470591B7D963E00F4A1BF /* NTESSystemNotificationViewController.m */; };
+		61E471261B7D963E00F4A1BF /* NTESSystemNotificationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E4705A1B7D963E00F4A1BF /* NTESSystemNotificationViewController.xib */; };
+		61E471281B7D963E00F4A1BF /* NTESLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470601B7D963E00F4A1BF /* NTESLoginManager.m */; };
+		61E4712A1B7D963E00F4A1BF /* NTESLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470651B7D963E00F4A1BF /* NTESLoginViewController.m */; };
+		61E4712B1B7D963E00F4A1BF /* NTESLoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470661B7D963E00F4A1BF /* NTESLoginViewController.xib */; };
+		61E4712C1B7D963E00F4A1BF /* NTESRegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470681B7D963E00F4A1BF /* NTESRegisterViewController.m */; };
+		61E4712D1B7D963E00F4A1BF /* NTESRegisterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470691B7D963E00F4A1BF /* NTESRegisterViewController.xib */; };
+		61E4712E1B7D963E00F4A1BF /* NTESSessionConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4706D1B7D963E00F4A1BF /* NTESSessionConfig.m */; };
+		61E4712F1B7D963E00F4A1BF /* NTESChartletAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470711B7D963E00F4A1BF /* NTESChartletAttachment.m */; };
+		61E471301B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470731B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.m */; };
+		61E471311B7D963E00F4A1BF /* NTESJanKenPonAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470761B7D963E00F4A1BF /* NTESJanKenPonAttachment.m */; };
+		61E471331B7D963E00F4A1BF /* NTESSearchLocalHistoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4707A1B7D963E00F4A1BF /* NTESSearchLocalHistoryObject.m */; };
+		61E471341B7D963E00F4A1BF /* NTESSessionMsgConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4707D1B7D963E00F4A1BF /* NTESSessionMsgConverter.m */; };
+		61E471351B7D963E00F4A1BF /* NTESSnapchatAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4707F1B7D963E00F4A1BF /* NTESSnapchatAttachment.m */; };
+		61E471361B7D963E00F4A1BF /* NTESWhiteboardAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470811B7D963E00F4A1BF /* NTESWhiteboardAttachment.m */; };
+		61E471391B7D963E00F4A1BF /* NTESSearchMessageContentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4708C1B7D963E00F4A1BF /* NTESSearchMessageContentCell.m */; };
+		61E4713A1B7D963E00F4A1BF /* NTESSearchMessageEntraceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4708E1B7D963E00F4A1BF /* NTESSearchMessageEntraceCell.m */; };
+		61E4713B1B7D963E00F4A1BF /* NTESSessionChartletContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470911B7D963E00F4A1BF /* NTESSessionChartletContentView.m */; };
+		61E4713C1B7D963E00F4A1BF /* NTESSessionJankenponContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470931B7D963E00F4A1BF /* NTESSessionJankenponContentView.m */; };
+		61E4713D1B7D963E00F4A1BF /* NTESSessionSnapchatContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470951B7D963E00F4A1BF /* NTESSessionSnapchatContentView.m */; };
+		61E4713E1B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470971B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.m */; };
+		61E4713F1B7D963E00F4A1BF /* NTESAudio2TextViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4709B1B7D963E00F4A1BF /* NTESAudio2TextViewController.m */; };
+		61E471401B7D963E00F4A1BF /* NTESAudio2TextViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E4709C1B7D963E00F4A1BF /* NTESAudio2TextViewController.xib */; };
+		61E471411B7D963E00F4A1BF /* NTESFilePreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4709F1B7D963E00F4A1BF /* NTESFilePreViewController.m */; };
+		61E471421B7D963E00F4A1BF /* NTESFilePreViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470A01B7D963E00F4A1BF /* NTESFilePreViewController.xib */; };
+		61E471431B7D963E00F4A1BF /* NTESFileTransSelectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470A21B7D963E00F4A1BF /* NTESFileTransSelectViewController.m */; };
+		61E471441B7D963E00F4A1BF /* NTESFileTransSelectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470A31B7D963E00F4A1BF /* NTESFileTransSelectViewController.xib */; };
+		61E471451B7D963E00F4A1BF /* NTESGalleryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470A61B7D963E00F4A1BF /* NTESGalleryViewController.m */; };
+		61E471461B7D963E00F4A1BF /* NTESGalleryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470A71B7D963E00F4A1BF /* NTESGalleryViewController.xib */; };
+		61E471491B7D963E00F4A1BF /* NTESSessionLocalHistoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470AD1B7D963E00F4A1BF /* NTESSessionLocalHistoryViewController.m */; };
+		61E4714A1B7D963E00F4A1BF /* NTESSessionRemoteHistoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470AF1B7D963E00F4A1BF /* NTESSessionRemoteHistoryViewController.m */; };
+		61E4714C1B7D963E00F4A1BF /* NTESWhiteboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470B41B7D963E00F4A1BF /* NTESWhiteboardViewController.m */; };
+		61E4714D1B7D963E00F4A1BF /* NTESWhiteboardViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470B51B7D963E00F4A1BF /* NTESWhiteboardViewController.xib */; };
+		61E4714E1B7D963E00F4A1BF /* NTESWhiteboardDrawView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470B81B7D963E00F4A1BF /* NTESWhiteboardDrawView.m */; };
+		61E4714F1B7D963E00F4A1BF /* NTESVideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470BB1B7D963E00F4A1BF /* NTESVideoViewController.m */; };
+		61E471501B7D963E00F4A1BF /* NTESVideoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470BC1B7D963E00F4A1BF /* NTESVideoViewController.xib */; };
+		61E471511B7D963E00F4A1BF /* NetCallChatInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470C01B7D963E00F4A1BF /* NetCallChatInfo.m */; };
+		61E471521B7D963E00F4A1BF /* NTESAudioChatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470C21B7D963E00F4A1BF /* NTESAudioChatViewController.m */; };
+		61E471531B7D963E00F4A1BF /* NTESAudioChatViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470C31B7D963E00F4A1BF /* NTESAudioChatViewController.xib */; };
+		61E471541B7D963E00F4A1BF /* NTESNetChatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470C51B7D963E00F4A1BF /* NTESNetChatViewController.m */; };
+		61E471551B7D963E00F4A1BF /* NTESVideoChatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470C71B7D963E00F4A1BF /* NTESVideoChatViewController.m */; };
+		61E471561B7D963E00F4A1BF /* NTESVideoChatViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470C81B7D963E00F4A1BF /* NTESVideoChatViewController.xib */; };
+		61E471571B7D963E00F4A1BF /* NTESVideoChatNetStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470CB1B7D963E00F4A1BF /* NTESVideoChatNetStatusView.m */; };
+		61E471581B7D963E00F4A1BF /* NTESMutiClientsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470D01B7D963E00F4A1BF /* NTESMutiClientsCell.m */; };
+		61E471591B7D963E00F4A1BF /* NTESMutiClientsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470D11B7D963E00F4A1BF /* NTESMutiClientsCell.xib */; };
+		61E4715A1B7D963E00F4A1BF /* NTESMutiClientsHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470D41B7D963E00F4A1BF /* NTESMutiClientsHeaderView.m */; };
+		61E4715B1B7D963E00F4A1BF /* NTESTextHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470D61B7D963E00F4A1BF /* NTESTextHeaderView.m */; };
+		61E4715C1B7D963E00F4A1BF /* NTESListHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470D81B7D963E00F4A1BF /* NTESListHeader.m */; };
+		61E4715D1B7D963E00F4A1BF /* NTESClientsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470DB1B7D963E00F4A1BF /* NTESClientsTableViewController.m */; };
+		61E4715E1B7D963E00F4A1BF /* NTESSessionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470DD1B7D963E00F4A1BF /* NTESSessionListViewController.m */; };
+		61E4715F1B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470E11B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.m */; };
+		61E471601B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470E21B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.xib */; };
+		61E471611B7D963E00F4A1BF /* NTESNoDisturbTimeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470E51B7D963E00F4A1BF /* NTESNoDisturbTimeCell.m */; };
+		61E471621B7D963E00F4A1BF /* NTESAboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470E71B7D963E00F4A1BF /* NTESAboutViewController.m */; };
+		61E471631B7D963E00F4A1BF /* NTESAboutViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470E81B7D963E00F4A1BF /* NTESAboutViewController.xib */; };
+		61E471641B7D963E00F4A1BF /* NTESSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470EA1B7D963E00F4A1BF /* NTESSettingViewController.m */; };
+		61E471651B7D963E00F4A1BF /* NTESSettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61E470EB1B7D963E00F4A1BF /* NTESSettingViewController.xib */; };
+		61E471661B7D963E00F4A1BF /* NTESSettingPortraitCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470EE1B7D963E00F4A1BF /* NTESSettingPortraitCell.m */; };
+		61E471671B7D963E00F4A1BF /* NTESSettingSwitcherCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470F01B7D963E00F4A1BF /* NTESSettingSwitcherCell.m */; };
+		61E4718A1B7D96AA00F4A1BF /* NTESBundleSetting.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4716C1B7D96AA00F4A1BF /* NTESBundleSetting.m */; };
+		61E4718B1B7D96AA00F4A1BF /* NTESClientUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4716E1B7D96AA00F4A1BF /* NTESClientUtil.m */; };
+		61E4718D1B7D96AA00F4A1BF /* NTESDemoConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E471721B7D96AA00F4A1BF /* NTESDemoConfig.m */; };
+		61E4718E1B7D96AA00F4A1BF /* NTESFileLocationHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E471741B7D96AA00F4A1BF /* NTESFileLocationHelper.m */; };
+		61E471931B7D96AA00F4A1BF /* NTESNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4717D1B7D96AA00F4A1BF /* NTESNotificationCenter.m */; };
+		61E471941B7D96AA00F4A1BF /* NTESService.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E4717F1B7D96AA00F4A1BF /* NTESService.m */; };
+		61E471951B7D96AA00F4A1BF /* NTESSessionUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E471811B7D96AA00F4A1BF /* NTESSessionUtil.m */; };
+		61E471961B7D96AA00F4A1BF /* NTESTimerHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E471831B7D96AA00F4A1BF /* NTESTimerHolder.m */; };
+		61E471971B7D96AA00F4A1BF /* NTESPinyinConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E471861B7D96AA00F4A1BF /* NTESPinyinConverter.m */; };
+		61E471981B7D96AA00F4A1BF /* NTESSpellingCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E471881B7D96AA00F4A1BF /* NTESSpellingCenter.m */; };
+		61E4719C1B7D9C8300F4A1BF /* NTESSessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E470B11B7D963E00F4A1BF /* NTESSessionViewController.m */; };
+		61E7B5021DCC832A00F19E83 /* NIMKitSettings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 61E7B5011DCC832A00F19E83 /* NIMKitSettings.bundle */; };
+		61E7B5881DCF39E200F19E83 /* NTESSessionTipContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E7B5871DCF39E200F19E83 /* NTESSessionTipContentView.m */; };
+		61E8F90E1AA169F000F51DAF /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61E8F90C1AA169B700F51DAF /* MapKit.framework */; };
+		61E8F9121AA16E5300F51DAF /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61E8F9111AA16E5300F51DAF /* CoreLocation.framework */; };
+		61EAD9081B82D0A2005DC715 /* NTESTextSettingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EAD9071B82D0A2005DC715 /* NTESTextSettingCell.m */; };
+		61EAD9121B82F275005DC715 /* NTESContactAddFriendViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EAD9111B82F275005DC715 /* NTESContactAddFriendViewController.m */; };
+		61EAD9151B82FEE9005DC715 /* NTESPersonalCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EAD9141B82FEE9005DC715 /* NTESPersonalCardViewController.m */; };
+		61EAD9181B833C4E005DC715 /* NTESBlackListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EAD9171B833C4E005DC715 /* NTESBlackListViewController.m */; };
+		61EAD91B1B834E72005DC715 /* NTESUserListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EAD91A1B834E72005DC715 /* NTESUserListCell.m */; };
+		61ED4F461AE4FA020073DBD9 /* Files in Resources */ = {isa = PBXBuildFile; fileRef = 61ED4F451AE4FA020073DBD9 /* Files */; };
+		61EEE7701C22865D00022315 /* NTESLiveInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EEE76F1C22865D00022315 /* NTESLiveInfoViewController.m */; };
+		61EEE7731C22917400022315 /* NTESChatroomMemberListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EEE7721C22917400022315 /* NTESChatroomMemberListViewController.m */; };
+		61EEE7761C22964500022315 /* NTESLiveMasterInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EEE7751C22964500022315 /* NTESLiveMasterInfoView.m */; };
+		61EEE7791C22AEB300022315 /* NTESLiveBroadcastView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EEE7781C22AEB300022315 /* NTESLiveBroadcastView.m */; };
+		61FB27711C4E70AA0086E0EB /* NTESChatroomMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 61FB27701C4E70AA0086E0EB /* NTESChatroomMaker.m */; };
+		834FE0141E272E56008F218F /* NTESSessionPeekViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 834FE0131E272E56008F218F /* NTESSessionPeekViewController.m */; };
+		8351CB721E977D9000DF4866 /* NTESContactDataCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8351CB711E977D9000DF4866 /* NTESContactDataCell.m */; };
+		83F32B731E94EFE200E594E0 /* NTESSubscribeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 83F32B721E94EFE200E594E0 /* NTESSubscribeManager.m */; };
+		86B7F5B61AE88C040040A547 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86B7F5B51AE88C040040A547 /* CoreTelephony.framework */; };
+		907DBE851E5C777300317C36 /* NTESRecordSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 907DBE841E5C777300317C36 /* NTESRecordSelectView.m */; };
+		9B2726C0A3FC2E1873247A6B /* libPods-NIMDemo-NIM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74D3CBBCCF66D9A6D453BB43 /* libPods-NIMDemo-NIM.a */; };
+		AE2AA6851A7CD35C00CFF013 /* UIView+NTES.m in Sources */ = {isa = PBXBuildFile; fileRef = AE2AA6841A7CD35C00CFF013 /* UIView+NTES.m */; };
+		AE5882F61A6F47E10070536A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AE5882F51A6F47E10070536A /* Images.xcassets */; };
+		AE58995A1A6FA7AC0070536A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE5899591A6FA7AC0070536A /* SystemConfiguration.framework */; };
+		AEA87FE11A81CAD600ACC3BA /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEA87FE01A81CAD500ACC3BA /* AVFoundation.framework */; };
+		BD52DB3E1B8F300E00434D0E /* NTESCADisplayLinkHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = BD52DB3D1B8F300E00434D0E /* NTESCADisplayLinkHolder.m */; };
+		BD73C07F1D9905D200F1C436 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BD73C07E1D9905D200F1C436 /* libc++.tbd */; };
+		BDA64F1A1CA38A3800BCF04D /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BDA64F191CA38A3800BCF04D /* VideoToolbox.framework */; };
+		BDB02D261E09172F00262A50 /* NTESNetDetectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BDB02D241E09172F00262A50 /* NTESNetDetectViewController.m */; };
+		BDB02D271E09172F00262A50 /* NTESNetDetectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BDB02D251E09172F00262A50 /* NTESNetDetectViewController.xib */; };
+		BDB0FC691BA7E6D30066654D /* NTESGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = BDB0FC681BA7E6D30066654D /* NTESGLView.m */; };
+		C40F4C4B1EF15BC7002B197A /* GiftTopBarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = C40F4C4A1EF15BC7002B197A /* GiftTopBarItem.m */; };
+		C41B6EF81EEFB30D00AD1F53 /* RechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C41B6EF71EEFB30D00AD1F53 /* RechargeViewController.m */; };
+		C41B6EFC1EEFB67500AD1F53 /* RechargeItem.m in Sources */ = {isa = PBXBuildFile; fileRef = C41B6EFB1EEFB67500AD1F53 /* RechargeItem.m */; };
+		C4A734601EE6BBD300D6489D /* GroupMoreTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4A7345F1EE6BBD300D6489D /* GroupMoreTableViewController.m */; };
+		C4A734631EE6D4DE00D6489D /* GroupMoreTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C4A734621EE6D4DE00D6489D /* GroupMoreTableViewCell.m */; };
+		C4A7D3661EE803E7009B5849 /* FriendViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4A7D3651EE803E6009B5849 /* FriendViewController.m */; };
+		C4B146391EF2351900819893 /* SettingTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4B146381EF2351900819893 /* SettingTableViewController.m */; };
+		C4B1463C1EF24E6300819893 /* SettingAccountViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4B1463B1EF24E6300819893 /* SettingAccountViewController.m */; };
+		C4B639511ED57DAB004288FC /* city.plist in Resources */ = {isa = PBXBuildFile; fileRef = C4B6394E1ED57DAB004288FC /* city.plist */; };
+		C4B639521ED57DAB004288FC /* PSCityPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = C4B639501ED57DAB004288FC /* PSCityPickerView.m */; };
+		C4B639571ED581E2004288FC /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = C4B639561ED581E2004288FC /* User.m */; };
+		C4D4C9261ED7C2A900ADD7B7 /* GroupTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C9251ED7C2A900ADD7B7 /* GroupTableViewCell.m */; };
+		C4D4C9321ED7C37F00ADD7B7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C9281ED7C37F00ADD7B7 /* AppDelegate.m */; };
+		C4D4C9331ED7C37F00ADD7B7 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C92A1ED7C37F00ADD7B7 /* LoginViewController.m */; };
+		C4D4C9341ED7C37F00ADD7B7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C92B1ED7C37F00ADD7B7 /* main.m */; };
+		C4D4C9351ED7C37F00ADD7B7 /* RegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C92D1ED7C37F00ADD7B7 /* RegisterViewController.m */; };
+		C4D4C9361ED7C37F00ADD7B7 /* TabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C92F1ED7C37F00ADD7B7 /* TabBarController.m */; };
+		C4D4C9371ED7C37F00ADD7B7 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C9311ED7C37F00ADD7B7 /* ViewController.m */; };
+		C4D4C93C1ED7C3DE00ADD7B7 /* CreateGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C9391ED7C3DE00ADD7B7 /* CreateGroupViewController.m */; };
+		C4D4C93D1ED7C3DE00ADD7B7 /* GroupTableController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C93B1ED7C3DE00ADD7B7 /* GroupTableController.m */; };
+		C4D4C9401ED81F2100ADD7B7 /* CityPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D4C93F1ED81F2100ADD7B7 /* CityPickerViewController.m */; };
+		C4D8F12C1ED48657002F9F3A /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8F1201ED48657002F9F3A /* AFHTTPSessionManager.m */; };
+		C4D8F12D1ED48657002F9F3A /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8F1231ED48657002F9F3A /* AFNetworkReachabilityManager.m */; };
+		C4D8F12E1ED48657002F9F3A /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8F1251ED48657002F9F3A /* AFSecurityPolicy.m */; };
+		C4D8F12F1ED48657002F9F3A /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8F1271ED48657002F9F3A /* AFURLRequestSerialization.m */; };
+		C4D8F1301ED48658002F9F3A /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8F1291ED48657002F9F3A /* AFURLResponseSerialization.m */; };
+		C4D8F1311ED48658002F9F3A /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8F12B1ED48657002F9F3A /* AFURLSessionManager.m */; };
+		C4D8F1511ED48840002F9F3A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C4D8F14D1ED4883F002F9F3A /* LaunchScreen.storyboard */; };
+		C4D8F1521ED48840002F9F3A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C4D8F14F1ED48840002F9F3A /* Main.storyboard */; };
+		E4168E291B6A364800F3D35D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4168E281B6A364800F3D35D /* AudioToolbox.framework */; };
+		E4168E2B1B6A364F00F3D35D /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4168E2A1B6A364F00F3D35D /* CoreMedia.framework */; };
+		E4562D8B1CE0855A00D66909 /* NTESSDKConfigDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E4562D8A1CE0855A00D66909 /* NTESSDKConfigDelegate.m */; };
+		E45E177A1CA8CB6200C4ED69 /* NTESLogUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = E45E17791CA8CB6200C4ED69 /* NTESLogUploader.m */; };
+		E45E17801CA8CBA500C4ED69 /* NTESLogManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E45E177C1CA8CBA500C4ED69 /* NTESLogManager.m */; };
+		E45E17811CA8CBA500C4ED69 /* NTESLogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E45E177E1CA8CBA500C4ED69 /* NTESLogViewController.m */; };
+		E45E17821CA8CBA500C4ED69 /* NTESLogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E45E177F1CA8CBA500C4ED69 /* NTESLogViewController.xib */; };
+		E48988E81DE42353001CF6C5 /* NTESCellLayoutConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = E48988E71DE42353001CF6C5 /* NTESCellLayoutConfig.m */; };
+		E48988EB1DE42391001CF6C5 /* NTESSessionCustomContentConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = E48988EA1DE42391001CF6C5 /* NTESSessionCustomContentConfig.m */; };
+		E48988EE1DE4263D001CF6C5 /* NTESChatroomTextContentConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = E48988ED1DE4263D001CF6C5 /* NTESChatroomTextContentConfig.m */; };
+		E49D53C11B451C7400A869AC /* NSData+NTES.m in Sources */ = {isa = PBXBuildFile; fileRef = E49D53C01B451C7400A869AC /* NSData+NTES.m */; };
+		E4ED12DD1B6B07EA00316496 /* message.wav in Resources */ = {isa = PBXBuildFile; fileRef = E4ED12DC1B6B07EA00316496 /* message.wav */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		03A4C9FB1AC2B79700E45E03 /* UIAlertView+NTESBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+NTESBlock.m"; sourceTree = "<group>"; };
+		03A4C9FC1AC2B79700E45E03 /* UIActionSheet+NTESBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIActionSheet+NTESBlock.h"; sourceTree = "<group>"; };
+		03A4C9FD1AC2B79700E45E03 /* UIActionSheet+NTESBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIActionSheet+NTESBlock.m"; sourceTree = "<group>"; };
+		03A4C9FE1AC2B79700E45E03 /* UIAlertView+NTESBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+NTESBlock.h"; sourceTree = "<group>"; };
+		610037311D9290170095C53B /* NIMDev.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = NIMDev.entitlements; sourceTree = "<group>"; };
+		610037321D9290170095C53B /* NIMPro.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = NIMPro.entitlements; sourceTree = "<group>"; };
+		610B1DFB1AFDDE04006454EA /* video_connect_chat_tip_sender.aac */ = {isa = PBXFileReference; lastKnownFileType = file; path = video_connect_chat_tip_sender.aac; sourceTree = "<group>"; };
+		610B1DFD1AFDDE04006454EA /* video_chat_tip_HangUp.aac */ = {isa = PBXFileReference; lastKnownFileType = file; path = video_chat_tip_HangUp.aac; sourceTree = "<group>"; };
+		610B1DFE1AFDDE04006454EA /* video_chat_tip_OnCall.aac */ = {isa = PBXFileReference; lastKnownFileType = file; path = video_chat_tip_OnCall.aac; sourceTree = "<group>"; };
+		610B1DFF1AFDDE04006454EA /* video_chat_tip_onTimer.aac */ = {isa = PBXFileReference; lastKnownFileType = file; path = video_chat_tip_onTimer.aac; sourceTree = "<group>"; };
+		610B1E001AFDDE04006454EA /* video_chat_tip_receiver.aac */ = {isa = PBXFileReference; lastKnownFileType = file; path = video_chat_tip_receiver.aac; sourceTree = "<group>"; };
+		610B1E011AFDDE04006454EA /* video_chat_tip_sender.aac */ = {isa = PBXFileReference; lastKnownFileType = file; path = video_chat_tip_sender.aac; sourceTree = "<group>"; };
+		610B5FBD1BADCCCD001F7EFB /* NTESBirthPickerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESBirthPickerView.h; sourceTree = "<group>"; };
+		610B5FBE1BADCCCD001F7EFB /* NTESBirthPickerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESBirthPickerView.m; sourceTree = "<group>"; };
+		6110D8A71C23E76D00805BA4 /* NTESChatroomMemberCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomMemberCell.h; sourceTree = "<group>"; };
+		6110D8A81C23E76D00805BA4 /* NTESChatroomMemberCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomMemberCell.m; sourceTree = "<group>"; };
+		6110D8B31C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+NTESPullToRefresh.h"; sourceTree = "<group>"; };
+		6110D8B41C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+NTESPullToRefresh.m"; sourceTree = "<group>"; };
+		6117562C1BEB6978006A1589 /* NTESAliasSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESAliasSettingViewController.h; sourceTree = "<group>"; };
+		6117562D1BEB6978006A1589 /* NTESAliasSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESAliasSettingViewController.m; sourceTree = "<group>"; };
+		6118F59B1C5A0FC1009AF01E /* SwizzlingDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwizzlingDefine.h; sourceTree = "<group>"; };
+		6118F59C1C5A0FC1009AF01E /* UINavigationBar+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationBar+Swizzling.h"; sourceTree = "<group>"; };
+		6118F59D1C5A0FC1009AF01E /* UINavigationBar+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationBar+Swizzling.m"; sourceTree = "<group>"; };
+		6118F59E1C5A0FC1009AF01E /* UINavigationController+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+Swizzling.h"; sourceTree = "<group>"; };
+		6118F59F1C5A0FC1009AF01E /* UINavigationController+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+Swizzling.m"; sourceTree = "<group>"; };
+		6118F5A01C5A0FC1009AF01E /* UINavigationItem+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationItem+Swizzling.h"; sourceTree = "<group>"; };
+		6118F5A11C5A0FC1009AF01E /* UINavigationItem+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationItem+Swizzling.m"; sourceTree = "<group>"; };
+		6118F5A21C5A0FC1009AF01E /* UIView+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Swizzling.h"; sourceTree = "<group>"; };
+		6118F5A31C5A0FC1009AF01E /* UIView+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Swizzling.m"; sourceTree = "<group>"; };
+		6118F5A41C5A0FC1009AF01E /* UIViewController+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Swizzling.h"; sourceTree = "<group>"; };
+		6118F5A51C5A0FC1009AF01E /* UIViewController+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Swizzling.m"; sourceTree = "<group>"; };
+		611ABEF21B3CF4FC00B8706C /* NTESAvatarImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESAvatarImageView.h; sourceTree = "<group>"; };
+		611ABEF31B3CF4FC00B8706C /* NTESAvatarImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = NTESAvatarImageView.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
+		611ABEF41B3CF4FC00B8706C /* NTESBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESBadgeView.h; sourceTree = "<group>"; };
+		611ABEF51B3CF4FC00B8706C /* NTESBadgeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESBadgeView.m; sourceTree = "<group>"; };
+		611ABEFA1B3CF4FC00B8706C /* NTESMarginButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESMarginButton.h; sourceTree = "<group>"; };
+		611ABEFB1B3CF4FC00B8706C /* NTESMarginButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESMarginButton.m; sourceTree = "<group>"; };
+		611ABF101B42321600B8706C /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Settings.bundle; path = ../../Settings.bundle; sourceTree = "<group>"; };
+		61206EE51C1E607B009E4C78 /* NTESChatroomListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomListCell.h; sourceTree = "<group>"; };
+		61206EE61C1E607B009E4C78 /* NTESChatroomListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomListCell.m; sourceTree = "<group>"; };
+		612CACEC1BB1484C00C348B5 /* NTESContactDataMember.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESContactDataMember.h; sourceTree = "<group>"; };
+		612CACED1BB1484C00C348B5 /* NTESContactDataMember.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESContactDataMember.m; sourceTree = "<group>"; };
+		612FA9531C1EC202008956C9 /* NTESChatroomMessageDataProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomMessageDataProvider.h; sourceTree = "<group>"; };
+		612FA9541C1EC202008956C9 /* NTESChatroomMessageDataProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomMessageDataProvider.m; sourceTree = "<group>"; };
+		613A2FE81C21016600508990 /* NTESChatroomSegmentedControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomSegmentedControl.h; sourceTree = "<group>"; };
+		613A2FE91C21016600508990 /* NTESChatroomSegmentedControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomSegmentedControl.m; sourceTree = "<group>"; };
+		613A2FEB1C21049E00508990 /* NTESLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLiveViewController.h; sourceTree = "<group>"; };
+		613A2FEC1C21049E00508990 /* NTESLiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLiveViewController.m; sourceTree = "<group>"; };
+		61518A461CA233390061C4A9 /* NTESNavigationAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNavigationAnimator.h; sourceTree = "<group>"; };
+		61518A471CA233390061C4A9 /* NTESNavigationAnimator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNavigationAnimator.m; sourceTree = "<group>"; };
+		61518A481CA233390061C4A9 /* NTESNavigationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNavigationHandler.h; sourceTree = "<group>"; };
+		61518A491CA233390061C4A9 /* NTESNavigationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNavigationHandler.m; sourceTree = "<group>"; };
+		61518A4D1CA233BB0061C4A9 /* NTESDemoFetchChatroomTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESDemoFetchChatroomTask.h; sourceTree = "<group>"; };
+		61518A4E1CA233BB0061C4A9 /* NTESDemoFetchChatroomTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESDemoFetchChatroomTask.m; sourceTree = "<group>"; };
+		61518A4F1CA233BB0061C4A9 /* NTESDemoRegisterTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESDemoRegisterTask.h; sourceTree = "<group>"; };
+		61518A501CA233BB0061C4A9 /* NTESDemoRegisterTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESDemoRegisterTask.m; sourceTree = "<group>"; };
+		61518A511CA233BB0061C4A9 /* NTESDemoService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESDemoService.h; sourceTree = "<group>"; };
+		61518A521CA233BB0061C4A9 /* NTESDemoService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESDemoService.m; sourceTree = "<group>"; };
+		61518A531CA233BB0061C4A9 /* NTESDemoServiceTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESDemoServiceTask.h; sourceTree = "<group>"; };
+		61518A581CA234590061C4A9 /* NTESMainTabController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESMainTabController.h; sourceTree = "<group>"; };
+		61518A591CA234590061C4A9 /* NTESMainTabController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESMainTabController.m; sourceTree = "<group>"; };
+		61530BE61BABAD3B00FE50CC /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; };
+		61530BEA1BABAD8200FE50CC /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
+		6159DF501C45F79D00E32EB4 /* NTESChatroomConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomConfig.h; sourceTree = "<group>"; };
+		6159DF511C45F79D00E32EB4 /* NTESChatroomConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomConfig.m; sourceTree = "<group>"; };
+		6159DF581C45FAF500E32EB4 /* NTESChatroomTextContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomTextContentView.h; sourceTree = "<group>"; };
+		6159DF591C45FAF500E32EB4 /* NTESChatroomTextContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomTextContentView.m; sourceTree = "<group>"; };
+		6173AEBE1BAAB91C00854D49 /* NTESNickNameSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNickNameSettingViewController.h; sourceTree = "<group>"; };
+		6173AEBF1BAAB91C00854D49 /* NTESNickNameSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNickNameSettingViewController.m; sourceTree = "<group>"; };
+		6173AEC11BAAB94400854D49 /* NTESUserInfoSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESUserInfoSettingViewController.h; sourceTree = "<group>"; };
+		6173AEC21BAAB94400854D49 /* NTESUserInfoSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESUserInfoSettingViewController.m; sourceTree = "<group>"; };
+		6173AEC31BAAB94400854D49 /* NTESUserInfoSettingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESUserInfoSettingViewController.xib; sourceTree = "<group>"; };
+		6173AEC61BAAC6CB00854D49 /* NTESGenderSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESGenderSettingViewController.h; sourceTree = "<group>"; };
+		6173AEC71BAAC6CB00854D49 /* NTESGenderSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESGenderSettingViewController.m; sourceTree = "<group>"; };
+		6173AECB1BAAC70200854D49 /* NTESBirthSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESBirthSettingViewController.h; sourceTree = "<group>"; };
+		6173AECC1BAAC70200854D49 /* NTESBirthSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESBirthSettingViewController.m; sourceTree = "<group>"; };
+		6173AED01BAAC8CF00854D49 /* NTESMobileSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESMobileSettingViewController.h; sourceTree = "<group>"; };
+		6173AED11BAAC8CF00854D49 /* NTESMobileSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESMobileSettingViewController.m; sourceTree = "<group>"; };
+		6173AED31BAAC8E700854D49 /* NTESEmailSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESEmailSettingViewController.h; sourceTree = "<group>"; };
+		6173AED41BAAC8E700854D49 /* NTESEmailSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESEmailSettingViewController.m; sourceTree = "<group>"; };
+		6173AED61BAAC8F500854D49 /* NTESSignSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSignSettingViewController.h; sourceTree = "<group>"; };
+		6173AED71BAAC8F500854D49 /* NTESSignSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSignSettingViewController.m; sourceTree = "<group>"; };
+		6173AED91BAAD03900854D49 /* NTESUserUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESUserUtil.h; sourceTree = "<group>"; };
+		6173AEDA1BAAD03900854D49 /* NTESUserUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESUserUtil.m; sourceTree = "<group>"; };
+		61775E911C571FE500C1DA03 /* NTESLiveActionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLiveActionView.h; sourceTree = "<group>"; };
+		61775E921C571FE500C1DA03 /* NTESLiveActionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLiveActionView.m; sourceTree = "<group>"; };
+		617D015B1AEDE03900C6DB77 /* UIImage+NTESColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+NTESColor.h"; sourceTree = "<group>"; };
+		617D015C1AEDE03900C6DB77 /* UIImage+NTESColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+NTESColor.m"; sourceTree = "<group>"; };
+		61839A991BF9B60400702DF0 /* NTESFPSLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESFPSLabel.h; sourceTree = "<group>"; };
+		61839A9A1BF9B60400702DF0 /* NTESFPSLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESFPSLabel.m; sourceTree = "<group>"; };
+		6185D2971BAAFBAF0046F90F /* NTESSettingCheckCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSettingCheckCell.h; sourceTree = "<group>"; };
+		6185D2981BAAFBAF0046F90F /* NTESSettingCheckCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSettingCheckCell.m; sourceTree = "<group>"; };
+		619087071BABE5D400F3A0C7 /* NTESDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESDevice.h; sourceTree = "<group>"; };
+		619087081BABE5D400F3A0C7 /* NTESDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESDevice.m; sourceTree = "<group>"; };
+		6195867F1C19717B00858434 /* NTESChatroomListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomListViewController.h; sourceTree = "<group>"; };
+		619586801C19717B00858434 /* NTESChatroomListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomListViewController.m; sourceTree = "<group>"; };
+		6195CD1E1A8C4D3C00F3E239 /* NSString+NTES.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+NTES.h"; sourceTree = "<group>"; };
+		6195CD1F1A8C4D3C00F3E239 /* NSString+NTES.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+NTES.m"; sourceTree = "<group>"; };
+		6195CD3E1A8C74DB00F3E239 /* NTESGlobalMacro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NTESGlobalMacro.h; sourceTree = "<group>"; };
+		61A1422D1AD7B02E00DCAD88 /* NSDictionary+NTESJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+NTESJson.h"; sourceTree = "<group>"; };
+		61A1422E1AD7B02E00DCAD88 /* NSDictionary+NTESJson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+NTESJson.m"; sourceTree = "<group>"; };
+		61A18A4A1DC73B96001FD538 /* NIMKitEmoticon.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = NIMKitEmoticon.bundle; sourceTree = "<group>"; };
+		61A18A4C1DC74448001FD538 /* NIMKitResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = NIMKitResource.bundle; sourceTree = "<group>"; };
+		61A8EF321BB67F0900033FB8 /* UIResponder+NTESFirstResponder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIResponder+NTESFirstResponder.h"; sourceTree = "<group>"; };
+		61A8EF331BB67F0900033FB8 /* UIResponder+NTESFirstResponder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIResponder+NTESFirstResponder.m"; sourceTree = "<group>"; };
+		61AE12851DD95947005980B5 /* libNIMKit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libNIMKit.a; path = "../../Library/Developer/Xcode/DerivedData/NIM-dgcpmwyjurnubraszivacbojoxmy/Build/Products/Debug-iphonesimulator/libNIMKit.a"; sourceTree = "<group>"; };
+		61AEC1281BD69C6E00B00F02 /* NTESSessionCardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionCardViewController.h; sourceTree = "<group>"; };
+		61AEC1291BD69C6E00B00F02 /* NTESSessionCardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionCardViewController.m; sourceTree = "<group>"; };
+		61AF8CDF1C55170900BFC84F /* UIScrollView+NTESDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+NTESDirection.h"; sourceTree = "<group>"; };
+		61AF8CE01C55170900BFC84F /* UIScrollView+NTESDirection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+NTESDirection.m"; sourceTree = "<group>"; };
+		61B2AEFB1BB9530F0093F532 /* NTESCardPortraitCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCardPortraitCell.h; sourceTree = "<group>"; };
+		61B2AEFC1BB9530F0093F532 /* NTESCardPortraitCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCardPortraitCell.m; sourceTree = "<group>"; };
+		61B5D7E91C21331600B52DBF /* NTESPageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESPageView.h; sourceTree = "<group>"; };
+		61B5D7EA1C21331600B52DBF /* NTESPageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESPageView.m; sourceTree = "<group>"; };
+		61C2CE501C489F0D00D76104 /* NTESChatroomManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomManager.h; sourceTree = "<group>"; };
+		61C2CE511C489F0D00D76104 /* NTESChatroomManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomManager.m; sourceTree = "<group>"; };
+		61CF576E1A787DB000B43072 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		61DA56FD1B53E33F00828B8A /* UIImage+NTES.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+NTES.h"; sourceTree = "<group>"; };
+		61DA56FE1B53E33F00828B8A /* UIImage+NTES.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+NTES.m"; sourceTree = "<group>"; };
+		61E1311B1C1A6778009AFEF1 /* NTESChatroomViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomViewController.h; sourceTree = "<group>"; };
+		61E1311C1C1A6778009AFEF1 /* NTESChatroomViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomViewController.m; sourceTree = "<group>"; };
+		61E46FFC1B7D963E00F4A1BF /* NTESColorButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESColorButtonCell.h; sourceTree = "<group>"; };
+		61E46FFD1B7D963E00F4A1BF /* NTESColorButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESColorButtonCell.m; sourceTree = "<group>"; };
+		61E470121B7D963E00F4A1BF /* NTESJionTeamViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESJionTeamViewController.h; sourceTree = "<group>"; };
+		61E470131B7D963E00F4A1BF /* NTESJionTeamViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESJionTeamViewController.m; sourceTree = "<group>"; };
+		61E470141B7D963E00F4A1BF /* NTESJionTeamViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESJionTeamViewController.xib; sourceTree = "<group>"; };
+		61E4701A1B7D963E00F4A1BF /* NTESSearchTeamViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSearchTeamViewController.h; sourceTree = "<group>"; };
+		61E4701B1B7D963E00F4A1BF /* NTESSearchTeamViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSearchTeamViewController.m; sourceTree = "<group>"; };
+		61E4701C1B7D963E00F4A1BF /* NTESSearchTeamViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESSearchTeamViewController.xib; sourceTree = "<group>"; };
+		61E470221B7D963E00F4A1BF /* NTESTeamListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESTeamListViewController.h; sourceTree = "<group>"; };
+		61E470231B7D963E00F4A1BF /* NTESTeamListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESTeamListViewController.m; sourceTree = "<group>"; };
+		61E470241B7D963E00F4A1BF /* NTESTeamListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESTeamListViewController.xib; sourceTree = "<group>"; };
+		61E4702C1B7D963E00F4A1BF /* NTESCustomSysNotificationSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCustomSysNotificationSender.h; sourceTree = "<group>"; };
+		61E4702D1B7D963E00F4A1BF /* NTESCustomSysNotificationSender.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCustomSysNotificationSender.m; sourceTree = "<group>"; };
+		61E470311B7D963E00F4A1BF /* NTESGroupedContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESGroupedContacts.h; sourceTree = "<group>"; };
+		61E470321B7D963E00F4A1BF /* NTESGroupedContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESGroupedContacts.m; sourceTree = "<group>"; };
+		61E470331B7D963E00F4A1BF /* NTESGroupedDataCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESGroupedDataCollection.h; sourceTree = "<group>"; };
+		61E470341B7D963E00F4A1BF /* NTESGroupedDataCollection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESGroupedDataCollection.m; sourceTree = "<group>"; };
+		61E470351B7D963E00F4A1BF /* NTESGroupedUsrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESGroupedUsrInfo.h; sourceTree = "<group>"; };
+		61E470361B7D963E00F4A1BF /* NTESGroupedUsrInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESGroupedUsrInfo.m; sourceTree = "<group>"; };
+		61E4703C1B7D963E00F4A1BF /* NTESContactDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESContactDefines.h; sourceTree = "<group>"; };
+		61E4703F1B7D963E00F4A1BF /* NTESContactUtilCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESContactUtilCell.h; sourceTree = "<group>"; };
+		61E470401B7D963E00F4A1BF /* NTESContactUtilCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESContactUtilCell.m; sourceTree = "<group>"; };
+		61E470411B7D963E00F4A1BF /* NTESContactUtilItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESContactUtilItem.h; sourceTree = "<group>"; };
+		61E470421B7D963E00F4A1BF /* NTESContactUtilItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESContactUtilItem.m; sourceTree = "<group>"; };
+		61E470481B7D963E00F4A1BF /* NTESContactViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESContactViewController.h; sourceTree = "<group>"; };
+		61E470491B7D963E00F4A1BF /* NTESContactViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESContactViewController.m; sourceTree = "<group>"; };
+		61E4704A1B7D963E00F4A1BF /* NTESContactViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESContactViewController.xib; sourceTree = "<group>"; };
+		61E4704D1B7D963E00F4A1BF /* NTESCustomNotificationDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCustomNotificationDB.h; sourceTree = "<group>"; };
+		61E4704E1B7D963E00F4A1BF /* NTESCustomNotificationDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCustomNotificationDB.m; sourceTree = "<group>"; };
+		61E470501B7D963E00F4A1BF /* NTESCustomNotificationObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCustomNotificationObject.h; sourceTree = "<group>"; };
+		61E470511B7D963E00F4A1BF /* NTESCustomNotificationObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCustomNotificationObject.m; sourceTree = "<group>"; };
+		61E470521B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCustomSysNotificationViewController.h; sourceTree = "<group>"; };
+		61E470531B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCustomSysNotificationViewController.m; sourceTree = "<group>"; };
+		61E470541B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESCustomSysNotificationViewController.xib; sourceTree = "<group>"; };
+		61E470551B7D963E00F4A1BF /* NTESSystemNotificationCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSystemNotificationCell.h; sourceTree = "<group>"; };
+		61E470561B7D963E00F4A1BF /* NTESSystemNotificationCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSystemNotificationCell.m; sourceTree = "<group>"; };
+		61E470571B7D963E00F4A1BF /* NTESSystemNotificationCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESSystemNotificationCell.xib; sourceTree = "<group>"; };
+		61E470581B7D963E00F4A1BF /* NTESSystemNotificationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSystemNotificationViewController.h; sourceTree = "<group>"; };
+		61E470591B7D963E00F4A1BF /* NTESSystemNotificationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSystemNotificationViewController.m; sourceTree = "<group>"; };
+		61E4705A1B7D963E00F4A1BF /* NTESSystemNotificationViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESSystemNotificationViewController.xib; sourceTree = "<group>"; };
+		61E4705F1B7D963E00F4A1BF /* NTESLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLoginManager.h; sourceTree = "<group>"; };
+		61E470601B7D963E00F4A1BF /* NTESLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLoginManager.m; sourceTree = "<group>"; };
+		61E470641B7D963E00F4A1BF /* NTESLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLoginViewController.h; sourceTree = "<group>"; };
+		61E470651B7D963E00F4A1BF /* NTESLoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLoginViewController.m; sourceTree = "<group>"; };
+		61E470661B7D963E00F4A1BF /* NTESLoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESLoginViewController.xib; sourceTree = "<group>"; };
+		61E470671B7D963E00F4A1BF /* NTESRegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESRegisterViewController.h; sourceTree = "<group>"; };
+		61E470681B7D963E00F4A1BF /* NTESRegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESRegisterViewController.m; sourceTree = "<group>"; };
+		61E470691B7D963E00F4A1BF /* NTESRegisterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESRegisterViewController.xib; sourceTree = "<group>"; };
+		61E4706C1B7D963E00F4A1BF /* NTESSessionConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionConfig.h; sourceTree = "<group>"; };
+		61E4706D1B7D963E00F4A1BF /* NTESSessionConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionConfig.m; sourceTree = "<group>"; };
+		61E470701B7D963E00F4A1BF /* NTESChartletAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChartletAttachment.h; sourceTree = "<group>"; };
+		61E470711B7D963E00F4A1BF /* NTESChartletAttachment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChartletAttachment.m; sourceTree = "<group>"; };
+		61E470721B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCustomAttachmentDecoder.h; sourceTree = "<group>"; };
+		61E470731B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCustomAttachmentDecoder.m; sourceTree = "<group>"; };
+		61E470741B7D963E00F4A1BF /* NTESCustomAttachmentDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCustomAttachmentDefines.h; sourceTree = "<group>"; };
+		61E470751B7D963E00F4A1BF /* NTESJanKenPonAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESJanKenPonAttachment.h; sourceTree = "<group>"; };
+		61E470761B7D963E00F4A1BF /* NTESJanKenPonAttachment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESJanKenPonAttachment.m; sourceTree = "<group>"; };
+		61E470791B7D963E00F4A1BF /* NTESSearchLocalHistoryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSearchLocalHistoryObject.h; sourceTree = "<group>"; };
+		61E4707A1B7D963E00F4A1BF /* NTESSearchLocalHistoryObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSearchLocalHistoryObject.m; sourceTree = "<group>"; };
+		61E4707B1B7D963E00F4A1BF /* NTESSessionFileStatusProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionFileStatusProtocol.h; sourceTree = "<group>"; };
+		61E4707C1B7D963E00F4A1BF /* NTESSessionMsgConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionMsgConverter.h; sourceTree = "<group>"; };
+		61E4707D1B7D963E00F4A1BF /* NTESSessionMsgConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionMsgConverter.m; sourceTree = "<group>"; };
+		61E4707E1B7D963E00F4A1BF /* NTESSnapchatAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSnapchatAttachment.h; sourceTree = "<group>"; };
+		61E4707F1B7D963E00F4A1BF /* NTESSnapchatAttachment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSnapchatAttachment.m; sourceTree = "<group>"; };
+		61E470801B7D963E00F4A1BF /* NTESWhiteboardAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESWhiteboardAttachment.h; sourceTree = "<group>"; };
+		61E470811B7D963E00F4A1BF /* NTESWhiteboardAttachment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESWhiteboardAttachment.m; sourceTree = "<group>"; };
+		61E4708A1B7D963E00F4A1BF /* NTESSearchCellLayoutConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSearchCellLayoutConstant.h; sourceTree = "<group>"; };
+		61E4708B1B7D963E00F4A1BF /* NTESSearchMessageContentCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSearchMessageContentCell.h; sourceTree = "<group>"; };
+		61E4708C1B7D963E00F4A1BF /* NTESSearchMessageContentCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSearchMessageContentCell.m; sourceTree = "<group>"; };
+		61E4708D1B7D963E00F4A1BF /* NTESSearchMessageEntraceCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSearchMessageEntraceCell.h; sourceTree = "<group>"; };
+		61E4708E1B7D963E00F4A1BF /* NTESSearchMessageEntraceCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSearchMessageEntraceCell.m; sourceTree = "<group>"; };
+		61E470901B7D963E00F4A1BF /* NTESSessionChartletContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionChartletContentView.h; sourceTree = "<group>"; };
+		61E470911B7D963E00F4A1BF /* NTESSessionChartletContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionChartletContentView.m; sourceTree = "<group>"; };
+		61E470921B7D963E00F4A1BF /* NTESSessionJankenponContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionJankenponContentView.h; sourceTree = "<group>"; };
+		61E470931B7D963E00F4A1BF /* NTESSessionJankenponContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionJankenponContentView.m; sourceTree = "<group>"; };
+		61E470941B7D963E00F4A1BF /* NTESSessionSnapchatContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionSnapchatContentView.h; sourceTree = "<group>"; };
+		61E470951B7D963E00F4A1BF /* NTESSessionSnapchatContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionSnapchatContentView.m; sourceTree = "<group>"; };
+		61E470961B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionWhiteBoardContentView.h; sourceTree = "<group>"; };
+		61E470971B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionWhiteBoardContentView.m; sourceTree = "<group>"; };
+		61E4709A1B7D963E00F4A1BF /* NTESAudio2TextViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESAudio2TextViewController.h; sourceTree = "<group>"; };
+		61E4709B1B7D963E00F4A1BF /* NTESAudio2TextViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESAudio2TextViewController.m; sourceTree = "<group>"; };
+		61E4709C1B7D963E00F4A1BF /* NTESAudio2TextViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESAudio2TextViewController.xib; sourceTree = "<group>"; };
+		61E4709E1B7D963E00F4A1BF /* NTESFilePreViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESFilePreViewController.h; sourceTree = "<group>"; };
+		61E4709F1B7D963E00F4A1BF /* NTESFilePreViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESFilePreViewController.m; sourceTree = "<group>"; };
+		61E470A01B7D963E00F4A1BF /* NTESFilePreViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESFilePreViewController.xib; sourceTree = "<group>"; };
+		61E470A11B7D963E00F4A1BF /* NTESFileTransSelectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESFileTransSelectViewController.h; sourceTree = "<group>"; };
+		61E470A21B7D963E00F4A1BF /* NTESFileTransSelectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESFileTransSelectViewController.m; sourceTree = "<group>"; };
+		61E470A31B7D963E00F4A1BF /* NTESFileTransSelectViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESFileTransSelectViewController.xib; sourceTree = "<group>"; };
+		61E470A51B7D963E00F4A1BF /* NTESGalleryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESGalleryViewController.h; sourceTree = "<group>"; };
+		61E470A61B7D963E00F4A1BF /* NTESGalleryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESGalleryViewController.m; sourceTree = "<group>"; };
+		61E470A71B7D963E00F4A1BF /* NTESGalleryViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESGalleryViewController.xib; sourceTree = "<group>"; };
+		61E470AC1B7D963E00F4A1BF /* NTESSessionLocalHistoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionLocalHistoryViewController.h; sourceTree = "<group>"; };
+		61E470AD1B7D963E00F4A1BF /* NTESSessionLocalHistoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionLocalHistoryViewController.m; sourceTree = "<group>"; };
+		61E470AE1B7D963E00F4A1BF /* NTESSessionRemoteHistoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionRemoteHistoryViewController.h; sourceTree = "<group>"; };
+		61E470AF1B7D963E00F4A1BF /* NTESSessionRemoteHistoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionRemoteHistoryViewController.m; sourceTree = "<group>"; };
+		61E470B01B7D963E00F4A1BF /* NTESSessionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionViewController.h; sourceTree = "<group>"; };
+		61E470B11B7D963E00F4A1BF /* NTESSessionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionViewController.m; sourceTree = "<group>"; };
+		61E470B31B7D963E00F4A1BF /* NTESWhiteboardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESWhiteboardViewController.h; sourceTree = "<group>"; };
+		61E470B41B7D963E00F4A1BF /* NTESWhiteboardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESWhiteboardViewController.m; sourceTree = "<group>"; };
+		61E470B51B7D963E00F4A1BF /* NTESWhiteboardViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESWhiteboardViewController.xib; sourceTree = "<group>"; };
+		61E470B71B7D963E00F4A1BF /* NTESWhiteboardDrawView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESWhiteboardDrawView.h; sourceTree = "<group>"; };
+		61E470B81B7D963E00F4A1BF /* NTESWhiteboardDrawView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESWhiteboardDrawView.m; sourceTree = "<group>"; };
+		61E470BA1B7D963E00F4A1BF /* NTESVideoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESVideoViewController.h; sourceTree = "<group>"; };
+		61E470BB1B7D963E00F4A1BF /* NTESVideoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESVideoViewController.m; sourceTree = "<group>"; };
+		61E470BC1B7D963E00F4A1BF /* NTESVideoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESVideoViewController.xib; sourceTree = "<group>"; };
+		61E470BF1B7D963E00F4A1BF /* NetCallChatInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetCallChatInfo.h; sourceTree = "<group>"; };
+		61E470C01B7D963E00F4A1BF /* NetCallChatInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetCallChatInfo.m; sourceTree = "<group>"; };
+		61E470C11B7D963E00F4A1BF /* NTESAudioChatViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESAudioChatViewController.h; sourceTree = "<group>"; };
+		61E470C21B7D963E00F4A1BF /* NTESAudioChatViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESAudioChatViewController.m; sourceTree = "<group>"; };
+		61E470C31B7D963E00F4A1BF /* NTESAudioChatViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESAudioChatViewController.xib; sourceTree = "<group>"; };
+		61E470C41B7D963E00F4A1BF /* NTESNetChatViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNetChatViewController.h; sourceTree = "<group>"; };
+		61E470C51B7D963E00F4A1BF /* NTESNetChatViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNetChatViewController.m; sourceTree = "<group>"; };
+		61E470C61B7D963E00F4A1BF /* NTESVideoChatViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESVideoChatViewController.h; sourceTree = "<group>"; };
+		61E470C71B7D963E00F4A1BF /* NTESVideoChatViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESVideoChatViewController.m; sourceTree = "<group>"; };
+		61E470C81B7D963E00F4A1BF /* NTESVideoChatViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESVideoChatViewController.xib; sourceTree = "<group>"; };
+		61E470CA1B7D963E00F4A1BF /* NTESVideoChatNetStatusView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESVideoChatNetStatusView.h; sourceTree = "<group>"; };
+		61E470CB1B7D963E00F4A1BF /* NTESVideoChatNetStatusView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESVideoChatNetStatusView.m; sourceTree = "<group>"; };
+		61E470CF1B7D963E00F4A1BF /* NTESMutiClientsCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESMutiClientsCell.h; sourceTree = "<group>"; };
+		61E470D01B7D963E00F4A1BF /* NTESMutiClientsCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESMutiClientsCell.m; sourceTree = "<group>"; };
+		61E470D11B7D963E00F4A1BF /* NTESMutiClientsCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESMutiClientsCell.xib; sourceTree = "<group>"; };
+		61E470D31B7D963E00F4A1BF /* NTESMutiClientsHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESMutiClientsHeaderView.h; sourceTree = "<group>"; };
+		61E470D41B7D963E00F4A1BF /* NTESMutiClientsHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESMutiClientsHeaderView.m; sourceTree = "<group>"; };
+		61E470D51B7D963E00F4A1BF /* NTESTextHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESTextHeaderView.h; sourceTree = "<group>"; };
+		61E470D61B7D963E00F4A1BF /* NTESTextHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESTextHeaderView.m; sourceTree = "<group>"; };
+		61E470D71B7D963E00F4A1BF /* NTESListHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESListHeader.h; sourceTree = "<group>"; };
+		61E470D81B7D963E00F4A1BF /* NTESListHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESListHeader.m; sourceTree = "<group>"; };
+		61E470DA1B7D963E00F4A1BF /* NTESClientsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESClientsTableViewController.h; sourceTree = "<group>"; };
+		61E470DB1B7D963E00F4A1BF /* NTESClientsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESClientsTableViewController.m; sourceTree = "<group>"; };
+		61E470DC1B7D963E00F4A1BF /* NTESSessionListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionListViewController.h; sourceTree = "<group>"; };
+		61E470DD1B7D963E00F4A1BF /* NTESSessionListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionListViewController.m; sourceTree = "<group>"; };
+		61E470E01B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNoDisturbSettingViewController.h; sourceTree = "<group>"; };
+		61E470E11B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNoDisturbSettingViewController.m; sourceTree = "<group>"; };
+		61E470E21B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESNoDisturbSettingViewController.xib; sourceTree = "<group>"; };
+		61E470E41B7D963E00F4A1BF /* NTESNoDisturbTimeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNoDisturbTimeCell.h; sourceTree = "<group>"; };
+		61E470E51B7D963E00F4A1BF /* NTESNoDisturbTimeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNoDisturbTimeCell.m; sourceTree = "<group>"; };
+		61E470E61B7D963E00F4A1BF /* NTESAboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESAboutViewController.h; sourceTree = "<group>"; };
+		61E470E71B7D963E00F4A1BF /* NTESAboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESAboutViewController.m; sourceTree = "<group>"; };
+		61E470E81B7D963E00F4A1BF /* NTESAboutViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESAboutViewController.xib; sourceTree = "<group>"; };
+		61E470E91B7D963E00F4A1BF /* NTESSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSettingViewController.h; sourceTree = "<group>"; };
+		61E470EA1B7D963E00F4A1BF /* NTESSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSettingViewController.m; sourceTree = "<group>"; };
+		61E470EB1B7D963E00F4A1BF /* NTESSettingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESSettingViewController.xib; sourceTree = "<group>"; };
+		61E470ED1B7D963E00F4A1BF /* NTESSettingPortraitCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSettingPortraitCell.h; sourceTree = "<group>"; };
+		61E470EE1B7D963E00F4A1BF /* NTESSettingPortraitCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSettingPortraitCell.m; sourceTree = "<group>"; };
+		61E470EF1B7D963E00F4A1BF /* NTESSettingSwitcherCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSettingSwitcherCell.h; sourceTree = "<group>"; };
+		61E470F01B7D963E00F4A1BF /* NTESSettingSwitcherCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSettingSwitcherCell.m; sourceTree = "<group>"; };
+		61E4716B1B7D96AA00F4A1BF /* NTESBundleSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESBundleSetting.h; sourceTree = "<group>"; };
+		61E4716C1B7D96AA00F4A1BF /* NTESBundleSetting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESBundleSetting.m; sourceTree = "<group>"; };
+		61E4716D1B7D96AA00F4A1BF /* NTESClientUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESClientUtil.h; sourceTree = "<group>"; };
+		61E4716E1B7D96AA00F4A1BF /* NTESClientUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESClientUtil.m; sourceTree = "<group>"; };
+		61E471711B7D96AA00F4A1BF /* NTESDemoConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESDemoConfig.h; sourceTree = "<group>"; };
+		61E471721B7D96AA00F4A1BF /* NTESDemoConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESDemoConfig.m; sourceTree = "<group>"; };
+		61E471731B7D96AA00F4A1BF /* NTESFileLocationHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESFileLocationHelper.h; sourceTree = "<group>"; };
+		61E471741B7D96AA00F4A1BF /* NTESFileLocationHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESFileLocationHelper.m; sourceTree = "<group>"; };
+		61E4717C1B7D96AA00F4A1BF /* NTESNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNotificationCenter.h; sourceTree = "<group>"; };
+		61E4717D1B7D96AA00F4A1BF /* NTESNotificationCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNotificationCenter.m; sourceTree = "<group>"; };
+		61E4717E1B7D96AA00F4A1BF /* NTESService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESService.h; sourceTree = "<group>"; };
+		61E4717F1B7D96AA00F4A1BF /* NTESService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESService.m; sourceTree = "<group>"; };
+		61E471801B7D96AA00F4A1BF /* NTESSessionUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionUtil.h; sourceTree = "<group>"; };
+		61E471811B7D96AA00F4A1BF /* NTESSessionUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionUtil.m; sourceTree = "<group>"; };
+		61E471821B7D96AA00F4A1BF /* NTESTimerHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESTimerHolder.h; sourceTree = "<group>"; };
+		61E471831B7D96AA00F4A1BF /* NTESTimerHolder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESTimerHolder.m; sourceTree = "<group>"; };
+		61E471851B7D96AA00F4A1BF /* NTESPinyinConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESPinyinConverter.h; sourceTree = "<group>"; };
+		61E471861B7D96AA00F4A1BF /* NTESPinyinConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESPinyinConverter.m; sourceTree = "<group>"; };
+		61E471871B7D96AA00F4A1BF /* NTESSpellingCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSpellingCenter.h; sourceTree = "<group>"; };
+		61E471881B7D96AA00F4A1BF /* NTESSpellingCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSpellingCenter.m; sourceTree = "<group>"; };
+		61E7B5011DCC832A00F19E83 /* NIMKitSettings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = NIMKitSettings.bundle; sourceTree = "<group>"; };
+		61E7B5861DCF39E200F19E83 /* NTESSessionTipContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionTipContentView.h; sourceTree = "<group>"; };
+		61E7B5871DCF39E200F19E83 /* NTESSessionTipContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionTipContentView.m; sourceTree = "<group>"; };
+		61E8F90C1AA169B700F51DAF /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
+		61E8F9111AA16E5300F51DAF /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		61EAD9061B82D0A2005DC715 /* NTESTextSettingCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESTextSettingCell.h; sourceTree = "<group>"; };
+		61EAD9071B82D0A2005DC715 /* NTESTextSettingCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESTextSettingCell.m; sourceTree = "<group>"; };
+		61EAD9101B82F275005DC715 /* NTESContactAddFriendViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESContactAddFriendViewController.h; sourceTree = "<group>"; };
+		61EAD9111B82F275005DC715 /* NTESContactAddFriendViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESContactAddFriendViewController.m; sourceTree = "<group>"; };
+		61EAD9131B82FEE9005DC715 /* NTESPersonalCardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESPersonalCardViewController.h; sourceTree = "<group>"; };
+		61EAD9141B82FEE9005DC715 /* NTESPersonalCardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESPersonalCardViewController.m; sourceTree = "<group>"; };
+		61EAD9161B833C4E005DC715 /* NTESBlackListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESBlackListViewController.h; sourceTree = "<group>"; };
+		61EAD9171B833C4E005DC715 /* NTESBlackListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESBlackListViewController.m; sourceTree = "<group>"; };
+		61EAD9191B834E72005DC715 /* NTESUserListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESUserListCell.h; sourceTree = "<group>"; };
+		61EAD91A1B834E72005DC715 /* NTESUserListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESUserListCell.m; sourceTree = "<group>"; };
+		61ED4F451AE4FA020073DBD9 /* Files */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Files; sourceTree = "<group>"; };
+		61EEE76E1C22865D00022315 /* NTESLiveInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLiveInfoViewController.h; sourceTree = "<group>"; };
+		61EEE76F1C22865D00022315 /* NTESLiveInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLiveInfoViewController.m; sourceTree = "<group>"; };
+		61EEE7711C22917400022315 /* NTESChatroomMemberListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomMemberListViewController.h; sourceTree = "<group>"; };
+		61EEE7721C22917400022315 /* NTESChatroomMemberListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomMemberListViewController.m; sourceTree = "<group>"; };
+		61EEE7741C22964500022315 /* NTESLiveMasterInfoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLiveMasterInfoView.h; sourceTree = "<group>"; };
+		61EEE7751C22964500022315 /* NTESLiveMasterInfoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLiveMasterInfoView.m; sourceTree = "<group>"; };
+		61EEE7771C22AEB300022315 /* NTESLiveBroadcastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLiveBroadcastView.h; sourceTree = "<group>"; };
+		61EEE7781C22AEB300022315 /* NTESLiveBroadcastView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLiveBroadcastView.m; sourceTree = "<group>"; };
+		61FB276F1C4E70AA0086E0EB /* NTESChatroomMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomMaker.h; sourceTree = "<group>"; };
+		61FB27701C4E70AA0086E0EB /* NTESChatroomMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomMaker.m; sourceTree = "<group>"; };
+		74D3CBBCCF66D9A6D453BB43 /* libPods-NIMDemo-NIM.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NIMDemo-NIM.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		834FE0121E272E56008F218F /* NTESSessionPeekViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionPeekViewController.h; sourceTree = "<group>"; };
+		834FE0131E272E56008F218F /* NTESSessionPeekViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionPeekViewController.m; sourceTree = "<group>"; };
+		8351CB701E977D9000DF4866 /* NTESContactDataCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESContactDataCell.h; sourceTree = "<group>"; };
+		8351CB711E977D9000DF4866 /* NTESContactDataCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESContactDataCell.m; sourceTree = "<group>"; };
+		83F32B711E94EFE200E594E0 /* NTESSubscribeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSubscribeManager.h; sourceTree = "<group>"; };
+		83F32B721E94EFE200E594E0 /* NTESSubscribeManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSubscribeManager.m; sourceTree = "<group>"; };
+		83F32B741E94F05B00E594E0 /* NTESSubscribeDefine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NTESSubscribeDefine.h; sourceTree = "<group>"; };
+		86B7F5B51AE88C040040A547 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
+		907DBE831E5C777300317C36 /* NTESRecordSelectView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESRecordSelectView.h; sourceTree = "<group>"; };
+		907DBE841E5C777300317C36 /* NTESRecordSelectView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESRecordSelectView.m; sourceTree = "<group>"; };
+		AC6B8AE55C5B47CC8A2E7CA1 /* Pods-NIMDemo-NIM.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NIMDemo-NIM.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NIMDemo-NIM/Pods-NIMDemo-NIM.debug.xcconfig"; sourceTree = "<group>"; };
+		AE2AA6831A7CD35C00CFF013 /* UIView+NTES.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "UIView+NTES.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+		AE2AA6841A7CD35C00CFF013 /* UIView+NTES.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "UIView+NTES.m"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
+		AE5882E51A6F47E10070536A /* NIM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NIM.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		AE5882E91A6F47E10070536A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		AE5882F51A6F47E10070536A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+		AE5899591A6FA7AC0070536A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		AEA87FE01A81CAD500ACC3BA /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		AEB8367F1A772C2F00E7493E /* NIMDemo-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NIMDemo-Prefix.pch"; sourceTree = "<group>"; };
+		BD52DB3C1B8F300E00434D0E /* NTESCADisplayLinkHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCADisplayLinkHolder.h; sourceTree = "<group>"; };
+		BD52DB3D1B8F300E00434D0E /* NTESCADisplayLinkHolder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCADisplayLinkHolder.m; sourceTree = "<group>"; };
+		BD73C07E1D9905D200F1C436 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
+		BDA64F191CA38A3800BCF04D /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; };
+		BDB02D231E09172F00262A50 /* NTESNetDetectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESNetDetectViewController.h; sourceTree = "<group>"; };
+		BDB02D241E09172F00262A50 /* NTESNetDetectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESNetDetectViewController.m; sourceTree = "<group>"; };
+		BDB02D251E09172F00262A50 /* NTESNetDetectViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESNetDetectViewController.xib; sourceTree = "<group>"; };
+		BDB0FC671BA7E6D30066654D /* NTESGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESGLView.h; sourceTree = "<group>"; };
+		BDB0FC681BA7E6D30066654D /* NTESGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESGLView.m; sourceTree = "<group>"; };
+		C40F4C491EF15BC7002B197A /* GiftTopBarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiftTopBarItem.h; sourceTree = "<group>"; };
+		C40F4C4A1EF15BC7002B197A /* GiftTopBarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftTopBarItem.m; sourceTree = "<group>"; };
+		C41B6EF61EEFB30D00AD1F53 /* RechargeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RechargeViewController.h; sourceTree = "<group>"; };
+		C41B6EF71EEFB30D00AD1F53 /* RechargeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RechargeViewController.m; sourceTree = "<group>"; };
+		C41B6EFA1EEFB67500AD1F53 /* RechargeItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RechargeItem.h; sourceTree = "<group>"; };
+		C41B6EFB1EEFB67500AD1F53 /* RechargeItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RechargeItem.m; sourceTree = "<group>"; };
+		C4A7345E1EE6BBD300D6489D /* GroupMoreTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupMoreTableViewController.h; sourceTree = "<group>"; };
+		C4A7345F1EE6BBD300D6489D /* GroupMoreTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupMoreTableViewController.m; sourceTree = "<group>"; };
+		C4A734611EE6D4DE00D6489D /* GroupMoreTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupMoreTableViewCell.h; sourceTree = "<group>"; };
+		C4A734621EE6D4DE00D6489D /* GroupMoreTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupMoreTableViewCell.m; sourceTree = "<group>"; };
+		C4A7D3641EE803E6009B5849 /* FriendViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FriendViewController.h; sourceTree = "<group>"; };
+		C4A7D3651EE803E6009B5849 /* FriendViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FriendViewController.m; sourceTree = "<group>"; };
+		C4B146371EF2351900819893 /* SettingTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingTableViewController.h; sourceTree = "<group>"; };
+		C4B146381EF2351900819893 /* SettingTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingTableViewController.m; sourceTree = "<group>"; };
+		C4B1463A1EF24E6300819893 /* SettingAccountViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingAccountViewController.h; sourceTree = "<group>"; };
+		C4B1463B1EF24E6300819893 /* SettingAccountViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingAccountViewController.m; sourceTree = "<group>"; };
+		C4B6394E1ED57DAB004288FC /* city.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = city.plist; path = PSCityPickerView/city.plist; sourceTree = "<group>"; };
+		C4B6394F1ED57DAB004288FC /* PSCityPickerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PSCityPickerView.h; path = PSCityPickerView/PSCityPickerView.h; sourceTree = "<group>"; };
+		C4B639501ED57DAB004288FC /* PSCityPickerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PSCityPickerView.m; path = PSCityPickerView/PSCityPickerView.m; sourceTree = "<group>"; };
+		C4B639551ED581E2004288FC /* User.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = "<group>"; };
+		C4B639561ED581E2004288FC /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = User.m; sourceTree = "<group>"; };
+		C4D4C9241ED7C2A900ADD7B7 /* GroupTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupTableViewCell.h; sourceTree = "<group>"; };
+		C4D4C9251ED7C2A900ADD7B7 /* GroupTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupTableViewCell.m; sourceTree = "<group>"; };
+		C4D4C9271ED7C37F00ADD7B7 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		C4D4C9281ED7C37F00ADD7B7 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		C4D4C9291ED7C37F00ADD7B7 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
+		C4D4C92A1ED7C37F00ADD7B7 /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };
+		C4D4C92B1ED7C37F00ADD7B7 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../main.m; sourceTree = "<group>"; };
+		C4D4C92C1ED7C37F00ADD7B7 /* RegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterViewController.h; sourceTree = "<group>"; };
+		C4D4C92D1ED7C37F00ADD7B7 /* RegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterViewController.m; sourceTree = "<group>"; };
+		C4D4C92E1ED7C37F00ADD7B7 /* TabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TabBarController.h; sourceTree = "<group>"; };
+		C4D4C92F1ED7C37F00ADD7B7 /* TabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TabBarController.m; sourceTree = "<group>"; };
+		C4D4C9301ED7C37F00ADD7B7 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+		C4D4C9311ED7C37F00ADD7B7 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+		C4D4C9381ED7C3DE00ADD7B7 /* CreateGroupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CreateGroupViewController.h; sourceTree = "<group>"; };
+		C4D4C9391ED7C3DE00ADD7B7 /* CreateGroupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CreateGroupViewController.m; sourceTree = "<group>"; };
+		C4D4C93A1ED7C3DE00ADD7B7 /* GroupTableController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupTableController.h; sourceTree = "<group>"; };
+		C4D4C93B1ED7C3DE00ADD7B7 /* GroupTableController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupTableController.m; sourceTree = "<group>"; };
+		C4D4C93E1ED81F2100ADD7B7 /* CityPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CityPickerViewController.h; sourceTree = "<group>"; };
+		C4D4C93F1ED81F2100ADD7B7 /* CityPickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CityPickerViewController.m; sourceTree = "<group>"; };
+		C4D8F11F1ED48657002F9F3A /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFHTTPSessionManager.h; path = AFNetworking/AFHTTPSessionManager.h; sourceTree = "<group>"; };
+		C4D8F1201ED48657002F9F3A /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFHTTPSessionManager.m; path = AFNetworking/AFHTTPSessionManager.m; sourceTree = "<group>"; };
+		C4D8F1211ED48657002F9F3A /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = AFNetworking/AFNetworking.h; sourceTree = "<group>"; };
+		C4D8F1221ED48657002F9F3A /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = AFNetworking/AFNetworkReachabilityManager.h; sourceTree = "<group>"; };
+		C4D8F1231ED48657002F9F3A /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFNetworkReachabilityManager.m; path = AFNetworking/AFNetworkReachabilityManager.m; sourceTree = "<group>"; };
+		C4D8F1241ED48657002F9F3A /* AFSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = AFNetworking/AFSecurityPolicy.h; sourceTree = "<group>"; };
+		C4D8F1251ED48657002F9F3A /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFSecurityPolicy.m; path = AFNetworking/AFSecurityPolicy.m; sourceTree = "<group>"; };
+		C4D8F1261ED48657002F9F3A /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLRequestSerialization.h; path = AFNetworking/AFURLRequestSerialization.h; sourceTree = "<group>"; };
+		C4D8F1271ED48657002F9F3A /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = AFNetworking/AFURLRequestSerialization.m; sourceTree = "<group>"; };
+		C4D8F1281ED48657002F9F3A /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = AFNetworking/AFURLResponseSerialization.h; sourceTree = "<group>"; };
+		C4D8F1291ED48657002F9F3A /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = AFNetworking/AFURLResponseSerialization.m; sourceTree = "<group>"; };
+		C4D8F12A1ED48657002F9F3A /* AFURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLSessionManager.h; path = AFNetworking/AFURLSessionManager.h; sourceTree = "<group>"; };
+		C4D8F12B1ED48657002F9F3A /* AFURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLSessionManager.m; path = AFNetworking/AFURLSessionManager.m; sourceTree = "<group>"; };
+		C4D8F14E1ED48840002F9F3A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		C4D8F1501ED48840002F9F3A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		C716F6793D5D6D1604893032 /* Pods-NIMDemo-NIM.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NIMDemo-NIM.release.xcconfig"; path = "Pods/Target Support Files/Pods-NIMDemo-NIM/Pods-NIMDemo-NIM.release.xcconfig"; sourceTree = "<group>"; };
+		E4168E281B6A364800F3D35D /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		E4168E2A1B6A364F00F3D35D /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		E4562D891CE0855A00D66909 /* NTESSDKConfigDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSDKConfigDelegate.h; sourceTree = "<group>"; };
+		E4562D8A1CE0855A00D66909 /* NTESSDKConfigDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSDKConfigDelegate.m; sourceTree = "<group>"; };
+		E45E17781CA8CB6200C4ED69 /* NTESLogUploader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLogUploader.h; sourceTree = "<group>"; };
+		E45E17791CA8CB6200C4ED69 /* NTESLogUploader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLogUploader.m; sourceTree = "<group>"; };
+		E45E177B1CA8CBA500C4ED69 /* NTESLogManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLogManager.h; sourceTree = "<group>"; };
+		E45E177C1CA8CBA500C4ED69 /* NTESLogManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLogManager.m; sourceTree = "<group>"; };
+		E45E177D1CA8CBA500C4ED69 /* NTESLogViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESLogViewController.h; sourceTree = "<group>"; };
+		E45E177E1CA8CBA500C4ED69 /* NTESLogViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESLogViewController.m; sourceTree = "<group>"; };
+		E45E177F1CA8CBA500C4ED69 /* NTESLogViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NTESLogViewController.xib; sourceTree = "<group>"; };
+		E48988E61DE42353001CF6C5 /* NTESCellLayoutConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESCellLayoutConfig.h; sourceTree = "<group>"; };
+		E48988E71DE42353001CF6C5 /* NTESCellLayoutConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESCellLayoutConfig.m; sourceTree = "<group>"; };
+		E48988E91DE42391001CF6C5 /* NTESSessionCustomContentConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESSessionCustomContentConfig.h; sourceTree = "<group>"; };
+		E48988EA1DE42391001CF6C5 /* NTESSessionCustomContentConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESSessionCustomContentConfig.m; sourceTree = "<group>"; };
+		E48988EC1DE4263D001CF6C5 /* NTESChatroomTextContentConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTESChatroomTextContentConfig.h; sourceTree = "<group>"; };
+		E48988ED1DE4263D001CF6C5 /* NTESChatroomTextContentConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTESChatroomTextContentConfig.m; sourceTree = "<group>"; };
+		E49D53BF1B451C7400A869AC /* NSData+NTES.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+NTES.h"; sourceTree = "<group>"; };
+		E49D53C01B451C7400A869AC /* NSData+NTES.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+NTES.m"; sourceTree = "<group>"; };
+		E4E8D98F1BB131F20077AE60 /* nim_debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = nim_debug.xcconfig; sourceTree = "<group>"; };
+		E4E8D9901BB132040077AE60 /* nim_release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = nim_release.xcconfig; sourceTree = "<group>"; };
+		E4ED12DC1B6B07EA00316496 /* message.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = message.wav; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		AE5882E21A6F47E10070536A /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				61AE12861DD95947005980B5 /* libNIMKit.a in Frameworks */,
+				BD73C07F1D9905D200F1C436 /* libc++.tbd in Frameworks */,
+				61530BEB1BABAD8200FE50CC /* libz.tbd in Frameworks */,
+				61530BE71BABAD3B00FE50CC /* libsqlite3.0.tbd in Frameworks */,
+				BDA64F1A1CA38A3800BCF04D /* VideoToolbox.framework in Frameworks */,
+				E4168E2B1B6A364F00F3D35D /* CoreMedia.framework in Frameworks */,
+				E4168E291B6A364800F3D35D /* AudioToolbox.framework in Frameworks */,
+				86B7F5B61AE88C040040A547 /* CoreTelephony.framework in Frameworks */,
+				61E8F9121AA16E5300F51DAF /* CoreLocation.framework in Frameworks */,
+				61E8F90E1AA169F000F51DAF /* MapKit.framework in Frameworks */,
+				AEA87FE11A81CAD600ACC3BA /* AVFoundation.framework in Frameworks */,
+				61CF576F1A787DB000B43072 /* MobileCoreServices.framework in Frameworks */,
+				AE58995A1A6FA7AC0070536A /* SystemConfiguration.framework in Frameworks */,
+				9B2726C0A3FC2E1873247A6B /* libPods-NIMDemo-NIM.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		3134E0020A559A7F56597C29 /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				AC6B8AE55C5B47CC8A2E7CA1 /* Pods-NIMDemo-NIM.debug.xcconfig */,
+				C716F6793D5D6D1604893032 /* Pods-NIMDemo-NIM.release.xcconfig */,
+			);
+			name = Pods;
+			sourceTree = "<group>";
+		};
+		5176189D0086B38FE643A26A /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				61AE12851DD95947005980B5 /* libNIMKit.a */,
+				BD73C07E1D9905D200F1C436 /* libc++.tbd */,
+				BDA64F191CA38A3800BCF04D /* VideoToolbox.framework */,
+				61530BEA1BABAD8200FE50CC /* libz.tbd */,
+				61530BE61BABAD3B00FE50CC /* libsqlite3.0.tbd */,
+				E4168E2A1B6A364F00F3D35D /* CoreMedia.framework */,
+				E4168E281B6A364800F3D35D /* AudioToolbox.framework */,
+				86B7F5B51AE88C040040A547 /* CoreTelephony.framework */,
+				74D3CBBCCF66D9A6D453BB43 /* libPods-NIMDemo-NIM.a */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		610B1DFA1AFDDDDA006454EA /* Sounds */ = {
+			isa = PBXGroup;
+			children = (
+				E4ED12DC1B6B07EA00316496 /* message.wav */,
+				610B1DFB1AFDDE04006454EA /* video_connect_chat_tip_sender.aac */,
+				610B1DFD1AFDDE04006454EA /* video_chat_tip_HangUp.aac */,
+				610B1DFE1AFDDE04006454EA /* video_chat_tip_OnCall.aac */,
+				610B1DFF1AFDDE04006454EA /* video_chat_tip_onTimer.aac */,
+				610B1E001AFDDE04006454EA /* video_chat_tip_receiver.aac */,
+				610B1E011AFDDE04006454EA /* video_chat_tip_sender.aac */,
+			);
+			path = Sounds;
+			sourceTree = "<group>";
+		};
+		6118F59A1C5A0FC1009AF01E /* Addons */ = {
+			isa = PBXGroup;
+			children = (
+				6118F59B1C5A0FC1009AF01E /* SwizzlingDefine.h */,
+				6118F59C1C5A0FC1009AF01E /* UINavigationBar+Swizzling.h */,
+				6118F59D1C5A0FC1009AF01E /* UINavigationBar+Swizzling.m */,
+				6118F59E1C5A0FC1009AF01E /* UINavigationController+Swizzling.h */,
+				6118F59F1C5A0FC1009AF01E /* UINavigationController+Swizzling.m */,
+				6118F5A01C5A0FC1009AF01E /* UINavigationItem+Swizzling.h */,
+				6118F5A11C5A0FC1009AF01E /* UINavigationItem+Swizzling.m */,
+				6118F5A21C5A0FC1009AF01E /* UIView+Swizzling.h */,
+				6118F5A31C5A0FC1009AF01E /* UIView+Swizzling.m */,
+				6118F5A41C5A0FC1009AF01E /* UIViewController+Swizzling.h */,
+				6118F5A51C5A0FC1009AF01E /* UIViewController+Swizzling.m */,
+			);
+			path = Addons;
+			sourceTree = "<group>";
+		};
+		611ABEEA1B3CF4FC00B8706C /* Common */ = {
+			isa = PBXGroup;
+			children = (
+				61518A571CA234590061C4A9 /* Controller */,
+				6118F59A1C5A0FC1009AF01E /* Addons */,
+				61A665351B40ED41001D1EDB /* Delegate */,
+				611ABEF11B3CF4FC00B8706C /* View */,
+			);
+			path = Common;
+			sourceTree = "<group>";
+		};
+		611ABEF11B3CF4FC00B8706C /* View */ = {
+			isa = PBXGroup;
+			children = (
+				611ABEF21B3CF4FC00B8706C /* NTESAvatarImageView.h */,
+				611ABEF31B3CF4FC00B8706C /* NTESAvatarImageView.m */,
+				611ABEF41B3CF4FC00B8706C /* NTESBadgeView.h */,
+				611ABEF51B3CF4FC00B8706C /* NTESBadgeView.m */,
+				611ABEFA1B3CF4FC00B8706C /* NTESMarginButton.h */,
+				611ABEFB1B3CF4FC00B8706C /* NTESMarginButton.m */,
+				61839A991BF9B60400702DF0 /* NTESFPSLabel.h */,
+				61839A9A1BF9B60400702DF0 /* NTESFPSLabel.m */,
+				61B5D7E91C21331600B52DBF /* NTESPageView.h */,
+				61B5D7EA1C21331600B52DBF /* NTESPageView.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61206EE31C1E6053009E4C78 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61206EE41C1E6053009E4C78 /* Cell */,
+				6159DF571C45FAC500E32EB4 /* SessionContentView */,
+				613A2FE81C21016600508990 /* NTESChatroomSegmentedControl.h */,
+				613A2FE91C21016600508990 /* NTESChatroomSegmentedControl.m */,
+				61EEE7741C22964500022315 /* NTESLiveMasterInfoView.h */,
+				61EEE7751C22964500022315 /* NTESLiveMasterInfoView.m */,
+				61EEE7771C22AEB300022315 /* NTESLiveBroadcastView.h */,
+				61EEE7781C22AEB300022315 /* NTESLiveBroadcastView.m */,
+				61775E911C571FE500C1DA03 /* NTESLiveActionView.h */,
+				61775E921C571FE500C1DA03 /* NTESLiveActionView.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61206EE41C1E6053009E4C78 /* Cell */ = {
+			isa = PBXGroup;
+			children = (
+				61206EE51C1E607B009E4C78 /* NTESChatroomListCell.h */,
+				61206EE61C1E607B009E4C78 /* NTESChatroomListCell.m */,
+				6110D8A71C23E76D00805BA4 /* NTESChatroomMemberCell.h */,
+				6110D8A81C23E76D00805BA4 /* NTESChatroomMemberCell.m */,
+			);
+			path = Cell;
+			sourceTree = "<group>";
+		};
+		61518A4C1CA233BB0061C4A9 /* Service */ = {
+			isa = PBXGroup;
+			children = (
+				61518A4D1CA233BB0061C4A9 /* NTESDemoFetchChatroomTask.h */,
+				61518A4E1CA233BB0061C4A9 /* NTESDemoFetchChatroomTask.m */,
+				61518A4F1CA233BB0061C4A9 /* NTESDemoRegisterTask.h */,
+				61518A501CA233BB0061C4A9 /* NTESDemoRegisterTask.m */,
+				61518A511CA233BB0061C4A9 /* NTESDemoService.h */,
+				61518A521CA233BB0061C4A9 /* NTESDemoService.m */,
+				61518A531CA233BB0061C4A9 /* NTESDemoServiceTask.h */,
+			);
+			path = Service;
+			sourceTree = "<group>";
+		};
+		61518A571CA234590061C4A9 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				61518A581CA234590061C4A9 /* NTESMainTabController.h */,
+				61518A591CA234590061C4A9 /* NTESMainTabController.m */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		6159DF4D1C45F79D00E32EB4 /* Config */ = {
+			isa = PBXGroup;
+			children = (
+				6159DF501C45F79D00E32EB4 /* NTESChatroomConfig.h */,
+				6159DF511C45F79D00E32EB4 /* NTESChatroomConfig.m */,
+			);
+			path = Config;
+			sourceTree = "<group>";
+		};
+		6159DF571C45FAC500E32EB4 /* SessionContentView */ = {
+			isa = PBXGroup;
+			children = (
+				6159DF581C45FAF500E32EB4 /* NTESChatroomTextContentView.h */,
+				6159DF591C45FAF500E32EB4 /* NTESChatroomTextContentView.m */,
+			);
+			path = SessionContentView;
+			sourceTree = "<group>";
+		};
+		6173AEBD1BAAB91C00854D49 /* UInfo */ = {
+			isa = PBXGroup;
+			children = (
+				6173AEBE1BAAB91C00854D49 /* NTESNickNameSettingViewController.h */,
+				6173AEBF1BAAB91C00854D49 /* NTESNickNameSettingViewController.m */,
+				6173AEC11BAAB94400854D49 /* NTESUserInfoSettingViewController.h */,
+				6173AEC21BAAB94400854D49 /* NTESUserInfoSettingViewController.m */,
+				6173AEC31BAAB94400854D49 /* NTESUserInfoSettingViewController.xib */,
+				6173AEC61BAAC6CB00854D49 /* NTESGenderSettingViewController.h */,
+				6173AEC71BAAC6CB00854D49 /* NTESGenderSettingViewController.m */,
+				6173AECB1BAAC70200854D49 /* NTESBirthSettingViewController.h */,
+				6173AECC1BAAC70200854D49 /* NTESBirthSettingViewController.m */,
+				6173AED01BAAC8CF00854D49 /* NTESMobileSettingViewController.h */,
+				6173AED11BAAC8CF00854D49 /* NTESMobileSettingViewController.m */,
+				6173AED31BAAC8E700854D49 /* NTESEmailSettingViewController.h */,
+				6173AED41BAAC8E700854D49 /* NTESEmailSettingViewController.m */,
+				6173AED61BAAC8F500854D49 /* NTESSignSettingViewController.h */,
+				6173AED71BAAC8F500854D49 /* NTESSignSettingViewController.m */,
+				6117562C1BEB6978006A1589 /* NTESAliasSettingViewController.h */,
+				6117562D1BEB6978006A1589 /* NTESAliasSettingViewController.m */,
+			);
+			path = UInfo;
+			sourceTree = "<group>";
+		};
+		6195867E1C19702D00858434 /* Chatroom */ = {
+			isa = PBXGroup;
+			children = (
+				61C2CE4F1C489EFC00D76104 /* Manager */,
+				61206EE31C1E6053009E4C78 /* View */,
+				6159DF4D1C45F79D00E32EB4 /* Config */,
+				6195867F1C19717B00858434 /* NTESChatroomListViewController.h */,
+				619586801C19717B00858434 /* NTESChatroomListViewController.m */,
+				61E1311B1C1A6778009AFEF1 /* NTESChatroomViewController.h */,
+				61E1311C1C1A6778009AFEF1 /* NTESChatroomViewController.m */,
+				613A2FEB1C21049E00508990 /* NTESLiveViewController.h */,
+				613A2FEC1C21049E00508990 /* NTESLiveViewController.m */,
+				61EEE7711C22917400022315 /* NTESChatroomMemberListViewController.h */,
+				61EEE7721C22917400022315 /* NTESChatroomMemberListViewController.m */,
+				61EEE76E1C22865D00022315 /* NTESLiveInfoViewController.h */,
+				61EEE76F1C22865D00022315 /* NTESLiveInfoViewController.m */,
+				612FA9531C1EC202008956C9 /* NTESChatroomMessageDataProvider.h */,
+				612FA9541C1EC202008956C9 /* NTESChatroomMessageDataProvider.m */,
+				61FB276F1C4E70AA0086E0EB /* NTESChatroomMaker.h */,
+				61FB27701C4E70AA0086E0EB /* NTESChatroomMaker.m */,
+			);
+			path = Chatroom;
+			sourceTree = "<group>";
+		};
+		61A665351B40ED41001D1EDB /* Delegate */ = {
+			isa = PBXGroup;
+			children = (
+				61518A461CA233390061C4A9 /* NTESNavigationAnimator.h */,
+				61518A471CA233390061C4A9 /* NTESNavigationAnimator.m */,
+				61518A481CA233390061C4A9 /* NTESNavigationHandler.h */,
+				61518A491CA233390061C4A9 /* NTESNavigationHandler.m */,
+			);
+			path = Delegate;
+			sourceTree = "<group>";
+		};
+		61C2CE4F1C489EFC00D76104 /* Manager */ = {
+			isa = PBXGroup;
+			children = (
+				61C2CE501C489F0D00D76104 /* NTESChatroomManager.h */,
+				61C2CE511C489F0D00D76104 /* NTESChatroomManager.m */,
+			);
+			path = Manager;
+			sourceTree = "<group>";
+		};
+		61E46FED1B7D963D00F4A1BF /* Sections */ = {
+			isa = PBXGroup;
+			children = (
+				83F32B701E94EFE200E594E0 /* Subscribe */,
+				6195867E1C19702D00858434 /* Chatroom */,
+				61E46FEE1B7D963D00F4A1BF /* Card */,
+				61E4702A1B7D963E00F4A1BF /* Contact */,
+				61E4705B1B7D963E00F4A1BF /* Login */,
+				61E4706A1B7D963E00F4A1BF /* Session */,
+				61E470CC1B7D963E00F4A1BF /* SessionList */,
+				61E470DE1B7D963E00F4A1BF /* Setting */,
+			);
+			path = Sections;
+			sourceTree = "<group>";
+		};
+		61E46FEE1B7D963D00F4A1BF /* Card */ = {
+			isa = PBXGroup;
+			children = (
+				61E46FFB1B7D963E00F4A1BF /* View */,
+				61E4700A1B7D963E00F4A1BF /* ViewController */,
+			);
+			path = Card;
+			sourceTree = "<group>";
+		};
+		61E46FFB1B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61E46FFC1B7D963E00F4A1BF /* NTESColorButtonCell.h */,
+				61E46FFD1B7D963E00F4A1BF /* NTESColorButtonCell.m */,
+				61B2AEFB1BB9530F0093F532 /* NTESCardPortraitCell.h */,
+				61B2AEFC1BB9530F0093F532 /* NTESCardPortraitCell.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E4700A1B7D963E00F4A1BF /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				61E470121B7D963E00F4A1BF /* NTESJionTeamViewController.h */,
+				61E470131B7D963E00F4A1BF /* NTESJionTeamViewController.m */,
+				61E470141B7D963E00F4A1BF /* NTESJionTeamViewController.xib */,
+				61E4701A1B7D963E00F4A1BF /* NTESSearchTeamViewController.h */,
+				61E4701B1B7D963E00F4A1BF /* NTESSearchTeamViewController.m */,
+				61E4701C1B7D963E00F4A1BF /* NTESSearchTeamViewController.xib */,
+				61E470221B7D963E00F4A1BF /* NTESTeamListViewController.h */,
+				61E470231B7D963E00F4A1BF /* NTESTeamListViewController.m */,
+				61E470241B7D963E00F4A1BF /* NTESTeamListViewController.xib */,
+				61EAD9131B82FEE9005DC715 /* NTESPersonalCardViewController.h */,
+				61EAD9141B82FEE9005DC715 /* NTESPersonalCardViewController.m */,
+				61AEC1281BD69C6E00B00F02 /* NTESSessionCardViewController.h */,
+				61AEC1291BD69C6E00B00F02 /* NTESSessionCardViewController.m */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		61E4702A1B7D963E00F4A1BF /* Contact */ = {
+			isa = PBXGroup;
+			children = (
+				61E4702B1B7D963E00F4A1BF /* Helper */,
+				61E4702E1B7D963E00F4A1BF /* Model */,
+				61E470371B7D963E00F4A1BF /* View */,
+				61E470431B7D963E00F4A1BF /* ViewController */,
+			);
+			path = Contact;
+			sourceTree = "<group>";
+		};
+		61E4702B1B7D963E00F4A1BF /* Helper */ = {
+			isa = PBXGroup;
+			children = (
+				61E4702C1B7D963E00F4A1BF /* NTESCustomSysNotificationSender.h */,
+				61E4702D1B7D963E00F4A1BF /* NTESCustomSysNotificationSender.m */,
+			);
+			path = Helper;
+			sourceTree = "<group>";
+		};
+		61E4702E1B7D963E00F4A1BF /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				612CACEC1BB1484C00C348B5 /* NTESContactDataMember.h */,
+				612CACED1BB1484C00C348B5 /* NTESContactDataMember.m */,
+				61E470311B7D963E00F4A1BF /* NTESGroupedContacts.h */,
+				61E470321B7D963E00F4A1BF /* NTESGroupedContacts.m */,
+				61E470331B7D963E00F4A1BF /* NTESGroupedDataCollection.h */,
+				61E470341B7D963E00F4A1BF /* NTESGroupedDataCollection.m */,
+				61E470351B7D963E00F4A1BF /* NTESGroupedUsrInfo.h */,
+				61E470361B7D963E00F4A1BF /* NTESGroupedUsrInfo.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		61E470371B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61E4703C1B7D963E00F4A1BF /* NTESContactDefines.h */,
+				61E4703F1B7D963E00F4A1BF /* NTESContactUtilCell.h */,
+				61E470401B7D963E00F4A1BF /* NTESContactUtilCell.m */,
+				61E470411B7D963E00F4A1BF /* NTESContactUtilItem.h */,
+				61E470421B7D963E00F4A1BF /* NTESContactUtilItem.m */,
+				61EAD9191B834E72005DC715 /* NTESUserListCell.h */,
+				61EAD91A1B834E72005DC715 /* NTESUserListCell.m */,
+				8351CB701E977D9000DF4866 /* NTESContactDataCell.h */,
+				8351CB711E977D9000DF4866 /* NTESContactDataCell.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E470431B7D963E00F4A1BF /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				61E470441B7D963E00F4A1BF /* Contact */,
+				61E4704B1B7D963E00F4A1BF /* Notification */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		61E470441B7D963E00F4A1BF /* Contact */ = {
+			isa = PBXGroup;
+			children = (
+				61E470481B7D963E00F4A1BF /* NTESContactViewController.h */,
+				61E470491B7D963E00F4A1BF /* NTESContactViewController.m */,
+				61E4704A1B7D963E00F4A1BF /* NTESContactViewController.xib */,
+				61EAD9101B82F275005DC715 /* NTESContactAddFriendViewController.h */,
+				61EAD9111B82F275005DC715 /* NTESContactAddFriendViewController.m */,
+				61EAD9161B833C4E005DC715 /* NTESBlackListViewController.h */,
+				61EAD9171B833C4E005DC715 /* NTESBlackListViewController.m */,
+			);
+			path = Contact;
+			sourceTree = "<group>";
+		};
+		61E4704B1B7D963E00F4A1BF /* Notification */ = {
+			isa = PBXGroup;
+			children = (
+				61E4704C1B7D963E00F4A1BF /* DB */,
+				61E4704F1B7D963E00F4A1BF /* Model */,
+				61E470521B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.h */,
+				61E470531B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.m */,
+				61E470541B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.xib */,
+				61E470551B7D963E00F4A1BF /* NTESSystemNotificationCell.h */,
+				61E470561B7D963E00F4A1BF /* NTESSystemNotificationCell.m */,
+				61E470571B7D963E00F4A1BF /* NTESSystemNotificationCell.xib */,
+				61E470581B7D963E00F4A1BF /* NTESSystemNotificationViewController.h */,
+				61E470591B7D963E00F4A1BF /* NTESSystemNotificationViewController.m */,
+				61E4705A1B7D963E00F4A1BF /* NTESSystemNotificationViewController.xib */,
+			);
+			path = Notification;
+			sourceTree = "<group>";
+		};
+		61E4704C1B7D963E00F4A1BF /* DB */ = {
+			isa = PBXGroup;
+			children = (
+				61E4704D1B7D963E00F4A1BF /* NTESCustomNotificationDB.h */,
+				61E4704E1B7D963E00F4A1BF /* NTESCustomNotificationDB.m */,
+			);
+			path = DB;
+			sourceTree = "<group>";
+		};
+		61E4704F1B7D963E00F4A1BF /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				61E470501B7D963E00F4A1BF /* NTESCustomNotificationObject.h */,
+				61E470511B7D963E00F4A1BF /* NTESCustomNotificationObject.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		61E4705B1B7D963E00F4A1BF /* Login */ = {
+			isa = PBXGroup;
+			children = (
+				61E4705C1B7D963E00F4A1BF /* Manager */,
+				61E470631B7D963E00F4A1BF /* ViewController */,
+			);
+			path = Login;
+			sourceTree = "<group>";
+		};
+		61E4705C1B7D963E00F4A1BF /* Manager */ = {
+			isa = PBXGroup;
+			children = (
+				61E4705F1B7D963E00F4A1BF /* NTESLoginManager.h */,
+				61E470601B7D963E00F4A1BF /* NTESLoginManager.m */,
+			);
+			path = Manager;
+			sourceTree = "<group>";
+		};
+		61E470631B7D963E00F4A1BF /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				61E470641B7D963E00F4A1BF /* NTESLoginViewController.h */,
+				61E470651B7D963E00F4A1BF /* NTESLoginViewController.m */,
+				61E470661B7D963E00F4A1BF /* NTESLoginViewController.xib */,
+				61E470671B7D963E00F4A1BF /* NTESRegisterViewController.h */,
+				61E470681B7D963E00F4A1BF /* NTESRegisterViewController.m */,
+				61E470691B7D963E00F4A1BF /* NTESRegisterViewController.xib */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		61E4706A1B7D963E00F4A1BF /* Session */ = {
+			isa = PBXGroup;
+			children = (
+				61E4706B1B7D963E00F4A1BF /* Config */,
+				61E4706E1B7D963E00F4A1BF /* Model */,
+				61E470821B7D963E00F4A1BF /* View */,
+				61E470981B7D963E00F4A1BF /* ViewController */,
+			);
+			path = Session;
+			sourceTree = "<group>";
+		};
+		61E4706B1B7D963E00F4A1BF /* Config */ = {
+			isa = PBXGroup;
+			children = (
+				61E4706C1B7D963E00F4A1BF /* NTESSessionConfig.h */,
+				61E4706D1B7D963E00F4A1BF /* NTESSessionConfig.m */,
+			);
+			path = Config;
+			sourceTree = "<group>";
+		};
+		61E4706E1B7D963E00F4A1BF /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				61E4706F1B7D963E00F4A1BF /* Object */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		61E4706F1B7D963E00F4A1BF /* Object */ = {
+			isa = PBXGroup;
+			children = (
+				61E470701B7D963E00F4A1BF /* NTESChartletAttachment.h */,
+				61E470711B7D963E00F4A1BF /* NTESChartletAttachment.m */,
+				61E470721B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.h */,
+				61E470731B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.m */,
+				61E470741B7D963E00F4A1BF /* NTESCustomAttachmentDefines.h */,
+				61E470751B7D963E00F4A1BF /* NTESJanKenPonAttachment.h */,
+				61E470761B7D963E00F4A1BF /* NTESJanKenPonAttachment.m */,
+				61E470791B7D963E00F4A1BF /* NTESSearchLocalHistoryObject.h */,
+				61E4707A1B7D963E00F4A1BF /* NTESSearchLocalHistoryObject.m */,
+				61E4707B1B7D963E00F4A1BF /* NTESSessionFileStatusProtocol.h */,
+				61E4707C1B7D963E00F4A1BF /* NTESSessionMsgConverter.h */,
+				61E4707D1B7D963E00F4A1BF /* NTESSessionMsgConverter.m */,
+				61E4707E1B7D963E00F4A1BF /* NTESSnapchatAttachment.h */,
+				61E4707F1B7D963E00F4A1BF /* NTESSnapchatAttachment.m */,
+				61E470801B7D963E00F4A1BF /* NTESWhiteboardAttachment.h */,
+				61E470811B7D963E00F4A1BF /* NTESWhiteboardAttachment.m */,
+			);
+			path = Object;
+			sourceTree = "<group>";
+		};
+		61E470821B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61E470831B7D963E00F4A1BF /* SessionCell */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E470831B7D963E00F4A1BF /* SessionCell */ = {
+			isa = PBXGroup;
+			children = (
+				61E470891B7D963E00F4A1BF /* Search */,
+				61E4708F1B7D963E00F4A1BF /* SessionContentView */,
+			);
+			path = SessionCell;
+			sourceTree = "<group>";
+		};
+		61E470891B7D963E00F4A1BF /* Search */ = {
+			isa = PBXGroup;
+			children = (
+				61E4708A1B7D963E00F4A1BF /* NTESSearchCellLayoutConstant.h */,
+				61E4708B1B7D963E00F4A1BF /* NTESSearchMessageContentCell.h */,
+				61E4708C1B7D963E00F4A1BF /* NTESSearchMessageContentCell.m */,
+				61E4708D1B7D963E00F4A1BF /* NTESSearchMessageEntraceCell.h */,
+				61E4708E1B7D963E00F4A1BF /* NTESSearchMessageEntraceCell.m */,
+			);
+			path = Search;
+			sourceTree = "<group>";
+		};
+		61E4708F1B7D963E00F4A1BF /* SessionContentView */ = {
+			isa = PBXGroup;
+			children = (
+				61E470901B7D963E00F4A1BF /* NTESSessionChartletContentView.h */,
+				61E470911B7D963E00F4A1BF /* NTESSessionChartletContentView.m */,
+				61E470921B7D963E00F4A1BF /* NTESSessionJankenponContentView.h */,
+				61E470931B7D963E00F4A1BF /* NTESSessionJankenponContentView.m */,
+				61E470941B7D963E00F4A1BF /* NTESSessionSnapchatContentView.h */,
+				61E470951B7D963E00F4A1BF /* NTESSessionSnapchatContentView.m */,
+				61E470961B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.h */,
+				61E470971B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.m */,
+				61E7B5861DCF39E200F19E83 /* NTESSessionTipContentView.h */,
+				61E7B5871DCF39E200F19E83 /* NTESSessionTipContentView.m */,
+			);
+			path = SessionContentView;
+			sourceTree = "<group>";
+		};
+		61E470981B7D963E00F4A1BF /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				61E470991B7D963E00F4A1BF /* Audio */,
+				61E4709D1B7D963E00F4A1BF /* File */,
+				61E470A41B7D963E00F4A1BF /* Gallery */,
+				61E470AC1B7D963E00F4A1BF /* NTESSessionLocalHistoryViewController.h */,
+				61E470AD1B7D963E00F4A1BF /* NTESSessionLocalHistoryViewController.m */,
+				61E470AE1B7D963E00F4A1BF /* NTESSessionRemoteHistoryViewController.h */,
+				61E470AF1B7D963E00F4A1BF /* NTESSessionRemoteHistoryViewController.m */,
+				834FE0121E272E56008F218F /* NTESSessionPeekViewController.h */,
+				834FE0131E272E56008F218F /* NTESSessionPeekViewController.m */,
+				61E470B01B7D963E00F4A1BF /* NTESSessionViewController.h */,
+				61E470B11B7D963E00F4A1BF /* NTESSessionViewController.m */,
+				61E470B21B7D963E00F4A1BF /* RealTimeSession */,
+				61E470B91B7D963E00F4A1BF /* Video */,
+				61E470BD1B7D963E00F4A1BF /* VideoChat */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		61E470991B7D963E00F4A1BF /* Audio */ = {
+			isa = PBXGroup;
+			children = (
+				61E4709A1B7D963E00F4A1BF /* NTESAudio2TextViewController.h */,
+				61E4709B1B7D963E00F4A1BF /* NTESAudio2TextViewController.m */,
+				61E4709C1B7D963E00F4A1BF /* NTESAudio2TextViewController.xib */,
+			);
+			path = Audio;
+			sourceTree = "<group>";
+		};
+		61E4709D1B7D963E00F4A1BF /* File */ = {
+			isa = PBXGroup;
+			children = (
+				61E4709E1B7D963E00F4A1BF /* NTESFilePreViewController.h */,
+				61E4709F1B7D963E00F4A1BF /* NTESFilePreViewController.m */,
+				61E470A01B7D963E00F4A1BF /* NTESFilePreViewController.xib */,
+				61E470A11B7D963E00F4A1BF /* NTESFileTransSelectViewController.h */,
+				61E470A21B7D963E00F4A1BF /* NTESFileTransSelectViewController.m */,
+				61E470A31B7D963E00F4A1BF /* NTESFileTransSelectViewController.xib */,
+			);
+			path = File;
+			sourceTree = "<group>";
+		};
+		61E470A41B7D963E00F4A1BF /* Gallery */ = {
+			isa = PBXGroup;
+			children = (
+				61E470A51B7D963E00F4A1BF /* NTESGalleryViewController.h */,
+				61E470A61B7D963E00F4A1BF /* NTESGalleryViewController.m */,
+				61E470A71B7D963E00F4A1BF /* NTESGalleryViewController.xib */,
+			);
+			path = Gallery;
+			sourceTree = "<group>";
+		};
+		61E470B21B7D963E00F4A1BF /* RealTimeSession */ = {
+			isa = PBXGroup;
+			children = (
+				61E470B31B7D963E00F4A1BF /* NTESWhiteboardViewController.h */,
+				61E470B41B7D963E00F4A1BF /* NTESWhiteboardViewController.m */,
+				61E470B51B7D963E00F4A1BF /* NTESWhiteboardViewController.xib */,
+				61E470B61B7D963E00F4A1BF /* View */,
+			);
+			path = RealTimeSession;
+			sourceTree = "<group>";
+		};
+		61E470B61B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61E470B71B7D963E00F4A1BF /* NTESWhiteboardDrawView.h */,
+				61E470B81B7D963E00F4A1BF /* NTESWhiteboardDrawView.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E470B91B7D963E00F4A1BF /* Video */ = {
+			isa = PBXGroup;
+			children = (
+				61E470BA1B7D963E00F4A1BF /* NTESVideoViewController.h */,
+				61E470BB1B7D963E00F4A1BF /* NTESVideoViewController.m */,
+				61E470BC1B7D963E00F4A1BF /* NTESVideoViewController.xib */,
+			);
+			path = Video;
+			sourceTree = "<group>";
+		};
+		61E470BD1B7D963E00F4A1BF /* VideoChat */ = {
+			isa = PBXGroup;
+			children = (
+				61E470BE1B7D963E00F4A1BF /* Model */,
+				61E470C11B7D963E00F4A1BF /* NTESAudioChatViewController.h */,
+				61E470C21B7D963E00F4A1BF /* NTESAudioChatViewController.m */,
+				61E470C31B7D963E00F4A1BF /* NTESAudioChatViewController.xib */,
+				61E470C41B7D963E00F4A1BF /* NTESNetChatViewController.h */,
+				61E470C51B7D963E00F4A1BF /* NTESNetChatViewController.m */,
+				61E470C61B7D963E00F4A1BF /* NTESVideoChatViewController.h */,
+				61E470C71B7D963E00F4A1BF /* NTESVideoChatViewController.m */,
+				61E470C81B7D963E00F4A1BF /* NTESVideoChatViewController.xib */,
+				61E470C91B7D963E00F4A1BF /* View */,
+			);
+			path = VideoChat;
+			sourceTree = "<group>";
+		};
+		61E470BE1B7D963E00F4A1BF /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				61E470BF1B7D963E00F4A1BF /* NetCallChatInfo.h */,
+				61E470C01B7D963E00F4A1BF /* NetCallChatInfo.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		61E470C91B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61E470CA1B7D963E00F4A1BF /* NTESVideoChatNetStatusView.h */,
+				61E470CB1B7D963E00F4A1BF /* NTESVideoChatNetStatusView.m */,
+				BDB0FC671BA7E6D30066654D /* NTESGLView.h */,
+				BDB0FC681BA7E6D30066654D /* NTESGLView.m */,
+				907DBE831E5C777300317C36 /* NTESRecordSelectView.h */,
+				907DBE841E5C777300317C36 /* NTESRecordSelectView.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E470CC1B7D963E00F4A1BF /* SessionList */ = {
+			isa = PBXGroup;
+			children = (
+				61E470CD1B7D963E00F4A1BF /* View */,
+				61E470D91B7D963E00F4A1BF /* ViewController */,
+			);
+			path = SessionList;
+			sourceTree = "<group>";
+		};
+		61E470CD1B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61E470CE1B7D963E00F4A1BF /* MutiCilentsCell */,
+				61E470D21B7D963E00F4A1BF /* SessionListHeader */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E470CE1B7D963E00F4A1BF /* MutiCilentsCell */ = {
+			isa = PBXGroup;
+			children = (
+				61E470CF1B7D963E00F4A1BF /* NTESMutiClientsCell.h */,
+				61E470D01B7D963E00F4A1BF /* NTESMutiClientsCell.m */,
+				61E470D11B7D963E00F4A1BF /* NTESMutiClientsCell.xib */,
+			);
+			path = MutiCilentsCell;
+			sourceTree = "<group>";
+		};
+		61E470D21B7D963E00F4A1BF /* SessionListHeader */ = {
+			isa = PBXGroup;
+			children = (
+				61E470D31B7D963E00F4A1BF /* NTESMutiClientsHeaderView.h */,
+				61E470D41B7D963E00F4A1BF /* NTESMutiClientsHeaderView.m */,
+				61E470D51B7D963E00F4A1BF /* NTESTextHeaderView.h */,
+				61E470D61B7D963E00F4A1BF /* NTESTextHeaderView.m */,
+				61E470D71B7D963E00F4A1BF /* NTESListHeader.h */,
+				61E470D81B7D963E00F4A1BF /* NTESListHeader.m */,
+			);
+			path = SessionListHeader;
+			sourceTree = "<group>";
+		};
+		61E470D91B7D963E00F4A1BF /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				61E470DA1B7D963E00F4A1BF /* NTESClientsTableViewController.h */,
+				61E470DB1B7D963E00F4A1BF /* NTESClientsTableViewController.m */,
+				61E470DC1B7D963E00F4A1BF /* NTESSessionListViewController.h */,
+				61E470DD1B7D963E00F4A1BF /* NTESSessionListViewController.m */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		61E470DE1B7D963E00F4A1BF /* Setting */ = {
+			isa = PBXGroup;
+			children = (
+				BDB02D221E09170400262A50 /* NetDetect */,
+				E45E17771CA8CB6200C4ED69 /* Log */,
+				6173AEBD1BAAB91C00854D49 /* UInfo */,
+				61E470DF1B7D963E00F4A1BF /* NoDisturb */,
+				61E470E61B7D963E00F4A1BF /* NTESAboutViewController.h */,
+				61E470E71B7D963E00F4A1BF /* NTESAboutViewController.m */,
+				61E470E81B7D963E00F4A1BF /* NTESAboutViewController.xib */,
+				61E470E91B7D963E00F4A1BF /* NTESSettingViewController.h */,
+				61E470EA1B7D963E00F4A1BF /* NTESSettingViewController.m */,
+				61E470EB1B7D963E00F4A1BF /* NTESSettingViewController.xib */,
+				61E470EC1B7D963E00F4A1BF /* View */,
+			);
+			path = Setting;
+			sourceTree = "<group>";
+		};
+		61E470DF1B7D963E00F4A1BF /* NoDisturb */ = {
+			isa = PBXGroup;
+			children = (
+				61E470E01B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.h */,
+				61E470E11B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.m */,
+				61E470E21B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.xib */,
+				61E470E31B7D963E00F4A1BF /* View */,
+			);
+			path = NoDisturb;
+			sourceTree = "<group>";
+		};
+		61E470E31B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				61E470E41B7D963E00F4A1BF /* NTESNoDisturbTimeCell.h */,
+				61E470E51B7D963E00F4A1BF /* NTESNoDisturbTimeCell.m */,
+				61EAD9061B82D0A2005DC715 /* NTESTextSettingCell.h */,
+				61EAD9071B82D0A2005DC715 /* NTESTextSettingCell.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E470EC1B7D963E00F4A1BF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				610B5FBD1BADCCCD001F7EFB /* NTESBirthPickerView.h */,
+				610B5FBE1BADCCCD001F7EFB /* NTESBirthPickerView.m */,
+				61E470ED1B7D963E00F4A1BF /* NTESSettingPortraitCell.h */,
+				61E470EE1B7D963E00F4A1BF /* NTESSettingPortraitCell.m */,
+				61E470EF1B7D963E00F4A1BF /* NTESSettingSwitcherCell.h */,
+				61E470F01B7D963E00F4A1BF /* NTESSettingSwitcherCell.m */,
+				6185D2971BAAFBAF0046F90F /* NTESSettingCheckCell.h */,
+				6185D2981BAAFBAF0046F90F /* NTESSettingCheckCell.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		61E471681B7D96AA00F4A1BF /* Util */ = {
+			isa = PBXGroup;
+			children = (
+				E4562D891CE0855A00D66909 /* NTESSDKConfigDelegate.h */,
+				E4562D8A1CE0855A00D66909 /* NTESSDKConfigDelegate.m */,
+				61E4716B1B7D96AA00F4A1BF /* NTESBundleSetting.h */,
+				61E4716C1B7D96AA00F4A1BF /* NTESBundleSetting.m */,
+				61E4716D1B7D96AA00F4A1BF /* NTESClientUtil.h */,
+				61E4716E1B7D96AA00F4A1BF /* NTESClientUtil.m */,
+				61E471711B7D96AA00F4A1BF /* NTESDemoConfig.h */,
+				61E471721B7D96AA00F4A1BF /* NTESDemoConfig.m */,
+				61E471731B7D96AA00F4A1BF /* NTESFileLocationHelper.h */,
+				61E471741B7D96AA00F4A1BF /* NTESFileLocationHelper.m */,
+				61E4717C1B7D96AA00F4A1BF /* NTESNotificationCenter.h */,
+				61E4717D1B7D96AA00F4A1BF /* NTESNotificationCenter.m */,
+				61E4717E1B7D96AA00F4A1BF /* NTESService.h */,
+				61E4717F1B7D96AA00F4A1BF /* NTESService.m */,
+				61E471801B7D96AA00F4A1BF /* NTESSessionUtil.h */,
+				61E471811B7D96AA00F4A1BF /* NTESSessionUtil.m */,
+				61E471821B7D96AA00F4A1BF /* NTESTimerHolder.h */,
+				61E471831B7D96AA00F4A1BF /* NTESTimerHolder.m */,
+				BD52DB3C1B8F300E00434D0E /* NTESCADisplayLinkHolder.h */,
+				BD52DB3D1B8F300E00434D0E /* NTESCADisplayLinkHolder.m */,
+				6173AED91BAAD03900854D49 /* NTESUserUtil.h */,
+				6173AEDA1BAAD03900854D49 /* NTESUserUtil.m */,
+				619087071BABE5D400F3A0C7 /* NTESDevice.h */,
+				619087081BABE5D400F3A0C7 /* NTESDevice.m */,
+				61E471841B7D96AA00F4A1BF /* Spelling */,
+			);
+			path = Util;
+			sourceTree = "<group>";
+		};
+		61E471841B7D96AA00F4A1BF /* Spelling */ = {
+			isa = PBXGroup;
+			children = (
+				61E471851B7D96AA00F4A1BF /* NTESPinyinConverter.h */,
+				61E471861B7D96AA00F4A1BF /* NTESPinyinConverter.m */,
+				61E471871B7D96AA00F4A1BF /* NTESSpellingCenter.h */,
+				61E471881B7D96AA00F4A1BF /* NTESSpellingCenter.m */,
+			);
+			path = Spelling;
+			sourceTree = "<group>";
+		};
+		61F728281A7B23A40076C096 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				E48988E51DE42353001CF6C5 /* LayoutConfig */,
+				61E471681B7D96AA00F4A1BF /* Util */,
+				61E46FED1B7D963D00F4A1BF /* Sections */,
+				611ABEEA1B3CF4FC00B8706C /* Common */,
+				61F728291A7B23A40076C096 /* Category */,
+				61518A4C1CA233BB0061C4A9 /* Service */,
+			);
+			path = Classes;
+			sourceTree = "<group>";
+		};
+		61F728291A7B23A40076C096 /* Category */ = {
+			isa = PBXGroup;
+			children = (
+				61AF8CDF1C55170900BFC84F /* UIScrollView+NTESDirection.h */,
+				61AF8CE01C55170900BFC84F /* UIScrollView+NTESDirection.m */,
+				6110D8B31C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.h */,
+				6110D8B41C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.m */,
+				617D015B1AEDE03900C6DB77 /* UIImage+NTESColor.h */,
+				617D015C1AEDE03900C6DB77 /* UIImage+NTESColor.m */,
+				61A1422D1AD7B02E00DCAD88 /* NSDictionary+NTESJson.h */,
+				61A1422E1AD7B02E00DCAD88 /* NSDictionary+NTESJson.m */,
+				03A4C9FE1AC2B79700E45E03 /* UIAlertView+NTESBlock.h */,
+				03A4C9FB1AC2B79700E45E03 /* UIAlertView+NTESBlock.m */,
+				03A4C9FC1AC2B79700E45E03 /* UIActionSheet+NTESBlock.h */,
+				03A4C9FD1AC2B79700E45E03 /* UIActionSheet+NTESBlock.m */,
+				AE2AA6831A7CD35C00CFF013 /* UIView+NTES.h */,
+				AE2AA6841A7CD35C00CFF013 /* UIView+NTES.m */,
+				6195CD1E1A8C4D3C00F3E239 /* NSString+NTES.h */,
+				6195CD1F1A8C4D3C00F3E239 /* NSString+NTES.m */,
+				E49D53BF1B451C7400A869AC /* NSData+NTES.h */,
+				E49D53C01B451C7400A869AC /* NSData+NTES.m */,
+				61DA56FD1B53E33F00828B8A /* UIImage+NTES.h */,
+				61DA56FE1B53E33F00828B8A /* UIImage+NTES.m */,
+				61A8EF321BB67F0900033FB8 /* UIResponder+NTESFirstResponder.h */,
+				61A8EF331BB67F0900033FB8 /* UIResponder+NTESFirstResponder.m */,
+			);
+			path = Category;
+			sourceTree = "<group>";
+		};
+		83F32B701E94EFE200E594E0 /* Subscribe */ = {
+			isa = PBXGroup;
+			children = (
+				83F32B741E94F05B00E594E0 /* NTESSubscribeDefine.h */,
+				83F32B711E94EFE200E594E0 /* NTESSubscribeManager.h */,
+				83F32B721E94EFE200E594E0 /* NTESSubscribeManager.m */,
+			);
+			path = Subscribe;
+			sourceTree = "<group>";
+		};
+		AE5882DC1A6F47E10070536A = {
+			isa = PBXGroup;
+			children = (
+				AE5882E71A6F47E10070536A /* whosay */,
+				AE5882E61A6F47E10070536A /* Products */,
+				5176189D0086B38FE643A26A /* Frameworks */,
+				3134E0020A559A7F56597C29 /* Pods */,
+			);
+			sourceTree = "<group>";
+		};
+		AE5882E61A6F47E10070536A /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				AE5882E51A6F47E10070536A /* NIM.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		AE5882E71A6F47E10070536A /* whosay */ = {
+			isa = PBXGroup;
+			children = (
+				C41B6EF91EEFB64900AD1F53 /* Recharge */,
+				C4D4C9271ED7C37F00ADD7B7 /* AppDelegate.h */,
+				C4D4C9281ED7C37F00ADD7B7 /* AppDelegate.m */,
+				C4D4C9291ED7C37F00ADD7B7 /* LoginViewController.h */,
+				C4D4C92A1ED7C37F00ADD7B7 /* LoginViewController.m */,
+				C4D4C92C1ED7C37F00ADD7B7 /* RegisterViewController.h */,
+				C4D4C92D1ED7C37F00ADD7B7 /* RegisterViewController.m */,
+				C4D4C92E1ED7C37F00ADD7B7 /* TabBarController.h */,
+				C4D4C92F1ED7C37F00ADD7B7 /* TabBarController.m */,
+				C4D4C9301ED7C37F00ADD7B7 /* ViewController.h */,
+				C4D4C9311ED7C37F00ADD7B7 /* ViewController.m */,
+				C4B639541ED58186004288FC /* User */,
+				C4B639531ED57DBB004288FC /* CityPicker */,
+				C4D8F14D1ED4883F002F9F3A /* LaunchScreen.storyboard */,
+				C4D8F14F1ED48840002F9F3A /* Main.storyboard */,
+				C4D8F14A1ED486F2002F9F3A /* SectionGroup */,
+				C4A7D3631EE80338009B5849 /* SectionFriend */,
+				C4B146331EF2333900819893 /* SectionSetting */,
+				C4D8F1321ED48660002F9F3A /* AFNetworking */,
+				61F728281A7B23A40076C096 /* Classes */,
+				AE5882F51A6F47E10070536A /* Images.xcassets */,
+				AEB8367F1A772C2F00E7493E /* NIMDemo-Prefix.pch */,
+				6195CD3E1A8C74DB00F3E239 /* NTESGlobalMacro.h */,
+				AE5882E81A6F47E10070536A /* Supporting Files */,
+			);
+			name = whosay;
+			path = NIMDemo;
+			sourceTree = "<group>";
+		};
+		AE5882E81A6F47E10070536A /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				C4D4C92B1ED7C37F00ADD7B7 /* main.m */,
+				61E7B5011DCC832A00F19E83 /* NIMKitSettings.bundle */,
+				61A18A4C1DC74448001FD538 /* NIMKitResource.bundle */,
+				61A18A4A1DC73B96001FD538 /* NIMKitEmoticon.bundle */,
+				610037311D9290170095C53B /* NIMDev.entitlements */,
+				610037321D9290170095C53B /* NIMPro.entitlements */,
+				611ABF101B42321600B8706C /* Settings.bundle */,
+				610B1DFA1AFDDDDA006454EA /* Sounds */,
+				61ED4F451AE4FA020073DBD9 /* Files */,
+				AE5882E91A6F47E10070536A /* Info.plist */,
+				61E8F9111AA16E5300F51DAF /* CoreLocation.framework */,
+				61E8F90C1AA169B700F51DAF /* MapKit.framework */,
+				61CF576E1A787DB000B43072 /* MobileCoreServices.framework */,
+				AEA87FE01A81CAD500ACC3BA /* AVFoundation.framework */,
+				AE5899591A6FA7AC0070536A /* SystemConfiguration.framework */,
+				E4E8D98F1BB131F20077AE60 /* nim_debug.xcconfig */,
+				E4E8D9901BB132040077AE60 /* nim_release.xcconfig */,
+			);
+			path = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		BDB02D221E09170400262A50 /* NetDetect */ = {
+			isa = PBXGroup;
+			children = (
+				BDB02D231E09172F00262A50 /* NTESNetDetectViewController.h */,
+				BDB02D241E09172F00262A50 /* NTESNetDetectViewController.m */,
+				BDB02D251E09172F00262A50 /* NTESNetDetectViewController.xib */,
+			);
+			path = NetDetect;
+			sourceTree = "<group>";
+		};
+		C41B6EF91EEFB64900AD1F53 /* Recharge */ = {
+			isa = PBXGroup;
+			children = (
+				C41B6EF61EEFB30D00AD1F53 /* RechargeViewController.h */,
+				C41B6EF71EEFB30D00AD1F53 /* RechargeViewController.m */,
+				C41B6EFA1EEFB67500AD1F53 /* RechargeItem.h */,
+				C41B6EFB1EEFB67500AD1F53 /* RechargeItem.m */,
+			);
+			name = Recharge;
+			sourceTree = "<group>";
+		};
+		C4A7D3631EE80338009B5849 /* SectionFriend */ = {
+			isa = PBXGroup;
+			children = (
+				C4A7D3641EE803E6009B5849 /* FriendViewController.h */,
+				C4A7D3651EE803E6009B5849 /* FriendViewController.m */,
+			);
+			name = SectionFriend;
+			sourceTree = "<group>";
+		};
+		C4B146331EF2333900819893 /* SectionSetting */ = {
+			isa = PBXGroup;
+			children = (
+				C4B146371EF2351900819893 /* SettingTableViewController.h */,
+				C4B146381EF2351900819893 /* SettingTableViewController.m */,
+				C4B1463A1EF24E6300819893 /* SettingAccountViewController.h */,
+				C4B1463B1EF24E6300819893 /* SettingAccountViewController.m */,
+			);
+			name = SectionSetting;
+			sourceTree = "<group>";
+		};
+		C4B639531ED57DBB004288FC /* CityPicker */ = {
+			isa = PBXGroup;
+			children = (
+				C4B6394E1ED57DAB004288FC /* city.plist */,
+				C4B6394F1ED57DAB004288FC /* PSCityPickerView.h */,
+				C4B639501ED57DAB004288FC /* PSCityPickerView.m */,
+			);
+			name = CityPicker;
+			sourceTree = "<group>";
+		};
+		C4B639541ED58186004288FC /* User */ = {
+			isa = PBXGroup;
+			children = (
+				C4B639551ED581E2004288FC /* User.h */,
+				C4B639561ED581E2004288FC /* User.m */,
+				C40F4C491EF15BC7002B197A /* GiftTopBarItem.h */,
+				C40F4C4A1EF15BC7002B197A /* GiftTopBarItem.m */,
+			);
+			name = User;
+			sourceTree = "<group>";
+		};
+		C4D8F1321ED48660002F9F3A /* AFNetworking */ = {
+			isa = PBXGroup;
+			children = (
+				C4D8F11F1ED48657002F9F3A /* AFHTTPSessionManager.h */,
+				C4D8F1201ED48657002F9F3A /* AFHTTPSessionManager.m */,
+				C4D8F1211ED48657002F9F3A /* AFNetworking.h */,
+				C4D8F1221ED48657002F9F3A /* AFNetworkReachabilityManager.h */,
+				C4D8F1231ED48657002F9F3A /* AFNetworkReachabilityManager.m */,
+				C4D8F1241ED48657002F9F3A /* AFSecurityPolicy.h */,
+				C4D8F1251ED48657002F9F3A /* AFSecurityPolicy.m */,
+				C4D8F1261ED48657002F9F3A /* AFURLRequestSerialization.h */,
+				C4D8F1271ED48657002F9F3A /* AFURLRequestSerialization.m */,
+				C4D8F1281ED48657002F9F3A /* AFURLResponseSerialization.h */,
+				C4D8F1291ED48657002F9F3A /* AFURLResponseSerialization.m */,
+				C4D8F12A1ED48657002F9F3A /* AFURLSessionManager.h */,
+				C4D8F12B1ED48657002F9F3A /* AFURLSessionManager.m */,
+			);
+			name = AFNetworking;
+			sourceTree = "<group>";
+		};
+		C4D8F14A1ED486F2002F9F3A /* SectionGroup */ = {
+			isa = PBXGroup;
+			children = (
+				C4D4C9381ED7C3DE00ADD7B7 /* CreateGroupViewController.h */,
+				C4D4C9391ED7C3DE00ADD7B7 /* CreateGroupViewController.m */,
+				C4D4C93A1ED7C3DE00ADD7B7 /* GroupTableController.h */,
+				C4D4C93B1ED7C3DE00ADD7B7 /* GroupTableController.m */,
+				C4D4C9241ED7C2A900ADD7B7 /* GroupTableViewCell.h */,
+				C4D4C9251ED7C2A900ADD7B7 /* GroupTableViewCell.m */,
+				C4D4C93E1ED81F2100ADD7B7 /* CityPickerViewController.h */,
+				C4D4C93F1ED81F2100ADD7B7 /* CityPickerViewController.m */,
+				C4A7345E1EE6BBD300D6489D /* GroupMoreTableViewController.h */,
+				C4A7345F1EE6BBD300D6489D /* GroupMoreTableViewController.m */,
+				C4A734611EE6D4DE00D6489D /* GroupMoreTableViewCell.h */,
+				C4A734621EE6D4DE00D6489D /* GroupMoreTableViewCell.m */,
+			);
+			name = SectionGroup;
+			sourceTree = "<group>";
+		};
+		E45E17771CA8CB6200C4ED69 /* Log */ = {
+			isa = PBXGroup;
+			children = (
+				E45E177B1CA8CBA500C4ED69 /* NTESLogManager.h */,
+				E45E177C1CA8CBA500C4ED69 /* NTESLogManager.m */,
+				E45E177D1CA8CBA500C4ED69 /* NTESLogViewController.h */,
+				E45E177E1CA8CBA500C4ED69 /* NTESLogViewController.m */,
+				E45E177F1CA8CBA500C4ED69 /* NTESLogViewController.xib */,
+				E45E17781CA8CB6200C4ED69 /* NTESLogUploader.h */,
+				E45E17791CA8CB6200C4ED69 /* NTESLogUploader.m */,
+			);
+			path = Log;
+			sourceTree = "<group>";
+		};
+		E48988E51DE42353001CF6C5 /* LayoutConfig */ = {
+			isa = PBXGroup;
+			children = (
+				E48988EC1DE4263D001CF6C5 /* NTESChatroomTextContentConfig.h */,
+				E48988ED1DE4263D001CF6C5 /* NTESChatroomTextContentConfig.m */,
+				E48988E91DE42391001CF6C5 /* NTESSessionCustomContentConfig.h */,
+				E48988EA1DE42391001CF6C5 /* NTESSessionCustomContentConfig.m */,
+				E48988E61DE42353001CF6C5 /* NTESCellLayoutConfig.h */,
+				E48988E71DE42353001CF6C5 /* NTESCellLayoutConfig.m */,
+			);
+			path = LayoutConfig;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		AE5882E41A6F47E10070536A /* NIM */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = AE5883081A6F47E10070536A /* Build configuration list for PBXNativeTarget "NIM" */;
+			buildPhases = (
+				BB0FF6D323B6C7B68134CBAC /* [CP] Check Pods Manifest.lock */,
+				AE5882E11A6F47E10070536A /* Sources */,
+				AE5882E21A6F47E10070536A /* Frameworks */,
+				AE5882E31A6F47E10070536A /* Resources */,
+				F9916A5271EB9BF1BF131F21 /* [CP] Embed Pods Frameworks */,
+				30ABFE694C3F7888547B762C /* [CP] Copy Pods Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = NIM;
+			productName = NIMDemo;
+			productReference = AE5882E51A6F47E10070536A /* NIM.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		AE5882DD1A6F47E10070536A /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				CLASSPREFIX = NTES;
+				LastUpgradeCheck = 0810;
+				ORGANIZATIONNAME = Netease;
+				TargetAttributes = {
+					AE5882E41A6F47E10070536A = {
+						CreatedOnToolsVersion = 6.1;
+						DevelopmentTeam = DGEMLT57K8;
+						ProvisioningStyle = Automatic;
+						SystemCapabilities = {
+							com.apple.BackgroundModes = {
+								enabled = 1;
+							};
+							com.apple.DataProtection = {
+								enabled = 0;
+							};
+							com.apple.Push = {
+								enabled = 1;
+							};
+						};
+					};
+				};
+			};
+			buildConfigurationList = AE5882E01A6F47E10070536A /* Build configuration list for PBXProject "NIMDemo" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = AE5882DC1A6F47E10070536A;
+			productRefGroup = AE5882E61A6F47E10070536A /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				AE5882E41A6F47E10070536A /* NIM */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		AE5882E31A6F47E10070536A /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				61E471561B7D963E00F4A1BF /* NTESVideoChatViewController.xib in Resources */,
+				610B1E081AFDDE04006454EA /* video_chat_tip_sender.aac in Resources */,
+				61E471401B7D963E00F4A1BF /* NTESAudio2TextViewController.xib in Resources */,
+				61E471461B7D963E00F4A1BF /* NTESGalleryViewController.xib in Resources */,
+				61E4711E1B7D963E00F4A1BF /* NTESContactViewController.xib in Resources */,
+				61E471441B7D963E00F4A1BF /* NTESFileTransSelectViewController.xib in Resources */,
+				61E471591B7D963E00F4A1BF /* NTESMutiClientsCell.xib in Resources */,
+				610B1E051AFDDE04006454EA /* video_chat_tip_OnCall.aac in Resources */,
+				61E7B5021DCC832A00F19E83 /* NIMKitSettings.bundle in Resources */,
+				611ABF111B42321600B8706C /* Settings.bundle in Resources */,
+				61E471081B7D963E00F4A1BF /* NTESSearchTeamViewController.xib in Resources */,
+				61E471531B7D963E00F4A1BF /* NTESAudioChatViewController.xib in Resources */,
+				61E4714D1B7D963E00F4A1BF /* NTESWhiteboardViewController.xib in Resources */,
+				BDB02D271E09172F00262A50 /* NTESNetDetectViewController.xib in Resources */,
+				610B1E041AFDDE04006454EA /* video_chat_tip_HangUp.aac in Resources */,
+				610B1E021AFDDE04006454EA /* video_connect_chat_tip_sender.aac in Resources */,
+				61E4712B1B7D963E00F4A1BF /* NTESLoginViewController.xib in Resources */,
+				AE5882F61A6F47E10070536A /* Images.xcassets in Resources */,
+				61A18A4B1DC73B96001FD538 /* NIMKitEmoticon.bundle in Resources */,
+				E45E17821CA8CBA500C4ED69 /* NTESLogViewController.xib in Resources */,
+				E4ED12DD1B6B07EA00316496 /* message.wav in Resources */,
+				61E471601B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.xib in Resources */,
+				61ED4F461AE4FA020073DBD9 /* Files in Resources */,
+				61E471031B7D963E00F4A1BF /* NTESJionTeamViewController.xib in Resources */,
+				610B1E061AFDDE04006454EA /* video_chat_tip_onTimer.aac in Resources */,
+				C4D8F1511ED48840002F9F3A /* LaunchScreen.storyboard in Resources */,
+				61E471261B7D963E00F4A1BF /* NTESSystemNotificationViewController.xib in Resources */,
+				61E471501B7D963E00F4A1BF /* NTESVideoViewController.xib in Resources */,
+				61A18A4D1DC74448001FD538 /* NIMKitResource.bundle in Resources */,
+				61E471421B7D963E00F4A1BF /* NTESFilePreViewController.xib in Resources */,
+				6173AEC51BAAB94400854D49 /* NTESUserInfoSettingViewController.xib in Resources */,
+				61E471631B7D963E00F4A1BF /* NTESAboutViewController.xib in Resources */,
+				61E471651B7D963E00F4A1BF /* NTESSettingViewController.xib in Resources */,
+				C4D8F1521ED48840002F9F3A /* Main.storyboard in Resources */,
+				61E471221B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.xib in Resources */,
+				61E471241B7D963E00F4A1BF /* NTESSystemNotificationCell.xib in Resources */,
+				61E4712D1B7D963E00F4A1BF /* NTESRegisterViewController.xib in Resources */,
+				C4B639511ED57DAB004288FC /* city.plist in Resources */,
+				610B1E071AFDDE04006454EA /* video_chat_tip_receiver.aac in Resources */,
+				61E4710D1B7D963E00F4A1BF /* NTESTeamListViewController.xib in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		30ABFE694C3F7888547B762C /* [CP] Copy Pods Resources */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "[CP] Copy Pods Resources";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NIMDemo-NIM/Pods-NIMDemo-NIM-resources.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+		BB0FF6D323B6C7B68134CBAC /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
+			showEnvVarsInLog = 0;
+		};
+		F9916A5271EB9BF1BF131F21 /* [CP] Embed Pods Frameworks */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "[CP] Embed Pods Frameworks";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NIMDemo-NIM/Pods-NIMDemo-NIM-frameworks.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		AE5882E11A6F47E10070536A /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				6118F5AA1C5A0FC1009AF01E /* UIViewController+Swizzling.m in Sources */,
+				6118F5A71C5A0FC1009AF01E /* UINavigationController+Swizzling.m in Sources */,
+				C4D4C9321ED7C37F00ADD7B7 /* AppDelegate.m in Sources */,
+				61E4719C1B7D9C8300F4A1BF /* NTESSessionViewController.m in Sources */,
+				61E4712F1B7D963E00F4A1BF /* NTESChartletAttachment.m in Sources */,
+				8351CB721E977D9000DF4866 /* NTESContactDataCell.m in Sources */,
+				61E4714F1B7D963E00F4A1BF /* NTESVideoViewController.m in Sources */,
+				61E4715C1B7D963E00F4A1BF /* NTESListHeader.m in Sources */,
+				834FE0141E272E56008F218F /* NTESSessionPeekViewController.m in Sources */,
+				61518A4A1CA233390061C4A9 /* NTESNavigationAnimator.m in Sources */,
+				61E471301B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.m in Sources */,
+				6195CD201A8C4D3C00F3E239 /* NSString+NTES.m in Sources */,
+				61E4712A1B7D963E00F4A1BF /* NTESLoginViewController.m in Sources */,
+				61E471111B7D963E00F4A1BF /* NTESCustomSysNotificationSender.m in Sources */,
+				61E471451B7D963E00F4A1BF /* NTESGalleryViewController.m in Sources */,
+				61E4715D1B7D963E00F4A1BF /* NTESClientsTableViewController.m in Sources */,
+				C4A734601EE6BBD300D6489D /* GroupMoreTableViewController.m in Sources */,
+				6159DF531C45F79D00E32EB4 /* NTESChatroomConfig.m in Sources */,
+				03A4C9FF1AC2B79700E45E03 /* UIAlertView+NTESBlock.m in Sources */,
+				6173AECE1BAAC70200854D49 /* NTESBirthSettingViewController.m in Sources */,
+				61E4715A1B7D963E00F4A1BF /* NTESMutiClientsHeaderView.m in Sources */,
+				6159DF5A1C45FAF500E32EB4 /* NTESChatroomTextContentView.m in Sources */,
+				61775E931C571FE500C1DA03 /* NTESLiveActionView.m in Sources */,
+				61E4713B1B7D963E00F4A1BF /* NTESSessionChartletContentView.m in Sources */,
+				619586811C19717B00858434 /* NTESChatroomListViewController.m in Sources */,
+				61E471941B7D96AA00F4A1BF /* NTESService.m in Sources */,
+				61E470F61B7D963E00F4A1BF /* NTESColorButtonCell.m in Sources */,
+				61518A561CA233BB0061C4A9 /* NTESDemoService.m in Sources */,
+				C4D4C9361ED7C37F00ADD7B7 /* TabBarController.m in Sources */,
+				6110D8B51C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.m in Sources */,
+				61EAD9151B82FEE9005DC715 /* NTESPersonalCardViewController.m in Sources */,
+				C4D8F12D1ED48657002F9F3A /* AFNetworkReachabilityManager.m in Sources */,
+				61A8EF341BB67F0900033FB8 /* UIResponder+NTESFirstResponder.m in Sources */,
+				61EEE7701C22865D00022315 /* NTESLiveInfoViewController.m in Sources */,
+				61E471521B7D963E00F4A1BF /* NTESAudioChatViewController.m in Sources */,
+				61E4712E1B7D963E00F4A1BF /* NTESSessionConfig.m in Sources */,
+				6173AEC01BAAB91C00854D49 /* NTESNickNameSettingViewController.m in Sources */,
+				61518A551CA233BB0061C4A9 /* NTESDemoRegisterTask.m in Sources */,
+				61839A9B1BF9B60400702DF0 /* NTESFPSLabel.m in Sources */,
+				61E471141B7D963E00F4A1BF /* NTESGroupedDataCollection.m in Sources */,
+				610B5FBF1BADCCCD001F7EFB /* NTESBirthPickerView.m in Sources */,
+				6173AEDB1BAAD03900854D49 /* NTESUserUtil.m in Sources */,
+				61E4714E1B7D963E00F4A1BF /* NTESWhiteboardDrawView.m in Sources */,
+				C4D8F12C1ED48657002F9F3A /* AFHTTPSessionManager.m in Sources */,
+				61DA56FF1B53E33F00828B8A /* UIImage+NTES.m in Sources */,
+				C4D8F12E1ED48657002F9F3A /* AFSecurityPolicy.m in Sources */,
+				C4D8F1311ED48658002F9F3A /* AFURLSessionManager.m in Sources */,
+				61E4715B1B7D963E00F4A1BF /* NTESTextHeaderView.m in Sources */,
+				61E471551B7D963E00F4A1BF /* NTESVideoChatViewController.m in Sources */,
+				61E471021B7D963E00F4A1BF /* NTESJionTeamViewController.m in Sources */,
+				C4B639521ED57DAB004288FC /* PSCityPickerView.m in Sources */,
+				C40F4C4B1EF15BC7002B197A /* GiftTopBarItem.m in Sources */,
+				C4D4C9371ED7C37F00ADD7B7 /* ViewController.m in Sources */,
+				61518A541CA233BB0061C4A9 /* NTESDemoFetchChatroomTask.m in Sources */,
+				61E4718E1B7D96AA00F4A1BF /* NTESFileLocationHelper.m in Sources */,
+				61E471931B7D96AA00F4A1BF /* NTESNotificationCenter.m in Sources */,
+				E48988E81DE42353001CF6C5 /* NTESCellLayoutConfig.m in Sources */,
+				6173AED21BAAC8CF00854D49 /* NTESMobileSettingViewController.m in Sources */,
+				61E471571B7D963E00F4A1BF /* NTESVideoChatNetStatusView.m in Sources */,
+				C4D4C9351ED7C37F00ADD7B7 /* RegisterViewController.m in Sources */,
+				6118F5A61C5A0FC1009AF01E /* UINavigationBar+Swizzling.m in Sources */,
+				C4D4C9401ED81F2100ADD7B7 /* CityPickerViewController.m in Sources */,
+				C41B6EF81EEFB30D00AD1F53 /* RechargeViewController.m in Sources */,
+				BDB02D261E09172F00262A50 /* NTESNetDetectViewController.m in Sources */,
+				61AEC12A1BD69C6E00B00F02 /* NTESSessionCardViewController.m in Sources */,
+				61AF8CE11C55170900BFC84F /* UIScrollView+NTESDirection.m in Sources */,
+				6118F5A81C5A0FC1009AF01E /* UINavigationItem+Swizzling.m in Sources */,
+				C4A734631EE6D4DE00D6489D /* GroupMoreTableViewCell.m in Sources */,
+				61E471231B7D963E00F4A1BF /* NTESSystemNotificationCell.m in Sources */,
+				61206EE71C1E607B009E4C78 /* NTESChatroomListCell.m in Sources */,
+				61E471191B7D963E00F4A1BF /* NTESContactUtilCell.m in Sources */,
+				61E471661B7D963E00F4A1BF /* NTESSettingPortraitCell.m in Sources */,
+				61E471131B7D963E00F4A1BF /* NTESGroupedContacts.m in Sources */,
+				C4D8F12F1ED48657002F9F3A /* AFURLRequestSerialization.m in Sources */,
+				61E4718D1B7D96AA00F4A1BF /* NTESDemoConfig.m in Sources */,
+				61E471541B7D963E00F4A1BF /* NTESNetChatViewController.m in Sources */,
+				61E471331B7D963E00F4A1BF /* NTESSearchLocalHistoryObject.m in Sources */,
+				6173AED81BAAC8F500854D49 /* NTESSignSettingViewController.m in Sources */,
+				61E471201B7D963E00F4A1BF /* NTESCustomNotificationObject.m in Sources */,
+				C4A7D3661EE803E7009B5849 /* FriendViewController.m in Sources */,
+				6173AEC41BAAB94400854D49 /* NTESUserInfoSettingViewController.m in Sources */,
+				61B2AEFD1BB9530F0093F532 /* NTESCardPortraitCell.m in Sources */,
+				C4D8F1301ED48658002F9F3A /* AFURLResponseSerialization.m in Sources */,
+				61E4711D1B7D963E00F4A1BF /* NTESContactViewController.m in Sources */,
+				61E471491B7D963E00F4A1BF /* NTESSessionLocalHistoryViewController.m in Sources */,
+				613A2FED1C21049E00508990 /* NTESLiveViewController.m in Sources */,
+				61E4713F1B7D963E00F4A1BF /* NTESAudio2TextViewController.m in Sources */,
+				61E471341B7D963E00F4A1BF /* NTESSessionMsgConverter.m in Sources */,
+				61EAD9121B82F275005DC715 /* NTESContactAddFriendViewController.m in Sources */,
+				61C2CE521C489F0D00D76104 /* NTESChatroomManager.m in Sources */,
+				61E4713C1B7D963E00F4A1BF /* NTESSessionJankenponContentView.m in Sources */,
+				61E471971B7D96AA00F4A1BF /* NTESPinyinConverter.m in Sources */,
+				613A2FEA1C21016600508990 /* NTESChatroomSegmentedControl.m in Sources */,
+				E4562D8B1CE0855A00D66909 /* NTESSDKConfigDelegate.m in Sources */,
+				C4B639571ED581E2004288FC /* User.m in Sources */,
+				6117562E1BEB6978006A1589 /* NTESAliasSettingViewController.m in Sources */,
+				61E4712C1B7D963E00F4A1BF /* NTESRegisterViewController.m in Sources */,
+				619087091BABE5D400F3A0C7 /* NTESDevice.m in Sources */,
+				61B5D7EB1C21331600B52DBF /* NTESPageView.m in Sources */,
+				C4D4C93D1ED7C3DE00ADD7B7 /* GroupTableController.m in Sources */,
+				61E4713D1B7D963E00F4A1BF /* NTESSessionSnapchatContentView.m in Sources */,
+				61E471281B7D963E00F4A1BF /* NTESLoginManager.m in Sources */,
+				612CACEE1BB1484C00C348B5 /* NTESContactDataMember.m in Sources */,
+				61E471391B7D963E00F4A1BF /* NTESSearchMessageContentCell.m in Sources */,
+				6173AEC91BAAC6CB00854D49 /* NTESGenderSettingViewController.m in Sources */,
+				E45E17801CA8CBA500C4ED69 /* NTESLogManager.m in Sources */,
+				C4D4C9331ED7C37F00ADD7B7 /* LoginViewController.m in Sources */,
+				61518A4B1CA233390061C4A9 /* NTESNavigationHandler.m in Sources */,
+				61E471621B7D963E00F4A1BF /* NTESAboutViewController.m in Sources */,
+				61E471411B7D963E00F4A1BF /* NTESFilePreViewController.m in Sources */,
+				611ABF011B3CF4FC00B8706C /* NTESBadgeView.m in Sources */,
+				611FE9EE1BB02320005E8E45 /* (null) in Sources */,
+				C4B146391EF2351900819893 /* SettingTableViewController.m in Sources */,
+				61E7B5881DCF39E200F19E83 /* NTESSessionTipContentView.m in Sources */,
+				61EEE7791C22AEB300022315 /* NTESLiveBroadcastView.m in Sources */,
+				BDB0FC691BA7E6D30066654D /* NTESGLView.m in Sources */,
+				61E4711A1B7D963E00F4A1BF /* NTESContactUtilItem.m in Sources */,
+				E48988EE1DE4263D001CF6C5 /* NTESChatroomTextContentConfig.m in Sources */,
+				C4D4C93C1ED7C3DE00ADD7B7 /* CreateGroupViewController.m in Sources */,
+				C4D4C9261ED7C2A900ADD7B7 /* GroupTableViewCell.m in Sources */,
+				61E4713A1B7D963E00F4A1BF /* NTESSearchMessageEntraceCell.m in Sources */,
+				61A1422F1AD7B02E00DCAD88 /* NSDictionary+NTESJson.m in Sources */,
+				61E471351B7D963E00F4A1BF /* NTESSnapchatAttachment.m in Sources */,
+				61E1311D1C1A6778009AFEF1 /* NTESChatroomViewController.m in Sources */,
+				61E4714C1B7D963E00F4A1BF /* NTESWhiteboardViewController.m in Sources */,
+				611ABF001B3CF4FC00B8706C /* NTESAvatarImageView.m in Sources */,
+				C4B1463C1EF24E6300819893 /* SettingAccountViewController.m in Sources */,
+				61E471611B7D963E00F4A1BF /* NTESNoDisturbTimeCell.m in Sources */,
+				C41B6EFC1EEFB67500AD1F53 /* RechargeItem.m in Sources */,
+				6185D2991BAAFBAF0046F90F /* NTESSettingCheckCell.m in Sources */,
+				61E471581B7D963E00F4A1BF /* NTESMutiClientsCell.m in Sources */,
+				61E4718B1B7D96AA00F4A1BF /* NTESClientUtil.m in Sources */,
+				61E471071B7D963E00F4A1BF /* NTESSearchTeamViewController.m in Sources */,
+				61E471671B7D963E00F4A1BF /* NTESSettingSwitcherCell.m in Sources */,
+				61E4710C1B7D963E00F4A1BF /* NTESTeamListViewController.m in Sources */,
+				61E4718A1B7D96AA00F4A1BF /* NTESBundleSetting.m in Sources */,
+				AE2AA6851A7CD35C00CFF013 /* UIView+NTES.m in Sources */,
+				E45E177A1CA8CB6200C4ED69 /* NTESLogUploader.m in Sources */,
+				61518A5A1CA234590061C4A9 /* NTESMainTabController.m in Sources */,
+				61EAD9181B833C4E005DC715 /* NTESBlackListViewController.m in Sources */,
+				612FA9551C1EC202008956C9 /* NTESChatroomMessageDataProvider.m in Sources */,
+				61E4714A1B7D963E00F4A1BF /* NTESSessionRemoteHistoryViewController.m in Sources */,
+				61E4711F1B7D963E00F4A1BF /* NTESCustomNotificationDB.m in Sources */,
+				61E471951B7D96AA00F4A1BF /* NTESSessionUtil.m in Sources */,
+				611ABF041B3CF4FC00B8706C /* NTESMarginButton.m in Sources */,
+				61E4715E1B7D963E00F4A1BF /* NTESSessionListViewController.m in Sources */,
+				61E471251B7D963E00F4A1BF /* NTESSystemNotificationViewController.m in Sources */,
+				61E4715F1B7D963E00F4A1BF /* NTESNoDisturbSettingViewController.m in Sources */,
+				83F32B731E94EFE200E594E0 /* NTESSubscribeManager.m in Sources */,
+				61E471641B7D963E00F4A1BF /* NTESSettingViewController.m in Sources */,
+				C4D4C9341ED7C37F00ADD7B7 /* main.m in Sources */,
+				6173AED51BAAC8E700854D49 /* NTESEmailSettingViewController.m in Sources */,
+				03A4CA001AC2B79700E45E03 /* UIActionSheet+NTESBlock.m in Sources */,
+				61E471431B7D963E00F4A1BF /* NTESFileTransSelectViewController.m in Sources */,
+				61E4713E1B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.m in Sources */,
+				6118F5A91C5A0FC1009AF01E /* UIView+Swizzling.m in Sources */,
+				6110D8A91C23E76D00805BA4 /* NTESChatroomMemberCell.m in Sources */,
+				E48988EB1DE42391001CF6C5 /* NTESSessionCustomContentConfig.m in Sources */,
+				61E471211B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.m in Sources */,
+				61E471311B7D963E00F4A1BF /* NTESJanKenPonAttachment.m in Sources */,
+				61E471981B7D96AA00F4A1BF /* NTESSpellingCenter.m in Sources */,
+				61FB27711C4E70AA0086E0EB /* NTESChatroomMaker.m in Sources */,
+				BD52DB3E1B8F300E00434D0E /* NTESCADisplayLinkHolder.m in Sources */,
+				61EAD91B1B834E72005DC715 /* NTESUserListCell.m in Sources */,
+				61E471511B7D963E00F4A1BF /* NetCallChatInfo.m in Sources */,
+				E49D53C11B451C7400A869AC /* NSData+NTES.m in Sources */,
+				61EEE7761C22964500022315 /* NTESLiveMasterInfoView.m in Sources */,
+				61EEE7731C22917400022315 /* NTESChatroomMemberListViewController.m in Sources */,
+				617D015D1AEDE03900C6DB77 /* UIImage+NTESColor.m in Sources */,
+				61EAD9081B82D0A2005DC715 /* NTESTextSettingCell.m in Sources */,
+				61E471361B7D963E00F4A1BF /* NTESWhiteboardAttachment.m in Sources */,
+				E45E17811CA8CBA500C4ED69 /* NTESLogViewController.m in Sources */,
+				907DBE851E5C777300317C36 /* NTESRecordSelectView.m in Sources */,
+				61E471151B7D963E00F4A1BF /* NTESGroupedUsrInfo.m in Sources */,
+				61E471961B7D96AA00F4A1BF /* NTESTimerHolder.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		C4D8F14D1ED4883F002F9F3A /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				C4D8F14E1ED48840002F9F3A /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+		C4D8F14F1ED48840002F9F3A /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				C4D8F1501ED48840002F9F3A /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		AE5883061A6F47E10070536A /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = E4E8D98F1BB131F20077AE60 /* nim_debug.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+				CLANG_CXX_LIBRARY = "compiler-default";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../NIMKit/NIMKit/Vendors/**";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_CFLAGS = "";
+				OTHER_LDFLAGS = "";
+				PROVISIONING_PROFILE = "32a53238-b6da-412b-b796-062d8cc51086";
+				SDKROOT = iphoneos;
+				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../NIMLib/NIMLib/**";
+			};
+			name = Debug;
+		};
+		AE5883071A6F47E10070536A /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = E4E8D9901BB132040077AE60 /* nim_release.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+				CLANG_CXX_LIBRARY = "compiler-default";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "iPhone Distribution: Cooperation Communication Operating and Support Center China Telecom";
+				"CODE_SIGN_IDENTITY[sdk=*]" = "iPhone Distribution: Cooperation Communication Operating and Support Center China Telecom";
+				COPY_PHASE_STRIP = NO;
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../NIMKit/NIMKit/Vendors/**";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+				OTHER_LDFLAGS = "";
+				PROVISIONING_PROFILE = "1a895aab-42c9-4e6f-89ed-a5e1a4685d5a";
+				SDKROOT = iphoneos;
+				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../NIMLib/NIMLib/**";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		AE5883091A6F47E10070536A /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = AC6B8AE55C5B47CC8A2E7CA1 /* Pods-NIMDemo-NIM.debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+				CLANG_CXX_LIBRARY = "compiler-default";
+				CODE_SIGN_ENTITLEMENTS = "NIMDemo/Supporting Files/NIMDev.entitlements";
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				DEVELOPMENT_TEAM = DGEMLT57K8;
+				ENABLE_BITCODE = YES;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(SRCROOT)/../NIMKit/NIMKit/Vendors/**",
+				);
+				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/NIMDemo/NIMDemo-Prefix.pch";
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(SRCROOT)/../NIMKit/NIMKit/**",
+				);
+				INFOPLIST_FILE = "NIMDemo/Supporting Files/Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = "$(inherited)";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-ObjC",
+					"-framework",
+					"\"NIMSDK\"",
+					"-framework",
+					"\"NIMAVChat\"",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.dashgame.whosay;
+				PRODUCT_NAME = NIM;
+				PROVISIONING_PROFILE = "";
+				PROVISIONING_PROFILE_SPECIFIER = "";
+				TARGETED_DEVICE_FAMILY = 1;
+				USER_HEADER_SEARCH_PATHS = "";
+			};
+			name = Debug;
+		};
+		AE58830A1A6F47E10070536A /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = C716F6793D5D6D1604893032 /* Pods-NIMDemo-NIM.release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+				CLANG_CXX_LIBRARY = "compiler-default";
+				CODE_SIGN_ENTITLEMENTS = "NIMDemo/Supporting Files/NIMPro.entitlements";
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=*]" = "$(XCCONFIG_CODE_SIGNING)";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				DEVELOPMENT_TEAM = DGEMLT57K8;
+				ENABLE_BITCODE = YES;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(SRCROOT)/../NIMKit/NIMKit/Vendors/**",
+				);
+				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/NIMDemo/NIMDemo-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					"COCOAPODS=1",
+					NDEBUG,
+				);
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(SRCROOT)/../NIMKit/NIMKit/**",
+				);
+				INFOPLIST_FILE = "NIMDemo/Supporting Files/Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = "$(inherited)";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-ObjC",
+					"-framework",
+					"\"NIMSDK\"",
+					"-framework",
+					"\"NIMAVChat\"",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.dashgame.whosay;
+				PRODUCT_NAME = NIM;
+				PROVISIONING_PROFILE = "";
+				PROVISIONING_PROFILE_SPECIFIER = "";
+				TARGETED_DEVICE_FAMILY = 1;
+				USER_HEADER_SEARCH_PATHS = "";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		AE5882E01A6F47E10070536A /* Build configuration list for PBXProject "NIMDemo" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AE5883061A6F47E10070536A /* Debug */,
+				AE5883071A6F47E10070536A /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		AE5883081A6F47E10070536A /* Build configuration list for PBXNativeTarget "NIM" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AE5883091A6F47E10070536A /* Debug */,
+				AE58830A1A6F47E10070536A /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = AE5882DD1A6F47E10070536A /* Project object */;
+}

+ 7 - 0
NIMDemo/NIMDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:NIM.xcodeproj">
+   </FileRef>
+</Workspace>

BIN
NIMDemo/NIMDemo.xcodeproj/project.xcworkspace/xcuserdata/fenric.xcuserdatad/UserInterfaceState.xcuserstate


+ 133 - 0
NIMDemo/NIMDemo.xcodeproj/xcshareddata/xcschemes/NIM.xcscheme

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0830"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "NO"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "83A389221E49C8000062CB96"
+               BuildableName = "NIMSDK.framework"
+               BlueprintName = "NIMSDK"
+               ReferencedContainer = "container:../NIMLib/NIMLib.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "83E816BF1E4AEAC700984738"
+               BuildableName = "NIMAVChat.framework"
+               BlueprintName = "NIMAVChat"
+               ReferencedContainer = "container:../NIMAVChat/NIMAVChat.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "6187F91E1B818ED800EFFB3A"
+               BuildableName = "libNIMKit.a"
+               BlueprintName = "NIMKit"
+               ReferencedContainer = "container:../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMKit/NIMKit.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "AE5882E41A6F47E10070536A"
+               BuildableName = "NIM.app"
+               BlueprintName = "NIM"
+               ReferencedContainer = "container:NIMDemo.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "AE5882E41A6F47E10070536A"
+            BuildableName = "NIM.app"
+            BlueprintName = "NIM"
+            ReferencedContainer = "container:NIMDemo.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "AE5882E41A6F47E10070536A"
+            BuildableName = "NIM.app"
+            BlueprintName = "NIM"
+            ReferencedContainer = "container:NIMDemo.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "AE5882E41A6F47E10070536A"
+            BuildableName = "NIM.app"
+            BlueprintName = "NIM"
+            ReferencedContainer = "container:NIMDemo.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Debug"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 22 - 0
NIMDemo/NIMDemo.xcodeproj/xcuserdata/Fenix.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>NIM.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>AE5882E41A6F47E10070536A</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
+</dict>
+</plist>

+ 22 - 0
NIMDemo/NIMDemo.xcodeproj/xcuserdata/fenric.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>NIM.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>22</integer>
+		</dict>
+	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>AE5882E41A6F47E10070536A</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
+</dict>
+</plist>

+ 304 - 0
NIMDemo/NIMDemo/AFNetworking/AFHTTPSessionManager.h

@@ -0,0 +1,304 @@
+// AFHTTPSessionManager.h
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#if !TARGET_OS_WATCH
+#import <SystemConfiguration/SystemConfiguration.h>
+#endif
+#import <TargetConditionals.h>
+
+#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
+#import <MobileCoreServices/MobileCoreServices.h>
+#else
+#import <CoreServices/CoreServices.h>
+#endif
+
+#import "AFURLSessionManager.h"
+
+/**
+ `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths.
+
+ ## Subclassing Notes
+
+ Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.
+
+ For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.
+
+ ## Methods to Override
+
+ To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:`.
+
+ ## Serialization
+
+ Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.
+
+ Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
+
+ ## URL Construction Using Relative Paths
+
+ For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.
+
+ Below are a few examples of how `baseURL` and relative paths interact:
+
+    NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"];
+    [NSURL URLWithString:@"foo" relativeToURL:baseURL];                  // http://example.com/v1/foo
+    [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL];          // http://example.com/v1/foo?bar=baz
+    [NSURL URLWithString:@"/foo" relativeToURL:baseURL];                 // http://example.com/foo
+    [NSURL URLWithString:@"foo/" relativeToURL:baseURL];                 // http://example.com/v1/foo
+    [NSURL URLWithString:@"/foo/" relativeToURL:baseURL];                // http://example.com/foo/
+    [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/
+
+ Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.
+
+ @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
+ */
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying>
+
+/**
+ The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
+ */
+@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
+
+/**
+ Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
+
+ @warning `requestSerializer` must not be `nil`.
+ */
+@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
+
+/**
+ Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.
+
+ @warning `responseSerializer` must not be `nil`.
+ */
+@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
+
+///-------------------------------
+/// @name Managing Security Policy
+///-------------------------------
+
+/**
+ The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. A security policy configured with `AFSSLPinningModePublicKey` or `AFSSLPinningModeCertificate` can only be applied on a session manager initialized with a secure base URL (i.e. https). Applying a security policy with pinning enabled on an insecure session manager throws an `Invalid Security Policy` exception.
+ */
+@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
+
+///---------------------
+/// @name Initialization
+///---------------------
+
+/**
+ Creates and returns an `AFHTTPSessionManager` object.
+ */
++ (instancetype)manager;
+
+/**
+ Initializes an `AFHTTPSessionManager` object with the specified base URL.
+
+ @param url The base URL for the HTTP client.
+
+ @return The newly-initialized HTTP client
+ */
+- (instancetype)initWithBaseURL:(nullable NSURL *)url;
+
+/**
+ Initializes an `AFHTTPSessionManager` object with the specified base URL.
+
+ This is the designated initializer.
+
+ @param url The base URL for the HTTP client.
+ @param configuration The configuration used to create the managed session.
+
+ @return The newly-initialized HTTP client
+ */
+- (instancetype)initWithBaseURL:(nullable NSURL *)url
+           sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
+
+///---------------------------
+/// @name Making HTTP Requests
+///---------------------------
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `GET` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
+                   parameters:(nullable id)parameters
+                      success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                      failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `GET` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
+                            parameters:(nullable id)parameters
+                              progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress
+                               success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                               failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `HEAD` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
+                    parameters:(nullable id)parameters
+                       success:(nullable void (^)(NSURLSessionDataTask *task))success
+                       failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `POST` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
+                    parameters:(nullable id)parameters
+                       success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                       failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `POST` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
+                             parameters:(nullable id)parameters
+                               progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
+                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
+                    parameters:(nullable id)parameters
+     constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
+                       success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                       failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
+ @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
+                             parameters:(nullable id)parameters
+              constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
+                               progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
+                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `PUT` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
+                   parameters:(nullable id)parameters
+                      success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                      failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
+                     parameters:(nullable id)parameters
+                        success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                        failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
+
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
+                      parameters:(nullable id)parameters
+                         success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                         failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 372 - 0
NIMDemo/NIMDemo/AFNetworking/AFHTTPSessionManager.m

@@ -0,0 +1,372 @@
+// AFHTTPSessionManager.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFHTTPSessionManager.h"
+
+#import "AFURLRequestSerialization.h"
+#import "AFURLResponseSerialization.h"
+
+#import <Availability.h>
+#import <TargetConditionals.h>
+#import <Security/Security.h>
+
+#import <netinet/in.h>
+#import <netinet6/in6.h>
+#import <arpa/inet.h>
+#import <ifaddrs.h>
+#import <netdb.h>
+
+#if TARGET_OS_IOS || TARGET_OS_TV
+#import <UIKit/UIKit.h>
+#elif TARGET_OS_WATCH
+#import <WatchKit/WatchKit.h>
+#endif
+
+@interface AFHTTPSessionManager ()
+@property (readwrite, nonatomic, strong) NSURL *baseURL;
+@end
+
+@implementation AFHTTPSessionManager
+@dynamic responseSerializer;
+
++ (instancetype)manager {
+    return [[[self class] alloc] initWithBaseURL:nil];
+}
+
+- (instancetype)init {
+    return [self initWithBaseURL:nil];
+}
+
+- (instancetype)initWithBaseURL:(NSURL *)url {
+    return [self initWithBaseURL:url sessionConfiguration:nil];
+}
+
+- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
+    return [self initWithBaseURL:nil sessionConfiguration:configuration];
+}
+
+- (instancetype)initWithBaseURL:(NSURL *)url
+           sessionConfiguration:(NSURLSessionConfiguration *)configuration
+{
+    self = [super initWithSessionConfiguration:configuration];
+    if (!self) {
+        return nil;
+    }
+
+    // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected
+    if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) {
+        url = [url URLByAppendingPathComponent:@""];
+    }
+
+    self.baseURL = url;
+
+    self.requestSerializer = [AFHTTPRequestSerializer serializer];
+    self.responseSerializer = [AFJSONResponseSerializer serializer];
+
+    return self;
+}
+
+#pragma mark -
+
+- (void)setRequestSerializer:(AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer {
+    NSParameterAssert(requestSerializer);
+
+    _requestSerializer = requestSerializer;
+}
+
+- (void)setResponseSerializer:(AFHTTPResponseSerializer <AFURLResponseSerialization> *)responseSerializer {
+    NSParameterAssert(responseSerializer);
+
+    [super setResponseSerializer:responseSerializer];
+}
+
+@dynamic securityPolicy;
+
+- (void)setSecurityPolicy:(AFSecurityPolicy *)securityPolicy {
+    if (securityPolicy.SSLPinningMode != AFSSLPinningModeNone && ![self.baseURL.scheme isEqualToString:@"https"]) {
+        NSString *pinningMode = @"Unknown Pinning Mode";
+        switch (securityPolicy.SSLPinningMode) {
+            case AFSSLPinningModeNone:        pinningMode = @"AFSSLPinningModeNone"; break;
+            case AFSSLPinningModeCertificate: pinningMode = @"AFSSLPinningModeCertificate"; break;
+            case AFSSLPinningModePublicKey:   pinningMode = @"AFSSLPinningModePublicKey"; break;
+        }
+        NSString *reason = [NSString stringWithFormat:@"A security policy configured with `%@` can only be applied on a manager with a secure base URL (i.e. https)", pinningMode];
+        @throw [NSException exceptionWithName:@"Invalid Security Policy" reason:reason userInfo:nil];
+    }
+
+    [super setSecurityPolicy:securityPolicy];
+}
+
+#pragma mark -
+
+- (NSURLSessionDataTask *)GET:(NSString *)URLString
+                   parameters:(id)parameters
+                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+
+    return [self GET:URLString parameters:parameters progress:nil success:success failure:failure];
+}
+
+- (NSURLSessionDataTask *)GET:(NSString *)URLString
+                   parameters:(id)parameters
+                     progress:(void (^)(NSProgress * _Nonnull))downloadProgress
+                      success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
+                      failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
+{
+
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET"
+                                                        URLString:URLString
+                                                       parameters:parameters
+                                                   uploadProgress:nil
+                                                 downloadProgress:downloadProgress
+                                                          success:success
+                                                          failure:failure];
+
+    [dataTask resume];
+
+    return dataTask;
+}
+
+- (NSURLSessionDataTask *)HEAD:(NSString *)URLString
+                    parameters:(id)parameters
+                       success:(void (^)(NSURLSessionDataTask *task))success
+                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask *task, __unused id responseObject) {
+        if (success) {
+            success(task);
+        }
+    } failure:failure];
+
+    [dataTask resume];
+
+    return dataTask;
+}
+
+- (NSURLSessionDataTask *)POST:(NSString *)URLString
+                    parameters:(id)parameters
+                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    return [self POST:URLString parameters:parameters progress:nil success:success failure:failure];
+}
+
+- (NSURLSessionDataTask *)POST:(NSString *)URLString
+                    parameters:(id)parameters
+                      progress:(void (^)(NSProgress * _Nonnull))uploadProgress
+                       success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
+                       failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure];
+
+    [dataTask resume];
+
+    return dataTask;
+}
+
+- (NSURLSessionDataTask *)POST:(NSString *)URLString
+                    parameters:(nullable id)parameters
+     constructingBodyWithBlock:(nullable void (^)(id<AFMultipartFormData> _Nonnull))block
+                       success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
+                       failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
+{
+    return [self POST:URLString parameters:parameters constructingBodyWithBlock:block progress:nil success:success failure:failure];
+}
+
+- (NSURLSessionDataTask *)POST:(NSString *)URLString
+                    parameters:(id)parameters
+     constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
+                      progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress
+                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSError *serializationError = nil;
+    NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];
+    if (serializationError) {
+        if (failure) {
+            dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
+                failure(nil, serializationError);
+            });
+        }
+
+        return nil;
+    }
+
+    __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:uploadProgress completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {
+        if (error) {
+            if (failure) {
+                failure(task, error);
+            }
+        } else {
+            if (success) {
+                success(task, responseObject);
+            }
+        }
+    }];
+
+    [task resume];
+
+    return task;
+}
+
+- (NSURLSessionDataTask *)PUT:(NSString *)URLString
+                   parameters:(id)parameters
+                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
+
+    [dataTask resume];
+
+    return dataTask;
+}
+
+- (NSURLSessionDataTask *)PATCH:(NSString *)URLString
+                     parameters:(id)parameters
+                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
+
+    [dataTask resume];
+
+    return dataTask;
+}
+
+- (NSURLSessionDataTask *)DELETE:(NSString *)URLString
+                      parameters:(id)parameters
+                         success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                         failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
+
+    [dataTask resume];
+
+    return dataTask;
+}
+
+- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method
+                                       URLString:(NSString *)URLString
+                                      parameters:(id)parameters
+                                  uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress
+                                downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress
+                                         success:(void (^)(NSURLSessionDataTask *, id))success
+                                         failure:(void (^)(NSURLSessionDataTask *, NSError *))failure
+{
+    NSError *serializationError = nil;
+    NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
+    if (serializationError) {
+        if (failure) {
+            dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
+                failure(nil, serializationError);
+            });
+        }
+
+        return nil;
+    }
+
+    __block NSURLSessionDataTask *dataTask = nil;
+    dataTask = [self dataTaskWithRequest:request
+                          uploadProgress:uploadProgress
+                        downloadProgress:downloadProgress
+                       completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {
+        if (error) {
+            if (failure) {
+                failure(dataTask, error);
+            }
+        } else {
+            if (success) {
+                success(dataTask, responseObject);
+            }
+        }
+    }];
+
+    return dataTask;
+}
+
+#pragma mark - NSObject
+
+- (NSString *)description {
+    return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.session, self.operationQueue];
+}
+
+#pragma mark - NSSecureCoding
+
++ (BOOL)supportsSecureCoding {
+    return YES;
+}
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))];
+    NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"];
+    if (!configuration) {
+        NSString *configurationIdentifier = [decoder decodeObjectOfClass:[NSString class] forKey:@"identifier"];
+        if (configurationIdentifier) {
+#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1100)
+            configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:configurationIdentifier];
+#else
+            configuration = [NSURLSessionConfiguration backgroundSessionConfiguration:configurationIdentifier];
+#endif
+        }
+    }
+
+    self = [self initWithBaseURL:baseURL sessionConfiguration:configuration];
+    if (!self) {
+        return nil;
+    }
+
+    self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))];
+    self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))];
+    AFSecurityPolicy *decodedPolicy = [decoder decodeObjectOfClass:[AFSecurityPolicy class] forKey:NSStringFromSelector(@selector(securityPolicy))];
+    if (decodedPolicy) {
+        self.securityPolicy = decodedPolicy;
+    }
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+    [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))];
+    if ([self.session.configuration conformsToProtocol:@protocol(NSCoding)]) {
+        [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"];
+    } else {
+        [coder encodeObject:self.session.configuration.identifier forKey:@"identifier"];
+    }
+    [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))];
+    [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))];
+    [coder encodeObject:self.securityPolicy forKey:NSStringFromSelector(@selector(securityPolicy))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration];
+
+    HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone];
+    HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone];
+    HTTPClient.securityPolicy = [self.securityPolicy copyWithZone:zone];
+    return HTTPClient;
+}
+
+@end

+ 213 - 0
NIMDemo/NIMDemo/AFNetworking/AFNetworkReachabilityManager.h

@@ -0,0 +1,213 @@
+// AFNetworkReachabilityManager.h
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+
+#if !TARGET_OS_WATCH
+#import <SystemConfiguration/SystemConfiguration.h>
+
+typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {
+    AFNetworkReachabilityStatusUnknown          = -1,
+    AFNetworkReachabilityStatusNotReachable     = 0,
+    AFNetworkReachabilityStatusReachableViaWWAN = 1,
+    AFNetworkReachabilityStatusReachableViaWiFi = 2,
+};
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.
+
+ Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability.
+
+ See Apple's Reachability Sample Code ( https://developer.apple.com/library/ios/samplecode/reachability/ )
+
+ @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined.
+ */
+@interface AFNetworkReachabilityManager : NSObject
+
+/**
+ The current network reachability status.
+ */
+@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
+
+/**
+ Whether or not the network is currently reachable.
+ */
+@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable;
+
+/**
+ Whether or not the network is currently reachable via WWAN.
+ */
+@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN;
+
+/**
+ Whether or not the network is currently reachable via WiFi.
+ */
+@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi;
+
+///---------------------
+/// @name Initialization
+///---------------------
+
+/**
+ Returns the shared network reachability manager.
+ */
++ (instancetype)sharedManager;
+
+/**
+ Creates and returns a network reachability manager with the default socket address.
+ 
+ @return An initialized network reachability manager, actively monitoring the default socket address.
+ */
++ (instancetype)manager;
+
+/**
+ Creates and returns a network reachability manager for the specified domain.
+
+ @param domain The domain used to evaluate network reachability.
+
+ @return An initialized network reachability manager, actively monitoring the specified domain.
+ */
++ (instancetype)managerForDomain:(NSString *)domain;
+
+/**
+ Creates and returns a network reachability manager for the socket address.
+
+ @param address The socket address (`sockaddr_in6`) used to evaluate network reachability.
+
+ @return An initialized network reachability manager, actively monitoring the specified socket address.
+ */
++ (instancetype)managerForAddress:(const void *)address;
+
+/**
+ Initializes an instance of a network reachability manager from the specified reachability object.
+
+ @param reachability The reachability object to monitor.
+
+ @return An initialized network reachability manager, actively monitoring the specified reachability.
+ */
+- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
+
+/**
+ *  Initializes an instance of a network reachability manager
+ *
+ *  @return nil as this method is unavailable
+ */
+- (nullable instancetype)init NS_UNAVAILABLE;
+
+///--------------------------------------------------
+/// @name Starting & Stopping Reachability Monitoring
+///--------------------------------------------------
+
+/**
+ Starts monitoring for changes in network reachability status.
+ */
+- (void)startMonitoring;
+
+/**
+ Stops monitoring for changes in network reachability status.
+ */
+- (void)stopMonitoring;
+
+///-------------------------------------------------
+/// @name Getting Localized Reachability Description
+///-------------------------------------------------
+
+/**
+ Returns a localized string representation of the current network reachability status.
+ */
+- (NSString *)localizedNetworkReachabilityStatusString;
+
+///---------------------------------------------------
+/// @name Setting Network Reachability Change Callback
+///---------------------------------------------------
+
+/**
+ Sets a callback to be executed when the network availability of the `baseURL` host changes.
+
+ @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`.
+ */
+- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block;
+
+@end
+
+///----------------
+/// @name Constants
+///----------------
+
+/**
+ ## Network Reachability
+
+ The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses.
+
+ enum {
+ AFNetworkReachabilityStatusUnknown,
+ AFNetworkReachabilityStatusNotReachable,
+ AFNetworkReachabilityStatusReachableViaWWAN,
+ AFNetworkReachabilityStatusReachableViaWiFi,
+ }
+
+ `AFNetworkReachabilityStatusUnknown`
+ The `baseURL` host reachability is not known.
+
+ `AFNetworkReachabilityStatusNotReachable`
+ The `baseURL` host cannot be reached.
+
+ `AFNetworkReachabilityStatusReachableViaWWAN`
+ The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS.
+
+ `AFNetworkReachabilityStatusReachableViaWiFi`
+ The `baseURL` host can be reached via a Wi-Fi connection.
+
+ ### Keys for Notification UserInfo Dictionary
+
+ Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification.
+
+ `AFNetworkingReachabilityNotificationStatusItem`
+ A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification.
+ The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status.
+ */
+
+///--------------------
+/// @name Notifications
+///--------------------
+
+/**
+ Posted when network reachability changes.
+ This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability.
+
+ @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`).
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification;
+FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem;
+
+///--------------------
+/// @name Functions
+///--------------------
+
+/**
+ Returns a localized string representation of an `AFNetworkReachabilityStatus` value.
+ */
+FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status);
+
+NS_ASSUME_NONNULL_END
+#endif

+ 263 - 0
NIMDemo/NIMDemo/AFNetworking/AFNetworkReachabilityManager.m

@@ -0,0 +1,263 @@
+// AFNetworkReachabilityManager.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFNetworkReachabilityManager.h"
+#if !TARGET_OS_WATCH
+
+#import <netinet/in.h>
+#import <netinet6/in6.h>
+#import <arpa/inet.h>
+#import <ifaddrs.h>
+#import <netdb.h>
+
+NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change";
+NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem";
+
+typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status);
+
+NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) {
+    switch (status) {
+        case AFNetworkReachabilityStatusNotReachable:
+            return NSLocalizedStringFromTable(@"Not Reachable", @"AFNetworking", nil);
+        case AFNetworkReachabilityStatusReachableViaWWAN:
+            return NSLocalizedStringFromTable(@"Reachable via WWAN", @"AFNetworking", nil);
+        case AFNetworkReachabilityStatusReachableViaWiFi:
+            return NSLocalizedStringFromTable(@"Reachable via WiFi", @"AFNetworking", nil);
+        case AFNetworkReachabilityStatusUnknown:
+        default:
+            return NSLocalizedStringFromTable(@"Unknown", @"AFNetworking", nil);
+    }
+}
+
+static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetworkReachabilityFlags flags) {
+    BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0);
+    BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0);
+    BOOL canConnectionAutomatically = (((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0));
+    BOOL canConnectWithoutUserInteraction = (canConnectionAutomatically && (flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0);
+    BOOL isNetworkReachable = (isReachable && (!needsConnection || canConnectWithoutUserInteraction));
+
+    AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusUnknown;
+    if (isNetworkReachable == NO) {
+        status = AFNetworkReachabilityStatusNotReachable;
+    }
+#if	TARGET_OS_IPHONE
+    else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) {
+        status = AFNetworkReachabilityStatusReachableViaWWAN;
+    }
+#endif
+    else {
+        status = AFNetworkReachabilityStatusReachableViaWiFi;
+    }
+
+    return status;
+}
+
+/**
+ * Queue a status change notification for the main thread.
+ *
+ * This is done to ensure that the notifications are received in the same order
+ * as they are sent. If notifications are sent directly, it is possible that
+ * a queued notification (for an earlier status condition) is processed after
+ * the later update, resulting in the listener being left in the wrong state.
+ */
+static void AFPostReachabilityStatusChange(SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusBlock block) {
+    AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags);
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if (block) {
+            block(status);
+        }
+        NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
+        NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) };
+        [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo];
+    });
+}
+
+static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) {
+    AFPostReachabilityStatusChange(flags, (__bridge AFNetworkReachabilityStatusBlock)info);
+}
+
+
+static const void * AFNetworkReachabilityRetainCallback(const void *info) {
+    return Block_copy(info);
+}
+
+static void AFNetworkReachabilityReleaseCallback(const void *info) {
+    if (info) {
+        Block_release(info);
+    }
+}
+
+@interface AFNetworkReachabilityManager ()
+@property (readonly, nonatomic, assign) SCNetworkReachabilityRef networkReachability;
+@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
+@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock;
+@end
+
+@implementation AFNetworkReachabilityManager
+
++ (instancetype)sharedManager {
+    static AFNetworkReachabilityManager *_sharedManager = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        _sharedManager = [self manager];
+    });
+
+    return _sharedManager;
+}
+
++ (instancetype)managerForDomain:(NSString *)domain {
+    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]);
+
+    AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
+    
+    CFRelease(reachability);
+
+    return manager;
+}
+
++ (instancetype)managerForAddress:(const void *)address {
+    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address);
+    AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
+
+    CFRelease(reachability);
+    
+    return manager;
+}
+
++ (instancetype)manager
+{
+#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+    struct sockaddr_in6 address;
+    bzero(&address, sizeof(address));
+    address.sin6_len = sizeof(address);
+    address.sin6_family = AF_INET6;
+#else
+    struct sockaddr_in address;
+    bzero(&address, sizeof(address));
+    address.sin_len = sizeof(address);
+    address.sin_family = AF_INET;
+#endif
+    return [self managerForAddress:&address];
+}
+
+- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    _networkReachability = CFRetain(reachability);
+    self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;
+
+    return self;
+}
+
+- (instancetype)init NS_UNAVAILABLE
+{
+    return nil;
+}
+
+- (void)dealloc {
+    [self stopMonitoring];
+    
+    if (_networkReachability != NULL) {
+        CFRelease(_networkReachability);
+    }
+}
+
+#pragma mark -
+
+- (BOOL)isReachable {
+    return [self isReachableViaWWAN] || [self isReachableViaWiFi];
+}
+
+- (BOOL)isReachableViaWWAN {
+    return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN;
+}
+
+- (BOOL)isReachableViaWiFi {
+    return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi;
+}
+
+#pragma mark -
+
+- (void)startMonitoring {
+    [self stopMonitoring];
+
+    if (!self.networkReachability) {
+        return;
+    }
+
+    __weak __typeof(self)weakSelf = self;
+    AFNetworkReachabilityStatusBlock callback = ^(AFNetworkReachabilityStatus status) {
+        __strong __typeof(weakSelf)strongSelf = weakSelf;
+
+        strongSelf.networkReachabilityStatus = status;
+        if (strongSelf.networkReachabilityStatusBlock) {
+            strongSelf.networkReachabilityStatusBlock(status);
+        }
+
+    };
+
+    SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL};
+    SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context);
+    SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
+
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{
+        SCNetworkReachabilityFlags flags;
+        if (SCNetworkReachabilityGetFlags(self.networkReachability, &flags)) {
+            AFPostReachabilityStatusChange(flags, callback);
+        }
+    });
+}
+
+- (void)stopMonitoring {
+    if (!self.networkReachability) {
+        return;
+    }
+
+    SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
+}
+
+#pragma mark -
+
+- (NSString *)localizedNetworkReachabilityStatusString {
+    return AFStringFromNetworkReachabilityStatus(self.networkReachabilityStatus);
+}
+
+#pragma mark -
+
+- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block {
+    self.networkReachabilityStatusBlock = block;
+}
+
+#pragma mark - NSKeyValueObserving
+
++ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
+    if ([key isEqualToString:@"reachable"] || [key isEqualToString:@"reachableViaWWAN"] || [key isEqualToString:@"reachableViaWiFi"]) {
+        return [NSSet setWithObject:@"networkReachabilityStatus"];
+    }
+
+    return [super keyPathsForValuesAffectingValueForKey:key];
+}
+
+@end
+#endif

+ 41 - 0
NIMDemo/NIMDemo/AFNetworking/AFNetworking.h

@@ -0,0 +1,41 @@
+// AFNetworking.h
+//
+// Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import <Availability.h>
+#import <TargetConditionals.h>
+
+#ifndef _AFNETWORKING_
+    #define _AFNETWORKING_
+
+    #import "AFURLRequestSerialization.h"
+    #import "AFURLResponseSerialization.h"
+    #import "AFSecurityPolicy.h"
+
+#if !TARGET_OS_WATCH
+    #import "AFNetworkReachabilityManager.h"
+#endif
+
+    #import "AFURLSessionManager.h"
+    #import "AFHTTPSessionManager.h"
+
+#endif /* _AFNETWORKING_ */

+ 154 - 0
NIMDemo/NIMDemo/AFNetworking/AFSecurityPolicy.h

@@ -0,0 +1,154 @@
+// AFSecurityPolicy.h
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import <Security/Security.h>
+
+typedef NS_ENUM(NSUInteger, AFSSLPinningMode) {
+    AFSSLPinningModeNone,
+    AFSSLPinningModePublicKey,
+    AFSSLPinningModeCertificate,
+};
+
+/**
+ `AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections.
+
+ Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.
+ */
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AFSecurityPolicy : NSObject <NSSecureCoding, NSCopying>
+
+/**
+ The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`.
+ */
+@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
+
+/**
+ The certificates used to evaluate server trust according to the SSL pinning mode. 
+
+  By default, this property is set to any (`.cer`) certificates included in the target compiling AFNetworking. Note that if you are using AFNetworking as embedded framework, no certificates will be pinned by default. Use `certificatesInBundle` to load certificates from your target, and then create a new policy by calling `policyWithPinningMode:withPinnedCertificates`.
+ 
+ Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches.
+ */
+@property (nonatomic, strong, nullable) NSSet <NSData *> *pinnedCertificates;
+
+/**
+ Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`.
+ */
+@property (nonatomic, assign) BOOL allowInvalidCertificates;
+
+/**
+ Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`.
+ */
+@property (nonatomic, assign) BOOL validatesDomainName;
+
+///-----------------------------------------
+/// @name Getting Certificates from the Bundle
+///-----------------------------------------
+
+/**
+ Returns any certificates included in the bundle. If you are using AFNetworking as an embedded framework, you must use this method to find the certificates you have included in your app bundle, and use them when creating your security policy by calling `policyWithPinningMode:withPinnedCertificates`.
+
+ @return The certificates included in the given bundle.
+ */
++ (NSSet <NSData *> *)certificatesInBundle:(NSBundle *)bundle;
+
+///-----------------------------------------
+/// @name Getting Specific Security Policies
+///-----------------------------------------
+
+/**
+ Returns the shared default security policy, which does not allow invalid certificates, validates domain name, and does not validate against pinned certificates or public keys.
+
+ @return The default security policy.
+ */
++ (instancetype)defaultPolicy;
+
+///---------------------
+/// @name Initialization
+///---------------------
+
+/**
+ Creates and returns a security policy with the specified pinning mode.
+
+ @param pinningMode The SSL pinning mode.
+
+ @return A new security policy.
+ */
++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode;
+
+/**
+ Creates and returns a security policy with the specified pinning mode.
+
+ @param pinningMode The SSL pinning mode.
+ @param pinnedCertificates The certificates to pin against.
+
+ @return A new security policy.
+ */
++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet <NSData *> *)pinnedCertificates;
+
+///------------------------------
+/// @name Evaluating Server Trust
+///------------------------------
+
+/**
+ Whether or not the specified server trust should be accepted, based on the security policy.
+
+ This method should be used when responding to an authentication challenge from a server.
+
+ @param serverTrust The X.509 certificate trust of the server.
+ @param domain The domain of serverTrust. If `nil`, the domain will not be validated.
+
+ @return Whether or not to trust the server.
+ */
+- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
+                  forDomain:(nullable NSString *)domain;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+///----------------
+/// @name Constants
+///----------------
+
+/**
+ ## SSL Pinning Modes
+
+ The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes.
+
+ enum {
+ AFSSLPinningModeNone,
+ AFSSLPinningModePublicKey,
+ AFSSLPinningModeCertificate,
+ }
+
+ `AFSSLPinningModeNone`
+ Do not used pinned certificates to validate servers.
+
+ `AFSSLPinningModePublicKey`
+ Validate host certificates against public keys of pinned certificates.
+
+ `AFSSLPinningModeCertificate`
+ Validate host certificates against pinned certificates.
+*/

+ 344 - 0
NIMDemo/NIMDemo/AFNetworking/AFSecurityPolicy.m

@@ -0,0 +1,344 @@
+// AFSecurityPolicy.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFSecurityPolicy.h"
+
+#import <AssertMacros.h>
+
+#if !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV
+static NSData * AFSecKeyGetData(SecKeyRef key) {
+    CFDataRef data = NULL;
+
+    __Require_noErr_Quiet(SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data), _out);
+
+    return (__bridge_transfer NSData *)data;
+
+_out:
+    if (data) {
+        CFRelease(data);
+    }
+
+    return nil;
+}
+#endif
+
+static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
+#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
+    return [(__bridge id)key1 isEqual:(__bridge id)key2];
+#else
+    return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)];
+#endif
+}
+
+static id AFPublicKeyForCertificate(NSData *certificate) {
+    id allowedPublicKey = nil;
+    SecCertificateRef allowedCertificate;
+    SecPolicyRef policy = nil;
+    SecTrustRef allowedTrust = nil;
+    SecTrustResultType result;
+
+    allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate);
+    __Require_Quiet(allowedCertificate != NULL, _out);
+
+    policy = SecPolicyCreateBasicX509();
+    __Require_noErr_Quiet(SecTrustCreateWithCertificates(allowedCertificate, policy, &allowedTrust), _out);
+    __Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out);
+
+    allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust);
+
+_out:
+    if (allowedTrust) {
+        CFRelease(allowedTrust);
+    }
+
+    if (policy) {
+        CFRelease(policy);
+    }
+
+    if (allowedCertificate) {
+        CFRelease(allowedCertificate);
+    }
+
+    return allowedPublicKey;
+}
+
+static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) {
+    BOOL isValid = NO;
+    SecTrustResultType result;
+    __Require_noErr_Quiet(SecTrustEvaluate(serverTrust, &result), _out);
+
+    isValid = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed);
+
+_out:
+    return isValid;
+}
+
+static NSArray * AFCertificateTrustChainForServerTrust(SecTrustRef serverTrust) {
+    CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
+    NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];
+
+    for (CFIndex i = 0; i < certificateCount; i++) {
+        SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);
+        [trustChain addObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)];
+    }
+
+    return [NSArray arrayWithArray:trustChain];
+}
+
+static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) {
+    SecPolicyRef policy = SecPolicyCreateBasicX509();
+    CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
+    NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];
+    for (CFIndex i = 0; i < certificateCount; i++) {
+        SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);
+
+        SecCertificateRef someCertificates[] = {certificate};
+        CFArrayRef certificates = CFArrayCreate(NULL, (const void **)someCertificates, 1, NULL);
+
+        SecTrustRef trust;
+        __Require_noErr_Quiet(SecTrustCreateWithCertificates(certificates, policy, &trust), _out);
+
+        SecTrustResultType result;
+        __Require_noErr_Quiet(SecTrustEvaluate(trust, &result), _out);
+
+        [trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)];
+
+    _out:
+        if (trust) {
+            CFRelease(trust);
+        }
+
+        if (certificates) {
+            CFRelease(certificates);
+        }
+
+        continue;
+    }
+    CFRelease(policy);
+
+    return [NSArray arrayWithArray:trustChain];
+}
+
+#pragma mark -
+
+@interface AFSecurityPolicy()
+@property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
+@property (readwrite, nonatomic, strong) NSSet *pinnedPublicKeys;
+@end
+
+@implementation AFSecurityPolicy
+
++ (NSSet *)certificatesInBundle:(NSBundle *)bundle {
+    NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."];
+
+    NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]];
+    for (NSString *path in paths) {
+        NSData *certificateData = [NSData dataWithContentsOfFile:path];
+        [certificates addObject:certificateData];
+    }
+
+    return [NSSet setWithSet:certificates];
+}
+
++ (NSSet *)defaultPinnedCertificates {
+    static NSSet *_defaultPinnedCertificates = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        NSBundle *bundle = [NSBundle bundleForClass:[self class]];
+        _defaultPinnedCertificates = [self certificatesInBundle:bundle];
+    });
+
+    return _defaultPinnedCertificates;
+}
+
++ (instancetype)defaultPolicy {
+    AFSecurityPolicy *securityPolicy = [[self alloc] init];
+    securityPolicy.SSLPinningMode = AFSSLPinningModeNone;
+
+    return securityPolicy;
+}
+
++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode {
+    return [self policyWithPinningMode:pinningMode withPinnedCertificates:[self defaultPinnedCertificates]];
+}
+
++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates {
+    AFSecurityPolicy *securityPolicy = [[self alloc] init];
+    securityPolicy.SSLPinningMode = pinningMode;
+
+    [securityPolicy setPinnedCertificates:pinnedCertificates];
+
+    return securityPolicy;
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.validatesDomainName = YES;
+
+    return self;
+}
+
+- (void)setPinnedCertificates:(NSSet *)pinnedCertificates {
+    _pinnedCertificates = pinnedCertificates;
+
+    if (self.pinnedCertificates) {
+        NSMutableSet *mutablePinnedPublicKeys = [NSMutableSet setWithCapacity:[self.pinnedCertificates count]];
+        for (NSData *certificate in self.pinnedCertificates) {
+            id publicKey = AFPublicKeyForCertificate(certificate);
+            if (!publicKey) {
+                continue;
+            }
+            [mutablePinnedPublicKeys addObject:publicKey];
+        }
+        self.pinnedPublicKeys = [NSSet setWithSet:mutablePinnedPublicKeys];
+    } else {
+        self.pinnedPublicKeys = nil;
+    }
+}
+
+#pragma mark -
+
+- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
+                  forDomain:(NSString *)domain
+{
+    if (domain && self.allowInvalidCertificates && self.validatesDomainName && (self.SSLPinningMode == AFSSLPinningModeNone || [self.pinnedCertificates count] == 0)) {
+        // https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html
+        //  According to the docs, you should only trust your provided certs for evaluation.
+        //  Pinned certificates are added to the trust. Without pinned certificates,
+        //  there is nothing to evaluate against.
+        //
+        //  From Apple Docs:
+        //          "Do not implicitly trust self-signed certificates as anchors (kSecTrustOptionImplicitAnchors).
+        //           Instead, add your own (self-signed) CA certificate to the list of trusted anchors."
+        NSLog(@"In order to validate a domain name for self signed certificates, you MUST use pinning.");
+        return NO;
+    }
+
+    NSMutableArray *policies = [NSMutableArray array];
+    if (self.validatesDomainName) {
+        [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)];
+    } else {
+        [policies addObject:(__bridge_transfer id)SecPolicyCreateBasicX509()];
+    }
+
+    SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies);
+
+    if (self.SSLPinningMode == AFSSLPinningModeNone) {
+        return self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust);
+    } else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) {
+        return NO;
+    }
+
+    switch (self.SSLPinningMode) {
+        case AFSSLPinningModeNone:
+        default:
+            return NO;
+        case AFSSLPinningModeCertificate: {
+            NSMutableArray *pinnedCertificates = [NSMutableArray array];
+            for (NSData *certificateData in self.pinnedCertificates) {
+                [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)];
+            }
+            SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates);
+
+            if (!AFServerTrustIsValid(serverTrust)) {
+                return NO;
+            }
+
+            // obtain the chain after being validated, which *should* contain the pinned certificate in the last position (if it's the Root CA)
+            NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust);
+            
+            for (NSData *trustChainCertificate in [serverCertificates reverseObjectEnumerator]) {
+                if ([self.pinnedCertificates containsObject:trustChainCertificate]) {
+                    return YES;
+                }
+            }
+            
+            return NO;
+        }
+        case AFSSLPinningModePublicKey: {
+            NSUInteger trustedPublicKeyCount = 0;
+            NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust);
+
+            for (id trustChainPublicKey in publicKeys) {
+                for (id pinnedPublicKey in self.pinnedPublicKeys) {
+                    if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) {
+                        trustedPublicKeyCount += 1;
+                    }
+                }
+            }
+            return trustedPublicKeyCount > 0;
+        }
+    }
+    
+    return NO;
+}
+
+#pragma mark - NSKeyValueObserving
+
++ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys {
+    return [NSSet setWithObject:@"pinnedCertificates"];
+}
+
+#pragma mark - NSSecureCoding
+
++ (BOOL)supportsSecureCoding {
+    return YES;
+}
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+
+    self = [self init];
+    if (!self) {
+        return nil;
+    }
+
+    self.SSLPinningMode = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(SSLPinningMode))] unsignedIntegerValue];
+    self.allowInvalidCertificates = [decoder decodeBoolForKey:NSStringFromSelector(@selector(allowInvalidCertificates))];
+    self.validatesDomainName = [decoder decodeBoolForKey:NSStringFromSelector(@selector(validatesDomainName))];
+    self.pinnedCertificates = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(pinnedCertificates))];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [coder encodeObject:[NSNumber numberWithUnsignedInteger:self.SSLPinningMode] forKey:NSStringFromSelector(@selector(SSLPinningMode))];
+    [coder encodeBool:self.allowInvalidCertificates forKey:NSStringFromSelector(@selector(allowInvalidCertificates))];
+    [coder encodeBool:self.validatesDomainName forKey:NSStringFromSelector(@selector(validatesDomainName))];
+    [coder encodeObject:self.pinnedCertificates forKey:NSStringFromSelector(@selector(pinnedCertificates))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFSecurityPolicy *securityPolicy = [[[self class] allocWithZone:zone] init];
+    securityPolicy.SSLPinningMode = self.SSLPinningMode;
+    securityPolicy.allowInvalidCertificates = self.allowInvalidCertificates;
+    securityPolicy.validatesDomainName = self.validatesDomainName;
+    securityPolicy.pinnedCertificates = [self.pinnedCertificates copyWithZone:zone];
+
+    return securityPolicy;
+}
+
+@end

+ 479 - 0
NIMDemo/NIMDemo/AFNetworking/AFURLRequestSerialization.h

@@ -0,0 +1,479 @@
+// AFURLRequestSerialization.h
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import <TargetConditionals.h>
+
+#if TARGET_OS_IOS || TARGET_OS_TV
+#import <UIKit/UIKit.h>
+#elif TARGET_OS_WATCH
+#import <WatchKit/WatchKit.h>
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ Returns a percent-escaped string following RFC 3986 for a query string key or value.
+ RFC 3986 states that the following characters are "reserved" characters.
+ - General Delimiters: ":", "#", "[", "]", "@", "?", "/"
+ - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
+
+ In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
+ query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
+ should be percent-escaped in the query string.
+ 
+ @param string The string to be percent-escaped.
+ 
+ @return The percent-escaped string.
+ */
+FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string);
+
+/**
+ A helper method to generate encoded url query parameters for appending to the end of a URL.
+
+ @param parameters A dictionary of key/values to be encoded.
+
+ @return A url encoded query string
+ */
+FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters);
+
+/**
+ The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.
+
+ For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the `Content-Type` HTTP header field value to `application/json`.
+ */
+@protocol AFURLRequestSerialization <NSObject, NSSecureCoding, NSCopying>
+
+/**
+ Returns a request with the specified parameters encoded into a copy of the original request.
+
+ @param request The original request.
+ @param parameters The parameters to be encoded.
+ @param error The error that occurred while attempting to encode the request parameters.
+
+ @return A serialized request.
+ */
+- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
+                               withParameters:(nullable id)parameters
+                                        error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW;
+
+@end
+
+#pragma mark -
+
+/**
+
+ */
+typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) {
+    AFHTTPRequestQueryStringDefaultStyle = 0,
+};
+
+@protocol AFMultipartFormData;
+
+/**
+ `AFHTTPRequestSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.
+
+ Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPRequestSerializer` in order to ensure consistent default behavior.
+ */
+@interface AFHTTPRequestSerializer : NSObject <AFURLRequestSerialization>
+
+/**
+ The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default.
+ */
+@property (nonatomic, assign) NSStringEncoding stringEncoding;
+
+/**
+ Whether created requests can use the device’s cellular radio (if present). `YES` by default.
+
+ @see NSMutableURLRequest -setAllowsCellularAccess:
+ */
+@property (nonatomic, assign) BOOL allowsCellularAccess;
+
+/**
+ The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default.
+
+ @see NSMutableURLRequest -setCachePolicy:
+ */
+@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy;
+
+/**
+ Whether created requests should use the default cookie handling. `YES` by default.
+
+ @see NSMutableURLRequest -setHTTPShouldHandleCookies:
+ */
+@property (nonatomic, assign) BOOL HTTPShouldHandleCookies;
+
+/**
+ Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default
+
+ @see NSMutableURLRequest -setHTTPShouldUsePipelining:
+ */
+@property (nonatomic, assign) BOOL HTTPShouldUsePipelining;
+
+/**
+ The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default.
+
+ @see NSMutableURLRequest -setNetworkServiceType:
+ */
+@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType;
+
+/**
+ The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds.
+
+ @see NSMutableURLRequest -setTimeoutInterval:
+ */
+@property (nonatomic, assign) NSTimeInterval timeoutInterval;
+
+///---------------------------------------
+/// @name Configuring HTTP Request Headers
+///---------------------------------------
+
+/**
+ Default HTTP header field values to be applied to serialized requests. By default, these include the following:
+
+ - `Accept-Language` with the contents of `NSLocale +preferredLanguages`
+ - `User-Agent` with the contents of various bundle identifiers and OS designations
+
+ @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`.
+ */
+@property (readonly, nonatomic, strong) NSDictionary <NSString *, NSString *> *HTTPRequestHeaders;
+
+/**
+ Creates and returns a serializer with default configuration.
+ */
++ (instancetype)serializer;
+
+/**
+ Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header.
+
+ @param field The HTTP header to set a default value for
+ @param value The value set as default for the specified header, or `nil`
+ */
+- (void)setValue:(nullable NSString *)value
+forHTTPHeaderField:(NSString *)field;
+
+/**
+ Returns the value for the HTTP headers set in the request serializer.
+
+ @param field The HTTP header to retrieve the default value for
+
+ @return The value set as default for the specified header, or `nil`
+ */
+- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
+
+/**
+ Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header.
+
+ @param username The HTTP basic auth username
+ @param password The HTTP basic auth password
+ */
+- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
+                                       password:(NSString *)password;
+
+/**
+ Clears any existing value for the "Authorization" HTTP header.
+ */
+- (void)clearAuthorizationHeader;
+
+///-------------------------------------------------------
+/// @name Configuring Query String Parameter Serialization
+///-------------------------------------------------------
+
+/**
+ HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default.
+ */
+@property (nonatomic, strong) NSSet <NSString *> *HTTPMethodsEncodingParametersInURI;
+
+/**
+ Set the method of query string serialization according to one of the pre-defined styles.
+
+ @param style The serialization style.
+
+ @see AFHTTPRequestQueryStringSerializationStyle
+ */
+- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style;
+
+/**
+ Set the a custom method of query string serialization according to the specified block.
+
+ @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request.
+ */
+- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block;
+
+///-------------------------------
+/// @name Creating Request Objects
+///-------------------------------
+
+/**
+ Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string.
+
+ If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body.
+
+ @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`.
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body.
+ @param error The error that occurred while constructing the request.
+
+ @return An `NSMutableURLRequest` object.
+ */
+- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
+                                 URLString:(NSString *)URLString
+                                parameters:(nullable id)parameters
+                                     error:(NSError * _Nullable __autoreleasing *)error;
+
+/**
+ Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2
+
+ Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream.
+
+ @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`.
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded and set in the request HTTP body.
+ @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
+ @param error The error that occurred while constructing the request.
+
+ @return An `NSMutableURLRequest` object
+ */
+- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
+                                              URLString:(NSString *)URLString
+                                             parameters:(nullable NSDictionary <NSString *, id> *)parameters
+                              constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
+                                                  error:(NSError * _Nullable __autoreleasing *)error;
+
+/**
+ Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished.
+
+ @param request The multipart form request. The `HTTPBodyStream` property of `request` must not be `nil`.
+ @param fileURL The file URL to write multipart form contents to.
+ @param handler A handler block to execute.
+
+ @discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request.
+
+ @see https://github.com/AFNetworking/AFNetworking/issues/1398
+ */
+- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request
+                             writingStreamContentsToFile:(NSURL *)fileURL
+                                       completionHandler:(nullable void (^)(NSError * _Nullable error))handler;
+
+@end
+
+#pragma mark -
+
+/**
+ The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`.
+ */
+@protocol AFMultipartFormData
+
+/**
+ Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary.
+
+ The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively.
+
+ @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
+ @param name The name to be associated with the specified data. This parameter must not be `nil`.
+ @param error If an error occurs, upon return contains an `NSError` object that describes the problem.
+
+ @return `YES` if the file data was successfully appended, otherwise `NO`.
+ */
+- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
+                         name:(NSString *)name
+                        error:(NSError * _Nullable __autoreleasing *)error;
+
+/**
+ Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
+
+ @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
+ @param name The name to be associated with the specified data. This parameter must not be `nil`.
+ @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`.
+ @param mimeType The declared MIME type of the file data. This parameter must not be `nil`.
+ @param error If an error occurs, upon return contains an `NSError` object that describes the problem.
+
+ @return `YES` if the file data was successfully appended otherwise `NO`.
+ */
+- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
+                         name:(NSString *)name
+                     fileName:(NSString *)fileName
+                     mimeType:(NSString *)mimeType
+                        error:(NSError * _Nullable __autoreleasing *)error;
+
+/**
+ Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary.
+
+ @param inputStream The input stream to be appended to the form data
+ @param name The name to be associated with the specified input stream. This parameter must not be `nil`.
+ @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`.
+ @param length The length of the specified input stream in bytes.
+ @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
+ */
+- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream
+                             name:(NSString *)name
+                         fileName:(NSString *)fileName
+                           length:(int64_t)length
+                         mimeType:(NSString *)mimeType;
+
+/**
+ Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
+
+ @param data The data to be encoded and appended to the form data.
+ @param name The name to be associated with the specified data. This parameter must not be `nil`.
+ @param fileName The filename to be associated with the specified data. This parameter must not be `nil`.
+ @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
+ */
+- (void)appendPartWithFileData:(NSData *)data
+                          name:(NSString *)name
+                      fileName:(NSString *)fileName
+                      mimeType:(NSString *)mimeType;
+
+/**
+ Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary.
+
+ @param data The data to be encoded and appended to the form data.
+ @param name The name to be associated with the specified data. This parameter must not be `nil`.
+ */
+
+- (void)appendPartWithFormData:(NSData *)data
+                          name:(NSString *)name;
+
+
+/**
+ Appends HTTP headers, followed by the encoded data and the multipart form boundary.
+
+ @param headers The HTTP headers to be appended to the form data.
+ @param body The data to be encoded and appended to the form data. This parameter must not be `nil`.
+ */
+- (void)appendPartWithHeaders:(nullable NSDictionary <NSString *, NSString *> *)headers
+                         body:(NSData *)body;
+
+/**
+ Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream.
+
+ When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth.
+
+ @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb.
+ @param delay Duration of delay each time a packet is read. By default, no delay is set.
+ */
+- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes
+                                  delay:(NSTimeInterval)delay;
+
+@end
+
+#pragma mark -
+
+/**
+ `AFJSONRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSJSONSerialization`, setting the `Content-Type` of the encoded request to `application/json`.
+ */
+@interface AFJSONRequestSerializer : AFHTTPRequestSerializer
+
+/**
+ Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONWritingOptions". `0` by default.
+ */
+@property (nonatomic, assign) NSJSONWritingOptions writingOptions;
+
+/**
+ Creates and returns a JSON serializer with specified reading and writing options.
+
+ @param writingOptions The specified JSON writing options.
+ */
++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions;
+
+@end
+
+#pragma mark -
+
+/**
+ `AFPropertyListRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSPropertyListSerializer`, setting the `Content-Type` of the encoded request to `application/x-plist`.
+ */
+@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer
+
+/**
+ The property list format. Possible values are described in "NSPropertyListFormat".
+ */
+@property (nonatomic, assign) NSPropertyListFormat format;
+
+/**
+ @warning The `writeOptions` property is currently unused.
+ */
+@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions;
+
+/**
+ Creates and returns a property list serializer with a specified format, read options, and write options.
+
+ @param format The property list format.
+ @param writeOptions The property list write options.
+
+ @warning The `writeOptions` property is currently unused.
+ */
++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
+                        writeOptions:(NSPropertyListWriteOptions)writeOptions;
+
+@end
+
+#pragma mark -
+
+///----------------
+/// @name Constants
+///----------------
+
+/**
+ ## Error Domains
+
+ The following error domain is predefined.
+
+ - `NSString * const AFURLRequestSerializationErrorDomain`
+
+ ### Constants
+
+ `AFURLRequestSerializationErrorDomain`
+ AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.
+ */
+FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain;
+
+/**
+ ## User info dictionary keys
+
+ These keys may exist in the user info dictionary, in addition to those defined for NSError.
+
+ - `NSString * const AFNetworkingOperationFailingURLRequestErrorKey`
+
+ ### Constants
+
+ `AFNetworkingOperationFailingURLRequestErrorKey`
+ The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey;
+
+/**
+ ## Throttling Bandwidth for HTTP Request Input Streams
+
+ @see -throttleBandwidthWithPacketSize:delay:
+
+ ### Constants
+
+ `kAFUploadStream3GSuggestedPacketSize`
+ Maximum packet size, in number of bytes. Equal to 16kb.
+
+ `kAFUploadStream3GSuggestedDelay`
+ Duration of delay each time a packet is read. Equal to 0.2 seconds.
+ */
+FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize;
+FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay;
+
+NS_ASSUME_NONNULL_END

+ 1393 - 0
NIMDemo/NIMDemo/AFNetworking/AFURLRequestSerialization.m

@@ -0,0 +1,1393 @@
+// AFURLRequestSerialization.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFURLRequestSerialization.h"
+
+#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
+#import <MobileCoreServices/MobileCoreServices.h>
+#else
+#import <CoreServices/CoreServices.h>
+#endif
+
+NSString * const AFURLRequestSerializationErrorDomain = @"com.alamofire.error.serialization.request";
+NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofire.serialization.request.error.response";
+
+typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error);
+
+/**
+ Returns a percent-escaped string following RFC 3986 for a query string key or value.
+ RFC 3986 states that the following characters are "reserved" characters.
+    - General Delimiters: ":", "#", "[", "]", "@", "?", "/"
+    - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
+
+ In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
+ query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
+ should be percent-escaped in the query string.
+    - parameter string: The string to be percent-escaped.
+    - returns: The percent-escaped string.
+ */
+NSString * AFPercentEscapedStringFromString(NSString *string) {
+    static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4
+    static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;=";
+
+    NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy];
+    [allowedCharacterSet removeCharactersInString:[kAFCharactersGeneralDelimitersToEncode stringByAppendingString:kAFCharactersSubDelimitersToEncode]];
+
+	// FIXME: https://github.com/AFNetworking/AFNetworking/pull/3028
+    // return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet];
+
+    static NSUInteger const batchSize = 50;
+
+    NSUInteger index = 0;
+    NSMutableString *escaped = @"".mutableCopy;
+
+    while (index < string.length) {
+        NSUInteger length = MIN(string.length - index, batchSize);
+        NSRange range = NSMakeRange(index, length);
+
+        // To avoid breaking up character sequences such as 👴🏻👮🏽
+        range = [string rangeOfComposedCharacterSequencesForRange:range];
+
+        NSString *substring = [string substringWithRange:range];
+        NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet];
+        [escaped appendString:encoded];
+
+        index += range.length;
+    }
+
+	return escaped;
+}
+
+#pragma mark -
+
+@interface AFQueryStringPair : NSObject
+@property (readwrite, nonatomic, strong) id field;
+@property (readwrite, nonatomic, strong) id value;
+
+- (instancetype)initWithField:(id)field value:(id)value;
+
+- (NSString *)URLEncodedStringValue;
+@end
+
+@implementation AFQueryStringPair
+
+- (instancetype)initWithField:(id)field value:(id)value {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.field = field;
+    self.value = value;
+
+    return self;
+}
+
+- (NSString *)URLEncodedStringValue {
+    if (!self.value || [self.value isEqual:[NSNull null]]) {
+        return AFPercentEscapedStringFromString([self.field description]);
+    } else {
+        return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedStringFromString([self.field description]), AFPercentEscapedStringFromString([self.value description])];
+    }
+}
+
+@end
+
+#pragma mark -
+
+FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary);
+FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value);
+
+NSString * AFQueryStringFromParameters(NSDictionary *parameters) {
+    NSMutableArray *mutablePairs = [NSMutableArray array];
+    for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {
+        [mutablePairs addObject:[pair URLEncodedStringValue]];
+    }
+
+    return [mutablePairs componentsJoinedByString:@"&"];
+}
+
+NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary) {
+    return AFQueryStringPairsFromKeyAndValue(nil, dictionary);
+}
+
+NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) {
+    NSMutableArray *mutableQueryStringComponents = [NSMutableArray array];
+
+    NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)];
+
+    if ([value isKindOfClass:[NSDictionary class]]) {
+        NSDictionary *dictionary = value;
+        // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries
+        for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) {
+            id nestedValue = dictionary[nestedKey];
+            if (nestedValue) {
+                [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)];
+            }
+        }
+    } else if ([value isKindOfClass:[NSArray class]]) {
+        NSArray *array = value;
+        for (id nestedValue in array) {
+            [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)];
+        }
+    } else if ([value isKindOfClass:[NSSet class]]) {
+        NSSet *set = value;
+        for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) {
+            [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, obj)];
+        }
+    } else {
+        [mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]];
+    }
+
+    return mutableQueryStringComponents;
+}
+
+#pragma mark -
+
+@interface AFStreamingMultipartFormData : NSObject <AFMultipartFormData>
+- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest
+                    stringEncoding:(NSStringEncoding)encoding;
+
+- (NSMutableURLRequest *)requestByFinalizingMultipartFormData;
+@end
+
+#pragma mark -
+
+static NSArray * AFHTTPRequestSerializerObservedKeyPaths() {
+    static NSArray *_AFHTTPRequestSerializerObservedKeyPaths = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        _AFHTTPRequestSerializerObservedKeyPaths = @[NSStringFromSelector(@selector(allowsCellularAccess)), NSStringFromSelector(@selector(cachePolicy)), NSStringFromSelector(@selector(HTTPShouldHandleCookies)), NSStringFromSelector(@selector(HTTPShouldUsePipelining)), NSStringFromSelector(@selector(networkServiceType)), NSStringFromSelector(@selector(timeoutInterval))];
+    });
+
+    return _AFHTTPRequestSerializerObservedKeyPaths;
+}
+
+static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerObserverContext;
+
+@interface AFHTTPRequestSerializer ()
+@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths;
+@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders;
+@property (readwrite, nonatomic, strong) dispatch_queue_t requestHeaderModificationQueue;
+@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle;
+@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization;
+@end
+
+@implementation AFHTTPRequestSerializer
+
++ (instancetype)serializer {
+    return [[self alloc] init];
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.stringEncoding = NSUTF8StringEncoding;
+
+    self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary];
+    self.requestHeaderModificationQueue = dispatch_queue_create("requestHeaderModificationQueue", DISPATCH_QUEUE_CONCURRENT);
+
+    // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
+    NSMutableArray *acceptLanguagesComponents = [NSMutableArray array];
+    [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
+        float q = 1.0f - (idx * 0.1f);
+        [acceptLanguagesComponents addObject:[NSString stringWithFormat:@"%@;q=%0.1g", obj, q]];
+        *stop = q <= 0.5f;
+    }];
+    [self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"];
+
+    NSString *userAgent = nil;
+#if TARGET_OS_IOS
+    // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
+    userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
+#elif TARGET_OS_WATCH
+    // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
+    userAgent = [NSString stringWithFormat:@"%@/%@ (%@; watchOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[WKInterfaceDevice currentDevice] model], [[WKInterfaceDevice currentDevice] systemVersion], [[WKInterfaceDevice currentDevice] screenScale]];
+#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+    userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]];
+#endif
+    if (userAgent) {
+        if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) {
+            NSMutableString *mutableUserAgent = [userAgent mutableCopy];
+            if (CFStringTransform((__bridge CFMutableStringRef)(mutableUserAgent), NULL, (__bridge CFStringRef)@"Any-Latin; Latin-ASCII; [:^ASCII:] Remove", false)) {
+                userAgent = mutableUserAgent;
+            }
+        }
+        [self setValue:userAgent forHTTPHeaderField:@"User-Agent"];
+    }
+
+    // HTTP Method Definitions; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
+    self.HTTPMethodsEncodingParametersInURI = [NSSet setWithObjects:@"GET", @"HEAD", @"DELETE", nil];
+
+    self.mutableObservedChangedKeyPaths = [NSMutableSet set];
+    for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {
+        if ([self respondsToSelector:NSSelectorFromString(keyPath)]) {
+            [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:AFHTTPRequestSerializerObserverContext];
+        }
+    }
+
+    return self;
+}
+
+- (void)dealloc {
+    for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {
+        if ([self respondsToSelector:NSSelectorFromString(keyPath)]) {
+            [self removeObserver:self forKeyPath:keyPath context:AFHTTPRequestSerializerObserverContext];
+        }
+    }
+}
+
+#pragma mark -
+
+// Workarounds for crashing behavior using Key-Value Observing with XCTest
+// See https://github.com/AFNetworking/AFNetworking/issues/2523
+
+- (void)setAllowsCellularAccess:(BOOL)allowsCellularAccess {
+    [self willChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))];
+    _allowsCellularAccess = allowsCellularAccess;
+    [self didChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))];
+}
+
+- (void)setCachePolicy:(NSURLRequestCachePolicy)cachePolicy {
+    [self willChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))];
+    _cachePolicy = cachePolicy;
+    [self didChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))];
+}
+
+- (void)setHTTPShouldHandleCookies:(BOOL)HTTPShouldHandleCookies {
+    [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))];
+    _HTTPShouldHandleCookies = HTTPShouldHandleCookies;
+    [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))];
+}
+
+- (void)setHTTPShouldUsePipelining:(BOOL)HTTPShouldUsePipelining {
+    [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))];
+    _HTTPShouldUsePipelining = HTTPShouldUsePipelining;
+    [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))];
+}
+
+- (void)setNetworkServiceType:(NSURLRequestNetworkServiceType)networkServiceType {
+    [self willChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))];
+    _networkServiceType = networkServiceType;
+    [self didChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))];
+}
+
+- (void)setTimeoutInterval:(NSTimeInterval)timeoutInterval {
+    [self willChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))];
+    _timeoutInterval = timeoutInterval;
+    [self didChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))];
+}
+
+#pragma mark -
+
+- (NSDictionary *)HTTPRequestHeaders {
+    NSDictionary __block *value;
+    dispatch_sync(self.requestHeaderModificationQueue, ^{
+        value = [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders];
+    });
+    return value;
+}
+
+- (void)setValue:(NSString *)value
+forHTTPHeaderField:(NSString *)field
+{
+    dispatch_barrier_async(self.requestHeaderModificationQueue, ^{
+        [self.mutableHTTPRequestHeaders setValue:value forKey:field];
+    });
+}
+
+- (NSString *)valueForHTTPHeaderField:(NSString *)field {
+    NSString __block *value;
+    dispatch_sync(self.requestHeaderModificationQueue, ^{
+        value = [self.mutableHTTPRequestHeaders valueForKey:field];
+    });
+    return value;
+}
+
+- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
+                                       password:(NSString *)password
+{
+    NSData *basicAuthCredentials = [[NSString stringWithFormat:@"%@:%@", username, password] dataUsingEncoding:NSUTF8StringEncoding];
+    NSString *base64AuthCredentials = [basicAuthCredentials base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)0];
+    [self setValue:[NSString stringWithFormat:@"Basic %@", base64AuthCredentials] forHTTPHeaderField:@"Authorization"];
+}
+
+- (void)clearAuthorizationHeader {
+    dispatch_barrier_async(self.requestHeaderModificationQueue, ^{
+        [self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"];
+    });
+}
+
+#pragma mark -
+
+- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style {
+    self.queryStringSerializationStyle = style;
+    self.queryStringSerialization = nil;
+}
+
+- (void)setQueryStringSerializationWithBlock:(NSString *(^)(NSURLRequest *, id, NSError *__autoreleasing *))block {
+    self.queryStringSerialization = block;
+}
+
+#pragma mark -
+
+- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
+                                 URLString:(NSString *)URLString
+                                parameters:(id)parameters
+                                     error:(NSError *__autoreleasing *)error
+{
+    NSParameterAssert(method);
+    NSParameterAssert(URLString);
+
+    NSURL *url = [NSURL URLWithString:URLString];
+
+    NSParameterAssert(url);
+
+    NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url];
+    mutableRequest.HTTPMethod = method;
+
+    for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {
+        if ([self.mutableObservedChangedKeyPaths containsObject:keyPath]) {
+            [mutableRequest setValue:[self valueForKeyPath:keyPath] forKey:keyPath];
+        }
+    }
+
+    mutableRequest = [[self requestBySerializingRequest:mutableRequest withParameters:parameters error:error] mutableCopy];
+
+	return mutableRequest;
+}
+
+- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
+                                              URLString:(NSString *)URLString
+                                             parameters:(NSDictionary *)parameters
+                              constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
+                                                  error:(NSError *__autoreleasing *)error
+{
+    NSParameterAssert(method);
+    NSParameterAssert(![method isEqualToString:@"GET"] && ![method isEqualToString:@"HEAD"]);
+
+    NSMutableURLRequest *mutableRequest = [self requestWithMethod:method URLString:URLString parameters:nil error:error];
+
+    __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:mutableRequest stringEncoding:NSUTF8StringEncoding];
+
+    if (parameters) {
+        for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {
+            NSData *data = nil;
+            if ([pair.value isKindOfClass:[NSData class]]) {
+                data = pair.value;
+            } else if ([pair.value isEqual:[NSNull null]]) {
+                data = [NSData data];
+            } else {
+                data = [[pair.value description] dataUsingEncoding:self.stringEncoding];
+            }
+
+            if (data) {
+                [formData appendPartWithFormData:data name:[pair.field description]];
+            }
+        }
+    }
+
+    if (block) {
+        block(formData);
+    }
+
+    return [formData requestByFinalizingMultipartFormData];
+}
+
+- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request
+                             writingStreamContentsToFile:(NSURL *)fileURL
+                                       completionHandler:(void (^)(NSError *error))handler
+{
+    NSParameterAssert(request.HTTPBodyStream);
+    NSParameterAssert([fileURL isFileURL]);
+
+    NSInputStream *inputStream = request.HTTPBodyStream;
+    NSOutputStream *outputStream = [[NSOutputStream alloc] initWithURL:fileURL append:NO];
+    __block NSError *error = nil;
+
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+        [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+
+        [inputStream open];
+        [outputStream open];
+
+        while ([inputStream hasBytesAvailable] && [outputStream hasSpaceAvailable]) {
+            uint8_t buffer[1024];
+
+            NSInteger bytesRead = [inputStream read:buffer maxLength:1024];
+            if (inputStream.streamError || bytesRead < 0) {
+                error = inputStream.streamError;
+                break;
+            }
+
+            NSInteger bytesWritten = [outputStream write:buffer maxLength:(NSUInteger)bytesRead];
+            if (outputStream.streamError || bytesWritten < 0) {
+                error = outputStream.streamError;
+                break;
+            }
+
+            if (bytesRead == 0 && bytesWritten == 0) {
+                break;
+            }
+        }
+
+        [outputStream close];
+        [inputStream close];
+
+        if (handler) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                handler(error);
+            });
+        }
+    });
+
+    NSMutableURLRequest *mutableRequest = [request mutableCopy];
+    mutableRequest.HTTPBodyStream = nil;
+
+    return mutableRequest;
+}
+
+#pragma mark - AFURLRequestSerialization
+
+- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
+                               withParameters:(id)parameters
+                                        error:(NSError *__autoreleasing *)error
+{
+    NSParameterAssert(request);
+
+    NSMutableURLRequest *mutableRequest = [request mutableCopy];
+
+    [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {
+        if (![request valueForHTTPHeaderField:field]) {
+            [mutableRequest setValue:value forHTTPHeaderField:field];
+        }
+    }];
+
+    NSString *query = nil;
+    if (parameters) {
+        if (self.queryStringSerialization) {
+            NSError *serializationError;
+            query = self.queryStringSerialization(request, parameters, &serializationError);
+
+            if (serializationError) {
+                if (error) {
+                    *error = serializationError;
+                }
+
+                return nil;
+            }
+        } else {
+            switch (self.queryStringSerializationStyle) {
+                case AFHTTPRequestQueryStringDefaultStyle:
+                    query = AFQueryStringFromParameters(parameters);
+                    break;
+            }
+        }
+    }
+
+    if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
+        if (query && query.length > 0) {
+            mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]];
+        }
+    } else {
+        // #2864: an empty string is a valid x-www-form-urlencoded payload
+        if (!query) {
+            query = @"";
+        }
+        if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) {
+            [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
+        }
+        [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]];
+    }
+
+    return mutableRequest;
+}
+
+#pragma mark - NSKeyValueObserving
+
++ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key {
+    if ([AFHTTPRequestSerializerObservedKeyPaths() containsObject:key]) {
+        return NO;
+    }
+
+    return [super automaticallyNotifiesObserversForKey:key];
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath
+                      ofObject:(__unused id)object
+                        change:(NSDictionary *)change
+                       context:(void *)context
+{
+    if (context == AFHTTPRequestSerializerObserverContext) {
+        if ([change[NSKeyValueChangeNewKey] isEqual:[NSNull null]]) {
+            [self.mutableObservedChangedKeyPaths removeObject:keyPath];
+        } else {
+            [self.mutableObservedChangedKeyPaths addObject:keyPath];
+        }
+    }
+}
+
+#pragma mark - NSSecureCoding
+
++ (BOOL)supportsSecureCoding {
+    return YES;
+}
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [self init];
+    if (!self) {
+        return nil;
+    }
+
+    self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy];
+    self.queryStringSerializationStyle = (AFHTTPRequestQueryStringSerializationStyle)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    dispatch_sync(self.requestHeaderModificationQueue, ^{
+        [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))];
+    });
+    [coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init];
+    dispatch_sync(self.requestHeaderModificationQueue, ^{
+        serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone];
+    });
+    serializer.queryStringSerializationStyle = self.queryStringSerializationStyle;
+    serializer.queryStringSerialization = self.queryStringSerialization;
+
+    return serializer;
+}
+
+@end
+
+#pragma mark -
+
+static NSString * AFCreateMultipartFormBoundary() {
+    return [NSString stringWithFormat:@"Boundary+%08X%08X", arc4random(), arc4random()];
+}
+
+static NSString * const kAFMultipartFormCRLF = @"\r\n";
+
+static inline NSString * AFMultipartFormInitialBoundary(NSString *boundary) {
+    return [NSString stringWithFormat:@"--%@%@", boundary, kAFMultipartFormCRLF];
+}
+
+static inline NSString * AFMultipartFormEncapsulationBoundary(NSString *boundary) {
+    return [NSString stringWithFormat:@"%@--%@%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF];
+}
+
+static inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) {
+    return [NSString stringWithFormat:@"%@--%@--%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF];
+}
+
+static inline NSString * AFContentTypeForPathExtension(NSString *extension) {
+    NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL);
+    NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType);
+    if (!contentType) {
+        return @"application/octet-stream";
+    } else {
+        return contentType;
+    }
+}
+
+NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16;
+NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
+
+@interface AFHTTPBodyPart : NSObject
+@property (nonatomic, assign) NSStringEncoding stringEncoding;
+@property (nonatomic, strong) NSDictionary *headers;
+@property (nonatomic, copy) NSString *boundary;
+@property (nonatomic, strong) id body;
+@property (nonatomic, assign) unsigned long long bodyContentLength;
+@property (nonatomic, strong) NSInputStream *inputStream;
+
+@property (nonatomic, assign) BOOL hasInitialBoundary;
+@property (nonatomic, assign) BOOL hasFinalBoundary;
+
+@property (readonly, nonatomic, assign, getter = hasBytesAvailable) BOOL bytesAvailable;
+@property (readonly, nonatomic, assign) unsigned long long contentLength;
+
+- (NSInteger)read:(uint8_t *)buffer
+        maxLength:(NSUInteger)length;
+@end
+
+@interface AFMultipartBodyStream : NSInputStream <NSStreamDelegate>
+@property (nonatomic, assign) NSUInteger numberOfBytesInPacket;
+@property (nonatomic, assign) NSTimeInterval delay;
+@property (nonatomic, strong) NSInputStream *inputStream;
+@property (readonly, nonatomic, assign) unsigned long long contentLength;
+@property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty;
+
+- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding;
+- (void)setInitialAndFinalBoundaries;
+- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart;
+@end
+
+#pragma mark -
+
+@interface AFStreamingMultipartFormData ()
+@property (readwrite, nonatomic, copy) NSMutableURLRequest *request;
+@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding;
+@property (readwrite, nonatomic, copy) NSString *boundary;
+@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream;
+@end
+
+@implementation AFStreamingMultipartFormData
+
+- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest
+                    stringEncoding:(NSStringEncoding)encoding
+{
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.request = urlRequest;
+    self.stringEncoding = encoding;
+    self.boundary = AFCreateMultipartFormBoundary();
+    self.bodyStream = [[AFMultipartBodyStream alloc] initWithStringEncoding:encoding];
+
+    return self;
+}
+
+- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
+                         name:(NSString *)name
+                        error:(NSError * __autoreleasing *)error
+{
+    NSParameterAssert(fileURL);
+    NSParameterAssert(name);
+
+    NSString *fileName = [fileURL lastPathComponent];
+    NSString *mimeType = AFContentTypeForPathExtension([fileURL pathExtension]);
+
+    return [self appendPartWithFileURL:fileURL name:name fileName:fileName mimeType:mimeType error:error];
+}
+
+- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
+                         name:(NSString *)name
+                     fileName:(NSString *)fileName
+                     mimeType:(NSString *)mimeType
+                        error:(NSError * __autoreleasing *)error
+{
+    NSParameterAssert(fileURL);
+    NSParameterAssert(name);
+    NSParameterAssert(fileName);
+    NSParameterAssert(mimeType);
+
+    if (![fileURL isFileURL]) {
+        NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"Expected URL to be a file URL", @"AFNetworking", nil)};
+        if (error) {
+            *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo];
+        }
+
+        return NO;
+    } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) {
+        NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"File URL not reachable.", @"AFNetworking", nil)};
+        if (error) {
+            *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo];
+        }
+
+        return NO;
+    }
+
+    NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:error];
+    if (!fileAttributes) {
+        return NO;
+    }
+
+    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
+    [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
+    [mutableHeaders setValue:mimeType forKey:@"Content-Type"];
+
+    AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];
+    bodyPart.stringEncoding = self.stringEncoding;
+    bodyPart.headers = mutableHeaders;
+    bodyPart.boundary = self.boundary;
+    bodyPart.body = fileURL;
+    bodyPart.bodyContentLength = [fileAttributes[NSFileSize] unsignedLongLongValue];
+    [self.bodyStream appendHTTPBodyPart:bodyPart];
+
+    return YES;
+}
+
+- (void)appendPartWithInputStream:(NSInputStream *)inputStream
+                             name:(NSString *)name
+                         fileName:(NSString *)fileName
+                           length:(int64_t)length
+                         mimeType:(NSString *)mimeType
+{
+    NSParameterAssert(name);
+    NSParameterAssert(fileName);
+    NSParameterAssert(mimeType);
+
+    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
+    [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
+    [mutableHeaders setValue:mimeType forKey:@"Content-Type"];
+
+    AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];
+    bodyPart.stringEncoding = self.stringEncoding;
+    bodyPart.headers = mutableHeaders;
+    bodyPart.boundary = self.boundary;
+    bodyPart.body = inputStream;
+
+    bodyPart.bodyContentLength = (unsigned long long)length;
+
+    [self.bodyStream appendHTTPBodyPart:bodyPart];
+}
+
+- (void)appendPartWithFileData:(NSData *)data
+                          name:(NSString *)name
+                      fileName:(NSString *)fileName
+                      mimeType:(NSString *)mimeType
+{
+    NSParameterAssert(name);
+    NSParameterAssert(fileName);
+    NSParameterAssert(mimeType);
+
+    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
+    [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
+    [mutableHeaders setValue:mimeType forKey:@"Content-Type"];
+
+    [self appendPartWithHeaders:mutableHeaders body:data];
+}
+
+- (void)appendPartWithFormData:(NSData *)data
+                          name:(NSString *)name
+{
+    NSParameterAssert(name);
+
+    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
+    [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"];
+
+    [self appendPartWithHeaders:mutableHeaders body:data];
+}
+
+- (void)appendPartWithHeaders:(NSDictionary *)headers
+                         body:(NSData *)body
+{
+    NSParameterAssert(body);
+
+    AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];
+    bodyPart.stringEncoding = self.stringEncoding;
+    bodyPart.headers = headers;
+    bodyPart.boundary = self.boundary;
+    bodyPart.bodyContentLength = [body length];
+    bodyPart.body = body;
+
+    [self.bodyStream appendHTTPBodyPart:bodyPart];
+}
+
+- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes
+                                  delay:(NSTimeInterval)delay
+{
+    self.bodyStream.numberOfBytesInPacket = numberOfBytes;
+    self.bodyStream.delay = delay;
+}
+
+- (NSMutableURLRequest *)requestByFinalizingMultipartFormData {
+    if ([self.bodyStream isEmpty]) {
+        return self.request;
+    }
+
+    // Reset the initial and final boundaries to ensure correct Content-Length
+    [self.bodyStream setInitialAndFinalBoundaries];
+    [self.request setHTTPBodyStream:self.bodyStream];
+
+    [self.request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", self.boundary] forHTTPHeaderField:@"Content-Type"];
+    [self.request setValue:[NSString stringWithFormat:@"%llu", [self.bodyStream contentLength]] forHTTPHeaderField:@"Content-Length"];
+
+    return self.request;
+}
+
+@end
+
+#pragma mark -
+
+@interface NSStream ()
+@property (readwrite) NSStreamStatus streamStatus;
+@property (readwrite, copy) NSError *streamError;
+@end
+
+@interface AFMultipartBodyStream () <NSCopying>
+@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding;
+@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts;
+@property (readwrite, nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator;
+@property (readwrite, nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart;
+@property (readwrite, nonatomic, strong) NSOutputStream *outputStream;
+@property (readwrite, nonatomic, strong) NSMutableData *buffer;
+@end
+
+@implementation AFMultipartBodyStream
+#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100)
+@synthesize delegate;
+#endif
+@synthesize streamStatus;
+@synthesize streamError;
+
+- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.stringEncoding = encoding;
+    self.HTTPBodyParts = [NSMutableArray array];
+    self.numberOfBytesInPacket = NSIntegerMax;
+
+    return self;
+}
+
+- (void)setInitialAndFinalBoundaries {
+    if ([self.HTTPBodyParts count] > 0) {
+        for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {
+            bodyPart.hasInitialBoundary = NO;
+            bodyPart.hasFinalBoundary = NO;
+        }
+
+        [[self.HTTPBodyParts firstObject] setHasInitialBoundary:YES];
+        [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES];
+    }
+}
+
+- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart {
+    [self.HTTPBodyParts addObject:bodyPart];
+}
+
+- (BOOL)isEmpty {
+    return [self.HTTPBodyParts count] == 0;
+}
+
+#pragma mark - NSInputStream
+
+- (NSInteger)read:(uint8_t *)buffer
+        maxLength:(NSUInteger)length
+{
+    if ([self streamStatus] == NSStreamStatusClosed) {
+        return 0;
+    }
+
+    NSInteger totalNumberOfBytesRead = 0;
+
+    while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) {
+        if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) {
+            if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) {
+                break;
+            }
+        } else {
+            NSUInteger maxLength = MIN(length, self.numberOfBytesInPacket) - (NSUInteger)totalNumberOfBytesRead;
+            NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength];
+            if (numberOfBytesRead == -1) {
+                self.streamError = self.currentHTTPBodyPart.inputStream.streamError;
+                break;
+            } else {
+                totalNumberOfBytesRead += numberOfBytesRead;
+
+                if (self.delay > 0.0f) {
+                    [NSThread sleepForTimeInterval:self.delay];
+                }
+            }
+        }
+    }
+
+    return totalNumberOfBytesRead;
+}
+
+- (BOOL)getBuffer:(__unused uint8_t **)buffer
+           length:(__unused NSUInteger *)len
+{
+    return NO;
+}
+
+- (BOOL)hasBytesAvailable {
+    return [self streamStatus] == NSStreamStatusOpen;
+}
+
+#pragma mark - NSStream
+
+- (void)open {
+    if (self.streamStatus == NSStreamStatusOpen) {
+        return;
+    }
+
+    self.streamStatus = NSStreamStatusOpen;
+
+    [self setInitialAndFinalBoundaries];
+    self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator];
+}
+
+- (void)close {
+    self.streamStatus = NSStreamStatusClosed;
+}
+
+- (id)propertyForKey:(__unused NSString *)key {
+    return nil;
+}
+
+- (BOOL)setProperty:(__unused id)property
+             forKey:(__unused NSString *)key
+{
+    return NO;
+}
+
+- (void)scheduleInRunLoop:(__unused NSRunLoop *)aRunLoop
+                  forMode:(__unused NSString *)mode
+{}
+
+- (void)removeFromRunLoop:(__unused NSRunLoop *)aRunLoop
+                  forMode:(__unused NSString *)mode
+{}
+
+- (unsigned long long)contentLength {
+    unsigned long long length = 0;
+    for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {
+        length += [bodyPart contentLength];
+    }
+
+    return length;
+}
+
+#pragma mark - Undocumented CFReadStream Bridged Methods
+
+- (void)_scheduleInCFRunLoop:(__unused CFRunLoopRef)aRunLoop
+                     forMode:(__unused CFStringRef)aMode
+{}
+
+- (void)_unscheduleFromCFRunLoop:(__unused CFRunLoopRef)aRunLoop
+                         forMode:(__unused CFStringRef)aMode
+{}
+
+- (BOOL)_setCFClientFlags:(__unused CFOptionFlags)inFlags
+                 callback:(__unused CFReadStreamClientCallBack)inCallback
+                  context:(__unused CFStreamClientContext *)inContext {
+    return NO;
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding];
+
+    for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {
+        [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]];
+    }
+
+    [bodyStreamCopy setInitialAndFinalBoundaries];
+
+    return bodyStreamCopy;
+}
+
+@end
+
+#pragma mark -
+
+typedef enum {
+    AFEncapsulationBoundaryPhase = 1,
+    AFHeaderPhase                = 2,
+    AFBodyPhase                  = 3,
+    AFFinalBoundaryPhase         = 4,
+} AFHTTPBodyPartReadPhase;
+
+@interface AFHTTPBodyPart () <NSCopying> {
+    AFHTTPBodyPartReadPhase _phase;
+    NSInputStream *_inputStream;
+    unsigned long long _phaseReadOffset;
+}
+
+- (BOOL)transitionToNextPhase;
+- (NSInteger)readData:(NSData *)data
+           intoBuffer:(uint8_t *)buffer
+            maxLength:(NSUInteger)length;
+@end
+
+@implementation AFHTTPBodyPart
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    [self transitionToNextPhase];
+
+    return self;
+}
+
+- (void)dealloc {
+    if (_inputStream) {
+        [_inputStream close];
+        _inputStream = nil;
+    }
+}
+
+- (NSInputStream *)inputStream {
+    if (!_inputStream) {
+        if ([self.body isKindOfClass:[NSData class]]) {
+            _inputStream = [NSInputStream inputStreamWithData:self.body];
+        } else if ([self.body isKindOfClass:[NSURL class]]) {
+            _inputStream = [NSInputStream inputStreamWithURL:self.body];
+        } else if ([self.body isKindOfClass:[NSInputStream class]]) {
+            _inputStream = self.body;
+        } else {
+            _inputStream = [NSInputStream inputStreamWithData:[NSData data]];
+        }
+    }
+
+    return _inputStream;
+}
+
+- (NSString *)stringForHeaders {
+    NSMutableString *headerString = [NSMutableString string];
+    for (NSString *field in [self.headers allKeys]) {
+        [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]];
+    }
+    [headerString appendString:kAFMultipartFormCRLF];
+
+    return [NSString stringWithString:headerString];
+}
+
+- (unsigned long long)contentLength {
+    unsigned long long length = 0;
+
+    NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding];
+    length += [encapsulationBoundaryData length];
+
+    NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];
+    length += [headersData length];
+
+    length += _bodyContentLength;
+
+    NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]);
+    length += [closingBoundaryData length];
+
+    return length;
+}
+
+- (BOOL)hasBytesAvailable {
+    // Allows `read:maxLength:` to be called again if `AFMultipartFormFinalBoundary` doesn't fit into the available buffer
+    if (_phase == AFFinalBoundaryPhase) {
+        return YES;
+    }
+
+    switch (self.inputStream.streamStatus) {
+        case NSStreamStatusNotOpen:
+        case NSStreamStatusOpening:
+        case NSStreamStatusOpen:
+        case NSStreamStatusReading:
+        case NSStreamStatusWriting:
+            return YES;
+        case NSStreamStatusAtEnd:
+        case NSStreamStatusClosed:
+        case NSStreamStatusError:
+        default:
+            return NO;
+    }
+}
+
+- (NSInteger)read:(uint8_t *)buffer
+        maxLength:(NSUInteger)length
+{
+    NSInteger totalNumberOfBytesRead = 0;
+
+    if (_phase == AFEncapsulationBoundaryPhase) {
+        NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding];
+        totalNumberOfBytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
+    }
+
+    if (_phase == AFHeaderPhase) {
+        NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];
+        totalNumberOfBytesRead += [self readData:headersData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
+    }
+
+    if (_phase == AFBodyPhase) {
+        NSInteger numberOfBytesRead = 0;
+
+        numberOfBytesRead = [self.inputStream read:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
+        if (numberOfBytesRead == -1) {
+            return -1;
+        } else {
+            totalNumberOfBytesRead += numberOfBytesRead;
+
+            if ([self.inputStream streamStatus] >= NSStreamStatusAtEnd) {
+                [self transitionToNextPhase];
+            }
+        }
+    }
+
+    if (_phase == AFFinalBoundaryPhase) {
+        NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]);
+        totalNumberOfBytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
+    }
+
+    return totalNumberOfBytesRead;
+}
+
+- (NSInteger)readData:(NSData *)data
+           intoBuffer:(uint8_t *)buffer
+            maxLength:(NSUInteger)length
+{
+    NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length));
+    [data getBytes:buffer range:range];
+
+    _phaseReadOffset += range.length;
+
+    if (((NSUInteger)_phaseReadOffset) >= [data length]) {
+        [self transitionToNextPhase];
+    }
+
+    return (NSInteger)range.length;
+}
+
+- (BOOL)transitionToNextPhase {
+    if (![[NSThread currentThread] isMainThread]) {
+        dispatch_sync(dispatch_get_main_queue(), ^{
+            [self transitionToNextPhase];
+        });
+        return YES;
+    }
+
+    switch (_phase) {
+        case AFEncapsulationBoundaryPhase:
+            _phase = AFHeaderPhase;
+            break;
+        case AFHeaderPhase:
+            [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
+            [self.inputStream open];
+            _phase = AFBodyPhase;
+            break;
+        case AFBodyPhase:
+            [self.inputStream close];
+            _phase = AFFinalBoundaryPhase;
+            break;
+        case AFFinalBoundaryPhase:
+        default:
+            _phase = AFEncapsulationBoundaryPhase;
+            break;
+    }
+    _phaseReadOffset = 0;
+
+    return YES;
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init];
+
+    bodyPart.stringEncoding = self.stringEncoding;
+    bodyPart.headers = self.headers;
+    bodyPart.bodyContentLength = self.bodyContentLength;
+    bodyPart.body = self.body;
+    bodyPart.boundary = self.boundary;
+
+    return bodyPart;
+}
+
+@end
+
+#pragma mark -
+
+@implementation AFJSONRequestSerializer
+
++ (instancetype)serializer {
+    return [self serializerWithWritingOptions:(NSJSONWritingOptions)0];
+}
+
++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions
+{
+    AFJSONRequestSerializer *serializer = [[self alloc] init];
+    serializer.writingOptions = writingOptions;
+
+    return serializer;
+}
+
+#pragma mark - AFURLRequestSerialization
+
+- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
+                               withParameters:(id)parameters
+                                        error:(NSError *__autoreleasing *)error
+{
+    NSParameterAssert(request);
+
+    if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
+        return [super requestBySerializingRequest:request withParameters:parameters error:error];
+    }
+
+    NSMutableURLRequest *mutableRequest = [request mutableCopy];
+
+    [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {
+        if (![request valueForHTTPHeaderField:field]) {
+            [mutableRequest setValue:value forHTTPHeaderField:field];
+        }
+    }];
+
+    if (parameters) {
+        if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) {
+            [mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+        }
+
+        if (![NSJSONSerialization isValidJSONObject:parameters]) {
+            if (error) {
+                NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"The `parameters` argument is not valid JSON.", @"AFNetworking", nil)};
+                *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo];
+            }
+            return nil;
+        }
+
+        NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error];
+        
+        if (!jsonData) {
+            return nil;
+        }
+        
+        [mutableRequest setHTTPBody:jsonData];
+    }
+
+    return mutableRequest;
+}
+
+#pragma mark - NSSecureCoding
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (!self) {
+        return nil;
+    }
+
+    self.writingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writingOptions))] unsignedIntegerValue];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+    [coder encodeInteger:self.writingOptions forKey:NSStringFromSelector(@selector(writingOptions))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFJSONRequestSerializer *serializer = [super copyWithZone:zone];
+    serializer.writingOptions = self.writingOptions;
+
+    return serializer;
+}
+
+@end
+
+#pragma mark -
+
+@implementation AFPropertyListRequestSerializer
+
++ (instancetype)serializer {
+    return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 writeOptions:0];
+}
+
++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
+                        writeOptions:(NSPropertyListWriteOptions)writeOptions
+{
+    AFPropertyListRequestSerializer *serializer = [[self alloc] init];
+    serializer.format = format;
+    serializer.writeOptions = writeOptions;
+
+    return serializer;
+}
+
+#pragma mark - AFURLRequestSerializer
+
+- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
+                               withParameters:(id)parameters
+                                        error:(NSError *__autoreleasing *)error
+{
+    NSParameterAssert(request);
+
+    if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
+        return [super requestBySerializingRequest:request withParameters:parameters error:error];
+    }
+
+    NSMutableURLRequest *mutableRequest = [request mutableCopy];
+
+    [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {
+        if (![request valueForHTTPHeaderField:field]) {
+            [mutableRequest setValue:value forHTTPHeaderField:field];
+        }
+    }];
+
+    if (parameters) {
+        if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) {
+            [mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"];
+        }
+
+        NSData *plistData = [NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error];
+        
+        if (!plistData) {
+            return nil;
+        }
+        
+        [mutableRequest setHTTPBody:plistData];
+    }
+
+    return mutableRequest;
+}
+
+#pragma mark - NSSecureCoding
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (!self) {
+        return nil;
+    }
+
+    self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue];
+    self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+    [coder encodeInteger:self.format forKey:NSStringFromSelector(@selector(format))];
+    [coder encodeObject:@(self.writeOptions) forKey:NSStringFromSelector(@selector(writeOptions))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone];
+    serializer.format = self.format;
+    serializer.writeOptions = self.writeOptions;
+
+    return serializer;
+}
+
+@end

+ 308 - 0
NIMDemo/NIMDemo/AFNetworking/AFURLResponseSerialization.h

@@ -0,0 +1,308 @@
+// AFURLResponseSerialization.h
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CoreGraphics.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.
+
+ For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object.
+ */
+@protocol AFURLResponseSerialization <NSObject, NSSecureCoding, NSCopying>
+
+/**
+ The response object decoded from the data associated with a specified response.
+
+ @param response The response to be processed.
+ @param data The response data to be decoded.
+ @param error The error that occurred while attempting to decode the response data.
+
+ @return The object decoded from the specified response data.
+ */
+- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response
+                           data:(nullable NSData *)data
+                          error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW;
+
+@end
+
+#pragma mark -
+
+/**
+ `AFHTTPResponseSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.
+
+ Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPResponseSerializer` in order to ensure consistent default behavior.
+ */
+@interface AFHTTPResponseSerializer : NSObject <AFURLResponseSerialization>
+
+- (instancetype)init;
+
+@property (nonatomic, assign) NSStringEncoding stringEncoding DEPRECATED_MSG_ATTRIBUTE("The string encoding is never used. AFHTTPResponseSerializer only validates status codes and content types but does not try to decode the received data in any way.");
+
+/**
+ Creates and returns a serializer with default configuration.
+ */
++ (instancetype)serializer;
+
+///-----------------------------------------
+/// @name Configuring Response Serialization
+///-----------------------------------------
+
+/**
+ The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation.
+
+ See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
+ */
+@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes;
+
+/**
+ The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation.
+ */
+@property (nonatomic, copy, nullable) NSSet <NSString *> *acceptableContentTypes;
+
+/**
+ Validates the specified response and data.
+
+ In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks.
+
+ @param response The response to be validated.
+ @param data The data associated with the response.
+ @param error The error that occurred while attempting to validate the response.
+
+ @return `YES` if the response is valid, otherwise `NO`.
+ */
+- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response
+                    data:(nullable NSData *)data
+                   error:(NSError * _Nullable __autoreleasing *)error;
+
+@end
+
+#pragma mark -
+
+
+/**
+ `AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses.
+
+ By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types:
+
+ - `application/json`
+ - `text/json`
+ - `text/javascript`
+ */
+@interface AFJSONResponseSerializer : AFHTTPResponseSerializer
+
+- (instancetype)init;
+
+/**
+ Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
+ */
+@property (nonatomic, assign) NSJSONReadingOptions readingOptions;
+
+/**
+ Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`.
+ */
+@property (nonatomic, assign) BOOL removesKeysWithNullValues;
+
+/**
+ Creates and returns a JSON serializer with specified reading and writing options.
+
+ @param readingOptions The specified JSON reading options.
+ */
++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions;
+
+@end
+
+#pragma mark -
+
+/**
+ `AFXMLParserResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects.
+
+ By default, `AFXMLParserResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
+
+ - `application/xml`
+ - `text/xml`
+ */
+@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer
+
+@end
+
+#pragma mark -
+
+#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+
+/**
+ `AFXMLDocumentResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
+
+ By default, `AFXMLDocumentResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
+
+ - `application/xml`
+ - `text/xml`
+ */
+@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer
+
+- (instancetype)init;
+
+/**
+ Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
+ */
+@property (nonatomic, assign) NSUInteger options;
+
+/**
+ Creates and returns an XML document serializer with the specified options.
+
+ @param mask The XML document options.
+ */
++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask;
+
+@end
+
+#endif
+
+#pragma mark -
+
+/**
+ `AFPropertyListResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
+
+ By default, `AFPropertyListResponseSerializer` accepts the following MIME types:
+
+ - `application/x-plist`
+ */
+@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer
+
+- (instancetype)init;
+
+/**
+ The property list format. Possible values are described in "NSPropertyListFormat".
+ */
+@property (nonatomic, assign) NSPropertyListFormat format;
+
+/**
+ The property list reading options. Possible values are described in "NSPropertyListMutabilityOptions."
+ */
+@property (nonatomic, assign) NSPropertyListReadOptions readOptions;
+
+/**
+ Creates and returns a property list serializer with a specified format, read options, and write options.
+
+ @param format The property list format.
+ @param readOptions The property list reading options.
+ */
++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
+                         readOptions:(NSPropertyListReadOptions)readOptions;
+
+@end
+
+#pragma mark -
+
+/**
+ `AFImageResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses.
+
+ By default, `AFImageResponseSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:
+
+ - `image/tiff`
+ - `image/jpeg`
+ - `image/gif`
+ - `image/png`
+ - `image/ico`
+ - `image/x-icon`
+ - `image/bmp`
+ - `image/x-bmp`
+ - `image/x-xbitmap`
+ - `image/x-win-bitmap`
+ */
+@interface AFImageResponseSerializer : AFHTTPResponseSerializer
+
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
+/**
+ The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance.
+ */
+@property (nonatomic, assign) CGFloat imageScale;
+
+/**
+ Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with `setCompletionBlockWithSuccess:failure:`, as it allows a bitmap representation to be constructed in the background rather than on the main thread. `YES` by default.
+ */
+@property (nonatomic, assign) BOOL automaticallyInflatesResponseImage;
+#endif
+
+@end
+
+#pragma mark -
+
+/**
+ `AFCompoundSerializer` is a subclass of `AFHTTPResponseSerializer` that delegates the response serialization to the first `AFHTTPResponseSerializer` object that returns an object for `responseObjectForResponse:data:error:`, falling back on the default behavior of `AFHTTPResponseSerializer`. This is useful for supporting multiple potential types and structures of server responses with a single serializer.
+ */
+@interface AFCompoundResponseSerializer : AFHTTPResponseSerializer
+
+/**
+ The component response serializers.
+ */
+@property (readonly, nonatomic, copy) NSArray <id<AFURLResponseSerialization>> *responseSerializers;
+
+/**
+ Creates and returns a compound serializer comprised of the specified response serializers.
+
+ @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`.
+ */
++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray <id<AFURLResponseSerialization>> *)responseSerializers;
+
+@end
+
+///----------------
+/// @name Constants
+///----------------
+
+/**
+ ## Error Domains
+
+ The following error domain is predefined.
+
+ - `NSString * const AFURLResponseSerializationErrorDomain`
+
+ ### Constants
+
+ `AFURLResponseSerializationErrorDomain`
+ AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.
+ */
+FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain;
+
+/**
+ ## User info dictionary keys
+
+ These keys may exist in the user info dictionary, in addition to those defined for NSError.
+
+ - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey`
+ - `NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey`
+
+ ### Constants
+
+ `AFNetworkingOperationFailingURLResponseErrorKey`
+ The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.
+
+ `AFNetworkingOperationFailingURLResponseDataErrorKey`
+ The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseErrorKey;
+
+FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey;
+
+NS_ASSUME_NONNULL_END

+ 817 - 0
NIMDemo/NIMDemo/AFNetworking/AFURLResponseSerialization.m

@@ -0,0 +1,817 @@
+// AFURLResponseSerialization.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFURLResponseSerialization.h"
+
+#import <TargetConditionals.h>
+
+#if TARGET_OS_IOS
+#import <UIKit/UIKit.h>
+#elif TARGET_OS_WATCH
+#import <WatchKit/WatchKit.h>
+#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+#import <Cocoa/Cocoa.h>
+#endif
+
+NSString * const AFURLResponseSerializationErrorDomain = @"com.alamofire.error.serialization.response";
+NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"com.alamofire.serialization.response.error.response";
+NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey = @"com.alamofire.serialization.response.error.data";
+
+static NSError * AFErrorWithUnderlyingError(NSError *error, NSError *underlyingError) {
+    if (!error) {
+        return underlyingError;
+    }
+
+    if (!underlyingError || error.userInfo[NSUnderlyingErrorKey]) {
+        return error;
+    }
+
+    NSMutableDictionary *mutableUserInfo = [error.userInfo mutableCopy];
+    mutableUserInfo[NSUnderlyingErrorKey] = underlyingError;
+
+    return [[NSError alloc] initWithDomain:error.domain code:error.code userInfo:mutableUserInfo];
+}
+
+static BOOL AFErrorOrUnderlyingErrorHasCodeInDomain(NSError *error, NSInteger code, NSString *domain) {
+    if ([error.domain isEqualToString:domain] && error.code == code) {
+        return YES;
+    } else if (error.userInfo[NSUnderlyingErrorKey]) {
+        return AFErrorOrUnderlyingErrorHasCodeInDomain(error.userInfo[NSUnderlyingErrorKey], code, domain);
+    }
+
+    return NO;
+}
+
+static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) {
+    if ([JSONObject isKindOfClass:[NSArray class]]) {
+        NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]];
+        for (id value in (NSArray *)JSONObject) {
+            [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)];
+        }
+
+        return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray];
+    } else if ([JSONObject isKindOfClass:[NSDictionary class]]) {
+        NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject];
+        for (id <NSCopying> key in [(NSDictionary *)JSONObject allKeys]) {
+            id value = (NSDictionary *)JSONObject[key];
+            if (!value || [value isEqual:[NSNull null]]) {
+                [mutableDictionary removeObjectForKey:key];
+            } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) {
+                mutableDictionary[key] = AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions);
+            }
+        }
+
+        return (readingOptions & NSJSONReadingMutableContainers) ? mutableDictionary : [NSDictionary dictionaryWithDictionary:mutableDictionary];
+    }
+
+    return JSONObject;
+}
+
+@implementation AFHTTPResponseSerializer
+
++ (instancetype)serializer {
+    return [[self alloc] init];
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
+    self.acceptableContentTypes = nil;
+
+    return self;
+}
+
+#pragma mark -
+
+- (BOOL)validateResponse:(NSHTTPURLResponse *)response
+                    data:(NSData *)data
+                   error:(NSError * __autoreleasing *)error
+{
+    BOOL responseIsValid = YES;
+    NSError *validationError = nil;
+
+    if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) {
+        if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]] &&
+            !([response MIMEType] == nil && [data length] == 0)) {
+
+            if ([data length] > 0 && [response URL]) {
+                NSMutableDictionary *mutableUserInfo = [@{
+                                                          NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]],
+                                                          NSURLErrorFailingURLErrorKey:[response URL],
+                                                          AFNetworkingOperationFailingURLResponseErrorKey: response,
+                                                        } mutableCopy];
+                if (data) {
+                    mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data;
+                }
+
+                validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:mutableUserInfo], validationError);
+            }
+
+            responseIsValid = NO;
+        }
+
+        if (self.acceptableStatusCodes && ![self.acceptableStatusCodes containsIndex:(NSUInteger)response.statusCode] && [response URL]) {
+            NSMutableDictionary *mutableUserInfo = [@{
+                                               NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode],
+                                               NSURLErrorFailingURLErrorKey:[response URL],
+                                               AFNetworkingOperationFailingURLResponseErrorKey: response,
+                                       } mutableCopy];
+
+            if (data) {
+                mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data;
+            }
+
+            validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorBadServerResponse userInfo:mutableUserInfo], validationError);
+
+            responseIsValid = NO;
+        }
+    }
+
+    if (error && !responseIsValid) {
+        *error = validationError;
+    }
+
+    return responseIsValid;
+}
+
+#pragma mark - AFURLResponseSerialization
+
+- (id)responseObjectForResponse:(NSURLResponse *)response
+                           data:(NSData *)data
+                          error:(NSError *__autoreleasing *)error
+{
+    [self validateResponse:(NSHTTPURLResponse *)response data:data error:error];
+
+    return data;
+}
+
+#pragma mark - NSSecureCoding
+
++ (BOOL)supportsSecureCoding {
+    return YES;
+}
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [self init];
+    if (!self) {
+        return nil;
+    }
+
+    self.acceptableStatusCodes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];
+    self.acceptableContentTypes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableContentTypes))];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];
+    [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
+    serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone];
+    serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone];
+
+    return serializer;
+}
+
+@end
+
+#pragma mark -
+
+@implementation AFJSONResponseSerializer
+
++ (instancetype)serializer {
+    return [self serializerWithReadingOptions:(NSJSONReadingOptions)0];
+}
+
++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions {
+    AFJSONResponseSerializer *serializer = [[self alloc] init];
+    serializer.readingOptions = readingOptions;
+
+    return serializer;
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];
+
+    return self;
+}
+
+#pragma mark - AFURLResponseSerialization
+
+- (id)responseObjectForResponse:(NSURLResponse *)response
+                           data:(NSData *)data
+                          error:(NSError *__autoreleasing *)error
+{
+    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
+        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
+            return nil;
+        }
+    }
+
+    // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
+    // See https://github.com/rails/rails/issues/1742
+    BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]];
+    
+    if (data.length == 0 || isSpace) {
+        return nil;
+    }
+    
+    NSError *serializationError = nil;
+    
+    id responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
+
+    if (!responseObject)
+    {
+        if (error) {
+            *error = AFErrorWithUnderlyingError(serializationError, *error);
+        }
+        return nil;
+    }
+    
+    if (self.removesKeysWithNullValues) {
+        return AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
+    }
+
+    return responseObject;
+}
+
+#pragma mark - NSSecureCoding
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (!self) {
+        return nil;
+    }
+
+    self.readingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readingOptions))] unsignedIntegerValue];
+    self.removesKeysWithNullValues = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))] boolValue];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+    [coder encodeObject:@(self.readingOptions) forKey:NSStringFromSelector(@selector(readingOptions))];
+    [coder encodeObject:@(self.removesKeysWithNullValues) forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFJSONResponseSerializer *serializer = [super copyWithZone:zone];
+    serializer.readingOptions = self.readingOptions;
+    serializer.removesKeysWithNullValues = self.removesKeysWithNullValues;
+
+    return serializer;
+}
+
+@end
+
+#pragma mark -
+
+@implementation AFXMLParserResponseSerializer
+
++ (instancetype)serializer {
+    AFXMLParserResponseSerializer *serializer = [[self alloc] init];
+
+    return serializer;
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil];
+
+    return self;
+}
+
+#pragma mark - AFURLResponseSerialization
+
+- (id)responseObjectForResponse:(NSHTTPURLResponse *)response
+                           data:(NSData *)data
+                          error:(NSError *__autoreleasing *)error
+{
+    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
+        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
+            return nil;
+        }
+    }
+
+    return [[NSXMLParser alloc] initWithData:data];
+}
+
+@end
+
+#pragma mark -
+
+#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+
+@implementation AFXMLDocumentResponseSerializer
+
++ (instancetype)serializer {
+    return [self serializerWithXMLDocumentOptions:0];
+}
+
++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask {
+    AFXMLDocumentResponseSerializer *serializer = [[self alloc] init];
+    serializer.options = mask;
+
+    return serializer;
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil];
+
+    return self;
+}
+
+#pragma mark - AFURLResponseSerialization
+
+- (id)responseObjectForResponse:(NSURLResponse *)response
+                           data:(NSData *)data
+                          error:(NSError *__autoreleasing *)error
+{
+    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
+        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
+            return nil;
+        }
+    }
+
+    NSError *serializationError = nil;
+    NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError];
+
+    if (!document)
+    {
+        if (error) {
+            *error = AFErrorWithUnderlyingError(serializationError, *error);
+        }
+        return nil;
+    }
+    
+    return document;
+}
+
+#pragma mark - NSSecureCoding
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (!self) {
+        return nil;
+    }
+
+    self.options = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(options))] unsignedIntegerValue];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+    [coder encodeObject:@(self.options) forKey:NSStringFromSelector(@selector(options))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFXMLDocumentResponseSerializer *serializer = [super copyWithZone:zone];
+    serializer.options = self.options;
+
+    return serializer;
+}
+
+@end
+
+#endif
+
+#pragma mark -
+
+@implementation AFPropertyListResponseSerializer
+
++ (instancetype)serializer {
+    return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 readOptions:0];
+}
+
++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
+                         readOptions:(NSPropertyListReadOptions)readOptions
+{
+    AFPropertyListResponseSerializer *serializer = [[self alloc] init];
+    serializer.format = format;
+    serializer.readOptions = readOptions;
+
+    return serializer;
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/x-plist", nil];
+
+    return self;
+}
+
+#pragma mark - AFURLResponseSerialization
+
+- (id)responseObjectForResponse:(NSURLResponse *)response
+                           data:(NSData *)data
+                          error:(NSError *__autoreleasing *)error
+{
+    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
+        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
+            return nil;
+        }
+    }
+
+    if (!data) {
+        return nil;
+    }
+    
+    NSError *serializationError = nil;
+    
+    id responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError];
+    
+    if (!responseObject)
+    {
+        if (error) {
+            *error = AFErrorWithUnderlyingError(serializationError, *error);
+        }
+        return nil;
+    }
+
+    return responseObject;
+}
+
+#pragma mark - NSSecureCoding
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (!self) {
+        return nil;
+    }
+
+    self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue];
+    self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+    [coder encodeObject:@(self.format) forKey:NSStringFromSelector(@selector(format))];
+    [coder encodeObject:@(self.readOptions) forKey:NSStringFromSelector(@selector(readOptions))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFPropertyListResponseSerializer *serializer = [super copyWithZone:zone];
+    serializer.format = self.format;
+    serializer.readOptions = self.readOptions;
+
+    return serializer;
+}
+
+@end
+
+#pragma mark -
+
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
+#import <CoreGraphics/CoreGraphics.h>
+#import <UIKit/UIKit.h>
+
+@interface UIImage (AFNetworkingSafeImageLoading)
++ (UIImage *)af_safeImageWithData:(NSData *)data;
+@end
+
+static NSLock* imageLock = nil;
+
+@implementation UIImage (AFNetworkingSafeImageLoading)
+
++ (UIImage *)af_safeImageWithData:(NSData *)data {
+    UIImage* image = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        imageLock = [[NSLock alloc] init];
+    });
+    
+    [imageLock lock];
+    image = [UIImage imageWithData:data];
+    [imageLock unlock];
+    return image;
+}
+
+@end
+
+static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) {
+    UIImage *image = [UIImage af_safeImageWithData:data];
+    if (image.images) {
+        return image;
+    }
+    
+    return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation];
+}
+
+static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) {
+    if (!data || [data length] == 0) {
+        return nil;
+    }
+
+    CGImageRef imageRef = NULL;
+    CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
+
+    if ([response.MIMEType isEqualToString:@"image/png"]) {
+        imageRef = CGImageCreateWithPNGDataProvider(dataProvider,  NULL, true, kCGRenderingIntentDefault);
+    } else if ([response.MIMEType isEqualToString:@"image/jpeg"]) {
+        imageRef = CGImageCreateWithJPEGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault);
+
+        if (imageRef) {
+            CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef);
+            CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace);
+
+            // CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so fall back to AFImageWithDataAtScale
+            if (imageColorSpaceModel == kCGColorSpaceModelCMYK) {
+                CGImageRelease(imageRef);
+                imageRef = NULL;
+            }
+        }
+    }
+
+    CGDataProviderRelease(dataProvider);
+
+    UIImage *image = AFImageWithDataAtScale(data, scale);
+    if (!imageRef) {
+        if (image.images || !image) {
+            return image;
+        }
+
+        imageRef = CGImageCreateCopy([image CGImage]);
+        if (!imageRef) {
+            return nil;
+        }
+    }
+
+    size_t width = CGImageGetWidth(imageRef);
+    size_t height = CGImageGetHeight(imageRef);
+    size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef);
+
+    if (width * height > 1024 * 1024 || bitsPerComponent > 8) {
+        CGImageRelease(imageRef);
+
+        return image;
+    }
+
+    // CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate
+    size_t bytesPerRow = 0;
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace);
+    CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef);
+
+    if (colorSpaceModel == kCGColorSpaceModelRGB) {
+        uint32_t alpha = (bitmapInfo & kCGBitmapAlphaInfoMask);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wassign-enum"
+        if (alpha == kCGImageAlphaNone) {
+            bitmapInfo &= ~kCGBitmapAlphaInfoMask;
+            bitmapInfo |= kCGImageAlphaNoneSkipFirst;
+        } else if (!(alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast)) {
+            bitmapInfo &= ~kCGBitmapAlphaInfoMask;
+            bitmapInfo |= kCGImageAlphaPremultipliedFirst;
+        }
+#pragma clang diagnostic pop
+    }
+
+    CGContextRef context = CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo);
+
+    CGColorSpaceRelease(colorSpace);
+
+    if (!context) {
+        CGImageRelease(imageRef);
+
+        return image;
+    }
+
+    CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef);
+    CGImageRef inflatedImageRef = CGBitmapContextCreateImage(context);
+
+    CGContextRelease(context);
+
+    UIImage *inflatedImage = [[UIImage alloc] initWithCGImage:inflatedImageRef scale:scale orientation:image.imageOrientation];
+
+    CGImageRelease(inflatedImageRef);
+    CGImageRelease(imageRef);
+
+    return inflatedImage;
+}
+#endif
+
+
+@implementation AFImageResponseSerializer
+
+- (instancetype)init {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil];
+
+#if TARGET_OS_IOS || TARGET_OS_TV
+    self.imageScale = [[UIScreen mainScreen] scale];
+    self.automaticallyInflatesResponseImage = YES;
+#elif TARGET_OS_WATCH
+    self.imageScale = [[WKInterfaceDevice currentDevice] screenScale];
+    self.automaticallyInflatesResponseImage = YES;
+#endif
+
+    return self;
+}
+
+#pragma mark - AFURLResponseSerializer
+
+- (id)responseObjectForResponse:(NSURLResponse *)response
+                           data:(NSData *)data
+                          error:(NSError *__autoreleasing *)error
+{
+    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
+        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
+            return nil;
+        }
+    }
+
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
+    if (self.automaticallyInflatesResponseImage) {
+        return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale);
+    } else {
+        return AFImageWithDataAtScale(data, self.imageScale);
+    }
+#else
+    // Ensure that the image is set to it's correct pixel width and height
+    NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data];
+    NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])];
+    [image addRepresentation:bitimage];
+
+    return image;
+#endif
+
+    return nil;
+}
+
+#pragma mark - NSSecureCoding
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (!self) {
+        return nil;
+    }
+
+#if TARGET_OS_IOS  || TARGET_OS_TV || TARGET_OS_WATCH
+    NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))];
+#if CGFLOAT_IS_DOUBLE
+    self.imageScale = [imageScale doubleValue];
+#else
+    self.imageScale = [imageScale floatValue];
+#endif
+
+    self.automaticallyInflatesResponseImage = [decoder decodeBoolForKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))];
+#endif
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
+    [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))];
+    [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))];
+#endif
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFImageResponseSerializer *serializer = [super copyWithZone:zone];
+
+#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
+    serializer.imageScale = self.imageScale;
+    serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage;
+#endif
+
+    return serializer;
+}
+
+@end
+
+#pragma mark -
+
+@interface AFCompoundResponseSerializer ()
+@property (readwrite, nonatomic, copy) NSArray *responseSerializers;
+@end
+
+@implementation AFCompoundResponseSerializer
+
++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers {
+    AFCompoundResponseSerializer *serializer = [[self alloc] init];
+    serializer.responseSerializers = responseSerializers;
+
+    return serializer;
+}
+
+#pragma mark - AFURLResponseSerialization
+
+- (id)responseObjectForResponse:(NSURLResponse *)response
+                           data:(NSData *)data
+                          error:(NSError *__autoreleasing *)error
+{
+    for (id <AFURLResponseSerialization> serializer in self.responseSerializers) {
+        if (![serializer isKindOfClass:[AFHTTPResponseSerializer class]]) {
+            continue;
+        }
+
+        NSError *serializerError = nil;
+        id responseObject = [serializer responseObjectForResponse:response data:data error:&serializerError];
+        if (responseObject) {
+            if (error) {
+                *error = AFErrorWithUnderlyingError(serializerError, *error);
+            }
+
+            return responseObject;
+        }
+    }
+
+    return [super responseObjectForResponse:response data:data error:error];
+}
+
+#pragma mark - NSSecureCoding
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (!self) {
+        return nil;
+    }
+
+    self.responseSerializers = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(responseSerializers))];
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [super encodeWithCoder:coder];
+
+    [coder encodeObject:self.responseSerializers forKey:NSStringFromSelector(@selector(responseSerializers))];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    AFCompoundResponseSerializer *serializer = [super copyWithZone:zone];
+    serializer.responseSerializers = self.responseSerializers;
+
+    return serializer;
+}
+
+@end

+ 500 - 0
NIMDemo/NIMDemo/AFNetworking/AFURLSessionManager.h

@@ -0,0 +1,500 @@
+// AFURLSessionManager.h
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+
+#import <Foundation/Foundation.h>
+
+#import "AFURLResponseSerialization.h"
+#import "AFURLRequestSerialization.h"
+#import "AFSecurityPolicy.h"
+#if !TARGET_OS_WATCH
+#import "AFNetworkReachabilityManager.h"
+#endif
+
+/**
+ `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to `<NSURLSessionTaskDelegate>`, `<NSURLSessionDataDelegate>`, `<NSURLSessionDownloadDelegate>`, and `<NSURLSessionDelegate>`.
+
+ ## Subclassing Notes
+
+ This is the base class for `AFHTTPSessionManager`, which adds functionality specific to making HTTP requests. If you are looking to extend `AFURLSessionManager` specifically for HTTP, consider subclassing `AFHTTPSessionManager` instead.
+
+ ## NSURLSession & NSURLSessionTask Delegate Methods
+
+ `AFURLSessionManager` implements the following delegate methods:
+
+ ### `NSURLSessionDelegate`
+
+ - `URLSession:didBecomeInvalidWithError:`
+ - `URLSession:didReceiveChallenge:completionHandler:`
+ - `URLSessionDidFinishEventsForBackgroundURLSession:`
+
+ ### `NSURLSessionTaskDelegate`
+
+ - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`
+ - `URLSession:task:didReceiveChallenge:completionHandler:`
+ - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`
+ - `URLSession:task:needNewBodyStream:`
+ - `URLSession:task:didCompleteWithError:`
+
+ ### `NSURLSessionDataDelegate`
+
+ - `URLSession:dataTask:didReceiveResponse:completionHandler:`
+ - `URLSession:dataTask:didBecomeDownloadTask:`
+ - `URLSession:dataTask:didReceiveData:`
+ - `URLSession:dataTask:willCacheResponse:completionHandler:`
+
+ ### `NSURLSessionDownloadDelegate`
+
+ - `URLSession:downloadTask:didFinishDownloadingToURL:`
+ - `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`
+ - `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`
+
+ If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first.
+
+ ## Network Reachability Monitoring
+
+ Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.
+
+ ## NSCoding Caveats
+
+ - Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`.
+
+ ## NSCopying Caveats
+
+ - `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original.
+ - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied.
+
+ @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
+ */
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying>
+
+/**
+ The managed session.
+ */
+@property (readonly, nonatomic, strong) NSURLSession *session;
+
+/**
+ The operation queue on which delegate callbacks are run.
+ */
+@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue;
+
+/**
+ Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.
+
+ @warning `responseSerializer` must not be `nil`.
+ */
+@property (nonatomic, strong) id <AFURLResponseSerialization> responseSerializer;
+
+///-------------------------------
+/// @name Managing Security Policy
+///-------------------------------
+
+/**
+ The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified.
+ */
+@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
+
+#if !TARGET_OS_WATCH
+///--------------------------------------
+/// @name Monitoring Network Reachability
+///--------------------------------------
+
+/**
+ The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default.
+ */
+@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
+#endif
+
+///----------------------------
+/// @name Getting Session Tasks
+///----------------------------
+
+/**
+ The data, upload, and download tasks currently run by the managed session.
+ */
+@property (readonly, nonatomic, strong) NSArray <NSURLSessionTask *> *tasks;
+
+/**
+ The data tasks currently run by the managed session.
+ */
+@property (readonly, nonatomic, strong) NSArray <NSURLSessionDataTask *> *dataTasks;
+
+/**
+ The upload tasks currently run by the managed session.
+ */
+@property (readonly, nonatomic, strong) NSArray <NSURLSessionUploadTask *> *uploadTasks;
+
+/**
+ The download tasks currently run by the managed session.
+ */
+@property (readonly, nonatomic, strong) NSArray <NSURLSessionDownloadTask *> *downloadTasks;
+
+///-------------------------------
+/// @name Managing Callback Queues
+///-------------------------------
+
+/**
+ The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.
+ */
+@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
+
+/**
+ The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
+ */
+@property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
+
+///---------------------------------
+/// @name Working Around System Bugs
+///---------------------------------
+
+/**
+ Whether to attempt to retry creation of upload tasks for background sessions when initial call returns `nil`. `NO` by default.
+
+ @bug As of iOS 7.0, there is a bug where upload tasks created for background tasks are sometimes `nil`. As a workaround, if this property is `YES`, AFNetworking will follow Apple's recommendation to try creating the task again.
+
+ @see https://github.com/AFNetworking/AFNetworking/issues/1675
+ */
+@property (nonatomic, assign) BOOL attemptsToRecreateUploadTasksForBackgroundSessions;
+
+///---------------------
+/// @name Initialization
+///---------------------
+
+/**
+ Creates and returns a manager for a session created with the specified configuration. This is the designated initializer.
+
+ @param configuration The configuration used to create the managed session.
+
+ @return A manager for a newly-created session.
+ */
+- (instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
+
+/**
+ Invalidates the managed session, optionally canceling pending tasks.
+
+ @param cancelPendingTasks Whether or not to cancel pending tasks.
+ */
+- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks;
+
+///-------------------------
+/// @name Running Data Tasks
+///-------------------------
+
+/**
+ Creates an `NSURLSessionDataTask` with the specified request.
+
+ @param request The HTTP request for the request.
+ @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
+ */
+- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
+                            completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject,  NSError * _Nullable error))completionHandler DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates an `NSURLSessionDataTask` with the specified request.
+
+ @param request The HTTP request for the request.
+ @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
+ @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
+ */
+- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
+                               uploadProgress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
+                             downloadProgress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
+                            completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject,  NSError * _Nullable error))completionHandler;
+
+///---------------------------
+/// @name Running Upload Tasks
+///---------------------------
+
+/**
+ Creates an `NSURLSessionUploadTask` with the specified request for a local file.
+
+ @param request The HTTP request for the request.
+ @param fileURL A URL to the local file to be uploaded.
+ @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
+
+ @see `attemptsToRecreateUploadTasksForBackgroundSessions`
+ */
+- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
+                                         fromFile:(NSURL *)fileURL
+                                         progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
+                                completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError  * _Nullable error))completionHandler;
+
+/**
+ Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body.
+
+ @param request The HTTP request for the request.
+ @param bodyData A data object containing the HTTP body to be uploaded.
+ @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
+ */
+- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
+                                         fromData:(nullable NSData *)bodyData
+                                         progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
+                                completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
+
+/**
+ Creates an `NSURLSessionUploadTask` with the specified streaming request.
+
+ @param request The HTTP request for the request.
+ @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
+ */
+- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request
+                                                 progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
+                                        completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
+
+///-----------------------------
+/// @name Running Download Tasks
+///-----------------------------
+
+/**
+ Creates an `NSURLSessionDownloadTask` with the specified request.
+
+ @param request The HTTP request for the request.
+ @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
+ @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
+ @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
+
+ @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method.
+ */
+- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request
+                                             progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
+                                          destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
+                                    completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler;
+
+/**
+ Creates an `NSURLSessionDownloadTask` with the specified resume data.
+
+ @param resumeData The data used to resume downloading.
+ @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
+ @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
+ @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
+ */
+- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData
+                                                progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
+                                             destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
+                                       completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler;
+
+///---------------------------------
+/// @name Getting Progress for Tasks
+///---------------------------------
+
+/**
+ Returns the upload progress of the specified task.
+
+ @param task The session task. Must not be `nil`.
+
+ @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable.
+ */
+- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task;
+
+/**
+ Returns the download progress of the specified task.
+
+ @param task The session task. Must not be `nil`.
+
+ @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable.
+ */
+- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task;
+
+///-----------------------------------------
+/// @name Setting Session Delegate Callbacks
+///-----------------------------------------
+
+/**
+ Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`.
+
+ @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation.
+ */
+- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block;
+
+/**
+ Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`.
+
+ @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
+ */
+- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block;
+
+///--------------------------------------
+/// @name Setting Task Delegate Callbacks
+///--------------------------------------
+
+/**
+ Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`.
+
+ @param block A block object to be executed when a task requires a new request body stream.
+ */
+- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block;
+
+/**
+ Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`.
+
+ @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
+ */
+- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
+
+/**
+ Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.
+
+ @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
+ */
+- (void)setTaskDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block;
+
+/**
+ Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`.
+
+ @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread.
+ */
+- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block;
+
+/**
+ Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`.
+
+ @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task.
+ */
+- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block;
+
+///-------------------------------------------
+/// @name Setting Data Task Delegate Callbacks
+///-------------------------------------------
+
+/**
+ Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`.
+
+ @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response.
+ */
+- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block;
+
+/**
+ Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`.
+
+ @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become.
+ */
+- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block;
+
+/**
+ Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`.
+
+ @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue.
+ */
+- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block;
+
+/**
+ Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`.
+
+ @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response.
+ */
+- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block;
+
+/**
+ Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`.
+
+ @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session.
+ */
+- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block;
+
+///-----------------------------------------------
+/// @name Setting Download Task Delegate Callbacks
+///-----------------------------------------------
+
+/**
+ Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`.
+
+ @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error.
+ */
+- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * _Nullable  (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block;
+
+/**
+ Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`.
+
+ @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue.
+ */
+- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block;
+
+/**
+ Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`.
+
+ @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded.
+ */
+- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block;
+
+@end
+
+///--------------------
+/// @name Notifications
+///--------------------
+
+/**
+ Posted when a task resumes.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidResumeNotification;
+
+/**
+ Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteNotification;
+
+/**
+ Posted when a task suspends its execution.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidSuspendNotification;
+
+/**
+ Posted when a session is invalidated.
+ */
+FOUNDATION_EXPORT NSString * const AFURLSessionDidInvalidateNotification;
+
+/**
+ Posted when a session download task encountered an error when moving the temporary download file to a specified destination.
+ */
+FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification;
+
+/**
+ The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if response data exists for the task.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseDataKey;
+
+/**
+ The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the response was serialized.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey;
+
+/**
+ The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the task has an associated response serializer.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey;
+
+/**
+ The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an the response data has been stored directly to disk.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey;
+
+/**
+ Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an error exists.
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey;
+
+NS_ASSUME_NONNULL_END

+ 1221 - 0
NIMDemo/NIMDemo/AFNetworking/AFURLSessionManager.m

@@ -0,0 +1,1221 @@
+// AFURLSessionManager.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFURLSessionManager.h"
+#import <objc/runtime.h>
+
+#ifndef NSFoundationVersionNumber_iOS_8_0
+#define NSFoundationVersionNumber_With_Fixed_5871104061079552_bug 1140.11
+#else
+#define NSFoundationVersionNumber_With_Fixed_5871104061079552_bug NSFoundationVersionNumber_iOS_8_0
+#endif
+
+static dispatch_queue_t url_session_manager_creation_queue() {
+    static dispatch_queue_t af_url_session_manager_creation_queue;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        af_url_session_manager_creation_queue = dispatch_queue_create("com.alamofire.networking.session.manager.creation", DISPATCH_QUEUE_SERIAL);
+    });
+
+    return af_url_session_manager_creation_queue;
+}
+
+static void url_session_manager_create_task_safely(dispatch_block_t block) {
+    if (NSFoundationVersionNumber < NSFoundationVersionNumber_With_Fixed_5871104061079552_bug) {
+        // Fix of bug
+        // Open Radar:http://openradar.appspot.com/radar?id=5871104061079552 (status: Fixed in iOS8)
+        // Issue about:https://github.com/AFNetworking/AFNetworking/issues/2093
+        dispatch_sync(url_session_manager_creation_queue(), block);
+    } else {
+        block();
+    }
+}
+
+static dispatch_queue_t url_session_manager_processing_queue() {
+    static dispatch_queue_t af_url_session_manager_processing_queue;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        af_url_session_manager_processing_queue = dispatch_queue_create("com.alamofire.networking.session.manager.processing", DISPATCH_QUEUE_CONCURRENT);
+    });
+
+    return af_url_session_manager_processing_queue;
+}
+
+static dispatch_group_t url_session_manager_completion_group() {
+    static dispatch_group_t af_url_session_manager_completion_group;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        af_url_session_manager_completion_group = dispatch_group_create();
+    });
+
+    return af_url_session_manager_completion_group;
+}
+
+NSString * const AFNetworkingTaskDidResumeNotification = @"com.alamofire.networking.task.resume";
+NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete";
+NSString * const AFNetworkingTaskDidSuspendNotification = @"com.alamofire.networking.task.suspend";
+NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate";
+NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error";
+
+NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse";
+NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer";
+NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata";
+NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error";
+NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath";
+
+static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock";
+
+static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3;
+
+typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error);
+typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);
+
+typedef NSURLRequest * (^AFURLSessionTaskWillPerformHTTPRedirectionBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request);
+typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionTaskDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);
+typedef void (^AFURLSessionDidFinishEventsForBackgroundURLSessionBlock)(NSURLSession *session);
+
+typedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task);
+typedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend);
+typedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error);
+
+typedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response);
+typedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask);
+typedef void (^AFURLSessionDataTaskDidReceiveDataBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data);
+typedef NSCachedURLResponse * (^AFURLSessionDataTaskWillCacheResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse);
+
+typedef NSURL * (^AFURLSessionDownloadTaskDidFinishDownloadingBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location);
+typedef void (^AFURLSessionDownloadTaskDidWriteDataBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite);
+typedef void (^AFURLSessionDownloadTaskDidResumeBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes);
+typedef void (^AFURLSessionTaskProgressBlock)(NSProgress *);
+
+typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id responseObject, NSError *error);
+
+
+#pragma mark -
+
+@interface AFURLSessionManagerTaskDelegate : NSObject <NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate>
+- (instancetype)initWithTask:(NSURLSessionTask *)task;
+@property (nonatomic, weak) AFURLSessionManager *manager;
+@property (nonatomic, strong) NSMutableData *mutableData;
+@property (nonatomic, strong) NSProgress *uploadProgress;
+@property (nonatomic, strong) NSProgress *downloadProgress;
+@property (nonatomic, copy) NSURL *downloadFileURL;
+@property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;
+@property (nonatomic, copy) AFURLSessionTaskProgressBlock uploadProgressBlock;
+@property (nonatomic, copy) AFURLSessionTaskProgressBlock downloadProgressBlock;
+@property (nonatomic, copy) AFURLSessionTaskCompletionHandler completionHandler;
+@end
+
+@implementation AFURLSessionManagerTaskDelegate
+
+- (instancetype)initWithTask:(NSURLSessionTask *)task {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+    
+    _mutableData = [NSMutableData data];
+    _uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
+    _downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
+    
+    __weak __typeof__(task) weakTask = task;
+    for (NSProgress *progress in @[ _uploadProgress, _downloadProgress ])
+    {
+        progress.totalUnitCount = NSURLSessionTransferSizeUnknown;
+        progress.cancellable = YES;
+        progress.cancellationHandler = ^{
+            [weakTask cancel];
+        };
+        progress.pausable = YES;
+        progress.pausingHandler = ^{
+            [weakTask suspend];
+        };
+        if ([progress respondsToSelector:@selector(setResumingHandler:)]) {
+            progress.resumingHandler = ^{
+                [weakTask resume];
+            };
+        }
+        [progress addObserver:self
+                   forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
+                      options:NSKeyValueObservingOptionNew
+                      context:NULL];
+    }
+    return self;
+}
+
+- (void)dealloc {
+    [self.downloadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
+    [self.uploadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
+}
+
+#pragma mark - NSProgress Tracking
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
+   if ([object isEqual:self.downloadProgress]) {
+        if (self.downloadProgressBlock) {
+            self.downloadProgressBlock(object);
+        }
+    }
+    else if ([object isEqual:self.uploadProgress]) {
+        if (self.uploadProgressBlock) {
+            self.uploadProgressBlock(object);
+        }
+    }
+}
+
+#pragma mark - NSURLSessionTaskDelegate
+
+- (void)URLSession:(__unused NSURLSession *)session
+              task:(NSURLSessionTask *)task
+didCompleteWithError:(NSError *)error
+{
+    __strong AFURLSessionManager *manager = self.manager;
+
+    __block id responseObject = nil;
+
+    __block NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
+    userInfo[AFNetworkingTaskDidCompleteResponseSerializerKey] = manager.responseSerializer;
+
+    //Performance Improvement from #2672
+    NSData *data = nil;
+    if (self.mutableData) {
+        data = [self.mutableData copy];
+        //We no longer need the reference, so nil it out to gain back some memory.
+        self.mutableData = nil;
+    }
+
+    if (self.downloadFileURL) {
+        userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL;
+    } else if (data) {
+        userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = data;
+    }
+
+    if (error) {
+        userInfo[AFNetworkingTaskDidCompleteErrorKey] = error;
+
+        dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{
+            if (self.completionHandler) {
+                self.completionHandler(task.response, responseObject, error);
+            }
+
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo];
+            });
+        });
+    } else {
+        dispatch_async(url_session_manager_processing_queue(), ^{
+            NSError *serializationError = nil;
+            responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:data error:&serializationError];
+
+            if (self.downloadFileURL) {
+                responseObject = self.downloadFileURL;
+            }
+
+            if (responseObject) {
+                userInfo[AFNetworkingTaskDidCompleteSerializedResponseKey] = responseObject;
+            }
+
+            if (serializationError) {
+                userInfo[AFNetworkingTaskDidCompleteErrorKey] = serializationError;
+            }
+
+            dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{
+                if (self.completionHandler) {
+                    self.completionHandler(task.response, responseObject, serializationError);
+                }
+
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo];
+                });
+            });
+        });
+    }
+}
+
+#pragma mark - NSURLSessionDataDelegate
+
+- (void)URLSession:(__unused NSURLSession *)session
+          dataTask:(__unused NSURLSessionDataTask *)dataTask
+    didReceiveData:(NSData *)data
+{
+    self.downloadProgress.totalUnitCount = dataTask.countOfBytesExpectedToReceive;
+    self.downloadProgress.completedUnitCount = dataTask.countOfBytesReceived;
+
+    [self.mutableData appendData:data];
+}
+
+- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
+   didSendBodyData:(int64_t)bytesSent
+    totalBytesSent:(int64_t)totalBytesSent
+totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend{
+    
+    self.uploadProgress.totalUnitCount = task.countOfBytesExpectedToSend;
+    self.uploadProgress.completedUnitCount = task.countOfBytesSent;
+}
+
+#pragma mark - NSURLSessionDownloadDelegate
+
+- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
+      didWriteData:(int64_t)bytesWritten
+ totalBytesWritten:(int64_t)totalBytesWritten
+totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite{
+    
+    self.downloadProgress.totalUnitCount = totalBytesExpectedToWrite;
+    self.downloadProgress.completedUnitCount = totalBytesWritten;
+}
+
+- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
+ didResumeAtOffset:(int64_t)fileOffset
+expectedTotalBytes:(int64_t)expectedTotalBytes{
+    
+    self.downloadProgress.totalUnitCount = expectedTotalBytes;
+    self.downloadProgress.completedUnitCount = fileOffset;
+}
+
+- (void)URLSession:(NSURLSession *)session
+      downloadTask:(NSURLSessionDownloadTask *)downloadTask
+didFinishDownloadingToURL:(NSURL *)location
+{
+    self.downloadFileURL = nil;
+
+    if (self.downloadTaskDidFinishDownloading) {
+        self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);
+        if (self.downloadFileURL) {
+            NSError *fileManagerError = nil;
+
+            if (![[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError]) {
+                [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo];
+            }
+        }
+    }
+}
+
+@end
+
+#pragma mark -
+
+/**
+ *  A workaround for issues related to key-value observing the `state` of an `NSURLSessionTask`.
+ *
+ *  See:
+ *  - https://github.com/AFNetworking/AFNetworking/issues/1477
+ *  - https://github.com/AFNetworking/AFNetworking/issues/2638
+ *  - https://github.com/AFNetworking/AFNetworking/pull/2702
+ */
+
+static inline void af_swizzleSelector(Class theClass, SEL originalSelector, SEL swizzledSelector) {
+    Method originalMethod = class_getInstanceMethod(theClass, originalSelector);
+    Method swizzledMethod = class_getInstanceMethod(theClass, swizzledSelector);
+    method_exchangeImplementations(originalMethod, swizzledMethod);
+}
+
+static inline BOOL af_addMethod(Class theClass, SEL selector, Method method) {
+    return class_addMethod(theClass, selector,  method_getImplementation(method),  method_getTypeEncoding(method));
+}
+
+static NSString * const AFNSURLSessionTaskDidResumeNotification  = @"com.alamofire.networking.nsurlsessiontask.resume";
+static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofire.networking.nsurlsessiontask.suspend";
+
+@interface _AFURLSessionTaskSwizzling : NSObject
+
+@end
+
+@implementation _AFURLSessionTaskSwizzling
+
++ (void)load {
+    /**
+     WARNING: Trouble Ahead
+     https://github.com/AFNetworking/AFNetworking/pull/2702
+     */
+
+    if (NSClassFromString(@"NSURLSessionTask")) {
+        /**
+         iOS 7 and iOS 8 differ in NSURLSessionTask implementation, which makes the next bit of code a bit tricky.
+         Many Unit Tests have been built to validate as much of this behavior has possible.
+         Here is what we know:
+            - NSURLSessionTasks are implemented with class clusters, meaning the class you request from the API isn't actually the type of class you will get back.
+            - Simply referencing `[NSURLSessionTask class]` will not work. You need to ask an `NSURLSession` to actually create an object, and grab the class from there.
+            - On iOS 7, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `__NSCFURLSessionTask`.
+            - On iOS 8, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `NSURLSessionTask`.
+            - On iOS 7, `__NSCFLocalSessionTask` and `__NSCFURLSessionTask` are the only two classes that have their own implementations of `resume` and `suspend`, and `__NSCFLocalSessionTask` DOES NOT CALL SUPER. This means both classes need to be swizzled.
+            - On iOS 8, `NSURLSessionTask` is the only class that implements `resume` and `suspend`. This means this is the only class that needs to be swizzled.
+            - Because `NSURLSessionTask` is not involved in the class hierarchy for every version of iOS, its easier to add the swizzled methods to a dummy class and manage them there.
+        
+         Some Assumptions:
+            - No implementations of `resume` or `suspend` call super. If this were to change in a future version of iOS, we'd need to handle it.
+            - No background task classes override `resume` or `suspend`
+         
+         The current solution:
+            1) Grab an instance of `__NSCFLocalDataTask` by asking an instance of `NSURLSession` for a data task.
+            2) Grab a pointer to the original implementation of `af_resume`
+            3) Check to see if the current class has an implementation of resume. If so, continue to step 4.
+            4) Grab the super class of the current class.
+            5) Grab a pointer for the current class to the current implementation of `resume`.
+            6) Grab a pointer for the super class to the current implementation of `resume`.
+            7) If the current class implementation of `resume` is not equal to the super class implementation of `resume` AND the current implementation of `resume` is not equal to the original implementation of `af_resume`, THEN swizzle the methods
+            8) Set the current class to the super class, and repeat steps 3-8
+         */
+        NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration];
+        NSURLSession * session = [NSURLSession sessionWithConfiguration:configuration];
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnonnull"
+        NSURLSessionDataTask *localDataTask = [session dataTaskWithURL:nil];
+#pragma clang diagnostic pop
+        IMP originalAFResumeIMP = method_getImplementation(class_getInstanceMethod([self class], @selector(af_resume)));
+        Class currentClass = [localDataTask class];
+        
+        while (class_getInstanceMethod(currentClass, @selector(resume))) {
+            Class superClass = [currentClass superclass];
+            IMP classResumeIMP = method_getImplementation(class_getInstanceMethod(currentClass, @selector(resume)));
+            IMP superclassResumeIMP = method_getImplementation(class_getInstanceMethod(superClass, @selector(resume)));
+            if (classResumeIMP != superclassResumeIMP &&
+                originalAFResumeIMP != classResumeIMP) {
+                [self swizzleResumeAndSuspendMethodForClass:currentClass];
+            }
+            currentClass = [currentClass superclass];
+        }
+        
+        [localDataTask cancel];
+        [session finishTasksAndInvalidate];
+    }
+}
+
++ (void)swizzleResumeAndSuspendMethodForClass:(Class)theClass {
+    Method afResumeMethod = class_getInstanceMethod(self, @selector(af_resume));
+    Method afSuspendMethod = class_getInstanceMethod(self, @selector(af_suspend));
+
+    if (af_addMethod(theClass, @selector(af_resume), afResumeMethod)) {
+        af_swizzleSelector(theClass, @selector(resume), @selector(af_resume));
+    }
+
+    if (af_addMethod(theClass, @selector(af_suspend), afSuspendMethod)) {
+        af_swizzleSelector(theClass, @selector(suspend), @selector(af_suspend));
+    }
+}
+
+- (NSURLSessionTaskState)state {
+    NSAssert(NO, @"State method should never be called in the actual dummy class");
+    return NSURLSessionTaskStateCanceling;
+}
+
+- (void)af_resume {
+    NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state");
+    NSURLSessionTaskState state = [self state];
+    [self af_resume];
+    
+    if (state != NSURLSessionTaskStateRunning) {
+        [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidResumeNotification object:self];
+    }
+}
+
+- (void)af_suspend {
+    NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state");
+    NSURLSessionTaskState state = [self state];
+    [self af_suspend];
+    
+    if (state != NSURLSessionTaskStateSuspended) {
+        [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidSuspendNotification object:self];
+    }
+}
+@end
+
+#pragma mark -
+
+@interface AFURLSessionManager ()
+@property (readwrite, nonatomic, strong) NSURLSessionConfiguration *sessionConfiguration;
+@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue;
+@property (readwrite, nonatomic, strong) NSURLSession *session;
+@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableTaskDelegatesKeyedByTaskIdentifier;
+@property (readonly, nonatomic, copy) NSString *taskDescriptionForSessionTasks;
+@property (readwrite, nonatomic, strong) NSLock *lock;
+@property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid;
+@property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge;
+@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession;
+@property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection;
+@property (readwrite, nonatomic, copy) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge;
+@property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream;
+@property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData;
+@property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete;
+@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse;
+@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask;
+@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData;
+@property (readwrite, nonatomic, copy) AFURLSessionDataTaskWillCacheResponseBlock dataTaskWillCacheResponse;
+@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;
+@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidWriteDataBlock downloadTaskDidWriteData;
+@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidResumeBlock downloadTaskDidResume;
+@end
+
+@implementation AFURLSessionManager
+
+- (instancetype)init {
+    return [self initWithSessionConfiguration:nil];
+}
+
+- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+
+    if (!configuration) {
+        configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
+    }
+
+    self.sessionConfiguration = configuration;
+
+    self.operationQueue = [[NSOperationQueue alloc] init];
+    self.operationQueue.maxConcurrentOperationCount = 1;
+
+    self.session = [NSURLSession sessionWithConfiguration:self.sessionConfiguration delegate:self delegateQueue:self.operationQueue];
+
+    self.responseSerializer = [AFJSONResponseSerializer serializer];
+
+    self.securityPolicy = [AFSecurityPolicy defaultPolicy];
+
+#if !TARGET_OS_WATCH
+    self.reachabilityManager = [AFNetworkReachabilityManager sharedManager];
+#endif
+
+    self.mutableTaskDelegatesKeyedByTaskIdentifier = [[NSMutableDictionary alloc] init];
+
+    self.lock = [[NSLock alloc] init];
+    self.lock.name = AFURLSessionManagerLockName;
+
+    [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) {
+        for (NSURLSessionDataTask *task in dataTasks) {
+            [self addDelegateForDataTask:task uploadProgress:nil downloadProgress:nil completionHandler:nil];
+        }
+
+        for (NSURLSessionUploadTask *uploadTask in uploadTasks) {
+            [self addDelegateForUploadTask:uploadTask progress:nil completionHandler:nil];
+        }
+
+        for (NSURLSessionDownloadTask *downloadTask in downloadTasks) {
+            [self addDelegateForDownloadTask:downloadTask progress:nil destination:nil completionHandler:nil];
+        }
+    }];
+
+    return self;
+}
+
+- (void)dealloc {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+#pragma mark -
+
+- (NSString *)taskDescriptionForSessionTasks {
+    return [NSString stringWithFormat:@"%p", self];
+}
+
+- (void)taskDidResume:(NSNotification *)notification {
+    NSURLSessionTask *task = notification.object;
+    if ([task respondsToSelector:@selector(taskDescription)]) {
+        if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidResumeNotification object:task];
+            });
+        }
+    }
+}
+
+- (void)taskDidSuspend:(NSNotification *)notification {
+    NSURLSessionTask *task = notification.object;
+    if ([task respondsToSelector:@selector(taskDescription)]) {
+        if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidSuspendNotification object:task];
+            });
+        }
+    }
+}
+
+#pragma mark -
+
+- (AFURLSessionManagerTaskDelegate *)delegateForTask:(NSURLSessionTask *)task {
+    NSParameterAssert(task);
+
+    AFURLSessionManagerTaskDelegate *delegate = nil;
+    [self.lock lock];
+    delegate = self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)];
+    [self.lock unlock];
+
+    return delegate;
+}
+
+- (void)setDelegate:(AFURLSessionManagerTaskDelegate *)delegate
+            forTask:(NSURLSessionTask *)task
+{
+    NSParameterAssert(task);
+    NSParameterAssert(delegate);
+
+    [self.lock lock];
+    self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate;
+    [self addNotificationObserverForTask:task];
+    [self.lock unlock];
+}
+
+- (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask
+                uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock
+              downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock
+             completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
+{
+    AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:dataTask];
+    delegate.manager = self;
+    delegate.completionHandler = completionHandler;
+
+    dataTask.taskDescription = self.taskDescriptionForSessionTasks;
+    [self setDelegate:delegate forTask:dataTask];
+
+    delegate.uploadProgressBlock = uploadProgressBlock;
+    delegate.downloadProgressBlock = downloadProgressBlock;
+}
+
+- (void)addDelegateForUploadTask:(NSURLSessionUploadTask *)uploadTask
+                        progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
+               completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
+{
+    AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:uploadTask];
+    delegate.manager = self;
+    delegate.completionHandler = completionHandler;
+
+    uploadTask.taskDescription = self.taskDescriptionForSessionTasks;
+
+    [self setDelegate:delegate forTask:uploadTask];
+
+    delegate.uploadProgressBlock = uploadProgressBlock;
+}
+
+- (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask
+                          progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock
+                       destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
+                 completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
+{
+    AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:downloadTask];
+    delegate.manager = self;
+    delegate.completionHandler = completionHandler;
+
+    if (destination) {
+        delegate.downloadTaskDidFinishDownloading = ^NSURL * (NSURLSession * __unused session, NSURLSessionDownloadTask *task, NSURL *location) {
+            return destination(location, task.response);
+        };
+    }
+
+    downloadTask.taskDescription = self.taskDescriptionForSessionTasks;
+
+    [self setDelegate:delegate forTask:downloadTask];
+
+    delegate.downloadProgressBlock = downloadProgressBlock;
+}
+
+- (void)removeDelegateForTask:(NSURLSessionTask *)task {
+    NSParameterAssert(task);
+
+    [self.lock lock];
+    [self removeNotificationObserverForTask:task];
+    [self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)];
+    [self.lock unlock];
+}
+
+#pragma mark -
+
+- (NSArray *)tasksForKeyPath:(NSString *)keyPath {
+    __block NSArray *tasks = nil;
+    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
+    [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) {
+        if ([keyPath isEqualToString:NSStringFromSelector(@selector(dataTasks))]) {
+            tasks = dataTasks;
+        } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(uploadTasks))]) {
+            tasks = uploadTasks;
+        } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(downloadTasks))]) {
+            tasks = downloadTasks;
+        } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(tasks))]) {
+            tasks = [@[dataTasks, uploadTasks, downloadTasks] valueForKeyPath:@"@unionOfArrays.self"];
+        }
+
+        dispatch_semaphore_signal(semaphore);
+    }];
+
+    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
+
+    return tasks;
+}
+
+- (NSArray *)tasks {
+    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
+}
+
+- (NSArray *)dataTasks {
+    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
+}
+
+- (NSArray *)uploadTasks {
+    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
+}
+
+- (NSArray *)downloadTasks {
+    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
+}
+
+#pragma mark -
+
+- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks {
+    if (cancelPendingTasks) {
+        [self.session invalidateAndCancel];
+    } else {
+        [self.session finishTasksAndInvalidate];
+    }
+}
+
+#pragma mark -
+
+- (void)setResponseSerializer:(id <AFURLResponseSerialization>)responseSerializer {
+    NSParameterAssert(responseSerializer);
+
+    _responseSerializer = responseSerializer;
+}
+
+#pragma mark -
+- (void)addNotificationObserverForTask:(NSURLSessionTask *)task {
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidResume:) name:AFNSURLSessionTaskDidResumeNotification object:task];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidSuspend:) name:AFNSURLSessionTaskDidSuspendNotification object:task];
+}
+
+- (void)removeNotificationObserverForTask:(NSURLSessionTask *)task {
+    [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidSuspendNotification object:task];
+    [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidResumeNotification object:task];
+}
+
+#pragma mark -
+
+- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
+                            completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
+{
+    return [self dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:completionHandler];
+}
+
+- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
+                               uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock
+                             downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock
+                            completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject,  NSError * _Nullable error))completionHandler {
+
+    __block NSURLSessionDataTask *dataTask = nil;
+    url_session_manager_create_task_safely(^{
+        dataTask = [self.session dataTaskWithRequest:request];
+    });
+
+    [self addDelegateForDataTask:dataTask uploadProgress:uploadProgressBlock downloadProgress:downloadProgressBlock completionHandler:completionHandler];
+
+    return dataTask;
+}
+
+#pragma mark -
+
+- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
+                                         fromFile:(NSURL *)fileURL
+                                         progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
+                                completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
+{
+    __block NSURLSessionUploadTask *uploadTask = nil;
+    url_session_manager_create_task_safely(^{
+        uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
+    });
+
+    // uploadTask may be nil on iOS7 because uploadTaskWithRequest:fromFile: may return nil despite being documented as nonnull (https://devforums.apple.com/message/926113#926113)
+    if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {
+        for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {
+            uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
+        }
+    }
+
+    [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
+
+    return uploadTask;
+}
+
+- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
+                                         fromData:(NSData *)bodyData
+                                         progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
+                                completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
+{
+    __block NSURLSessionUploadTask *uploadTask = nil;
+    url_session_manager_create_task_safely(^{
+        uploadTask = [self.session uploadTaskWithRequest:request fromData:bodyData];
+    });
+
+    [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
+
+    return uploadTask;
+}
+
+- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request
+                                                 progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
+                                        completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
+{
+    __block NSURLSessionUploadTask *uploadTask = nil;
+    url_session_manager_create_task_safely(^{
+        uploadTask = [self.session uploadTaskWithStreamedRequest:request];
+    });
+
+    [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
+
+    return uploadTask;
+}
+
+#pragma mark -
+
+- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request
+                                             progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock
+                                          destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
+                                    completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
+{
+    __block NSURLSessionDownloadTask *downloadTask = nil;
+    url_session_manager_create_task_safely(^{
+        downloadTask = [self.session downloadTaskWithRequest:request];
+    });
+
+    [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler];
+
+    return downloadTask;
+}
+
+- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData
+                                                progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock
+                                             destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
+                                       completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
+{
+    __block NSURLSessionDownloadTask *downloadTask = nil;
+    url_session_manager_create_task_safely(^{
+        downloadTask = [self.session downloadTaskWithResumeData:resumeData];
+    });
+
+    [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler];
+
+    return downloadTask;
+}
+
+#pragma mark -
+- (NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task {
+    return [[self delegateForTask:task] uploadProgress];
+}
+
+- (NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task {
+    return [[self delegateForTask:task] downloadProgress];
+}
+
+#pragma mark -
+
+- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block {
+    self.sessionDidBecomeInvalid = block;
+}
+
+- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block {
+    self.sessionDidReceiveAuthenticationChallenge = block;
+}
+
+- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block {
+    self.didFinishEventsForBackgroundURLSession = block;
+}
+
+#pragma mark -
+
+- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block {
+    self.taskNeedNewBodyStream = block;
+}
+
+- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block {
+    self.taskWillPerformHTTPRedirection = block;
+}
+
+- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block {
+    self.taskDidReceiveAuthenticationChallenge = block;
+}
+
+- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block {
+    self.taskDidSendBodyData = block;
+}
+
+- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block {
+    self.taskDidComplete = block;
+}
+
+#pragma mark -
+
+- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block {
+    self.dataTaskDidReceiveResponse = block;
+}
+
+- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block {
+    self.dataTaskDidBecomeDownloadTask = block;
+}
+
+- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block {
+    self.dataTaskDidReceiveData = block;
+}
+
+- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block {
+    self.dataTaskWillCacheResponse = block;
+}
+
+#pragma mark -
+
+- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block {
+    self.downloadTaskDidFinishDownloading = block;
+}
+
+- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block {
+    self.downloadTaskDidWriteData = block;
+}
+
+- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block {
+    self.downloadTaskDidResume = block;
+}
+
+#pragma mark - NSObject
+
+- (NSString *)description {
+    return [NSString stringWithFormat:@"<%@: %p, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, self.session, self.operationQueue];
+}
+
+- (BOOL)respondsToSelector:(SEL)selector {
+    if (selector == @selector(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)) {
+        return self.taskWillPerformHTTPRedirection != nil;
+    } else if (selector == @selector(URLSession:dataTask:didReceiveResponse:completionHandler:)) {
+        return self.dataTaskDidReceiveResponse != nil;
+    } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) {
+        return self.dataTaskWillCacheResponse != nil;
+    } else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) {
+        return self.didFinishEventsForBackgroundURLSession != nil;
+    }
+
+    return [[self class] instancesRespondToSelector:selector];
+}
+
+#pragma mark - NSURLSessionDelegate
+
+- (void)URLSession:(NSURLSession *)session
+didBecomeInvalidWithError:(NSError *)error
+{
+    if (self.sessionDidBecomeInvalid) {
+        self.sessionDidBecomeInvalid(session, error);
+    }
+
+    [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDidInvalidateNotification object:session];
+}
+
+- (void)URLSession:(NSURLSession *)session
+didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
+ completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler
+{
+    NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;
+    __block NSURLCredential *credential = nil;
+
+    if (self.sessionDidReceiveAuthenticationChallenge) {
+        disposition = self.sessionDidReceiveAuthenticationChallenge(session, challenge, &credential);
+    } else {
+        if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
+            if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) {
+                credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
+                if (credential) {
+                    disposition = NSURLSessionAuthChallengeUseCredential;
+                } else {
+                    disposition = NSURLSessionAuthChallengePerformDefaultHandling;
+                }
+            } else {
+                disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;
+            }
+        } else {
+            disposition = NSURLSessionAuthChallengePerformDefaultHandling;
+        }
+    }
+
+    if (completionHandler) {
+        completionHandler(disposition, credential);
+    }
+}
+
+#pragma mark - NSURLSessionTaskDelegate
+
+- (void)URLSession:(NSURLSession *)session
+              task:(NSURLSessionTask *)task
+willPerformHTTPRedirection:(NSHTTPURLResponse *)response
+        newRequest:(NSURLRequest *)request
+ completionHandler:(void (^)(NSURLRequest *))completionHandler
+{
+    NSURLRequest *redirectRequest = request;
+
+    if (self.taskWillPerformHTTPRedirection) {
+        redirectRequest = self.taskWillPerformHTTPRedirection(session, task, response, request);
+    }
+
+    if (completionHandler) {
+        completionHandler(redirectRequest);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+              task:(NSURLSessionTask *)task
+didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
+ completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler
+{
+    NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;
+    __block NSURLCredential *credential = nil;
+
+    if (self.taskDidReceiveAuthenticationChallenge) {
+        disposition = self.taskDidReceiveAuthenticationChallenge(session, task, challenge, &credential);
+    } else {
+        if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
+            if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) {
+                disposition = NSURLSessionAuthChallengeUseCredential;
+                credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
+            } else {
+                disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;
+            }
+        } else {
+            disposition = NSURLSessionAuthChallengePerformDefaultHandling;
+        }
+    }
+
+    if (completionHandler) {
+        completionHandler(disposition, credential);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+              task:(NSURLSessionTask *)task
+ needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler
+{
+    NSInputStream *inputStream = nil;
+
+    if (self.taskNeedNewBodyStream) {
+        inputStream = self.taskNeedNewBodyStream(session, task);
+    } else if (task.originalRequest.HTTPBodyStream && [task.originalRequest.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) {
+        inputStream = [task.originalRequest.HTTPBodyStream copy];
+    }
+
+    if (completionHandler) {
+        completionHandler(inputStream);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+              task:(NSURLSessionTask *)task
+   didSendBodyData:(int64_t)bytesSent
+    totalBytesSent:(int64_t)totalBytesSent
+totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend
+{
+
+    int64_t totalUnitCount = totalBytesExpectedToSend;
+    if(totalUnitCount == NSURLSessionTransferSizeUnknown) {
+        NSString *contentLength = [task.originalRequest valueForHTTPHeaderField:@"Content-Length"];
+        if(contentLength) {
+            totalUnitCount = (int64_t) [contentLength longLongValue];
+        }
+    }
+    
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
+    
+    if (delegate) {
+        [delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalBytesExpectedToSend];
+    }
+
+    if (self.taskDidSendBodyData) {
+        self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+              task:(NSURLSessionTask *)task
+didCompleteWithError:(NSError *)error
+{
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
+
+    // delegate may be nil when completing a task in the background
+    if (delegate) {
+        [delegate URLSession:session task:task didCompleteWithError:error];
+
+        [self removeDelegateForTask:task];
+    }
+
+    if (self.taskDidComplete) {
+        self.taskDidComplete(session, task, error);
+    }
+}
+
+#pragma mark - NSURLSessionDataDelegate
+
+- (void)URLSession:(NSURLSession *)session
+          dataTask:(NSURLSessionDataTask *)dataTask
+didReceiveResponse:(NSURLResponse *)response
+ completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler
+{
+    NSURLSessionResponseDisposition disposition = NSURLSessionResponseAllow;
+
+    if (self.dataTaskDidReceiveResponse) {
+        disposition = self.dataTaskDidReceiveResponse(session, dataTask, response);
+    }
+
+    if (completionHandler) {
+        completionHandler(disposition);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+          dataTask:(NSURLSessionDataTask *)dataTask
+didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask
+{
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask];
+    if (delegate) {
+        [self removeDelegateForTask:dataTask];
+        [self setDelegate:delegate forTask:downloadTask];
+    }
+
+    if (self.dataTaskDidBecomeDownloadTask) {
+        self.dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+          dataTask:(NSURLSessionDataTask *)dataTask
+    didReceiveData:(NSData *)data
+{
+
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask];
+    [delegate URLSession:session dataTask:dataTask didReceiveData:data];
+
+    if (self.dataTaskDidReceiveData) {
+        self.dataTaskDidReceiveData(session, dataTask, data);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+          dataTask:(NSURLSessionDataTask *)dataTask
+ willCacheResponse:(NSCachedURLResponse *)proposedResponse
+ completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler
+{
+    NSCachedURLResponse *cachedResponse = proposedResponse;
+
+    if (self.dataTaskWillCacheResponse) {
+        cachedResponse = self.dataTaskWillCacheResponse(session, dataTask, proposedResponse);
+    }
+
+    if (completionHandler) {
+        completionHandler(cachedResponse);
+    }
+}
+
+- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session {
+    if (self.didFinishEventsForBackgroundURLSession) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            self.didFinishEventsForBackgroundURLSession(session);
+        });
+    }
+}
+
+#pragma mark - NSURLSessionDownloadDelegate
+
+- (void)URLSession:(NSURLSession *)session
+      downloadTask:(NSURLSessionDownloadTask *)downloadTask
+didFinishDownloadingToURL:(NSURL *)location
+{
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];
+    if (self.downloadTaskDidFinishDownloading) {
+        NSURL *fileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);
+        if (fileURL) {
+            delegate.downloadFileURL = fileURL;
+            NSError *error = nil;
+            
+            if (![[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error]) {
+                [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo];
+            }
+
+            return;
+        }
+    }
+
+    if (delegate) {
+        [delegate URLSession:session downloadTask:downloadTask didFinishDownloadingToURL:location];
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+      downloadTask:(NSURLSessionDownloadTask *)downloadTask
+      didWriteData:(int64_t)bytesWritten
+ totalBytesWritten:(int64_t)totalBytesWritten
+totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
+{
+    
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];
+    
+    if (delegate) {
+        [delegate URLSession:session downloadTask:downloadTask didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite];
+    }
+
+    if (self.downloadTaskDidWriteData) {
+        self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);
+    }
+}
+
+- (void)URLSession:(NSURLSession *)session
+      downloadTask:(NSURLSessionDownloadTask *)downloadTask
+ didResumeAtOffset:(int64_t)fileOffset
+expectedTotalBytes:(int64_t)expectedTotalBytes
+{
+    
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];
+    
+    if (delegate) {
+        [delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes];
+    }
+
+    if (self.downloadTaskDidResume) {
+        self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes);
+    }
+}
+
+#pragma mark - NSSecureCoding
+
++ (BOOL)supportsSecureCoding {
+    return YES;
+}
+
+- (instancetype)initWithCoder:(NSCoder *)decoder {
+    NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"];
+
+    self = [self initWithSessionConfiguration:configuration];
+    if (!self) {
+        return nil;
+    }
+
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {
+    [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"];
+}
+
+#pragma mark - NSCopying
+
+- (instancetype)copyWithZone:(NSZone *)zone {
+    return [[[self class] allocWithZone:zone] initWithSessionConfiguration:self.session.configuration];
+}
+
+@end

+ 20 - 0
NIMDemo/NIMDemo/AppDelegate.h

@@ -0,0 +1,20 @@
+//
+//  AppDelegate.h
+//  whosay
+//
+//  Created by Fenix Wang on 2017/5/19.
+//  Copyright © 2017年 DashGame. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+-(void) noNavBar:(UIViewController *)viewController;
+-(void) whiteNavBar:(UIViewController *)viewController;
+-(void) orangeNavBar:(UIViewController *)viewController;
+
+@end
+

+ 291 - 0
NIMDemo/NIMDemo/AppDelegate.m

@@ -0,0 +1,291 @@
+//
+//  AppDelegate.m
+//  whosay
+//
+//  Created by Fenix Wang on 2017/5/19.
+//  Copyright © 2017年 DashGame. All rights reserved.
+//
+
+#import "AppDelegate.h"
+#import "NTESSDKConfigDelegate.h"
+#import "NTESLoginManager.h"
+#import "NTESService.h"
+#import "NTESClientUtil.h"
+#import "NTESLogManager.h"
+#import "NTESNotificationCenter.h"
+#import "NTESSubscribeManager.h"
+#import "NTESDemoConfig.h"
+#import "NTESCustomAttachmentDecoder.h"
+#import "NTESCellLayoutConfig.h"
+#import "NTESSessionUtil.h"
+#import "User.h"
+
+NSString *NTESNotificationLogout = @"NTESNotificationLogout";
+@interface AppDelegate ()<NIMLoginManagerDelegate>
+
+@property (nonatomic,strong) NTESSDKConfigDelegate *sdkConfigDelegate;
+
+@end
+
+@implementation AppDelegate
+
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+    // Override point for customization after application launch.
+    
+    [self setupNIMSDK];
+    [self setupServices];
+    [self registerAPNs];
+    [self commonInitListenEvents];
+    
+    [self setupMainViewController];
+    
+    return YES;
+}
+
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    [[[NIMSDK sharedSDK] loginManager] removeDelegate:self];
+}
+
+
+
+
+#pragma mark - ApplicationDelegate
+- (void)applicationWillResignActive:(UIApplication *)application {
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+    NSInteger count = [[[NIMSDK sharedSDK] conversationManager] allUnreadCount];
+    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:count];
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+}
+
+- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
+{
+    [[NIMSDK sharedSDK] updateApnsToken:deviceToken];
+    DDLogInfo(@"didRegisterForRemoteNotificationsWithDeviceToken:  %@", deviceToken);
+}
+
+- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
+    DDLogInfo(@"receive remote notification:  %@", userInfo);
+}
+
+- (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
+{
+    DDLogError(@"fail to get apns token :%@",error);
+}
+
+
+
+
+
+#pragma mark - misc
+- (void)registerAPNs
+{
+    [[UIApplication sharedApplication] registerForRemoteNotifications];
+    
+    UIUserNotificationType types = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
+    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:types
+                                                                             categories:nil];
+    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
+}
+
+- (void)setupMainViewController
+{
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
+    UINavigationController *nav = [board instantiateViewControllerWithIdentifier:@"NavController"];
+    self.window.rootViewController = nav;
+}
+
+- (void)commonInitListenEvents
+{
+    [[NSNotificationCenter defaultCenter] addObserver:self
+                                             selector:@selector(logout:)
+                                                 name:NTESNotificationLogout
+                                               object:nil];
+    
+    [[[NIMSDK sharedSDK] loginManager] addDelegate:self];
+}
+
+- (void)setupLoginViewController
+{
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
+    UINavigationController *nav = [board instantiateViewControllerWithIdentifier:@"NavController"];
+    self.window.rootViewController = nav;
+}
+
+#pragma mark - 注销
+-(void)logout:(NSNotification*)note
+{
+    [self doLogout];
+}
+
+- (void)doLogout
+{
+    [[NTESLoginManager sharedManager] setCurrentLoginData:nil];
+    [[NTESServiceManager sharedManager] destory];
+    [self setupLoginViewController];
+}
+
+
+#pragma NIMLoginManagerDelegate
+-(void)onKick:(NIMKickReason)code clientType:(NIMLoginClientType)clientType
+{
+    NSString *reason = @"你被踢下线";
+    switch (code) {
+        case NIMKickReasonByClient:
+        case NIMKickReasonByClientManually:{
+            NSString *clientName = [NTESClientUtil clientName:clientType];
+            reason = clientName.length ? [NSString stringWithFormat:@"你的帐号被%@端踢出下线,请注意帐号信息安全",clientName] : @"你的帐号被踢出下线,请注意帐号信息安全";
+            break;
+        }
+        case NIMKickReasonByServer:
+            reason = @"你被服务器踢下线";
+            break;
+        default:
+            break;
+    }
+    [[[NIMSDK sharedSDK] loginManager] logout:^(NSError *error) {
+        [[NSNotificationCenter defaultCenter] postNotificationName:NTESNotificationLogout object:nil];
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"下线通知" message:reason delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
+        [alert show];
+    }];
+}
+
+- (void)onAutoLoginFailed:(NSError *)error
+{
+    //只有连接发生严重错误才会走这个回调,在这个回调里应该登出,返回界面等待用户手动重新登录。
+    DDLogInfo(@"onAutoLoginFailed %zd",error.code);
+    [self showAutoLoginErrorAlert:error];
+}
+
+#pragma mark - logic impl
+- (void)setupServices
+{
+    [[NTESLogManager sharedManager] start];
+    [[NTESNotificationCenter sharedCenter] start];
+    [[NTESSubscribeManager sharedInstance] start];
+}
+
+
+
+
+- (void)setupNIMSDK
+{
+    //在注册 NIMSDK appKey 之前先进行配置信息的注册,如是否使用新路径,是否要忽略某些通知,是否需要多端同步未读数
+    self.sdkConfigDelegate = [[NTESSDKConfigDelegate alloc] init];
+    [[NIMSDKConfig sharedConfig] setDelegate:self.sdkConfigDelegate];
+    [[NIMSDKConfig sharedConfig] setShouldSyncUnreadCount:YES];
+    [[NIMSDKConfig sharedConfig] setMaxAutoLoginRetryTimes:10];
+    
+    
+    //appkey 是应用的标识,不同应用之间的数据(用户、消息、群组等)是完全隔离的。
+    //如需打网易云信 Demo 包,请勿修改 appkey ,开发自己的应用时,请替换为自己的 appkey 。
+    //并请对应更换 Demo 代码中的获取好友列表、个人信息等网易云信 SDK 未提供的接口。
+    NSString *appKey = [[NTESDemoConfig sharedConfig] appKey];
+    NSString *cerName= [[NTESDemoConfig sharedConfig] cerName];
+    [[NIMSDK sharedSDK] registerWithAppID:appKey
+                                  cerName:cerName];
+    
+    
+    //注册自定义消息的解析器
+    [NIMCustomObject registerCustomDecoder:[NTESCustomAttachmentDecoder new]];
+    
+    //注册 NIMKit 自定义排版配置
+    [[NIMKit sharedKit] registerLayoutConfig:[NTESCellLayoutConfig class]];
+}
+
+#pragma mark - 登录错误回调
+- (void)showAutoLoginErrorAlert:(NSError *)error
+{
+    NSString *message = [NTESSessionUtil formatAutoLoginMessage:error];
+    UIAlertController *vc = [UIAlertController alertControllerWithTitle:@"自动登录失败"
+                                                                message:message
+                                                         preferredStyle:UIAlertControllerStyleAlert];
+    
+    if ([error.domain isEqualToString:NIMLocalErrorDomain] &&
+        error.code == NIMLocalErrorCodeAutoLoginRetryLimit)
+    {
+        UIAlertAction *retryAction = [UIAlertAction actionWithTitle:@"重试"
+                                                              style:UIAlertActionStyleCancel
+                                                            handler:^(UIAlertAction * _Nonnull action) {
+                                                                LoginData *data = [[NTESLoginManager sharedManager] currentLoginData];
+                                                                NSString *account = [data account];
+                                                                NSString *token = [data token];
+                                                                if ([account length] && [token length])
+                                                                {
+                                                                    NIMAutoLoginData *loginData = [[NIMAutoLoginData alloc] init];
+                                                                    loginData.account = account;
+                                                                    loginData.token = token;
+                                                                    
+                                                                    [[[NIMSDK sharedSDK] loginManager] autoLogin:loginData];
+                                                                }
+                                                            }];
+        [vc addAction:retryAction];
+    }
+    
+    
+    
+    UIAlertAction *logoutAction = [UIAlertAction actionWithTitle:@"注销"
+                                                           style:UIAlertActionStyleDestructive
+                                                         handler:^(UIAlertAction * _Nonnull action) {
+                                                             [[[NIMSDK sharedSDK] loginManager] logout:^(NSError *error) {
+                                                                 [[NSNotificationCenter defaultCenter] postNotificationName:NTESNotificationLogout object:nil];
+                                                             }];
+                                                         }];
+    [vc addAction:logoutAction];
+    
+    [self.window.rootViewController presentViewController:vc
+                                                 animated:YES
+                                               completion:nil];
+}
+
+
+
+
+
+
+
+
+
+- (void)noNavBar:(UIViewController *)viewController{
+    [viewController.navigationController.navigationBar setHidden:YES];
+    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
+}
+
+- (void)whiteNavBar:(UIViewController *)viewController{
+    [viewController.navigationController.navigationBar setHidden:NO];
+    viewController.navigationController.navigationBar.tintColor = [UIColor blackColor];
+    [viewController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
+    viewController.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
+    
+    [viewController.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
+    [viewController.navigationController.navigationBar setShadowImage:[UIImage new]];
+    
+    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
+}
+
+- (void)orangeNavBar:(UIViewController *)viewController{
+    [viewController.navigationController.navigationBar setHidden:NO];
+    viewController.navigationController.navigationBar.tintColor = [UIColor whiteColor];
+    [viewController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
+    viewController.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:(255.0 / 255.0) green:(171.0 / 255.0) blue:(8.0 / 255.0) alpha:1.0];
+    viewController.navigationItem.titleView.tintColor = [UIColor whiteColor];
+    
+    [viewController.navigationController.navigationBar setBackgroundImage:nil forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
+    [viewController.navigationController.navigationBar setShadowImage:nil];
+    
+    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
+}
+
+@end

+ 31 - 0
NIMDemo/NIMDemo/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
+                        <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+</document>

+ 1203 - 0
NIMDemo/NIMDemo/Base.lproj/Main.storyboard

@@ -0,0 +1,1203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F2073" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ryW-gA-XNT">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Navigation Controller-->
+        <scene sceneID="fAe-M1-am2">
+            <objects>
+                <navigationController storyboardIdentifier="NavController" id="ryW-gA-XNT" sceneMemberID="viewController">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="Hk7-II-cEF">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </navigationBar>
+                    <connections>
+                        <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="5y9-9A-Swr"/>
+                        <segue destination="cAF-wc-1QN" kind="show" id="Fcx-hW-gId"/>
+                    </connections>
+                </navigationController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="R3V-uB-z0z" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-934" y="36"/>
+        </scene>
+        <!--充值-->
+        <scene sceneID="hv6-7P-Vyt">
+            <objects>
+                <viewController storyboardIdentifier="Recharge" title="充值" id="cAF-wc-1QN" customClass="RechargeViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Jv6-og-gDZ"/>
+                        <viewControllerLayoutGuide type="bottom" id="xa5-EZ-cRS"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="b0w-tR-r0S">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="7Dg-NZ-p9f" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-935.20000000000005" y="868.51574212893559"/>
+        </scene>
+        <!--谁说-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController storyboardIdentifier="FirstView" title="谁说" id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qSw-o9-c1X">
+                                <rect key="frame" x="35" y="335" width="305" height="50"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <state key="normal" title="登录" backgroundImage="登录界面_03"/>
+                                <connections>
+                                    <segue destination="UlQ-pI-CdJ" kind="show" id="26v-7j-kWO"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="谁说APP版权所有" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m6M-ca-R5W">
+                                <rect key="frame" x="0.0" y="619" width="375" height="25"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <color key="textColor" red="0.80778062343597412" green="0.80787831544876099" blue="0.80774742364883423" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="35l-Ty-Mc8">
+                                <rect key="frame" x="103" y="118" width="168" height="128"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                            </imageView>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gTO-zI-B9g">
+                                <rect key="frame" x="35" y="409" width="305" height="50"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <state key="normal" title="注册" backgroundImage="登录界面_06">
+                                    <color key="titleColor" red="0.95986098051071167" green="0.650989830493927" blue="0.11616792529821396" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <segue destination="WOk-cZ-Myx" kind="show" id="ZPf-qf-Bgx"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                    <navigationItem key="navigationItem" id="EUZ-iT-wKO"/>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-148" y="36"/>
+        </scene>
+        <!--Login View Controller-->
+        <scene sceneID="b9x-lz-ipl">
+            <objects>
+                <viewController id="UlQ-pI-CdJ" customClass="LoginViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="YfD-xM-VsH"/>
+                        <viewControllerLayoutGuide type="bottom" id="YeZ-pX-3WO"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ekg-R6-x7D">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="欢迎来到谁说" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lOq-ub-Ymu">
+                                <rect key="frame" x="16" y="87" width="250" height="41"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="32"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="请输入你的登录信息" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TEP-eB-qAy">
+                                <rect key="frame" x="16" y="136" width="250" height="28"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="20"/>
+                                <color key="textColor" red="0.59208381175994873" green="0.59220314025878906" blue="0.5920829176902771" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="FbB-Kd-Wwb">
+                                <rect key="frame" x="16" y="214" width="343" height="30"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" keyboardType="phonePad"/>
+                            </textField>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="WrB-gh-jQd">
+                                <rect key="frame" x="16" y="268" width="343" height="30"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" secureTextEntry="YES"/>
+                            </textField>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lUf-5d-xWC">
+                                <rect key="frame" x="16" y="357" width="343" height="50"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <state key="normal" title="登录" backgroundImage="登录界面_03"/>
+                                <connections>
+                                    <action selector="logicClick:" destination="UlQ-pI-CdJ" eventType="touchUpInside" id="97G-kh-O8Q"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="登录代表您已同意" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q7I-mU-QGX">
+                                <rect key="frame" x="16" y="423" width="155" height="28"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                <color key="textColor" red="0.59208381180000003" green="0.59220314029999999" blue="0.59208291769999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GUp-R2-h87">
+                                <rect key="frame" x="193" y="422" width="145" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="《用户注册协议》">
+                                    <color key="titleColor" red="0.35230711102485657" green="0.78861087560653687" blue="0.64692634344100952" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="还没有账号?" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PXI-jZ-06Y">
+                                <rect key="frame" x="28" y="629" width="182" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                <color key="textColor" red="0.59208381180000003" green="0.59220314029999999" blue="0.59208291769999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NbL-4t-apr">
+                                <rect key="frame" x="209" y="629" width="72" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                <state key="normal" title="现在注册">
+                                    <color key="titleColor" red="0.35230711100000001" green="0.78861087559999998" blue="0.64692634339999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <segue destination="WOk-cZ-Myx" kind="show" id="koG-KY-sGS"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                    <toolbarItems/>
+                    <connections>
+                        <outlet property="mobileTextField" destination="FbB-Kd-Wwb" id="ZaN-90-hQf"/>
+                        <outlet property="pwdTextField" destination="WrB-gh-jQd" id="tSm-6j-Trb"/>
+                        <segue destination="ggS-Se-Q5A" kind="show" identifier="login2Tab" id="3R5-Pr-2W2"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="4sX-MW-vHe" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="668" y="-316"/>
+        </scene>
+        <!--Register View Controller-->
+        <scene sceneID="tPp-6c-llA">
+            <objects>
+                <viewController id="WOk-cZ-Myx" customClass="RegisterViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="AnS-1S-atQ"/>
+                        <viewControllerLayoutGuide type="bottom" id="pn7-1L-PTV"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="4av-X4-Xhk">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="96Z-Ww-f42">
+                                <rect key="frame" x="37" y="103" width="300" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <textInputTraits key="textInputTraits" keyboardType="phonePad"/>
+                            </textField>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="a82-dS-POP">
+                                <rect key="frame" x="37" y="158" width="300" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <textInputTraits key="textInputTraits" keyboardType="phonePad"/>
+                            </textField>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="密码(6-12位数字和字母组成)" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="CMg-YG-ALW">
+                                <rect key="frame" x="37" y="216" width="300" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <textInputTraits key="textInputTraits" keyboardType="phonePad"/>
+                            </textField>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="确认密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0TO-fY-Gay">
+                                <rect key="frame" x="37" y="276" width="300" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <textInputTraits key="textInputTraits" keyboardType="phonePad"/>
+                            </textField>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nUC-vV-b1N">
+                                <rect key="frame" x="29" y="342" width="316" height="50"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                <state key="normal" title="注册" backgroundImage="登录界面_03"/>
+                                <connections>
+                                    <action selector="registerClick:" destination="WOk-cZ-Myx" eventType="touchUpInside" id="1j5-jo-xnV"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R6L-Df-xI4">
+                                <rect key="frame" x="37" y="421" width="300" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                <state key="normal" title="我同意遵守《谁说社交APP服务协议》">
+                                    <color key="titleColor" red="0.65482175350189209" green="0.65495258569717407" blue="0.65482074022293091" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                    <connections>
+                        <outlet property="mobileTextField" destination="96Z-Ww-f42" id="nXR-eo-02e"/>
+                        <outlet property="pwdConfirmTextField" destination="0TO-fY-Gay" id="bll-hs-AKm"/>
+                        <outlet property="pwdTextField" destination="CMg-YG-ALW" id="Hhd-NC-oDz"/>
+                        <outlet property="vcTextField" destination="a82-dS-POP" id="uxO-4w-xjG"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="YBw-o3-UHP" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="668" y="423"/>
+        </scene>
+        <!--朋友-->
+        <scene sceneID="Ifc-QK-3eD">
+            <objects>
+                <viewController id="LW2-NW-CF0" customClass="FriendViewController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="Rpl-MA-peY">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <connections>
+                            <outlet property="dataSource" destination="LW2-NW-CF0" id="n2x-KZ-9KI"/>
+                            <outlet property="delegate" destination="LW2-NW-CF0" id="s0b-L7-ACc"/>
+                        </connections>
+                    </tableView>
+                    <extendedEdge key="edgesForExtendedLayout" top="YES"/>
+                    <tabBarItem key="tabBarItem" title="朋友" image="五个图标_19" selectedImage="五个图标_05" id="q7s-dK-zBU"/>
+                    <simulatedTabBarMetrics key="simulatedBottomBarMetrics" translucent="NO"/>
+                    <connections>
+                        <outlet property="mTableView" destination="Rpl-MA-peY" id="BsQ-O1-5d0"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="mCS-33-Zij" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2518" y="-264"/>
+        </scene>
+        <!--交易帖-->
+        <scene sceneID="xe7-yV-wsZ">
+            <objects>
+                <viewController id="DfF-9d-fkt" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="MMB-8h-3h3"/>
+                        <viewControllerLayoutGuide type="bottom" id="9Z2-IW-BWK"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="ZeR-Zu-go5">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                    <tabBarItem key="tabBarItem" title="交易帖" image="五个图标_20" selectedImage="五个图标_07" id="5oe-06-YCK"/>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="kJU-hs-Hg5" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2518" y="422"/>
+        </scene>
+        <!--朋友圈-->
+        <scene sceneID="WAG-Ob-5Qi">
+            <objects>
+                <viewController id="Uhr-b8-Pkv" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="IIn-iL-1z2"/>
+                        <viewControllerLayoutGuide type="bottom" id="UGq-Un-6f2"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="19c-KI-w62">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                    <tabBarItem key="tabBarItem" title="朋友圈" image="五个图标_21" selectedImage="五个图标_09" id="vyo-cF-KS0"/>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="ten-yh-4ue" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2518" y="1116"/>
+        </scene>
+        <!--我的-->
+        <scene sceneID="Ixr-fZ-phM">
+            <objects>
+                <tableViewController title="我的" id="jFP-5S-Sx6" customClass="SettingTableViewController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="none" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="QkO-9q-JjT">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                        <sections>
+                            <tableViewSection id="I3k-ak-7uh">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="300" id="skT-k4-pey">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="300"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="skT-k4-pey" id="7sA-Tb-G76">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="300"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" layoutMarginsFollowReadableWidth="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IfL-77-v8x">
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="180"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <state key="normal" title="点击更换背景" backgroundImage="群资料_01">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                </button>
+                                                <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nlv-Sx-RuL" customClass="NIMAvatarImageView">
+                                                    <rect key="frame" x="136" y="130" width="100" height="100"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                </view>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="我的_07 (3)" translatesAutoresizingMaskIntoConstraints="NO" id="3Vj-yy-uIj">
+                                                    <rect key="frame" x="205" y="195" width="30" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="ID:213123" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ur1-2W-LD0">
+                                                    <rect key="frame" x="72.5" y="258" width="230" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="前世情人" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6fr-nf-quH">
+                                                    <rect key="frame" x="72.5" y="238" width="230" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="50" id="QQI-1I-3Iq">
+                                        <rect key="frame" x="0.0" y="300" width="375" height="50"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QQI-1I-3Iq" id="QJk-OW-b17">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="S5g-Fw-Axc">
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="214"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                </view>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="10" id="OJt-pZ-mTE">
+                                        <rect key="frame" x="0.0" y="350" width="375" height="10"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OJt-pZ-mTE" id="aML-OK-pvE">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="10"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <color key="backgroundColor" red="0.90210087435233155" green="0.90210087435233155" blue="0.90210087435233155" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Zfh-lz-oAm">
+                                        <rect key="frame" x="0.0" y="360" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Zfh-lz-oAm" id="3Sg-Fx-PvB">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="我的_07" translatesAutoresizingMaskIntoConstraints="NO" id="N5U-oJ-BKW">
+                                                    <rect key="frame" x="15" y="8" width="30" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="jo3-AL-V4P">
+                                                    <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="附近的人" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kz2-op-bVo">
+                                                    <rect key="frame" x="55" y="12" width="198" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Z6-gG-Hss">
+                                                    <rect key="frame" x="0.0" y="0.0" width="408" height="44.5"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <connections>
+                                                        <action selector="onTouchNear:" destination="jFP-5S-Sx6" eventType="touchUpInside" id="bNi-CT-DGT"/>
+                                                    </connections>
+                                                </button>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="1" id="8Kd-fJ-d1u">
+                                        <rect key="frame" x="0.0" y="404" width="375" height="1"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8Kd-fJ-d1u" id="bsA-zS-EWk">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <color key="backgroundColor" red="0.90210087439999997" green="0.90210087439999997" blue="0.90210087439999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="KVb-vl-idH">
+                                        <rect key="frame" x="0.0" y="405" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KVb-vl-idH" id="7fO-8e-wXq">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="我的_10" translatesAutoresizingMaskIntoConstraints="NO" id="S0x-lA-3J7">
+                                                    <rect key="frame" x="15" y="6" width="30" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="我的供需" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cpK-MC-qWg">
+                                                    <rect key="frame" x="55" y="12" width="198" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="7P8-Ft-E8l">
+                                                    <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VJL-lD-5KH">
+                                                    <rect key="frame" x="0.0" y="0.0" width="408" height="44.5"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <connections>
+                                                        <action selector="onTouchSupply:" destination="jFP-5S-Sx6" eventType="touchUpInside" id="9g5-8Q-Dvl"/>
+                                                    </connections>
+                                                </button>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="1" id="gNo-0w-wVK">
+                                        <rect key="frame" x="0.0" y="449" width="375" height="1"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gNo-0w-wVK" id="tXq-Bb-NhH">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <color key="backgroundColor" red="0.90210087439999997" green="0.90210087439999997" blue="0.90210087439999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="m8w-k2-CrD">
+                                        <rect key="frame" x="0.0" y="450" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="m8w-k2-CrD" id="E2I-M3-bif">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="我的_17" translatesAutoresizingMaskIntoConstraints="NO" id="85V-vW-s0k">
+                                                    <rect key="frame" x="15" y="5" width="30" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="设置" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yhk-5I-zBn">
+                                                    <rect key="frame" x="55" y="12" width="198" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5TP-Gc-bul">
+                                                    <rect key="frame" x="0.0" y="0.0" width="408" height="44.5"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <connections>
+                                                        <action selector="onTouchSetting:" destination="jFP-5S-Sx6" eventType="touchUpInside" id="e5q-Hf-XQC"/>
+                                                        <segue destination="rUO-gt-PPj" kind="show" id="WdG-eP-qVZ"/>
+                                                    </connections>
+                                                </button>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="PqK-A3-rQN">
+                                                    <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="1" id="sIC-9L-HZD">
+                                        <rect key="frame" x="0.0" y="494" width="375" height="1"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sIC-9L-HZD" id="AAr-aA-V3Q">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <color key="backgroundColor" red="0.90210087439999997" green="0.90210087439999997" blue="0.90210087439999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                        </sections>
+                    </tableView>
+                    <extendedEdge key="edgesForExtendedLayout" top="YES"/>
+                    <tabBarItem key="tabBarItem" title="我的" image="五个图标_22" selectedImage="五个图标_11" id="lsN-GL-pin"/>
+                    <simulatedTabBarMetrics key="simulatedBottomBarMetrics" translucent="NO"/>
+                    <connections>
+                        <outlet property="avatarImg" destination="nlv-Sx-RuL" id="Yjx-CW-OwS"/>
+                        <outlet property="genderImg" destination="3Vj-yy-uIj" id="y3V-OG-3EZ"/>
+                        <outlet property="topBgBtn" destination="IfL-77-v8x" id="jf8-U1-9L5"/>
+                        <outlet property="userIdLabel" destination="Ur1-2W-LD0" id="Kkl-rn-aPe"/>
+                        <outlet property="userNameLabel" destination="6fr-nf-quH" id="Gqm-oo-dON"/>
+                    </connections>
+                </tableViewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="a35-Ef-GXn" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2516" y="1854.4227886056974"/>
+        </scene>
+        <!--Setting Account View Controller-->
+        <scene sceneID="TDU-IJ-Itb">
+            <objects>
+                <viewController id="rUO-gt-PPj" customClass="SettingAccountViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="pQW-9x-68V"/>
+                        <viewControllerLayoutGuide type="bottom" id="kdV-Os-LUa"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="ISB-Mh-c6U">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eG0-Zn-1dn">
+                                <rect key="frame" x="0.0" y="64" width="375" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="账户与安全" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cQQ-8Y-bdN">
+                                        <rect key="frame" x="15" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="安全等级高" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gjo-cX-P6X">
+                                        <rect key="frame" x="195" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="jFL-6d-bzT">
+                                        <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                    </imageView>
+                                    <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Yb-Nj-gKo">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                    </button>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </view>
+                            <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="H9s-SQ-CXL">
+                                <rect key="frame" x="0.0" y="109" width="375" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="消息通知" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kk5-rU-aPU">
+                                        <rect key="frame" x="15" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="静音" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gZR-sn-suf">
+                                        <rect key="frame" x="195" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="7Hi-s6-D6L">
+                                        <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                    </imageView>
+                                    <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DX4-u1-sWB">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                    </button>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </view>
+                            <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="83B-sT-jMs">
+                                <rect key="frame" x="0.0" y="154" width="375" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="隐私" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VPl-e6-lu9">
+                                        <rect key="frame" x="15" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MHO-w4-CPB">
+                                        <rect key="frame" x="195" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="DdH-6w-nx0">
+                                        <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                    </imageView>
+                                    <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bie-Zx-5Nf">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                    </button>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </view>
+                            <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5Tn-Jw-UHU">
+                                <rect key="frame" x="0.0" y="199" width="375" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="帮助与反馈" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vnI-FC-weU">
+                                        <rect key="frame" x="15" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0IO-LM-M7w">
+                                        <rect key="frame" x="195" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="TtH-Lc-QoR">
+                                        <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                    </imageView>
+                                    <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fUP-nw-Kha">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                    </button>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </view>
+                            <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tVl-g1-J8e">
+                                <rect key="frame" x="0.0" y="250" width="375" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="关于谁说" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vcY-u0-Yhd">
+                                        <rect key="frame" x="15" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J00-YX-STW">
+                                        <rect key="frame" x="195" y="12" width="149" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="设置_03" translatesAutoresizingMaskIntoConstraints="NO" id="jN0-Bl-21P">
+                                        <rect key="frame" x="350" y="12" width="10" height="21"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                    </imageView>
+                                    <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UDJ-BA-sir">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                    </button>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </view>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SaW-tt-jni">
+                                <rect key="frame" x="15" y="320" width="343" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="退出登录" backgroundImage="登录界面_03">
+                                    <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
+                                </state>
+                                <connections>
+                                    <action selector="onTouchLogout:" destination="rUO-gt-PPj" eventType="touchUpInside" id="mPu-et-1os"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" red="0.97255921363830566" green="0.97254097461700439" blue="0.97255337238311768" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
+                    </view>
+                    <simulatedTabBarMetrics key="simulatedBottomBarMetrics" translucent="NO"/>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="jp0-tt-9Ls" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="3304.8000000000002" y="2132.3838080959522"/>
+        </scene>
+        <!--组群-->
+        <scene sceneID="xUq-cg-xDw">
+            <objects>
+                <tableViewController storyboardIdentifier="Group" id="61v-Gy-to8" customClass="GroupTableController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="fag-QF-435">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                        <prototypes>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Group" rowHeight="80" id="vpa-au-VEB" customClass="GroupTableViewCell">
+                                <rect key="frame" x="0.0" y="28" width="375" height="80"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vpa-au-VEB" id="hVY-F7-6ak">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="79.5"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9LE-Vb-IgG">
+                                            <rect key="frame" x="18" y="10" width="60" height="60"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        </view>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="国家群" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0BY-47-g1V">
+                                            <rect key="frame" x="94" y="14" width="249" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                            <nil key="textColor"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="国家群" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a51-Bg-NyF">
+                                            <rect key="frame" x="94" y="43" width="249" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" red="0.60000002379999995" green="0.60000002379999995" blue="0.60000002379999995" alpha="1" colorSpace="calibratedRGB"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                </tableViewCellContentView>
+                                <connections>
+                                    <outlet property="avatarContainer" destination="9LE-Vb-IgG" id="2SS-Ml-hOw"/>
+                                    <outlet property="descTextField" destination="a51-Bg-NyF" id="G0q-0O-zSI"/>
+                                    <outlet property="titleTextField" destination="0BY-47-g1V" id="uJs-3l-4r3"/>
+                                </connections>
+                            </tableViewCell>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="More" rowHeight="50" id="f7W-aI-VMa">
+                                <rect key="frame" x="0.0" y="108" width="375" height="50"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="f7W-aI-VMa" id="nfY-aU-5nZ">
+                                    <rect key="frame" x="0.0" y="0.0" width="342" height="49.5"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="选择群组_10" translatesAutoresizingMaskIntoConstraints="NO" id="3Qd-jX-ays" userLabel="Icon">
+                                            <rect key="frame" x="18" y="10" width="30" height="30"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        </imageView>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="更多地区房间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fPd-1F-zeE">
+                                            <rect key="frame" x="60" y="15" width="249" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" red="0.60000002379999995" green="0.60000002379999995" blue="0.60000002379999995" alpha="1" colorSpace="calibratedRGB"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                </tableViewCellContentView>
+                            </tableViewCell>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Split" rowHeight="10" id="HUS-Vl-HRR">
+                                <rect key="frame" x="0.0" y="158" width="375" height="10"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="HUS-Vl-HRR" id="bHS-pd-EOj">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="9.5"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                                </tableViewCellContentView>
+                            </tableViewCell>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Near" rowHeight="60" id="9JQ-Eo-fTP">
+                                <rect key="frame" x="0.0" y="168" width="375" height="60"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9JQ-Eo-fTP" id="q4Q-Za-EPa">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="选择群组_13" translatesAutoresizingMaskIntoConstraints="NO" id="zjx-Z0-HgP" userLabel="Icon">
+                                            <rect key="frame" x="18" y="15" width="30" height="30"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        </imageView>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="附近群" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Omc-63-qlp">
+                                            <rect key="frame" x="59" y="19" width="127" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                            <color key="textColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vnR-QJ-L7I">
+                                            <rect key="frame" x="244" y="15" width="113" height="30"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                            <state key="normal" title="用户创建群组">
+                                                <color key="titleColor" red="0.60000002379999995" green="0.60000002379999995" blue="0.60000002379999995" alpha="1" colorSpace="calibratedRGB"/>
+                                            </state>
+                                            <connections>
+                                                <action selector="createGroup:" destination="61v-Gy-to8" eventType="touchUpInside" id="eai-lq-b1r"/>
+                                            </connections>
+                                        </button>
+                                    </subviews>
+                                </tableViewCellContentView>
+                            </tableViewCell>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Activity" rowHeight="40" id="G9n-nF-a4h">
+                                <rect key="frame" x="0.0" y="228" width="375" height="40"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="G9n-nF-a4h" id="fbF-fe-hdE">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="39.5"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="最近活跃群" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ucp-e4-fBc">
+                                            <rect key="frame" x="18" y="10" width="127" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                            <color key="textColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                </tableViewCellContentView>
+                            </tableViewCell>
+                        </prototypes>
+                        <connections>
+                            <outlet property="dataSource" destination="61v-Gy-to8" id="eCT-Bq-Ii1"/>
+                            <outlet property="delegate" destination="61v-Gy-to8" id="j6w-bo-cvs"/>
+                        </connections>
+                    </tableView>
+                    <extendedEdge key="edgesForExtendedLayout" top="YES"/>
+                    <tabBarItem key="tabBarItem" title="组群" image="五个图标_18" selectedImage="五个图标_03" id="YMa-Xo-VPw"/>
+                    <simulatedTabBarMetrics key="simulatedBottomBarMetrics" translucent="NO"/>
+                    <connections>
+                        <outlet property="tableView" destination="fag-QF-435" id="hFI-GS-dPr"/>
+                        <segue destination="5qs-Nf-4Jf" kind="show" identifier="createGroup" id="crz-lb-2c2"/>
+                        <segue destination="M3Y-Uu-1Gu" kind="show" identifier="cityPicker" id="BGa-Po-1U5"/>
+                        <segue destination="Pzn-rE-rHS" kind="show" identifier="" id="qWY-O8-ZLe"/>
+                    </connections>
+                </tableViewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="eOB-Cn-FW5" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2517.5999999999999" y="-929.68515742128943"/>
+        </scene>
+        <!--City Picker View Controller-->
+        <scene sceneID="L3u-fg-i0c">
+            <objects>
+                <viewController id="M3Y-Uu-1Gu" customClass="CityPickerViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="cHy-Ne-olc"/>
+                        <viewControllerLayoutGuide type="bottom" id="mtU-Zy-ar1"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="KfJ-My-GKX">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <pickerView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4zt-pf-brs" customClass="PSCityPickerView">
+                                <rect key="frame" x="0.0" y="64" width="375" height="554"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </pickerView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                    <connections>
+                        <outlet property="cityPicker" destination="4zt-pf-brs" id="g21-CC-RGr"/>
+                        <segue destination="61v-Gy-to8" kind="show" identifier="cityPicked" id="gKG-Mt-Dsc"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="wEQ-eF-qrB" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="3306" y="-1685"/>
+        </scene>
+        <!--Create Group View Controller-->
+        <scene sceneID="3ED-cz-NRR">
+            <objects>
+                <tableViewController id="5qs-Nf-4Jf" customClass="CreateGroupViewController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="none" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="nVT-GQ-TMi">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                        <sections>
+                            <tableViewSection id="zhZ-Eg-XFb">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="120" id="cPp-ZU-nSI">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="120"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cPp-ZU-nSI" id="BW2-Lr-Mz9">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="120"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="群头像" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P5i-QK-CYZ">
+                                                    <rect key="frame" x="15" y="50" width="52" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9Ff-hh-W2F">
+                                                    <rect key="frame" x="92" y="18" width="84" height="84"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                </view>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="2" id="hSI-Di-stH">
+                                        <rect key="frame" x="0.0" y="120" width="375" height="2"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hSI-Di-stH" id="ZhO-lr-Iux">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="2"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="60" id="Xez-oq-MMj">
+                                        <rect key="frame" x="0.0" y="122" width="375" height="60"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Xez-oq-MMj" id="YS5-A6-fJC">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="群昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xRL-J7-wKM">
+                                                    <rect key="frame" x="15" y="19" width="52" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入群名" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="w6x-i0-xTf">
+                                                    <rect key="frame" x="90" y="14" width="271" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                                    <nil key="textColor"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits"/>
+                                                </textField>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="6" id="zWr-uu-pba">
+                                        <rect key="frame" x="0.0" y="182" width="375" height="6"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zWr-uu-pba" id="351-IP-AX6">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="6"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="150" id="iCY-MW-ewP">
+                                        <rect key="frame" x="0.0" y="188" width="375" height="150"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="iCY-MW-ewP" id="pFE-Bq-k7t">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="150"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="群简介" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F1c-bF-uMT">
+                                                    <rect key="frame" x="15" y="10" width="52" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6L8-u4-TE8">
+                                                    <rect key="frame" x="15" y="40" width="350" height="97"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                                </textView>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="6" id="eRb-am-hVV">
+                                        <rect key="frame" x="0.0" y="338" width="375" height="6"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="eRb-am-hVV" id="laH-7Q-skz">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="6"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                        </tableViewCellContentView>
+                                        <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="t6W-6K-6cf">
+                                        <rect key="frame" x="0.0" y="344" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="t6W-6K-6cf" id="Yp0-TN-o5f">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="群成员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lnv-JQ-Cog">
+                                                    <rect key="frame" x="15" y="11" width="52" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="2" id="cbI-R4-BIr">
+                                        <rect key="frame" x="0.0" y="388" width="375" height="2"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cbI-R4-BIr" id="QGs-jD-n2g">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="2"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                        </tableViewCellContentView>
+                                        <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="100" id="wxL-we-bix">
+                                        <rect key="frame" x="0.0" y="390" width="375" height="100"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wxL-we-bix" id="6dn-ab-ukv">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z2h-9J-xFe">
+                                                    <rect key="frame" x="16" y="20" width="60" height="60"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                                                    <state key="normal" title="+"/>
+                                                    <connections>
+                                                        <action selector="addMenber:" destination="5qs-Nf-4Jf" eventType="touchUpInside" id="DGd-32-Niw"/>
+                                                    </connections>
+                                                </button>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="80" id="54i-Je-dCP">
+                                        <rect key="frame" x="0.0" y="490" width="375" height="80"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="54i-Je-dCP" id="cHl-Gw-LNs">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nGB-FK-VMc">
+                                                    <rect key="frame" x="12" y="15" width="350" height="50"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                                    <state key="normal" title="创建群组" backgroundImage="开启通讯录_07"/>
+                                                    <connections>
+                                                        <action selector="createGroup:" destination="5qs-Nf-4Jf" eventType="touchUpInside" id="iaq-Gy-YXT"/>
+                                                    </connections>
+                                                </button>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                        </sections>
+                        <connections>
+                            <outlet property="dataSource" destination="5qs-Nf-4Jf" id="jQX-E9-hBT"/>
+                            <outlet property="delegate" destination="5qs-Nf-4Jf" id="oSP-pT-4cG"/>
+                        </connections>
+                    </tableView>
+                    <nil key="simulatedBottomBarMetrics"/>
+                    <connections>
+                        <outlet property="addBtn" destination="Z2h-9J-xFe" id="64d-wN-5un"/>
+                        <outlet property="avatarContainer" destination="9Ff-hh-W2F" id="vVm-Om-PQJ"/>
+                        <outlet property="descTextView" destination="6L8-u4-TE8" id="uTV-YE-ytY"/>
+                        <outlet property="menberContainer" destination="6dn-ab-ukv" id="2fS-Qy-G2H"/>
+                        <outlet property="nickTextField" destination="w6x-i0-xTf" id="eO7-7s-zsd"/>
+                    </connections>
+                </tableViewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="mtg-bH-TTq" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="3978" y="-1685"/>
+        </scene>
+        <!--Group More Table View Controller-->
+        <scene sceneID="SMT-Sp-C6c">
+            <objects>
+                <tableViewController storyboardIdentifier="GroupMore" id="Pzn-rE-rHS" customClass="GroupMoreTableViewController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="80" sectionHeaderHeight="28" sectionFooterHeight="28" id="cp8-AT-t8S">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                        <prototypes>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="Group" selectionStyle="default" indentationWidth="10" reuseIdentifier="Group" rowHeight="80" id="qvV-9e-Kta" customClass="GroupMoreTableViewCell">
+                                <rect key="frame" x="0.0" y="28" width="375" height="80"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="qvV-9e-Kta" id="aqd-jU-f8s">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="79.5"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bcw-rl-sKj">
+                                            <rect key="frame" x="18" y="10" width="60" height="60"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        </view>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="国家群" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8wB-Fe-Lkb">
+                                            <rect key="frame" x="94" y="14" width="197" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                                            <nil key="textColor"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="国家群" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RfM-lE-TzK">
+                                            <rect key="frame" x="94" y="43" width="197" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" red="0.60000002379999995" green="0.60000002379999995" blue="0.60000002379999995" alpha="1" colorSpace="calibratedRGB"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="国家群" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5iS-Aj-x2S">
+                                            <rect key="frame" x="270" y="29" width="97" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" red="0.60000002379999995" green="0.60000002379999995" blue="0.60000002379999995" alpha="1" colorSpace="calibratedRGB"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                </tableViewCellContentView>
+                                <connections>
+                                    <outlet property="avatarContainer" destination="bcw-rl-sKj" id="ABu-Uz-RhL"/>
+                                    <outlet property="descTextField" destination="RfM-lE-TzK" id="fEx-tb-qJn"/>
+                                    <outlet property="distTextField" destination="5iS-Aj-x2S" id="qRq-yn-LJR"/>
+                                    <outlet property="titleTextField" destination="8wB-Fe-Lkb" id="Rde-SQ-9eI"/>
+                                </connections>
+                            </tableViewCell>
+                        </prototypes>
+                        <connections>
+                            <outlet property="dataSource" destination="Pzn-rE-rHS" id="NKX-Ca-hFF"/>
+                            <outlet property="delegate" destination="Pzn-rE-rHS" id="zIH-5r-tfK"/>
+                        </connections>
+                    </tableView>
+                    <connections>
+                        <segue destination="5qs-Nf-4Jf" kind="show" identifier="nearCreateGroup" id="L8f-9a-f45"/>
+                    </connections>
+                </tableViewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="nNY-yP-3hS" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="4879" y="-1686"/>
+        </scene>
+        <!--Tab Bar Controller-->
+        <scene sceneID="ncA-6i-C8L">
+            <objects>
+                <tabBarController storyboardIdentifier="TabBarView" id="ggS-Se-Q5A" customClass="TabBarController" sceneMemberID="viewController">
+                    <tabBar key="tabBar" contentMode="scaleToFill" id="CiZ-YY-MKG">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <color key="selectedImageTintColor" red="0.9602389931678772" green="0.66694557666778564" blue="0.0098898103460669518" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </tabBar>
+                    <connections>
+                        <segue destination="61v-Gy-to8" kind="relationship" relationship="viewControllers" id="1Zu-Wn-MWT"/>
+                        <segue destination="LW2-NW-CF0" kind="relationship" relationship="viewControllers" id="SNA-tO-I7s"/>
+                        <segue destination="DfF-9d-fkt" kind="relationship" relationship="viewControllers" id="aje-Io-HCa"/>
+                        <segue destination="Uhr-b8-Pkv" kind="relationship" relationship="viewControllers" id="Idz-lS-5Hw"/>
+                        <segue destination="jFP-5S-Sx6" kind="relationship" relationship="viewControllers" id="9I6-nh-jMi"/>
+                    </connections>
+                </tabBarController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="aKp-XW-PQB" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="1534" y="37"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="五个图标_03" width="25" height="25"/>
+        <image name="五个图标_05" width="25" height="25"/>
+        <image name="五个图标_07" width="25" height="25"/>
+        <image name="五个图标_09" width="25" height="25"/>
+        <image name="五个图标_11" width="25" height="25"/>
+        <image name="五个图标_18" width="25" height="25"/>
+        <image name="五个图标_19" width="25" height="25"/>
+        <image name="五个图标_20" width="25" height="25"/>
+        <image name="五个图标_21" width="25" height="25"/>
+        <image name="五个图标_22" width="25" height="25"/>
+        <image name="开启通讯录_07" width="333" height="45"/>
+        <image name="我的_07" width="50" height="50"/>
+        <image name="我的_07 (3)" width="36" height="36"/>
+        <image name="我的_10" width="50" height="50"/>
+        <image name="我的_17" width="50" height="50"/>
+        <image name="登录界面_03" width="632" height="90"/>
+        <image name="登录界面_06" width="632" height="90"/>
+        <image name="群资料_01" width="375" height="203"/>
+        <image name="设置_03" width="7" height="13"/>
+        <image name="选择群组_10" width="20" height="20"/>
+        <image name="选择群组_13" width="20" height="20"/>
+    </resources>
+    <inferredMetricsTieBreakers>
+        <segue reference="ZPf-qf-Bgx"/>
+        <segue reference="gKG-Mt-Dsc"/>
+        <segue reference="crz-lb-2c2"/>
+    </inferredMetricsTieBreakers>
+</document>

+ 13 - 0
NIMDemo/NIMDemo/CityPickerViewController.h

@@ -0,0 +1,13 @@
+//
+//  CityPickerViewController.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/5/26.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface CityPickerViewController : UIViewController
+
+@end

+ 124 - 0
NIMDemo/NIMDemo/CityPickerViewController.m

@@ -0,0 +1,124 @@
+//
+//  CityPickerViewController.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/5/26.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "CityPickerViewController.h"
+#import "PSCityPickerView.h"
+#import "User.h"
+#import "SVProgressHUD.h"
+#import "AFNetworking/AFNetworking.h"
+
+
+@interface CityPickerViewController () <PSCityPickerViewDelegate>
+@property (weak, nonatomic) IBOutlet PSCityPickerView *cityPicker;
+
+@property (nonatomic, copy, readwrite) NSString *province;
+@property (nonatomic, copy, readwrite) NSString *city;
+@property (nonatomic, copy, readwrite) NSString *district;
+
+@end
+
+@implementation CityPickerViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    self.cityPicker.dataSource = self.cityPicker;
+    self.cityPicker.delegate = self.cityPicker;
+    self.cityPicker.cityPickerDelegate = self;
+    
+    User *user = [User sharedInfo];
+    self.province = user.province;
+    self.city = user.city;
+    self.district = user.district;
+    
+    [self.cityPicker initPicker:user.province city:user.city district:user.district];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    
+    self.cityPicker.cityPickerDelegate = nil;
+}
+
+-(void) viewWillAppear:(BOOL)animated{
+    [self.navigationItem setTitle:@"请选择城市"];
+    
+    UIBarButtonItem *rightButton = [[UIBarButtonItem alloc]
+                                   initWithTitle:@"保存"
+                                   style:UIBarButtonItemStylePlain
+                                   target:self
+                                   action:@selector(citySelected)];
+    [self.navigationItem setRightBarButtonItem:rightButton];
+}
+
+- (void)cityPickerView:(PSCityPickerView *)picker
+    finishPickProvince:(NSString *)province
+                  city:(NSString *)city
+              district:(NSString *)district
+{
+    
+    NSLog(@"%@", [NSString stringWithFormat:@"%@ %@ %@",province,city,district]);
+    
+    self.province = province;
+    self.city = city;
+    self.district = district;
+}
+
+- (void)citySelected{
+    
+    [SVProgressHUD show];
+    User *user = [User sharedInfo];
+    
+    NSDictionary *parameters = @{@"id":[NSString stringWithFormat:@"%d", user.userId],
+                                 @"province":self.province,
+                                 @"city":self.city,
+                                 @"district":self.district
+                                 };
+    NSString *urlString = @"http://whosay.dashgame.com/index.php?m=who&c=index&a=reset_location";
+    //请求的managers
+    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
+    manager.responseSerializer = [AFJSONResponseSerializer new];
+    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/html", nil];
+
+    //请求的方式:POST
+    
+    NSLog(@"%@", parameters);
+    
+    [manager POST:urlString parameters:parameters progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
+        
+        [SVProgressHUD dismiss];
+        
+        NSLog(@"请求成功,服务器返回的信息%@", responseObject);
+        NSDictionary * dic = responseObject;
+        int code = [[dic valueForKey:@"c"] intValue];
+        NSDictionary *data = (NSDictionary *)[dic objectForKey:@"d"];
+        
+        NSLog(@"Json解析结果 = %d   %@", code, data);
+        
+        if(code == 0)
+        {
+            
+            user.province = self.province;
+            user.city = self.city;
+            user.district = self.district;
+            
+            user.provinceRoomId = [data objectForKey:@"province"];
+            user.cityRoomId = [data objectForKey:@"city"];
+            user.districtRoomId = [data objectForKey:@"district"];
+        
+            [self.navigationController popViewControllerAnimated:YES];
+        }
+        
+    } failure:^(NSURLSessionDataTask *task, NSError * error) {
+        [SVProgressHUD dismiss];
+        NSLog(@"请求失败,服务器返回的错误信息%@",error);
+    }];
+
+}
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/Category/NSData+NTES.h

@@ -0,0 +1,13 @@
+//
+//  NSData+NTES.h
+//  NIM
+//
+//  Created by amao on 7/2/15.
+//  Copyright (c) 2015 Netease. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSData (NTES)
+- (NSString *)MD5String;
+@end

+ 28 - 0
NIMDemo/NIMDemo/Classes/Category/NSData+NTES.m

@@ -0,0 +1,28 @@
+//
+//  NSData+NTES.m
+//  NIM
+//
+//  Created by amao on 7/2/15.
+//  Copyright (c) 2015 Netease. All rights reserved.
+//
+
+#import "NSData+NTES.h"
+#import <CommonCrypto/CommonDigest.h>
+
+@implementation NSData (NTES)
+
+- (NSString *)MD5String {
+    const char *cstr = [self bytes];
+    unsigned char result[16];
+    CC_MD5(cstr, (CC_LONG)[self length], result);
+    return [NSString stringWithFormat:
+            @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
+            result[0], result[1], result[2], result[3],
+            result[4], result[5], result[6], result[7],
+            result[8], result[9], result[10], result[11],
+            result[12], result[13], result[14], result[15]
+            ];
+}
+
+
+@end

+ 25 - 0
NIMDemo/NIMDemo/Classes/Category/NSDictionary+NTESJson.h

@@ -0,0 +1,25 @@
+//
+//  NSDictionary+NTESJson.h
+//  NIM
+//
+//  Created by amao on 13-7-12.
+//  Copyright (c) 2013年 Netease. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSDictionary (NTESJson)
+- (NSString *)jsonString: (NSString *)key;
+
+- (NSDictionary *)jsonDict: (NSString *)key;
+- (NSArray *)jsonArray: (NSString *)key;
+- (NSArray *)jsonStringArray: (NSString *)key;
+
+
+- (BOOL)jsonBool: (NSString *)key;
+- (NSInteger)jsonInteger: (NSString *)key;
+- (long long)jsonLongLong: (NSString *)key;
+- (unsigned long long)jsonUnsignedLongLong:(NSString *)key;
+
+- (double)jsonDouble: (NSString *)key;
+@end

+ 109 - 0
NIMDemo/NIMDemo/Classes/Category/NSDictionary+NTESJson.m

@@ -0,0 +1,109 @@
+//
+//  NSDictionary+NTESJson.m
+//  NIM
+//
+//  Created by amao on 13-7-12.
+//  Copyright (c) 2013年 Netease. All rights reserved.
+//
+
+
+@implementation NSDictionary (NTESJson)
+
+- (NSString *)jsonString: (NSString *)key
+{
+    id object = [self objectForKey:key];
+    if ([object isKindOfClass:[NSString class]])
+    {
+        return object;
+    }
+    else if([object isKindOfClass:[NSNumber class]])
+    {
+        return [object stringValue];
+    }
+    return nil;
+}
+
+- (NSDictionary *)jsonDict: (NSString *)key
+{
+    id object = [self objectForKey:key];
+    return [object isKindOfClass:[NSDictionary class]] ? object : nil;
+}
+
+
+- (NSArray *)jsonArray: (NSString *)key
+{
+    id object = [self objectForKey:key];
+    return [object isKindOfClass:[NSArray class]] ? object : nil;
+
+}
+
+- (NSArray *)jsonStringArray: (NSString *)key
+{
+    NSArray *array = [self jsonArray:key];
+    BOOL invalid = NO;
+    for (id item in array)
+    {
+        if (![item isKindOfClass:[NSString class]])
+        {
+            invalid = YES;
+        }
+    }
+    return invalid ? nil : array;
+}
+
+- (BOOL)jsonBool: (NSString *)key
+{
+    id object = [self objectForKey:key];
+    if ([object isKindOfClass:[NSString class]] ||
+        [object isKindOfClass:[NSNumber class]])
+    {
+        return [object boolValue];
+    }
+    return NO;
+}
+
+- (NSInteger)jsonInteger: (NSString *)key
+{
+    id object = [self objectForKey:key];
+    if ([object isKindOfClass:[NSString class]] ||
+        [object isKindOfClass:[NSNumber class]])
+    {
+        return [object integerValue];
+    }
+    return 0;
+}
+
+- (long long)jsonLongLong: (NSString *)key
+{
+    id object = [self objectForKey:key];
+    if ([object isKindOfClass:[NSString class]] ||
+        [object isKindOfClass:[NSNumber class]])
+    {
+        return [object longLongValue];
+    }
+    return 0;
+}
+
+- (unsigned long long)jsonUnsignedLongLong:(NSString *)key
+{
+    id object = [self objectForKey:key];
+    if ([object isKindOfClass:[NSString class]] ||
+        [object isKindOfClass:[NSNumber class]])
+    {
+        return [object unsignedLongLongValue];
+    }
+    return 0;
+}
+
+
+- (double)jsonDouble: (NSString *)key{
+    id object = [self objectForKey:key];
+    if ([object isKindOfClass:[NSString class]] ||
+        [object isKindOfClass:[NSNumber class]])
+    {
+        return [object doubleValue];
+    }
+    return 0;
+}
+
+@end

+ 23 - 0
NIMDemo/NIMDemo/Classes/Category/NSString+NTES.h

@@ -0,0 +1,23 @@
+//
+//  NSString+NTES.h
+//  NIMDemo
+//
+//  Created by chris on 15/2/12.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NSString (NTES)
+
+- (CGSize)stringSizeWithFont:(UIFont *)font;
+
+- (NSString *)MD5String;
+
+- (NSUInteger)getBytesLength;
+
+- (NSString *)stringByDeletingPictureResolution;
+
+- (NSString *)tokenByPassword;
+
+@end

+ 62 - 0
NIMDemo/NIMDemo/Classes/Category/NSString+NTES.m

@@ -0,0 +1,62 @@
+//
+//  NSString+NTES.m
+//  NIMDemo
+//
+//  Created by chris on 15/2/12.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "NSString+NTES.h"
+#import <CommonCrypto/CommonDigest.h>
+
+
+@implementation NSString (NTES)
+
+- (CGSize)stringSizeWithFont:(UIFont *)font{
+    return [self sizeWithAttributes:@{NSFontAttributeName:font}];
+}
+
+- (NSString *)MD5String {
+    const char *cstr = [self UTF8String];
+    unsigned char result[16];
+    CC_MD5(cstr, (CC_LONG)strlen(cstr), result);
+    return [NSString stringWithFormat:
+            @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+            result[0], result[1], result[2], result[3],
+            result[4], result[5], result[6], result[7],
+            result[8], result[9], result[10], result[11],
+            result[12], result[13], result[14], result[15]
+            ];
+}
+
+
+- (NSUInteger)getBytesLength
+{
+    NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
+    return [self lengthOfBytesUsingEncoding:enc];
+}
+
+
+- (NSString *)stringByDeletingPictureResolution{
+    NSString *doubleResolution  = @"@2x";
+    NSString *tribleResolution = @"@3x";
+    NSString *fileName = self.stringByDeletingPathExtension;
+    NSString *res = [self copy];
+    if ([fileName hasSuffix:doubleResolution] || [fileName hasSuffix:tribleResolution]) {
+        res = [fileName substringToIndex:fileName.length - 3];
+        if (self.pathExtension.length) {
+           res = [res stringByAppendingPathExtension:self.pathExtension];
+        }
+    }
+    return res;
+}
+
+- (NSString *)tokenByPassword
+{
+    //demo直接使用username作为account,md5(password)作为token
+    //接入应用开发需要根据自己的实际情况来获取 account和token
+    return [[NIMSDK sharedSDK] isUsingDemoAppKey] ? [self MD5String] : self;
+}
+
+
+@end

+ 15 - 0
NIMDemo/NIMDemo/Classes/Category/UIActionSheet+NTESBlock.h

@@ -0,0 +1,15 @@
+//
+//  UIActionSheet+NTESBlock.h
+//  eim_iphone
+//
+//  Created by amao on 12-11-23.
+//  Copyright (c) 2012年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+typedef void (^ActionSheetBlock)(NSInteger);
+
+@interface UIActionSheet (NTESBlock)<UIActionSheetDelegate>
+- (void)showInView: (UIView *)view completionHandler: (ActionSheetBlock)block;
+- (void)clearActionBlock;
+@end

+ 84 - 0
NIMDemo/NIMDemo/Classes/Category/UIActionSheet+NTESBlock.m

@@ -0,0 +1,84 @@
+//
+//  UIActionSheet+NTESBlock.m
+//  eim_iphone
+//
+//  Created by amao on 12-11-23.
+//  Copyright (c) 2012年 Netease. All rights reserved.
+//
+
+#import "UIActionSheet+NTESBlock.h"
+#import <objc/runtime.h>
+
+static char kUIActionSheetBlockAddress;
+
+
+@implementation UIActionSheet (NTESBlock)
+
+
+- (void)showInView: (UIView *)view completionHandler: (ActionSheetBlock)block
+{
+    self.delegate = self;
+    objc_setAssociatedObject(self,&kUIActionSheetBlockAddress,block,OBJC_ASSOCIATION_COPY);
+    
+    if (view.window)
+    {
+        [self showInView:view];
+    }
+    else
+    {
+        UITabBar *tabbar = [self tabbarForPresent];
+        if (tabbar)
+        {
+            [self showFromTabBar:tabbar];
+        }
+        else
+        {
+            //如果出现嵌套调用,会出现当前view的window因为被UIActionSheet的attachedWindow出现而置为nil的情况
+            //所以这种情况下先hack一下
+            [self performSelector:@selector(showInView:)
+                       withObject:view
+                       afterDelay:1];
+
+        }
+    }
+}
+
+- (UITabBar *)tabbarForPresent
+{
+    UITabBar *bar = nil;
+    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
+    if (UIInterfaceOrientationIsLandscape(orientation))
+    {
+        UIViewController *rootViewController= [[[UIApplication sharedApplication] keyWindow] rootViewController];
+        if ([rootViewController isKindOfClass:[UITabBarController class]])
+        {
+            bar = [(UITabBarController *)rootViewController tabBar];
+        }
+    }
+    return bar;
+}
+
+- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
+{
+    ActionSheetBlock block = [objc_getAssociatedObject(self, &kUIActionSheetBlockAddress) copy];
+    objc_setAssociatedObject(self,&kUIActionSheetBlockAddress,nil,OBJC_ASSOCIATION_COPY);
+    dispatch_block_t dispatchBlock = ^(){
+        if (block)
+        {
+            block(buttonIndex);
+        }
+    };
+    //需要延迟的原因是actionsheet dismiss本身是个动画,如果在这种动画没完成的情况下直接调用present会导致两个切换冲突
+    //这种情况在iOS5上最为明显
+    dispatchBlock();
+}
+
+
+- (void)clearActionBlock
+{
+    self.delegate = nil;
+    objc_setAssociatedObject(self,&kUIActionSheetBlockAddress,nil,OBJC_ASSOCIATION_COPY);
+}
+
+
+@end

+ 15 - 0
NIMDemo/NIMDemo/Classes/Category/UIAlertView+NTESBlock.h

@@ -0,0 +1,15 @@
+//
+//  UIAlertView+NTESBlock.h
+//  eim_iphone
+//
+//  Created by amao on 12-11-7.
+//  Copyright (c) 2012年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+typedef void (^AlertBlock)(NSInteger);
+
+@interface UIAlertView (NTESBlock)
+- (void)showAlertWithCompletionHandler: (AlertBlock)block;
+- (void)clearActionBlock;
+@end

+ 39 - 0
NIMDemo/NIMDemo/Classes/Category/UIAlertView+NTESBlock.m

@@ -0,0 +1,39 @@
+//
+//  UIAlertView+NTESBlock.m
+//  eim_iphone
+//
+//  Created by amao on 12-11-7.
+//  Copyright (c) 2012年 Netease. All rights reserved.
+//
+
+#import "UIAlertView+NTESBlock.h"
+#import <objc/runtime.h>
+
+static char kUIAlertViewBlockAddress;
+
+@implementation UIAlertView (NTESBlock)
+- (void)showAlertWithCompletionHandler: (void (^)(NSInteger))block
+{
+    self.delegate = self;
+    objc_setAssociatedObject(self,&kUIAlertViewBlockAddress,block,OBJC_ASSOCIATION_COPY);
+    [self show];
+}
+
+
+- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
+{
+    AlertBlock block = objc_getAssociatedObject(self, &kUIAlertViewBlockAddress);
+    if (block)
+    {
+        block(buttonIndex);
+        objc_setAssociatedObject(self, &kUIAlertViewBlockAddress, nil, OBJC_ASSOCIATION_COPY);
+    }
+}
+
+- (void)clearActionBlock
+{
+    self.delegate = nil;
+    objc_setAssociatedObject(self, &kUIAlertViewBlockAddress, nil, OBJC_ASSOCIATION_COPY);
+}
+
+@end

+ 19 - 0
NIMDemo/NIMDemo/Classes/Category/UIImage+NTES.h

@@ -0,0 +1,19 @@
+//
+//  UIImage+NTES.h
+//  NIM
+//
+//  Created by chris on 15/7/13.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIImage (NTES)
+
++ (UIImage *)fetchImage:(NSString *)imageNameOrPath;
+
++ (UIImage *)fetchChartlet:(NSString *)imageName chartletId:(NSString *)chartletId;
+
+- (UIImage *)imageForAvatarUpload;
+
+@end

+ 218 - 0
NIMDemo/NIMDemo/Classes/Category/UIImage+NTES.m

@@ -0,0 +1,218 @@
+//
+//  UIImage+NTESm
+//  NIM
+//
+//  Created by chris on 15/7/13.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "UIImage+NTES.h"
+#import "NTESDevice.h"
+
+#define EmojiCatalog                @"default"
+#define ChartletChartletCatalogPath @"Chartlet"
+#define ChartletChartletCatalogContentPath @"content"
+#define ChartletChartletCatalogIconPath    @"icon"
+#define ChartletChartletCatalogIconsSuffixNormal    @"normal"
+#define ChartletChartletCatalogIconsSuffixHighLight @"highlighted"
+
+@implementation UIImage (NTES)
++ (UIImage *)fetchImage:(NSString *)imageNameOrPath{
+    UIImage *image = [UIImage imageNamed:imageNameOrPath];
+    if (!image) {
+        image = [UIImage imageWithContentsOfFile:imageNameOrPath];
+    }
+    return image;
+}
+
+
++ (UIImage *)fetchChartlet:(NSString *)imageName chartletId:(NSString *)chartletId{
+    if ([chartletId isEqualToString:EmojiCatalog]) {
+        return [UIImage imageNamed:imageName];
+    }
+    NSString *bundlePath = [[NSBundle mainBundle] pathForResource:[NIMKit sharedKit].emoticonBundleName ofType:nil];
+
+    NSString *subDirectory = [NSString stringWithFormat:@"%@/%@/%@",ChartletChartletCatalogPath,chartletId,ChartletChartletCatalogContentPath];
+    //先拿2倍图
+    NSString *doubleImage  = [imageName stringByAppendingString:@"@2x"];
+    NSString *tribleImage  = [imageName stringByAppendingString:@"@3x"];
+    NSString *sourcePath   = [bundlePath stringByAppendingPathComponent:subDirectory];
+    NSString *path = nil;
+    
+    NSArray *array = [NSBundle pathsForResourcesOfType:nil inDirectory:sourcePath];
+    NSString *fileExt = [[array.firstObject lastPathComponent] pathExtension];
+    if ([UIScreen mainScreen].scale == 3.0) {
+        path = [NSBundle pathForResource:tribleImage ofType:fileExt inDirectory:sourcePath];
+    }
+    path = path ? path : [NSBundle pathForResource:doubleImage ofType:fileExt inDirectory:sourcePath]; //取二倍图
+    path = path ? path : [NSBundle pathForResource:imageName ofType:fileExt inDirectory:sourcePath]; //实在没了就去取一倍图
+    return [UIImage imageWithContentsOfFile:path];
+}
+
+- (UIImage *)imageForAvatarUpload
+{
+    CGFloat pixels = [[NTESDevice currentDevice] suggestImagePixels];
+    UIImage * image = [self imageForUpload:pixels];
+    return [image fixOrientation];
+}
+
+
+#pragma mark - Private
+
+- (UIImage *)imageForUpload: (CGFloat)suggestPixels
+{
+    const CGFloat kMaxPixels = 4000000;
+    const CGFloat kMaxRatio  = 3;
+    
+    CGFloat width = self.size.width;
+    CGFloat height= self.size.height;
+    
+    //对于超过建议像素,且长宽比超过max ratio的图做特殊处理
+    if (width * height > suggestPixels &&
+        (width / height > kMaxRatio || height / width > kMaxRatio))
+    {
+        return [self scaleWithMaxPixels:kMaxPixels];
+    }
+    else
+    {
+        return [self scaleWithMaxPixels:suggestPixels];
+    }
+}
+
+- (UIImage *)scaleWithMaxPixels: (CGFloat)maxPixels
+{
+    CGFloat width = self.size.width;
+    CGFloat height= self.size.height;
+    if (width * height < maxPixels || maxPixels == 0)
+    {
+        return self;
+    }
+    CGFloat ratio = sqrt(width * height / maxPixels);
+    if (fabs(ratio - 1) <= 0.01)
+    {
+        return self;
+    }
+    CGFloat newSizeWidth = width / ratio;
+    CGFloat newSizeHeight= height/ ratio;
+    return [self scaleToSize:CGSizeMake(newSizeWidth, newSizeHeight)];
+}
+
+//内缩放,一条变等于最长边,另外一条小于等于最长边
+- (UIImage *)scaleToSize:(CGSize)newSize
+{
+    CGFloat width = self.size.width;
+    CGFloat height= self.size.height;
+    CGFloat newSizeWidth = newSize.width;
+    CGFloat newSizeHeight= newSize.height;
+    if (width <= newSizeWidth &&
+        height <= newSizeHeight)
+    {
+        return self;
+    }
+    
+    if (width == 0 || height == 0 || newSizeHeight == 0 || newSizeWidth == 0)
+    {
+        return nil;
+    }
+    CGSize size;
+    if (width / height > newSizeWidth / newSizeHeight)
+    {
+        size = CGSizeMake(newSizeWidth, newSizeWidth * height / width);
+    }
+    else
+    {
+        size = CGSizeMake(newSizeHeight * width / height, newSizeHeight);
+    }
+    return [self drawImageWithSize:size];
+}
+
+- (UIImage *)drawImageWithSize: (CGSize)size
+{
+    CGSize drawSize = CGSizeMake(floor(size.width), floor(size.height));
+    UIGraphicsBeginImageContext(drawSize);
+    
+    [self drawInRect:CGRectMake(0, 0, drawSize.width, drawSize.height)];
+    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    return newImage;
+}
+
+- (UIImage *)fixOrientation
+{
+    
+    // No-op if the orientation is already correct
+    if (self.imageOrientation == UIImageOrientationUp)
+        return self;
+    
+    // We need to calculate the proper transformation to make the image upright.
+    // We do it in 2 steps: Rotate if Left/Right/Down, and then flip if Mirrored.
+    CGAffineTransform transform = CGAffineTransformIdentity;
+    
+    switch (self.imageOrientation) {
+        case UIImageOrientationDown:
+        case UIImageOrientationDownMirrored:
+            transform = CGAffineTransformTranslate(transform, self.size.width, self.size.height);
+            transform = CGAffineTransformRotate(transform, M_PI);
+            break;
+            
+        case UIImageOrientationLeft:
+        case UIImageOrientationLeftMirrored:
+            transform = CGAffineTransformTranslate(transform, self.size.width, 0);
+            transform = CGAffineTransformRotate(transform, M_PI_2);
+            break;
+            
+        case UIImageOrientationRight:
+        case UIImageOrientationRightMirrored:
+            transform = CGAffineTransformTranslate(transform, 0, self.size.height);
+            transform = CGAffineTransformRotate(transform, -M_PI_2);
+            break;
+        default:
+            break;
+    }
+    
+    switch (self.imageOrientation) {
+        case UIImageOrientationUpMirrored:
+        case UIImageOrientationDownMirrored:
+            transform = CGAffineTransformTranslate(transform, self.size.width, 0);
+            transform = CGAffineTransformScale(transform, -1, 1);
+            break;
+            
+        case UIImageOrientationLeftMirrored:
+        case UIImageOrientationRightMirrored:
+            transform = CGAffineTransformTranslate(transform, self.size.height, 0);
+            transform = CGAffineTransformScale(transform, -1, 1);
+            break;
+        default:
+            break;
+    }
+    
+    // Now we draw the underlying CGImage into a new context, applying the transform
+    // calculated above.
+    CGContextRef ctx = CGBitmapContextCreate(NULL, self.size.width, self.size.height,
+                                             CGImageGetBitsPerComponent(self.CGImage), 0,
+                                             CGImageGetColorSpace(self.CGImage),
+                                             CGImageGetBitmapInfo(self.CGImage));
+    CGContextConcatCTM(ctx, transform);
+    switch (self.imageOrientation) {
+        case UIImageOrientationLeft:
+        case UIImageOrientationLeftMirrored:
+        case UIImageOrientationRight:
+        case UIImageOrientationRightMirrored:
+            // Grr...
+            CGContextDrawImage(ctx, CGRectMake(0,0,self.size.height,self.size.width), self.CGImage);
+            break;
+            
+        default:
+            CGContextDrawImage(ctx, CGRectMake(0,0,self.size.width,self.size.height), self.CGImage);
+            break;
+    }
+    
+    // And now we just create a new UIImage from the drawing context
+    CGImageRef cgimg = CGBitmapContextCreateImage(ctx);
+    UIImage *img = [UIImage imageWithCGImage:cgimg];
+    CGContextRelease(ctx);
+    CGImageRelease(cgimg);
+    return img;
+}
+
+@end

+ 17 - 0
NIMDemo/NIMDemo/Classes/Category/UIImage+NTESColor.h

@@ -0,0 +1,17 @@
+//
+//  UIImage+Color.h
+//  yixin_iphone
+//
+//  Created by Xuhui on 14-3-17.
+//  Copyright (c) 2014年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIImage (NTESColor)
+
++ (UIImage *)clearColorImage;
+
++ (UIImage *)imageWithColor:(UIColor *)color;
+
+@end

+ 82 - 0
NIMDemo/NIMDemo/Classes/Category/UIImage+NTESColor.m

@@ -0,0 +1,82 @@
+//
+//  UIImage+Color.m
+//  yixin_iphone
+//
+//  Created by Xuhui on 14-3-17.
+//  Copyright (c) 2014年 Netease. All rights reserved.
+//
+
+#import <sys/stat.h>
+#import "UIImage+NTESColor.h"
+
+@interface UIColorCache : NSObject
+@property (nonatomic,strong)    NSCache *colorImageCache;
+@end
+
+@implementation UIColorCache
++ (instancetype)sharedCache
+{
+    static UIColorCache *instance = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [[UIColorCache alloc] init];
+    });
+    return instance;
+}
+
+- (instancetype)init
+{
+    if (self = [super init])
+    {
+        _colorImageCache = [[NSCache alloc] init];
+    }
+    return self;
+}
+
+- (UIImage *)image:(UIColor *)color
+{
+    return color ? [_colorImageCache objectForKey:[color description]] : nil;
+}
+
+- (void)setImage:(UIImage *)image
+        forColor:(UIColor *)color
+{
+    [_colorImageCache setObject:image
+                         forKey:[color description]];
+}
+@end
+
+@implementation UIImage (NTESColor)
+
++ (UIImage *)clearColorImage {
+    return [UIImage imageNamed:@"Clear_color_image"];
+}
+
++ (UIImage *)imageWithColor:(UIColor *)color {    
+    if (color == nil)
+    {
+        assert(0);
+        DDLogError(@"Invalid Param");
+        return nil;
+    }
+    UIImage *image = [[UIColorCache sharedCache] image:color];
+    if (image == nil)
+    {
+        CGFloat alphaChannel;
+        [color getRed:NULL green:NULL blue:NULL alpha:&alphaChannel];
+        BOOL opaqueImage = (alphaChannel == 1.0);
+        CGRect rect = CGRectMake(0, 0, 1, 1);
+        UIGraphicsBeginImageContextWithOptions(rect.size, opaqueImage, [UIScreen mainScreen].scale);
+        [color setFill];
+        UIRectFill(rect);
+        image = UIGraphicsGetImageFromCurrentImageContext();
+        UIGraphicsEndImageContext();
+        [[UIColorCache sharedCache] setImage:image
+                                    forColor:color];
+    }
+    return image;
+}
+
+
+@end
+

+ 17 - 0
NIMDemo/NIMDemo/Classes/Category/UIResponder+NTESFirstResponder.h

@@ -0,0 +1,17 @@
+//
+//  UIResponder+NTESFirstResponder.h
+//  NIM
+//
+//  Created by chris on 15/9/26.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIResponder (NTESFirstResponder)
+
++ (instancetype)currentFirstResponder;
+
++ (instancetype)currentSecondResponder;
+
+@end

+ 39 - 0
NIMDemo/NIMDemo/Classes/Category/UIResponder+NTESFirstResponder.m

@@ -0,0 +1,39 @@
+//
+//  UIResponder+NTESFirstResponder.m
+//  NIM
+//
+//  Created by chris on 15/9/26.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import "UIResponder+NTESFirstResponder.h"
+static __weak id currentFirstResponder;
+static __weak id currentSecodResponder;
+
+@implementation UIResponder (NTESFirstResponder)
+
++ (instancetype)currentFirstResponder {
+    currentFirstResponder = nil;
+    currentSecodResponder = nil;
+    [[UIApplication sharedApplication] sendAction:@selector(findFirstResponder:) to:nil from:nil forEvent:nil];
+    return currentFirstResponder;
+}
+
++ (instancetype)currentSecondResponder{
+    currentFirstResponder = nil;
+    currentSecodResponder = nil;
+    [[UIApplication sharedApplication] sendAction:@selector(findFirstResponder:) to:nil from:nil forEvent:nil];
+    return currentSecodResponder;
+}
+
+- (void)findFirstResponder:(id)sender {
+    currentFirstResponder = self;
+    [self.nextResponder findSecondResponder:sender];
+}
+
+
+- (void)findSecondResponder:(id)sender{
+    currentSecodResponder = self;
+}
+
+@end

+ 30 - 0
NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESDirection.h

@@ -0,0 +1,30 @@
+//
+//  UIScrollView+NTESDirection.h
+//  NIM
+//
+//  Created by chris on 16/1/24.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+
+#import <UIKit/UIKit.h>
+
+
+typedef enum NTESScrollViewDirection {
+    NTESScrollViewDirectionNone,
+    NTESScrollViewDirectionRight,
+    NTESScrollViewDirectionLeft,
+    NTESScrollViewDirectionUp,
+    NTESScrollViewDirectionDown,
+} NTESScrollViewDirection;
+
+
+@interface UIScrollView (Direction)
+
+- (void)startObservingDirection;
+- (void)stopObservingDirection;
+
+@property (readonly, nonatomic) NTESScrollViewDirection horizontalScrollingDirection;
+@property (readonly, nonatomic) NTESScrollViewDirection verticalScrollingDirection;
+
+@end

+ 81 - 0
NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESDirection.m

@@ -0,0 +1,81 @@
+//
+//  UIScrollView+NTESDirection.m
+//  NIM
+//
+//  Created by chris on 16/1/24.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "UIScrollView+NTESDirection.h"
+#import <objc/runtime.h>
+
+
+@interface UIScrollView ()
+@property (assign, nonatomic) NTESScrollViewDirection horizontalScrollingDirection;
+@property (assign, nonatomic) NTESScrollViewDirection verticalScrollingDirection;
+@end
+
+
+static const char horizontalScrollingDirectionKey;
+static const char verticalScrollingDirectionKey;
+
+
+@implementation UIScrollView (NTESDirection)
+
+- (void)startObservingDirection
+{
+    [self addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];
+}
+
+- (void)stopObservingDirection
+{
+    [self removeObserver:self forKeyPath:@"contentOffset"];
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
+{
+    if (![keyPath isEqualToString:@"contentOffset"]) return;
+    
+    CGPoint newContentOffset = [[change valueForKey:NSKeyValueChangeNewKey] CGPointValue];
+    CGPoint oldContentOffset = [[change valueForKey:NSKeyValueChangeOldKey] CGPointValue];
+    
+    if (oldContentOffset.x < newContentOffset.x) {
+        self.horizontalScrollingDirection = NTESScrollViewDirectionRight;
+    } else if (oldContentOffset.x > newContentOffset.x) {
+        self.horizontalScrollingDirection = NTESScrollViewDirectionLeft;
+    } else {
+        self.horizontalScrollingDirection = NTESScrollViewDirectionNone;
+    }
+    
+    if (oldContentOffset.y < newContentOffset.y) {
+        self.verticalScrollingDirection = NTESScrollViewDirectionDown;
+    } else if (oldContentOffset.y > newContentOffset.y) {
+        self.verticalScrollingDirection = NTESScrollViewDirectionUp;
+    } else {
+        self.verticalScrollingDirection = NTESScrollViewDirectionNone;
+    }
+}
+
+#pragma mark - Properties
+- (NTESScrollViewDirection)horizontalScrollingDirection
+{
+    return [objc_getAssociatedObject(self, (void *)&horizontalScrollingDirectionKey) intValue];
+}
+
+- (void)setHorizontalScrollingDirection:(NTESScrollViewDirection)horizontalScrollingDirection
+{
+    objc_setAssociatedObject(self, (void *)&horizontalScrollingDirectionKey, [NSNumber numberWithInt:horizontalScrollingDirection], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+}
+
+- (NTESScrollViewDirection)verticalScrollingDirection
+{
+    return [objc_getAssociatedObject(self, (void *)&verticalScrollingDirectionKey) intValue];
+}
+
+- (void)setVerticalScrollingDirection:(NTESScrollViewDirection)verticalScrollingDirection
+{
+    objc_setAssociatedObject(self, (void *)&verticalScrollingDirectionKey, [NSNumber numberWithInt:verticalScrollingDirection], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+}
+
+
+@end

+ 58 - 0
NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESPullToRefresh.h

@@ -0,0 +1,58 @@
+//
+//  UIScrollView+NTESPullToRefresh.h
+//
+//  Created by chris on 15/2/12.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+//
+
+#import <UIKit/UIKit.h>
+
+@class NTESPullToRefreshView;
+
+@interface UIScrollView (NTESPullToRefresh)
+
+typedef NS_ENUM(NSUInteger, NTESPullToRefreshPosition) {
+    NTESPullToRefreshPositionTop = 0,
+    NTESPullToRefreshPositionBottom,
+};
+
+- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler;
+- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler position:(NTESPullToRefreshPosition)position;
+- (void)triggerPullToRefresh;
+
+@property (nonatomic, strong, readonly) NTESPullToRefreshView *pullToRefreshView;
+@property (nonatomic, assign) BOOL showsPullToRefresh;
+
+@end
+
+
+typedef NS_ENUM(NSUInteger, NTESPullToRefreshState) {
+    NTESPullToRefreshStateStopped = 0,
+    NTESPullToRefreshStateTriggered,
+    NTESPullToRefreshStateLoading,
+    NTESPullToRefreshStateAll = 10
+};
+
+@interface NTESPullToRefreshView : UIView
+
+@property (nonatomic, strong) UIColor *arrowColor;
+@property (nonatomic, strong) UIColor *textColor;
+@property (nonatomic, strong, readonly) UILabel *titleLabel;
+@property (nonatomic, strong, readonly) UILabel *subtitleLabel;
+@property (nonatomic, strong, readwrite) UIColor *activityIndicatorViewColor;
+@property (nonatomic, readwrite) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
+
+@property (nonatomic, readonly) NTESPullToRefreshState state;
+@property (nonatomic, readonly) NTESPullToRefreshPosition position;
+
+- (void)setTitle:(NSString *)title forState:(NTESPullToRefreshState)state;
+- (void)setSubtitle:(NSString *)subtitle forState:(NTESPullToRefreshState)state;
+- (void)setCustomView:(UIView *)view forState:(NTESPullToRefreshState)state;
+
+- (void)startAnimating;
+- (void)stopAnimating;
+
+
+@end
+

+ 722 - 0
NIMDemo/NIMDemo/Classes/Category/UIScrollView+NTESPullToRefresh.m

@@ -0,0 +1,722 @@
+//
+// UIScrollView+NTESPullToRefresh.m
+//
+//  Created by chris on 15/2/12.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+//
+
+#import <QuartzCore/QuartzCore.h>
+#import "UIScrollView+NTESPullToRefresh.h"
+
+#define fequal(a,b) (fabs((a) - (b)) < FLT_EPSILON)
+#define fequalzero(a) (fabs(a) < FLT_EPSILON)
+
+static CGFloat const NTESPullToRefreshViewHeight = 60;
+
+@interface NTESPullToRefreshArrow : UIView
+
+@property (nonatomic, strong) UIColor *arrowColor;
+
+@end
+
+
+@interface NTESPullToRefreshView ()
+
+@property (nonatomic, copy) void (^pullToRefreshActionHandler)(void);
+
+@property (nonatomic, strong) NTESPullToRefreshArrow *arrow;
+@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView;
+@property (nonatomic, strong, readwrite) UILabel *titleLabel;
+@property (nonatomic, strong, readwrite) UILabel *subtitleLabel;
+@property (nonatomic, readwrite) NTESPullToRefreshState state;
+@property (nonatomic, readwrite) NTESPullToRefreshPosition position;
+
+@property (nonatomic, strong) NSMutableArray *titles;
+@property (nonatomic, strong) NSMutableArray *subtitles;
+@property (nonatomic, strong) NSMutableArray *viewForState;
+
+@property (nonatomic, weak) UIScrollView *scrollView;
+@property (nonatomic, readwrite) CGFloat originalTopInset;
+@property (nonatomic, readwrite) CGFloat originalBottomInset;
+
+@property (nonatomic, assign) BOOL wasTriggeredByUser;
+@property (nonatomic, assign) BOOL showsPullToRefresh;
+@property (nonatomic, assign) BOOL showsDateLabel;
+@property(nonatomic, assign) BOOL isObserving;
+
+- (void)resetScrollViewContentInset;
+- (void)setScrollViewContentInsetForLoading;
+- (void)setScrollViewContentInset:(UIEdgeInsets)insets;
+- (void)rotateArrow:(float)degrees hide:(BOOL)hide;
+
+@end
+
+
+
+#pragma mark - UIScrollView (NTESPullToRefresh)
+#import <objc/runtime.h>
+
+static char UIScrollViewPullToRefreshView;
+
+@implementation UIScrollView (NTESPullToRefresh)
+
+@dynamic pullToRefreshView, showsPullToRefresh;
+
+- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler position:(NTESPullToRefreshPosition)position {
+    
+    if(!self.pullToRefreshView) {
+        CGFloat yOrigin;
+        switch (position) {
+            case NTESPullToRefreshPositionTop:
+                yOrigin = -NTESPullToRefreshViewHeight;
+                break;
+            case NTESPullToRefreshPositionBottom:
+                yOrigin = self.contentSize.height;
+                break;
+            default:
+                return;
+        }
+        NTESPullToRefreshView *view = [[NTESPullToRefreshView alloc] initWithFrame:CGRectMake(0, yOrigin, self.bounds.size.width, NTESPullToRefreshViewHeight)];
+        view.pullToRefreshActionHandler = actionHandler;
+        view.scrollView = self;
+        [self addSubview:view];
+        
+        view.originalTopInset = self.contentInset.top;
+        view.originalBottomInset = self.contentInset.bottom;
+        view.position = position;
+        self.pullToRefreshView = view;
+        self.showsPullToRefresh = YES;
+    }
+    
+}
+
+- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler {
+    [self addPullToRefreshWithActionHandler:actionHandler position:NTESPullToRefreshPositionTop];
+}
+
+- (void)triggerPullToRefresh {
+    self.pullToRefreshView.state = NTESPullToRefreshStateTriggered;
+    [self.pullToRefreshView startAnimating];
+}
+
+- (void)setPullToRefreshView:(NTESPullToRefreshView *)pullToRefreshView {
+    [self willChangeValueForKey:@"SVPullToRefreshView"];
+    objc_setAssociatedObject(self, &UIScrollViewPullToRefreshView,
+                             pullToRefreshView,
+                             OBJC_ASSOCIATION_ASSIGN);
+    [self didChangeValueForKey:@"SVPullToRefreshView"];
+}
+
+- (NTESPullToRefreshView *)pullToRefreshView {
+    return objc_getAssociatedObject(self, &UIScrollViewPullToRefreshView);
+}
+
+- (void)setShowsPullToRefresh:(BOOL)showsPullToRefresh {
+    self.pullToRefreshView.hidden = !showsPullToRefresh;
+    
+    if(!showsPullToRefresh) {
+        if (self.pullToRefreshView.isObserving) {
+            [self removeObserver:self.pullToRefreshView forKeyPath:@"contentOffset"];
+            [self removeObserver:self.pullToRefreshView forKeyPath:@"contentSize"];
+            [self removeObserver:self.pullToRefreshView forKeyPath:@"frame"];
+            [self.pullToRefreshView resetScrollViewContentInset];
+            self.pullToRefreshView.isObserving = NO;
+        }
+    }
+    else {
+        if (!self.pullToRefreshView.isObserving) {
+            [self addObserver:self.pullToRefreshView forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:nil];
+            [self addObserver:self.pullToRefreshView forKeyPath:@"contentSize" options:NSKeyValueObservingOptionNew context:nil];
+            [self addObserver:self.pullToRefreshView forKeyPath:@"frame" options:NSKeyValueObservingOptionNew context:nil];
+            self.pullToRefreshView.isObserving = YES;
+            
+            CGFloat yOrigin = 0;
+            switch (self.pullToRefreshView.position) {
+                case NTESPullToRefreshPositionTop:
+                    yOrigin = -NTESPullToRefreshViewHeight;
+                    break;
+                case NTESPullToRefreshPositionBottom:
+                    yOrigin = self.contentSize.height;
+                    break;
+            }
+            
+            self.pullToRefreshView.frame = CGRectMake(0, yOrigin, self.bounds.size.width, NTESPullToRefreshViewHeight);
+        }
+    }
+}
+
+- (BOOL)showsPullToRefresh {
+    return !self.pullToRefreshView.hidden;
+}
+
+@end
+
+#pragma mark - NTESPullToRefresh
+@implementation NTESPullToRefreshView
+
+// public properties
+@synthesize pullToRefreshActionHandler, arrowColor, textColor, activityIndicatorViewColor, activityIndicatorViewStyle;
+
+@synthesize state = _state;
+@synthesize scrollView = _scrollView;
+@synthesize showsPullToRefresh = _showsPullToRefresh;
+@synthesize arrow = _arrow;
+@synthesize activityIndicatorView = _activityIndicatorView;
+
+@synthesize titleLabel = _titleLabel;
+
+
+- (id)initWithFrame:(CGRect)frame {
+    if(self = [super initWithFrame:frame]) {
+        
+        // default styling values
+        self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
+        self.textColor = [UIColor darkGrayColor];
+        self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+        self.state = NTESPullToRefreshStateStopped;
+        self.showsDateLabel = NO;
+        
+        self.titles = [NSMutableArray arrayWithObjects:NSLocalizedString(@"下拉加载...",),
+                       NSLocalizedString(@"松开刷新...",),
+                       NSLocalizedString(@"加载中...",),
+                       nil];
+        
+        self.subtitles = [NSMutableArray arrayWithObjects:@"", @"", @"", @"", nil];
+        self.viewForState = [NSMutableArray arrayWithObjects:@"", @"", @"", @"", nil];
+        self.wasTriggeredByUser = YES;
+    }
+    
+    return self;
+}
+
+- (void)willMoveToSuperview:(UIView *)newSuperview {
+    if (self.superview && newSuperview == nil) {
+        //use self.superview, not self.scrollView. Why self.scrollView == nil here?
+        UIScrollView *scrollView = (UIScrollView *)self.superview;
+        if (scrollView.showsPullToRefresh) {
+            if (self.isObserving) {
+                //If enter this branch, it is the moment just before "SVPullToRefreshView's dealloc", so remove observer here
+                [scrollView removeObserver:self forKeyPath:@"contentOffset"];
+                [scrollView removeObserver:self forKeyPath:@"contentSize"];
+                [scrollView removeObserver:self forKeyPath:@"frame"];
+                self.isObserving = NO;
+            }
+        }
+    }
+}
+
+- (void)layoutSubviews {
+    
+    for(id otherView in self.viewForState) {
+        if([otherView isKindOfClass:[UIView class]])
+            [otherView removeFromSuperview];
+    }
+    
+    id customView = [self.viewForState objectAtIndex:self.state];
+    BOOL hasCustomView = [customView isKindOfClass:[UIView class]];
+    
+    self.titleLabel.hidden = hasCustomView;
+    self.subtitleLabel.hidden = hasCustomView;
+    self.arrow.hidden = hasCustomView;
+    
+    if(hasCustomView) {
+        [self addSubview:customView];
+        CGRect viewBounds = [customView bounds];
+        CGPoint origin = CGPointMake(roundf((self.bounds.size.width-viewBounds.size.width)/2), roundf((self.bounds.size.height-viewBounds.size.height)/2));
+        [customView setFrame:CGRectMake(origin.x, origin.y, viewBounds.size.width, viewBounds.size.height)];
+    }
+    else {
+        switch (self.state) {
+            case NTESPullToRefreshStateAll:
+            case NTESPullToRefreshStateStopped:
+                self.arrow.alpha = 1;
+                [self.activityIndicatorView stopAnimating];
+                switch (self.position) {
+                    case NTESPullToRefreshPositionTop:
+                        [self rotateArrow:0 hide:NO];
+                        break;
+                    case NTESPullToRefreshPositionBottom:
+                        [self rotateArrow:(float)M_PI hide:NO];
+                        break;
+                }
+                break;
+                
+            case NTESPullToRefreshStateTriggered:
+                switch (self.position) {
+                    case NTESPullToRefreshPositionTop:
+                        [self rotateArrow:(float)M_PI hide:NO];
+                        break;
+                    case NTESPullToRefreshPositionBottom:
+                        [self rotateArrow:0 hide:NO];
+                        break;
+                }
+                break;
+                
+            case NTESPullToRefreshStateLoading:
+                [self.activityIndicatorView startAnimating];
+                switch (self.position) {
+                    case NTESPullToRefreshPositionTop:
+                        [self rotateArrow:0 hide:YES];
+                        break;
+                    case NTESPullToRefreshPositionBottom:
+                        [self rotateArrow:(float)M_PI hide:YES];
+                        break;
+                }
+                break;
+        }
+        
+        CGFloat leftViewWidth = MAX(self.arrow.bounds.size.width,self.activityIndicatorView.bounds.size.width);
+        
+        CGFloat margin = 10;
+        CGFloat marginY = 2;
+        CGFloat labelMaxWidth = self.bounds.size.width - margin - leftViewWidth;
+        
+        self.titleLabel.text = [self.titles objectAtIndex:self.state];
+        
+        NSString *subtitle = [self.subtitles objectAtIndex:self.state];
+        self.subtitleLabel.text = subtitle.length > 0 ? subtitle : nil;
+        
+        
+        CGSize titleSize = [self.titleLabel.text boundingRectWithSize:CGSizeMake(labelMaxWidth,self.titleLabel.font.lineHeight)
+                                          options:(NSStringDrawingUsesFontLeading|NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesLineFragmentOrigin)
+                                       attributes:@{NSFontAttributeName: self.titleLabel.font}
+                                          context:NULL].size;
+        
+        CGSize subtitleSize = [self.subtitleLabel.text boundingRectWithSize:CGSizeMake(labelMaxWidth,self.subtitleLabel.font.lineHeight)
+                                                              options:(NSStringDrawingUsesFontLeading|NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesLineFragmentOrigin)
+                                                           attributes:@{NSFontAttributeName: self.subtitleLabel.font}
+                                                              context:NULL].size;
+        
+        CGFloat maxLabelWidth = MAX(titleSize.width,subtitleSize.width);
+        
+        CGFloat totalMaxWidth;
+        if (maxLabelWidth) {
+            totalMaxWidth = leftViewWidth + margin + maxLabelWidth;
+        } else {
+            totalMaxWidth = leftViewWidth + maxLabelWidth;
+        }
+        
+        CGFloat labelX = (self.bounds.size.width / 2) - (totalMaxWidth / 2) + leftViewWidth + margin;
+        
+        if(subtitleSize.height > 0){
+            CGFloat totalHeight = titleSize.height + subtitleSize.height + marginY;
+            CGFloat minY = (self.bounds.size.height / 2)  - (totalHeight / 2);
+            
+            CGFloat titleY = minY;
+            self.titleLabel.frame = CGRectIntegral(CGRectMake(labelX, titleY, titleSize.width, titleSize.height));
+            self.subtitleLabel.frame = CGRectIntegral(CGRectMake(labelX, titleY + titleSize.height + marginY, subtitleSize.width, subtitleSize.height));
+        }else{
+            CGFloat totalHeight = titleSize.height;
+            CGFloat minY = (self.bounds.size.height / 2)  - (totalHeight / 2);
+            
+            CGFloat titleY = minY;
+            self.titleLabel.frame = CGRectIntegral(CGRectMake(labelX, titleY, titleSize.width, titleSize.height));
+            self.subtitleLabel.frame = CGRectIntegral(CGRectMake(labelX, titleY + titleSize.height + marginY, subtitleSize.width, subtitleSize.height));
+        }
+        
+        CGFloat arrowX = (self.bounds.size.width / 2) - (totalMaxWidth / 2) + (leftViewWidth - self.arrow.bounds.size.width) / 2;
+        self.arrow.frame = CGRectMake(arrowX,
+                                      (self.bounds.size.height / 2) - (self.arrow.bounds.size.height / 2),
+                                      self.arrow.bounds.size.width,
+                                      self.arrow.bounds.size.height);
+        self.activityIndicatorView.center = self.arrow.center;
+    }
+}
+
+#pragma mark - Scroll View
+
+- (void)resetScrollViewContentInset {
+    UIEdgeInsets currentInsets = self.scrollView.contentInset;
+    switch (self.position) {
+        case NTESPullToRefreshPositionTop:
+            currentInsets.top = self.originalTopInset;
+            break;
+        case NTESPullToRefreshPositionBottom:
+            currentInsets.bottom = self.originalBottomInset;
+            currentInsets.top = self.originalTopInset;
+            break;
+    }
+    [self setScrollViewContentInset:currentInsets];
+}
+
+- (void)setScrollViewContentInsetForLoading {
+    CGFloat offset = MAX(self.scrollView.contentOffset.y * -1, 0);
+    UIEdgeInsets currentInsets = self.scrollView.contentInset;
+    switch (self.position) {
+        case NTESPullToRefreshPositionTop:
+            currentInsets.top = MIN(offset, self.originalTopInset + self.bounds.size.height);
+            break;
+        case NTESPullToRefreshPositionBottom:
+            currentInsets.bottom = MIN(offset, self.originalBottomInset + self.bounds.size.height);
+            break;
+    }
+    [self setScrollViewContentInset:currentInsets];
+}
+
+- (void)setScrollViewContentInset:(UIEdgeInsets)contentInset {
+    [UIView animateWithDuration:0.3
+                          delay:0
+                        options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionBeginFromCurrentState
+                     animations:^{
+                         self.scrollView.contentInset = contentInset;
+                     }
+                     completion:NULL];
+}
+
+#pragma mark - Observing
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
+    if([keyPath isEqualToString:@"contentOffset"])
+        [self scrollViewDidScroll:[[change valueForKey:NSKeyValueChangeNewKey] CGPointValue]];
+    else if([keyPath isEqualToString:@"contentSize"]) {
+        [self layoutSubviews];
+        
+        CGFloat yOrigin;
+        switch (self.position) {
+            case NTESPullToRefreshPositionTop:
+                yOrigin = -NTESPullToRefreshViewHeight;
+                break;
+            case NTESPullToRefreshPositionBottom:
+                yOrigin = MAX(self.scrollView.contentSize.height, self.scrollView.bounds.size.height);
+                break;
+        }
+        self.frame = CGRectMake(0, yOrigin, self.bounds.size.width, NTESPullToRefreshViewHeight);
+    }
+    else if([keyPath isEqualToString:@"frame"])
+        [self layoutSubviews];
+    
+}
+
+- (void)scrollViewDidScroll:(CGPoint)contentOffset {
+    if(self.state != NTESPullToRefreshStateLoading) {
+        CGFloat scrollOffsetThreshold = 0;
+        switch (self.position) {
+            case NTESPullToRefreshPositionTop:
+                scrollOffsetThreshold = self.frame.origin.y - self.originalTopInset;
+                break;
+            case NTESPullToRefreshPositionBottom:
+                scrollOffsetThreshold = MAX(self.scrollView.contentSize.height - self.scrollView.bounds.size.height, 0.0f) + self.bounds.size.height + self.originalBottomInset;
+                break;
+        }
+        
+        if(!self.scrollView.isDragging && self.state == NTESPullToRefreshStateTriggered)
+            self.state = NTESPullToRefreshStateLoading;
+        else if(contentOffset.y < scrollOffsetThreshold && self.scrollView.isDragging && self.state == NTESPullToRefreshStateStopped && self.position == NTESPullToRefreshPositionTop)
+            self.state = NTESPullToRefreshStateTriggered;
+        else if(contentOffset.y >= scrollOffsetThreshold && self.state != NTESPullToRefreshStateStopped && self.position == NTESPullToRefreshPositionTop)
+            self.state = NTESPullToRefreshStateStopped;
+        else if(contentOffset.y > scrollOffsetThreshold && self.scrollView.isDragging && self.state == NTESPullToRefreshStateStopped && self.position == NTESPullToRefreshPositionBottom)
+            self.state = NTESPullToRefreshStateTriggered;
+        else if(contentOffset.y <= scrollOffsetThreshold && self.state != NTESPullToRefreshStateStopped && self.position == NTESPullToRefreshPositionBottom)
+            self.state = NTESPullToRefreshStateStopped;
+    } else {
+        CGFloat offset;
+        UIEdgeInsets contentInset;
+        switch (self.position) {
+            case NTESPullToRefreshPositionTop:
+                offset = MAX(self.scrollView.contentOffset.y * -1, 0.0f);
+                offset = MIN(offset, self.originalTopInset + self.bounds.size.height);
+                contentInset = self.scrollView.contentInset;
+                self.scrollView.contentInset = UIEdgeInsetsMake(offset, contentInset.left, contentInset.bottom, contentInset.right);
+                break;
+            case NTESPullToRefreshPositionBottom:
+                if (self.scrollView.contentSize.height >= self.scrollView.bounds.size.height) {
+                    offset = MAX(self.scrollView.contentSize.height - self.scrollView.bounds.size.height + self.bounds.size.height, 0.0f);
+                    offset = MIN(offset, self.originalBottomInset + self.bounds.size.height);
+                    contentInset = self.scrollView.contentInset;
+                    self.scrollView.contentInset = UIEdgeInsetsMake(contentInset.top, contentInset.left, offset, contentInset.right);
+                } else if (self.wasTriggeredByUser) {
+                    offset = MIN(self.bounds.size.height, self.originalBottomInset + self.bounds.size.height);
+                    contentInset = self.scrollView.contentInset;
+                    self.scrollView.contentInset = UIEdgeInsetsMake(-offset, contentInset.left, contentInset.bottom, contentInset.right);
+                }
+                break;
+        }
+    }
+}
+
+#pragma mark - Getters
+
+- (NTESPullToRefreshArrow *)arrow {
+    if(!_arrow) {
+        _arrow = [[NTESPullToRefreshArrow alloc]initWithFrame:CGRectMake(0, self.bounds.size.height-54, 22, 48)];
+        _arrow.backgroundColor = [UIColor clearColor];
+        [self addSubview:_arrow];
+    }
+    return _arrow;
+}
+
+- (UIActivityIndicatorView *)activityIndicatorView {
+    if(!_activityIndicatorView) {
+        _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
+        _activityIndicatorView.hidesWhenStopped = YES;
+        [self addSubview:_activityIndicatorView];
+    }
+    return _activityIndicatorView;
+}
+
+- (UILabel *)titleLabel {
+    if(!_titleLabel) {
+        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 210, 20)];
+        _titleLabel.text = NSLocalizedString(@"Pull to refresh...",);
+        _titleLabel.font = [UIFont boldSystemFontOfSize:14];
+        _titleLabel.backgroundColor = [UIColor clearColor];
+        _titleLabel.textColor = textColor;
+        [self addSubview:_titleLabel];
+    }
+    return _titleLabel;
+}
+
+- (UILabel *)subtitleLabel {
+    if(!_subtitleLabel) {
+        _subtitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 210, 20)];
+        _subtitleLabel.font = [UIFont systemFontOfSize:12];
+        _subtitleLabel.backgroundColor = [UIColor clearColor];
+        _subtitleLabel.textColor = textColor;
+        [self addSubview:_subtitleLabel];
+    }
+    return _subtitleLabel;
+}
+
+- (UILabel *)dateLabel {
+    return self.showsDateLabel ? self.subtitleLabel : nil;
+}
+
+- (UIColor *)arrowColor {
+    return self.arrow.arrowColor; // pass through
+}
+
+- (UIColor *)textColor {
+    return self.titleLabel.textColor;
+}
+
+- (UIColor *)activityIndicatorViewColor {
+    return self.activityIndicatorView.color;
+}
+
+- (UIActivityIndicatorViewStyle)activityIndicatorViewStyle {
+    return self.activityIndicatorView.activityIndicatorViewStyle;
+}
+
+#pragma mark - Setters
+
+- (void)setArrowColor:(UIColor *)newArrowColor {
+    self.arrow.arrowColor = newArrowColor; // pass through
+    [self.arrow setNeedsDisplay];
+}
+
+- (void)setTitle:(NSString *)title forState:(NTESPullToRefreshState)state {
+    if(!title)
+        title = @"";
+    
+    if(state == NTESPullToRefreshStateAll)
+        [self.titles replaceObjectsInRange:NSMakeRange(0, 3) withObjectsFromArray:@[title, title, title]];
+    else
+        [self.titles replaceObjectAtIndex:state withObject:title];
+    
+    [self setNeedsLayout];
+}
+
+- (void)setSubtitle:(NSString *)subtitle forState:(NTESPullToRefreshState)state {
+    if(!subtitle)
+        subtitle = @"";
+    
+    if(state == NTESPullToRefreshStateAll)
+        [self.subtitles replaceObjectsInRange:NSMakeRange(0, 3) withObjectsFromArray:@[subtitle, subtitle, subtitle]];
+    else
+        [self.subtitles replaceObjectAtIndex:state withObject:subtitle];
+    
+    [self setNeedsLayout];
+}
+
+- (void)setCustomView:(UIView *)view forState:(NTESPullToRefreshState)state {
+    id viewPlaceholder = view;
+    
+    if(!viewPlaceholder)
+        viewPlaceholder = @"";
+    
+    if(state == NTESPullToRefreshStateAll)
+        [self.viewForState replaceObjectsInRange:NSMakeRange(0, 3) withObjectsFromArray:@[viewPlaceholder, viewPlaceholder, viewPlaceholder]];
+    else
+        [self.viewForState replaceObjectAtIndex:state withObject:viewPlaceholder];
+    
+    [self setNeedsLayout];
+}
+
+- (void)setTextColor:(UIColor *)newTextColor {
+    textColor = newTextColor;
+    self.titleLabel.textColor = newTextColor;
+    self.subtitleLabel.textColor = newTextColor;
+}
+
+- (void)setActivityIndicatorViewColor:(UIColor *)color {
+    self.activityIndicatorView.color = color;
+}
+
+- (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)viewStyle {
+    self.activityIndicatorView.activityIndicatorViewStyle = viewStyle;
+}
+
+
+
+#pragma mark -
+
+- (void)startAnimating{
+    switch (self.position) {
+        case NTESPullToRefreshPositionTop:
+            
+            if(fequalzero(self.scrollView.contentOffset.y)) {
+                [self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, -self.frame.size.height) animated:YES];
+                self.wasTriggeredByUser = NO;
+            }
+            else
+                self.wasTriggeredByUser = YES;
+            
+            break;
+        case NTESPullToRefreshPositionBottom:
+            
+            if((fequalzero(self.scrollView.contentOffset.y) && self.scrollView.contentSize.height < self.scrollView.bounds.size.height)
+               || fequal(self.scrollView.contentOffset.y, self.scrollView.contentSize.height - self.scrollView.bounds.size.height)) {
+                [self.scrollView setContentOffset:(CGPoint){.y = MAX(self.scrollView.contentSize.height - self.scrollView.bounds.size.height, 0.0f) + self.frame.size.height} animated:YES];
+                self.wasTriggeredByUser = NO;
+            }
+            else
+                self.wasTriggeredByUser = YES;
+            
+            break;
+    }
+    
+    self.state = NTESPullToRefreshStateLoading;
+}
+
+- (void)stopAnimating {
+    self.state = NTESPullToRefreshStateStopped;
+    
+    switch (self.position) {
+        case NTESPullToRefreshPositionTop:
+            if(!self.wasTriggeredByUser)
+                [self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, -self.originalTopInset) animated:YES];
+            break;
+        case NTESPullToRefreshPositionBottom:
+            if(!self.wasTriggeredByUser)
+                [self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, self.scrollView.contentSize.height - self.scrollView.bounds.size.height + self.originalBottomInset) animated:YES];
+            break;
+    }
+}
+
+- (void)setState:(NTESPullToRefreshState)newState {
+    
+    if(_state == newState)
+        return;
+    
+    NTESPullToRefreshState previousState = _state;
+    _state = newState;
+    
+    [self setNeedsLayout];
+    [self layoutIfNeeded];
+    
+    switch (newState) {
+        case NTESPullToRefreshStateAll:
+        case NTESPullToRefreshStateStopped:
+            [self resetScrollViewContentInset];
+            break;
+            
+        case NTESPullToRefreshStateTriggered:
+            break;
+            
+        case NTESPullToRefreshStateLoading:
+            [self setScrollViewContentInsetForLoading];
+            
+            if(previousState == NTESPullToRefreshStateTriggered && pullToRefreshActionHandler)
+                pullToRefreshActionHandler();
+            
+            break;
+    }
+}
+
+- (void)rotateArrow:(float)degrees hide:(BOOL)hide {
+    [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
+        self.arrow.layer.transform = CATransform3DMakeRotation(degrees, 0, 0, 1);
+        self.arrow.layer.opacity = !hide;
+        //[self.arrow setNeedsDisplay];//ios 4
+    } completion:NULL];
+}
+
+@end
+
+
+#pragma mark - NTESPullToRefreshArrow
+
+@implementation NTESPullToRefreshArrow
+@synthesize arrowColor;
+
+- (UIColor *)arrowColor {
+    if (arrowColor) return arrowColor;
+    return [UIColor grayColor]; // default Color
+}
+
+- (void)drawRect:(CGRect)rect {
+    CGContextRef c = UIGraphicsGetCurrentContext();
+    
+    // the rects above the arrow
+    CGContextAddRect(c, CGRectMake(5, 0, 12, 4)); // to-do: use dynamic points
+    CGContextAddRect(c, CGRectMake(5, 6, 12, 4)); // currently fixed size: 22 x 48pt
+    CGContextAddRect(c, CGRectMake(5, 12, 12, 4));
+    CGContextAddRect(c, CGRectMake(5, 18, 12, 4));
+    CGContextAddRect(c, CGRectMake(5, 24, 12, 4));
+    CGContextAddRect(c, CGRectMake(5, 30, 12, 4));
+    
+    // the arrow
+    CGContextMoveToPoint(c, 0, 34);
+    CGContextAddLineToPoint(c, 11, 48);
+    CGContextAddLineToPoint(c, 22, 34);
+    CGContextAddLineToPoint(c, 0, 34);
+    CGContextClosePath(c);
+    
+    CGContextSaveGState(c);
+    CGContextClip(c);
+    
+    // Gradient Declaration
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGFloat alphaGradientLocations[] = {0, 0.8f};
+    
+    CGGradientRef alphaGradient = nil;
+    if([[[UIDevice currentDevice] systemVersion]floatValue] >= 5){
+        NSArray* alphaGradientColors = [NSArray arrayWithObjects:
+                                        (id)[self.arrowColor colorWithAlphaComponent:0].CGColor,
+                                        (id)[self.arrowColor colorWithAlphaComponent:1].CGColor,
+                                        nil];
+        alphaGradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)alphaGradientColors, alphaGradientLocations);
+    }else{
+        const CGFloat * components = CGColorGetComponents([self.arrowColor CGColor]);
+        size_t numComponents = CGColorGetNumberOfComponents([self.arrowColor CGColor]);
+        CGFloat colors[8];
+        switch(numComponents){
+            case 2:{
+                colors[0] = colors[4] = components[0];
+                colors[1] = colors[5] = components[0];
+                colors[2] = colors[6] = components[0];
+                break;
+            }
+            case 4:{
+                colors[0] = colors[4] = components[0];
+                colors[1] = colors[5] = components[1];
+                colors[2] = colors[6] = components[2];
+                break;
+            }
+        }
+        colors[3] = 0;
+        colors[7] = 1;
+        alphaGradient = CGGradientCreateWithColorComponents(colorSpace,colors,alphaGradientLocations,2);
+    }
+    
+    
+    CGContextDrawLinearGradient(c, alphaGradient, CGPointZero, CGPointMake(0, rect.size.height), 0);
+    
+    CGContextRestoreGState(c);
+    
+    CGGradientRelease(alphaGradient);
+    CGColorSpaceRelease(colorSpace);
+}
+@end

+ 95 - 0
NIMDemo/NIMDemo/Classes/Category/UIView+NTES.h

@@ -0,0 +1,95 @@
+//
+//  UIView+NTES.h
+//  NIMDemo
+//
+//  Created by ght on 15-1-31.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIView (NTES)
+
+@property (nonatomic) CGFloat left;
+
+/**
+ * Shortcut for frame.origin.y
+ *
+ * Sets frame.origin.y = top
+ */
+@property (nonatomic) CGFloat top;
+
+/**
+ * Shortcut for frame.origin.x + frame.size.width
+ *
+ * Sets frame.origin.x = right - frame.size.width
+ */
+@property (nonatomic) CGFloat right;
+
+/**
+ * Shortcut for frame.origin.y + frame.size.height
+ *
+ * Sets frame.origin.y = bottom - frame.size.height
+ */
+@property (nonatomic) CGFloat bottom;
+
+/**
+ * Shortcut for frame.size.width
+ *
+ * Sets frame.size.width = width
+ */
+@property (nonatomic) CGFloat width;
+
+/**
+ * Shortcut for frame.size.height
+ *
+ * Sets frame.size.height = height
+ */
+@property (nonatomic) CGFloat height;
+
+/**
+ * Shortcut for center.x
+ *
+ * Sets center.x = centerX
+ */
+@property (nonatomic) CGFloat centerX;
+
+/**
+ * Shortcut for center.y
+ *
+ * Sets center.y = centerY
+ */
+@property (nonatomic) CGFloat centerY;
+/**
+ * Shortcut for frame.origin
+ */
+@property (nonatomic) CGPoint origin;
+
+/**
+ * Shortcut for frame.size
+ */
+@property (nonatomic) CGSize size;
+
+//找到自己的vc
+- (UIViewController *)viewController;
+
+
+@end
+
+
+@interface UIView (NTESPresent)
+
+//弹出一个类似present效果的窗口
+- (void)presentView:(UIView*)view animated:(BOOL)animated complete:(void(^)()) complete;
+
+//获取一个view上正在被present的view
+- (UIView *)presentedView;
+
+- (void)dismissPresentedView:(BOOL)animated complete:(void(^)()) complete;
+
+//这个是被present的窗口本身的方法
+//如果自己是被present出来的,消失掉
+- (void)hideSelf:(BOOL)animated complete:(void(^)()) complete;
+
+@end
+

+ 320 - 0
NIMDemo/NIMDemo/Classes/Category/UIView+NTES.m

@@ -0,0 +1,320 @@
+//
+//  UIView+NTES.m
+//  NIMDemo
+//
+//  Created by ght on 15-1-31.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "UIView+NTES.h"
+#import <objc/runtime.h>
+@implementation UIView (NTES)
+
+- (CGFloat)left {
+    return self.frame.origin.x;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setLeft:(CGFloat)x {
+    CGRect frame = self.frame;
+    frame.origin.x = x;
+    self.frame = frame;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGFloat)top {
+    return self.frame.origin.y;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setTop:(CGFloat)y {
+    CGRect frame = self.frame;
+    frame.origin.y = y;
+    self.frame = frame;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGFloat)right {
+    return self.frame.origin.x + self.frame.size.width;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setRight:(CGFloat)right {
+    CGRect frame = self.frame;
+    frame.origin.x = right - frame.size.width;
+    self.frame = frame;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGFloat)bottom {
+    return self.frame.origin.y + self.frame.size.height;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setBottom:(CGFloat)bottom {
+    CGRect frame = self.frame;
+    frame.origin.y = bottom - frame.size.height;
+    self.frame = frame;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGFloat)centerX {
+    return self.center.x;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setCenterX:(CGFloat)centerX {
+    self.center = CGPointMake(centerX, self.center.y);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGFloat)centerY {
+    return self.center.y;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setCenterY:(CGFloat)centerY {
+    self.center = CGPointMake(self.center.x, centerY);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGFloat)width {
+    return self.frame.size.width;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setWidth:(CGFloat)width {
+    CGRect frame = self.frame;
+    frame.size.width = width;
+    self.frame = frame;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGFloat)height {
+    return self.frame.size.height;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setHeight:(CGFloat)height {
+    CGRect frame = self.frame;
+    frame.size.height = height;
+    self.frame = frame;
+}
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGPoint)origin {
+    return self.frame.origin;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setOrigin:(CGPoint)origin {
+    CGRect frame = self.frame;
+    frame.origin = origin;
+    self.frame = frame;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (CGSize)size {
+    return self.frame.size;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setSize:(CGSize)size {
+    CGRect frame = self.frame;
+    frame.size = size;
+    self.frame = frame;
+}
+
+
+- (UIViewController *)viewController{
+    for (UIView* next = self; next; next = next.superview) {
+        UIResponder* nextResponder = [next nextResponder];
+        if ([nextResponder isKindOfClass:[UIViewController class]]) {
+            return (UIViewController*)nextResponder;
+        }
+    }
+    return nil;
+}
+
+@end
+
+
+
+@implementation UIView(NTESPresent)
+
+
+static char PresentedViewAddress;   //被Present的View
+static char PresentingViewAddress;  //正在Present其他视图的view
+#define AnimateDuartion .25f
+- (void)presentView:(UIView*)view animated:(BOOL)animated complete:(void(^)()) complete{
+    if (!self.window) {
+        return;
+    }
+    [self.window addSubview:view];
+    objc_setAssociatedObject(self, &PresentedViewAddress, view, OBJC_ASSOCIATION_RETAIN);
+    objc_setAssociatedObject(view, &PresentingViewAddress, self, OBJC_ASSOCIATION_RETAIN);
+    if (animated) {
+        [self doAlertAnimate:view complete:complete];
+    }else{
+        view.center = self.window.center;
+    }
+}
+
+- (UIView *)presentedView{
+    UIView * view =  objc_getAssociatedObject(self, &PresentedViewAddress);
+    return view;
+}
+
+- (void)dismissPresentedView:(BOOL)animated complete:(void(^)()) complete{
+    UIView * view =  objc_getAssociatedObject(self, &PresentedViewAddress);
+    if (animated) {
+        [self doHideAnimate:view complete:complete];
+    }else{
+        [view removeFromSuperview];
+        [self cleanAssocaiteObject];
+    }
+}
+
+- (void)hideSelf:(BOOL)animated complete:(void(^)()) complete{
+    UIView * baseView =  objc_getAssociatedObject(self, &PresentingViewAddress);
+    if (!baseView) {
+        return;
+    }
+    [baseView dismissPresentedView:animated complete:complete];
+    [self cleanAssocaiteObject];
+}
+
+
+- (void)onPressBkg:(id)sender{
+    [self dismissPresentedView:YES complete:nil];
+}
+
+#pragma mark - Animation
+- (void)doAlertAnimate:(UIView*)view complete:(void(^)()) complete{
+    CGRect bounds = view.bounds;
+    // 放大
+    CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"bounds"];
+    scaleAnimation.duration  = AnimateDuartion;
+    scaleAnimation.fromValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 1, 1)];
+    scaleAnimation.toValue   = [NSValue valueWithCGRect:bounds];
+    
+    // 移动
+    CABasicAnimation *moveAnimation = [CABasicAnimation animationWithKeyPath:@"position"];
+    moveAnimation.duration   = AnimateDuartion;
+    moveAnimation.fromValue  = [NSValue valueWithCGPoint:[self.superview convertPoint:self.center toView:nil]];
+    moveAnimation.toValue    = [NSValue valueWithCGPoint:self.window.center];
+    
+    CAAnimationGroup *group = [CAAnimationGroup animation];
+    group.beginTime				= CACurrentMediaTime();
+    group.duration				= AnimateDuartion;
+    group.animations			= [NSArray arrayWithObjects:scaleAnimation,moveAnimation,nil];
+    group.timingFunction		= [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
+    group.fillMode				= kCAFillModeForwards;
+    group.removedOnCompletion	= NO;
+    group.autoreverses			= NO;
+    
+    [self hideAllSubView:view];
+    
+    [view.layer addAnimation:group forKey:@"groupAnimationAlert"];
+    
+    __weak UIView * wself = self;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(AnimateDuartion * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        view.layer.bounds    = bounds;
+        view.layer.position  = wself.superview.center;
+        [wself showAllSubView:view];
+        if (complete) {
+            complete();
+        }
+    });
+    
+}
+
+- (void)doHideAnimate:(UIView*)alertView complete:(void(^)()) complete{
+    if (!alertView) {
+        return;
+    }
+    // 缩小
+    CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"bounds"];
+    scaleAnimation.duration = AnimateDuartion;
+    scaleAnimation.toValue  = [NSValue valueWithCGRect:CGRectMake(0, 0, 1, 1)];
+    
+    CGPoint position   = self.center;
+    // 移动
+    CABasicAnimation *moveAnimation = [CABasicAnimation animationWithKeyPath:@"position"];
+    moveAnimation.duration = AnimateDuartion;
+    moveAnimation.toValue  = [NSValue valueWithCGPoint:[self.superview convertPoint:self.center toView:nil]];
+    
+    CAAnimationGroup *group   = [CAAnimationGroup animation];
+    group.beginTime           = CACurrentMediaTime();
+    group.duration            = AnimateDuartion;
+    group.animations          = [NSArray arrayWithObjects:scaleAnimation,moveAnimation,nil];
+    group.timingFunction      = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
+    group.fillMode            = kCAFillModeForwards;
+    group.removedOnCompletion = NO;
+    group.autoreverses        = NO;
+    
+    
+    alertView.layer.bounds    = self.bounds;
+    alertView.layer.position  = position;
+    alertView.layer.needsDisplayOnBoundsChange = YES;
+    
+    [self hideAllSubView:alertView];
+    alertView.backgroundColor = [UIColor clearColor];
+    
+    [alertView.layer addAnimation:group forKey:@"groupAnimationHide"];
+    
+    __weak UIView * wself = self;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(AnimateDuartion * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [alertView removeFromSuperview];
+        [wself cleanAssocaiteObject];
+        [wself showAllSubView:alertView];
+        if (complete) {
+            complete();
+        }
+    });
+}
+
+
+static char *HideViewsAddress = "hideViewsAddress";
+- (void)hideAllSubView:(UIView*)view{
+    for (UIView * subView in view.subviews) {
+        NSMutableArray *array = [[NSMutableArray alloc] init];
+        if (subView.hidden) {
+            [array addObject:subView];
+        }
+        objc_setAssociatedObject(self, &HideViewsAddress, array, OBJC_ASSOCIATION_RETAIN);
+        subView.hidden = YES;
+    }
+}
+
+- (void)showAllSubView:(UIView*)view{
+    NSMutableArray *array = objc_getAssociatedObject(self,&HideViewsAddress);
+    for (UIView * subView in view.subviews) {
+        subView.hidden = [array containsObject:subView];
+    }
+}
+
+- (void)cleanAssocaiteObject{
+    objc_setAssociatedObject(self,&PresentedViewAddress,nil,OBJC_ASSOCIATION_RETAIN);
+    objc_setAssociatedObject(self,&PresentingViewAddress,nil,OBJC_ASSOCIATION_RETAIN);
+    objc_setAssociatedObject(self,&HideViewsAddress,nil, OBJC_ASSOCIATION_RETAIN);
+}
+
+@end

+ 24 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/SwizzlingDefine.h

@@ -0,0 +1,24 @@
+//
+//  SwizzlingDefine.h
+//  NIM
+//
+//  Created by chris on 15/6/23.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#ifndef NIM_SwizzlingDefine_h
+#define NIM_SwizzlingDefine_h
+#import <objc/runtime.h>
+static inline void swizzling_exchangeMethod(Class clazz ,SEL originalSelector, SEL swizzledSelector){
+    Method originalMethod = class_getInstanceMethod(clazz, originalSelector);
+    Method swizzledMethod = class_getInstanceMethod(clazz, swizzledSelector);
+    
+    BOOL success = class_addMethod(clazz, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod));
+    if (success) {
+        class_replaceMethod(clazz, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
+    } else {
+        method_exchangeImplementations(originalMethod, swizzledMethod);
+    }
+}
+
+#endif

+ 13 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationBar+Swizzling.h

@@ -0,0 +1,13 @@
+//
+//  UINavigationBar+Swizzling.h
+//  NIM
+//
+//  Created by chris on 15/6/23.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UINavigationBar (Swizzling)
+
+@end

+ 66 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationBar+Swizzling.m

@@ -0,0 +1,66 @@
+//
+//  UINavigationBar+Swizzling.m
+//  NIM
+//
+//  Created by chris on 15/6/23.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "UINavigationBar+Swizzling.h"
+#import "UIView+NTES.h"
+#import "SwizzlingDefine.h"
+@implementation UINavigationBar (Swizzling)
+
++ (void)load{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        swizzling_exchangeMethod([UINavigationBar class] ,@selector(layoutSubviews), @selector(swizzling_layoutSubviews));
+    });
+}
+
+#pragma mark - LayoutSubviews
+#define NavigationBtnMargin 28
+#define TitleMargin 43
+- (void)swizzling_layoutSubviews{
+    [self swizzling_layoutSubviews];
+    UINavigationItem *navigationItem = [self topItem];
+    UIView *subview  = [[navigationItem leftBarButtonItem] customView];
+    subview.left = NavigationBtnMargin;
+    
+    //解决标题过长时,设置navigationItem.title导致标题偏移的问题
+    UILabel *label = (UILabel *)navigationItem.titleView;
+    UIFont *font   = self.titleTextAttributes[NSFontAttributeName];
+    if (font) {
+        label.font = font;
+    }
+    UIColor *color = self.titleTextAttributes[NSForegroundColorAttributeName];
+    if (color && [label isKindOfClass:[UILabel class]]) {
+        label.textColor = color;
+    }
+    [label sizeToFit];
+    [self layoutLabel];
+    
+    if (!IOS8) {
+        UIViewController *vc = self.viewController;
+        //在竖屏转横屏后,iOS7下导航条会变成32,但是并没有通知到对应vc...这里手动加一个... 否则排版会出问题
+        [vc.view setNeedsLayout];
+    }
+}
+
+#pragma mark - Private
+- (void)layoutLabel{
+    UINavigationItem *navigationItem = [self topItem];
+    UIView *leftView   = [[navigationItem leftBarButtonItems].lastObject customView];
+    UIView *rightView  = [[navigationItem rightBarButtonItems].firstObject customView];
+    CGFloat left  = leftView.right;
+    CGFloat right = rightView ? rightView.right : self.width;
+    
+    CGFloat maxWidth   = right - left - 2 * TitleMargin;
+    UIView *view = navigationItem.titleView;
+    view.width   = view.width > maxWidth ? maxWidth : view.width;
+    view.centerX = self.width  * .5f;
+    view.centerY = self.height * .5f;
+}
+
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationController+Swizzling.h

@@ -0,0 +1,13 @@
+//
+//  UINavigationController+Swizzling.h
+//  NIM
+//
+//  Created by chris on 15/10/26.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UINavigationController (Swizzling)
+
+@end

+ 38 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationController+Swizzling.m

@@ -0,0 +1,38 @@
+//
+//  UINavigationController+Swizzling.m
+//  NIM
+//
+//  Created by chris on 15/10/26.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import "UINavigationController+Swizzling.h"
+#import "SwizzlingDefine.h"
+#import "UIView+NTES.h"
+
+@implementation UINavigationController (Swizzling)
+
++ (void)load{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        swizzling_exchangeMethod([UINavigationController class] ,@selector(supportedInterfaceOrientations), @selector(swizzling_supportedInterfaceOrientations));
+        swizzling_exchangeMethod([UINavigationController class] ,@selector(shouldAutorotate), @selector(swizzling_shouldAutorotate));
+    });
+}
+
+#pragma mark - ShouldAutorotate
+- (BOOL)swizzling_shouldAutorotate
+{
+    return [self.topViewController shouldAutorotate];
+}
+
+
+#pragma mark - SupportedInterfaceOrientations
+- (UIInterfaceOrientationMask)swizzling_supportedInterfaceOrientations{
+    return [self.topViewController supportedInterfaceOrientations];
+}
+
+
+
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationItem+Swizzling.h

@@ -0,0 +1,13 @@
+//
+//  UINavigationItem+Swizzling.h
+//  NIM
+//
+//  Created by chris on 15/7/21.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UINavigationItem (Swizzling)
+
+@end

+ 53 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UINavigationItem+Swizzling.m

@@ -0,0 +1,53 @@
+//
+//  UINavigationItem+Swizzling.m
+//  NIM
+//
+//  Created by chris on 15/7/21.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "UINavigationItem+Swizzling.h"
+#import "SwizzlingDefine.h"
+#import "UIView+NTES.h"
+
+#define MaxTitleWidth 200
+
+@implementation UINavigationItem (Swizzling)
+
++ (void)load{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        swizzling_exchangeMethod([UINavigationItem class] ,@selector(setTitle:), @selector(swizzling_setTitle:));
+        swizzling_exchangeMethod([UINavigationItem class] ,@selector(title), @selector(swizzling_title));
+    });
+}
+
+
+#pragma mark - SetTitle
+- (void)swizzling_setTitle:(NSString *)title{
+    UILabel *label = (UILabel *)self.titleView;
+    if (!label) {
+        label = [[UILabel alloc] initWithFrame:CGRectZero];
+        label.lineBreakMode = NSLineBreakByTruncatingMiddle;
+        self.titleView = label;
+    }
+    if ([label isKindOfClass:[UILabel class]]) {
+        label.text = title;
+    }
+    [label.superview setNeedsLayout];
+}
+
+- (NSString *)swizzling_title{
+    if (self.swizzling_title.length) {
+        return self.swizzling_title;
+    }
+    UILabel *label = (UILabel *)self.titleView;
+    if ([label isKindOfClass:[UILabel class]]) {
+        return label.text;
+    }
+    return nil;
+}
+
+
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UIView+Swizzling.h

@@ -0,0 +1,13 @@
+//
+//  UIView+Swizzling.h
+//  NIM
+//
+//  Created by chris on 15/10/27.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIView (Swizzling)
+
+@end

+ 34 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UIView+Swizzling.m

@@ -0,0 +1,34 @@
+//
+//  UIView+Swizzling.m
+//  NIM
+//
+//  Created by chris on 15/10/27.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import "UIView+Swizzling.h"
+#import "SwizzlingDefine.h"
+
+@implementation UIView (Swizzling)
+
++ (void)load{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        //响应链日志,在调试的时候开启
+        //swizzling_exchangeMethod([UIView class] ,@selector(hitTest:withEvent:), @selector(swizzling_hitTest:withEvent:));
+    });
+}
+
+#pragma mark - ShouldAutorotate
+- (UIView *)swizzling_hitTest:(CGPoint)point withEvent:(UIEvent *)event
+{
+    UIView *view = [self swizzling_hitTest:point withEvent:event];
+    if (view) {
+        DDLogDebug(@"--hit test--,%@ hit view : %@",[self class],[view class]);
+    }
+    return view;
+}
+
+
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UIViewController+Swizzling.h

@@ -0,0 +1,13 @@
+//
+//  UIViewController+Swizzling.h
+//  NIM
+//
+//  Created by chris on 15/6/15.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIViewController (Swizzling)
+
+@end

+ 105 - 0
NIMDemo/NIMDemo/Classes/Common/Addons/UIViewController+Swizzling.m

@@ -0,0 +1,105 @@
+//
+//  UIViewController+Swizzling.m
+//  NIM
+//
+//  Created by chris on 15/6/15.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "UIViewController+Swizzling.h"
+#import "SVProgressHUD.H"
+#import "SwizzlingDefine.h"
+#import "UIResponder+NTESFirstResponder.h"
+#import "UIView+NTES.h"
+#import "UIImage+NTESColor.h"
+
+@implementation UIViewController (Swizzling)
+
++ (void)load{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        swizzling_exchangeMethod([UIViewController class] ,@selector(viewWillAppear:), @selector(swizzling_viewWillAppear:));
+        swizzling_exchangeMethod([UIViewController class] ,@selector(viewDidAppear:), @selector(swizzling_viewDidAppear:));
+        swizzling_exchangeMethod([UIViewController class] ,@selector(viewWillDisappear:), @selector(swizzling_viewWillDisappear:));
+        swizzling_exchangeMethod([UIViewController class] ,@selector(viewDidLoad),    @selector(swizzling_viewDidLoad));
+        swizzling_exchangeMethod([UIViewController class], @selector(initWithNibName:bundle:), @selector(swizzling_initWithNibName:bundle:));
+    });
+}
+
+#pragma mark - ViewDidLoad
+- (void)swizzling_viewDidLoad{
+    if (self.navigationController) {
+        //UIImage *buttonNormal = [[UIImage imageNamed:@"icon_back_normal.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
+        //[self.navigationController.navigationBar setBackIndicatorImage:buttonNormal];
+        //[self.navigationController.navigationBar setBackIndicatorTransitionMaskImage:buttonNormal];
+        UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
+        self.navigationItem.backBarButtonItem = backItem;
+    }
+    [self swizzling_viewDidLoad];
+}
+
+
+#pragma mark - InitWithNibName:bundle:
+//如果希望vchidesBottomBarWhenPushed为NO的话,请在vc init方法之后调用vc.hidesBottomBarWhenPushed = NO;
+- (instancetype)swizzling_initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
+    id instance = [self swizzling_initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+    if (instance) {
+        self.hidesBottomBarWhenPushed = YES;
+    }
+    return instance;
+}
+
+#pragma mark - ViewWillAppear
+static char UIFirstResponderViewAddress;
+
+- (void)swizzling_viewWillAppear:(BOOL)animated{
+    [self swizzling_viewWillAppear:animated];
+    if (self.parentViewController == self.navigationController)
+    {
+        if ([self swizzling_isUseClearBar] && self.navigationController)
+        {
+            [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
+            [self.navigationController.navigationBar setShadowImage:[UIImage new]];
+        }
+        else
+        {
+            [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
+            [self.navigationController.navigationBar setShadowImage:nil];
+        }
+    }
+}
+
+#pragma mark - ViewDidAppear
+- (void)swizzling_viewDidAppear:(BOOL)animated{
+    [self swizzling_viewDidAppear:animated];
+    UIView *view = objc_getAssociatedObject(self, &UIFirstResponderViewAddress);
+    [view becomeFirstResponder];
+}
+
+
+#pragma mark - ViewWillDisappear
+
+- (void)swizzling_viewWillDisappear:(BOOL)animated{
+    [self swizzling_viewWillDisappear:animated];
+    UIView *view = (UIView *)[UIResponder currentFirstResponder];
+    if ([view isKindOfClass:[UIView class]] && view.viewController == self) {
+        objc_setAssociatedObject(self, &UIFirstResponderViewAddress, view, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+        [view resignFirstResponder];
+    }else{
+        objc_setAssociatedObject(self, &UIFirstResponderViewAddress, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+    }
+}
+
+#pragma mark - Private
+- (BOOL)swizzling_isUseClearBar
+{
+    SEL  sel = NSSelectorFromString(@"useClearBar");
+    BOOL use = NO;
+    if ([self respondsToSelector:sel]) {
+        SuppressPerformSelectorLeakWarning(use = (BOOL)[self performSelector:sel]);
+    }
+    return use;
+}
+
+
+@end

+ 15 - 0
NIMDemo/NIMDemo/Classes/Common/Controller/NTESMainTabController.h

@@ -0,0 +1,15 @@
+//
+//  MainTabController.h
+//  NIMDemo
+//
+//  Created by chris on 15/2/2.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "NIMKit.h"
+@interface NTESMainTabController : UITabBarController
+
++ (instancetype)instance;
+
+@end

+ 270 - 0
NIMDemo/NIMDemo/Classes/Common/Controller/NTESMainTabController.m

@@ -0,0 +1,270 @@
+//
+//  MainTabController.m
+//  NIMDemo
+//
+//  Created by chris on 15/2/2.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "NTESMainTabController.h"
+//#import "NTESAppDelegate.h"
+//#import "NTESSessionListViewController.h"
+//#import "NTESContactViewController.h"
+#import "UIImage+NTESColor.h"
+#import "NTESCustomNotificationDB.h"
+#import "NTESNotificationCenter.h"
+#import "NTESNavigationHandler.h"
+#import "NTESNavigationAnimator.h"
+#import "NTESBundleSetting.h"
+
+#define TabbarVC    @"vc"
+#define TabbarTitle @"title"
+#define TabbarImage @"image"
+#define TabbarSelectedImage @"selectedImage"
+#define TabbarItemBadgeValue @"badgeValue"
+#define TabBarCount 4
+
+typedef NS_ENUM(NSInteger,NTESMainTabType) {
+    NTESMainTabTypeMessageList,    //聊天
+    NTESMainTabTypeContact,        //通讯录
+    NTESMainTabTypeChatroomList,   //聊天室
+    NTESMainTabTypeSetting,        //设置
+};
+
+
+
+@interface NTESMainTabController ()<NIMSystemNotificationManagerDelegate,NIMConversationManagerDelegate>
+
+@property (nonatomic,strong) NSArray *navigationHandlers;
+
+@property (nonatomic,strong) NTESNavigationAnimator *animator;
+
+@property (nonatomic,assign) NSInteger sessionUnreadCount;
+
+@property (nonatomic,assign) NSInteger systemUnreadCount;
+
+@property (nonatomic,assign) NSInteger customSystemUnreadCount;
+
+@property (nonatomic,copy)  NSDictionary *configs;
+
+@end
+
+@implementation NTESMainTabController
+
++ (instancetype)instance{
+//    NTESAppDelegate *delegete = (NTESAppDelegate *)[UIApplication sharedApplication].delegate;
+//    UIViewController *vc = delegete.window.rootViewController;
+//    if ([vc isKindOfClass:[NTESMainTabController class]]) {
+//        return (NTESMainTabController *)vc;
+//    }else{
+//        return nil;
+//    }
+    return nil;
+}
+
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self setUpSubNav];
+    [[NIMSDK sharedSDK].systemNotificationManager addDelegate:self];
+    [[NIMSDK sharedSDK].conversationManager addDelegate:self];
+    extern NSString *NTESCustomNotificationCountChanged;
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onCustomNotifyChanged:) name:NTESCustomNotificationCountChanged object:nil];
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    [self setUpStatusBar];
+}
+
+- (void)viewDidAppear:(BOOL)animated
+{
+    [super viewDidAppear:animated];
+    //会话界面发送拍摄的视频,拍摄结束后点击发送后可能顶部会有红条,导致的界面错位。
+    self.view.frame = [UIScreen mainScreen].bounds;
+}
+
+- (void)dealloc{
+    [[NIMSDK sharedSDK].systemNotificationManager removeDelegate:self];
+    [[NIMSDK sharedSDK].conversationManager removeDelegate:self];
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+- (NSArray*)tabbars{
+    self.sessionUnreadCount  = [NIMSDK sharedSDK].conversationManager.allUnreadCount;
+    self.systemUnreadCount   = [NIMSDK sharedSDK].systemNotificationManager.allUnreadCount;
+    self.customSystemUnreadCount = [[NTESCustomNotificationDB sharedInstance] unreadCount];
+    NSMutableArray *items = [[NSMutableArray alloc] init];
+    for (NSInteger tabbar = 0; tabbar < TabBarCount; tabbar++) {
+        [items addObject:@(tabbar)];
+    }
+    return items;
+}
+
+
+- (void)setUpSubNav{
+    NSMutableArray *handleArray = [[NSMutableArray alloc] init];
+    NSMutableArray *vcArray = [[NSMutableArray alloc] init];
+    [self.tabbars enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
+        NSDictionary * item =[self vcInfoForTabType:[obj integerValue]];
+        NSString *vcName = item[TabbarVC];
+        NSString *title  = item[TabbarTitle];
+        NSString *imageName = item[TabbarImage];
+        NSString *imageSelected = item[TabbarSelectedImage];
+        Class clazz = NSClassFromString(vcName);
+        UIViewController *vc = [[clazz alloc] initWithNibName:nil bundle:nil];
+        vc.hidesBottomBarWhenPushed = NO;
+        UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
+        nav.tabBarItem = [[UITabBarItem alloc] initWithTitle:title
+                                                       image:[UIImage imageNamed:imageName]
+                                               selectedImage:[UIImage imageNamed:imageSelected]];
+        nav.tabBarItem.tag = idx;
+        NSInteger badge = [item[TabbarItemBadgeValue] integerValue];
+        if (badge) {
+            nav.tabBarItem.badgeValue = [NSString stringWithFormat:@"%zd",badge];
+        }
+        NTESNavigationHandler *handler = [[NTESNavigationHandler alloc] initWithNavigationController:nav];
+        nav.delegate = handler;
+        
+        [vcArray addObject:nav];
+        [handleArray addObject:handler];
+    }];
+    self.viewControllers = [NSArray arrayWithArray:vcArray];
+    self.navigationHandlers = [NSArray arrayWithArray:handleArray];
+}
+
+
+- (void)setUpStatusBar{
+    UIStatusBarStyle style = UIStatusBarStyleDefault;
+    [[UIApplication sharedApplication] setStatusBarStyle:style
+                                                animated:NO];
+}
+
+
+#pragma mark - NIMConversationManagerDelegate
+- (void)didAddRecentSession:(NIMRecentSession *)recentSession
+           totalUnreadCount:(NSInteger)totalUnreadCount{
+    self.sessionUnreadCount = totalUnreadCount;
+    [self refreshSessionBadge];
+}
+
+
+- (void)didUpdateRecentSession:(NIMRecentSession *)recentSession
+              totalUnreadCount:(NSInteger)totalUnreadCount{
+    self.sessionUnreadCount = totalUnreadCount;
+    [self refreshSessionBadge];
+}
+
+
+- (void)didRemoveRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount{
+    self.sessionUnreadCount = totalUnreadCount;
+    [self refreshSessionBadge];
+}
+
+- (void)messagesDeletedInSession:(NIMSession *)session{
+    self.sessionUnreadCount = [NIMSDK sharedSDK].conversationManager.allUnreadCount;
+    [self refreshSessionBadge];
+}
+
+- (void)allMessagesDeleted{
+    self.sessionUnreadCount = 0;
+    [self refreshSessionBadge];
+}
+
+#pragma mark - NIMSystemNotificationManagerDelegate
+- (void)onSystemNotificationCountChanged:(NSInteger)unreadCount
+{
+    self.systemUnreadCount = unreadCount;
+    [self refreshContactBadge];
+}
+
+#pragma mark - Notification
+- (void)onCustomNotifyChanged:(NSNotification *)notification
+{
+    NTESCustomNotificationDB *db = [NTESCustomNotificationDB sharedInstance];
+    self.customSystemUnreadCount = db.unreadCount;
+    [self refreshSettingBadge];
+}
+
+
+
+- (void)refreshSessionBadge{
+    UINavigationController *nav = self.viewControllers[NTESMainTabTypeMessageList];
+    nav.tabBarItem.badgeValue = self.sessionUnreadCount ? @(self.sessionUnreadCount).stringValue : nil;
+}
+
+- (void)refreshContactBadge{
+    UINavigationController *nav = self.viewControllers[NTESMainTabTypeContact];
+    NSInteger badge = self.systemUnreadCount;
+    nav.tabBarItem.badgeValue = badge ? @(badge).stringValue : nil;
+}
+
+- (void)refreshSettingBadge{
+    UINavigationController *nav = self.viewControllers[NTESMainTabTypeSetting];
+    NSInteger badge = self.customSystemUnreadCount;
+    nav.tabBarItem.badgeValue = badge ? @(badge).stringValue : nil;
+}
+
+
+- (UIStatusBarStyle)preferredStatusBarStyle {
+    return UIStatusBarStyleDefault;
+}
+
+
+#pragma mark - Rotate
+
+- (BOOL)shouldAutorotate{
+    BOOL enableRotate = [NTESBundleSetting sharedConfig].enableRotate;
+    return enableRotate ? [self.selectedViewController shouldAutorotate] : NO;
+}
+
+- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
+    BOOL enableRotate = [NTESBundleSetting sharedConfig].enableRotate;
+    return enableRotate ? [self.selectedViewController supportedInterfaceOrientations] : UIInterfaceOrientationMaskPortrait;
+}
+
+
+#pragma mark - VC
+- (NSDictionary *)vcInfoForTabType:(NTESMainTabType)type{
+    
+    if (_configs == nil)
+    {
+        _configs = @{
+                     @(NTESMainTabTypeMessageList) : @{
+                             TabbarVC           : @"NTESSessionListViewController",
+                             TabbarTitle        : @"云信",
+                             TabbarImage        : @"icon_message_normal",
+                             TabbarSelectedImage: @"icon_message_pressed",
+                             TabbarItemBadgeValue: @(self.sessionUnreadCount)
+                             },
+                     @(NTESMainTabTypeContact)     : @{
+                             TabbarVC           : @"NTESContactViewController",
+                             TabbarTitle        : @"通讯录",
+                             TabbarImage        : @"icon_contact_normal",
+                             TabbarSelectedImage: @"icon_contact_pressed",
+                             TabbarItemBadgeValue: @(self.systemUnreadCount)
+                             },
+                     @(NTESMainTabTypeChatroomList): @{
+                             TabbarVC           : @"NTESChatroomListViewController",
+                             TabbarTitle        : @"直播间",
+                             TabbarImage        : @"icon_chatroom_normal",
+                             TabbarSelectedImage: @"icon_chatroom_pressed",
+                             },
+                     @(NTESMainTabTypeSetting)     : @{
+                             TabbarVC           : @"NTESSettingViewController",
+                             TabbarTitle        : @"设置",
+                             TabbarImage        : @"icon_setting_normal",
+                             TabbarSelectedImage: @"icon_setting_pressed",
+                             TabbarItemBadgeValue: @(self.customSystemUnreadCount)
+                             }
+                     };
+
+    }
+    return _configs[@(type)];
+}
+
+
+
+
+
+@end

+ 39 - 0
NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationAnimator.h

@@ -0,0 +1,39 @@
+//
+//  NTESNavigationAnimator.h
+//  NIM
+//
+//  Created by chris on 16/1/31.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+typedef NS_ENUM(NSInteger, NTESNavigationAnimationType) {
+    NTESNavigationAnimationTypeNormal,
+    NTESNavigationAnimationTypeCross,
+};
+
+@class NTESNavigationAnimator;
+
+@protocol NTESNavigationAnimatorDelegate <NSObject>
+
+- (void)animationWillStart:(NTESNavigationAnimator *)animator;
+
+- (void)animationDidEnd:(NTESNavigationAnimator *)animator;
+
+@end
+
+
+@interface NTESNavigationAnimator : NSObject <UIViewControllerAnimatedTransitioning>
+
+@property (nonatomic,weak)   UINavigationController *navigationController;
+
+@property (nonatomic,assign) UINavigationControllerOperation currentOpearation;
+
+@property (nonatomic,assign) NTESNavigationAnimationType animationType;
+
+@property (nonatomic,weak) id<NTESNavigationAnimatorDelegate> delegate;
+
+- (instancetype)initWithNavigationController:(UINavigationController *)navigationController;
+
+@end

+ 149 - 0
NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationAnimator.m

@@ -0,0 +1,149 @@
+//
+//  NTESNavigationAnimator.m
+//  NIM
+//
+//  Created by chris on 16/1/31.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "NTESNavigationAnimator.h"
+#import "UIView+NTES.h"
+#import "NTESMainTabController.h"
+
+@implementation NTESNavigationAnimator
+
+- (instancetype)initWithNavigationController:(UINavigationController *)navigationController
+{
+    self = [super init];
+    if (self) {
+        _navigationController = navigationController;
+    }
+    return self;
+}
+
+- (NSTimeInterval)transitionDuration:(id <UIViewControllerContextTransitioning>)transitionContext
+{
+    return 0.35;
+}
+
+- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext
+{
+    
+    switch (self.currentOpearation) {
+        case UINavigationControllerOperationPop:
+            [self popAnimation:transitionContext];
+            break;
+        case UINavigationControllerOperationPush:
+            [self pushAnimation:transitionContext];
+            break;
+        default:
+            break;
+    }
+}
+
+
+- (void)pushAnimation:(id<UIViewControllerContextTransitioning>)transitionContext
+{
+    UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
+    UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
+    
+    UIView *containerView = [transitionContext containerView];
+    UINavigationController *navigationController = fromViewController.navigationController;
+    UITabBarController *tabbarController = fromViewController.tabBarController;
+    //使用xib可能会出现view的size不对的情况
+    CGRect frame = fromViewController.view.frame;
+    if ((toViewController.edgesForExtendedLayout & UIRectEdgeTop) == 0)
+    {
+        frame = CGRectOffset(navigationController.view.frame, 0, navigationController.navigationBar.bottom);
+    }
+    if ((toViewController.edgesForExtendedLayout & UIRectEdgeBottom) == 0) {
+        CGRect slice     = CGRectZero;
+        CGRect remainder = CGRectZero;
+        CGRectDivide(frame, &slice, &remainder, tabbarController.tabBar.height, CGRectMaxYEdge);
+        frame = remainder;
+    }
+    toViewController.view.frame = frame;
+    
+    [containerView addSubview:fromViewController.view];
+    [containerView addSubview:toViewController.view];
+    
+    
+    CGFloat width  = containerView.width;
+    toViewController.view.left = width;
+    
+    [self callAnimationWillStart];
+    CGFloat duration = [self transitionDuration:transitionContext];
+    
+    [UIView animateWithDuration:duration animations:^{
+        fromViewController.view.right = width * 0.5;
+        toViewController.view.right  = width;
+    } completion:^(BOOL finished) {
+        [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
+        [self callAnimationDidEnd];
+    }];
+}
+
+
+
+- (void)popAnimation:(id<UIViewControllerContextTransitioning>)transitionContext
+{
+    UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
+    UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
+    CGFloat snapshootHeight = [UIApplication sharedApplication].statusBarFrame.size.height + fromViewController.navigationController.navigationBar.height;
+    
+    UIView          *fakeBar = [fromViewController.navigationController.view
+                        resizableSnapshotViewFromRect:CGRectMake(0, 0,fromViewController.view.width, snapshootHeight) afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero];
+    UINavigationBar *tureBar = toViewController.navigationController.navigationBar;
+    
+    BOOL hidesBottomBar = toViewController.hidesBottomBarWhenPushed && self.navigationController.viewControllers.firstObject != toViewController;
+    
+    UITabBar *tabbar = [NTESMainTabController instance].tabBar;
+    UIView *containerView = [transitionContext containerView];
+    
+    [containerView addSubview:toViewController.view];
+    if (!hidesBottomBar) {
+        [containerView addSubview:tabbar];
+    }
+    if (self.animationType == NTESNavigationAnimationTypeCross) {
+        [containerView addSubview:tureBar];
+        [fromViewController.view addSubview:fakeBar];
+    }
+    [containerView addSubview:fromViewController.view];
+    
+    
+    CGFloat width  = containerView.width;
+    
+    toViewController.view.right = width * 0.5;
+    tabbar.right = width * 0.5;
+    
+    [self callAnimationWillStart];
+    CGFloat duration = [self transitionDuration:transitionContext];
+    [UIView animateWithDuration:duration animations:^{
+        fromViewController.view.left = width;
+        toViewController.view.right  = width;
+        tabbar.right = width;
+        fakeBar.alpha = 0.0;
+    } completion:^(BOOL finished) {
+        [[NTESMainTabController instance].view addSubview:tabbar];
+        [toViewController.navigationController.view addSubview:tureBar];
+        [fakeBar removeFromSuperview];
+        [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
+        [self callAnimationDidEnd];
+    }];
+}
+
+- (void)callAnimationWillStart
+{
+    if ([self.delegate respondsToSelector:@selector(animationWillStart:)]) {
+        [self.delegate animationWillStart:self];
+    }
+}
+
+- (void)callAnimationDidEnd
+{
+    if ([self.delegate respondsToSelector:@selector(animationDidEnd:)]) {
+        [self.delegate animationDidEnd:self];
+    }
+}
+
+@end

+ 17 - 0
NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationHandler.h

@@ -0,0 +1,17 @@
+//
+//  NTESNavigationHandler.h
+//  NIM
+//
+//  Created by chris on 16/1/28.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NTESNavigationHandler : NSObject<UINavigationControllerDelegate>
+
+@property (nonatomic,strong,readonly) UIPanGestureRecognizer *recognizer;
+
+- (instancetype)initWithNavigationController:(UINavigationController *)navigationController;
+
+@end

+ 184 - 0
NIMDemo/NIMDemo/Classes/Common/Delegate/NTESNavigationHandler.m

@@ -0,0 +1,184 @@
+//
+//  NTESNavigationHandler.m
+//  NIM
+//
+//  Created by chris on 16/1/28.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "NTESNavigationHandler.h"
+#import "UIView+NTES.h"
+#import "NTESMainTabController.h"
+#import "UIResponder+NTESFirstResponder.h"
+#import "NTESNavigationAnimator.h"
+
+@interface NTESNavigationHandler()<UIGestureRecognizerDelegate,NTESNavigationAnimatorDelegate>
+
+@property (nonatomic,strong) UIPercentDrivenInteractiveTransition* interaction;
+
+@property (nonatomic,weak)   UINavigationController *navigationController;
+
+@property (nonatomic,strong) NTESNavigationAnimator *animator;
+
+@property (nonatomic,assign) UINavigationControllerOperation currentOperation;
+
+@property (nonatomic,strong) CAGradientLayer *uiPopShadow;
+
+@property (nonatomic,assign) BOOL isAnimating;
+
+@end
+
+@implementation NTESNavigationHandler
+
+- (instancetype)initWithNavigationController:(UINavigationController *)navigationController
+{
+    self = [super init];
+    if (self) {
+        _recognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)];
+        _recognizer.delegate = self;
+        _recognizer.delaysTouchesBegan = NO;
+        [navigationController.view addGestureRecognizer:_recognizer];
+        _animator = [[NTESNavigationAnimator alloc] initWithNavigationController:navigationController];
+        _animator.delegate = self;
+        _navigationController = navigationController;
+        
+    }
+    return self;
+}
+
+- (void)pan:(UIPanGestureRecognizer*)recognizer
+{
+    UIView* view = recognizer.view;
+    switch (recognizer.state) {
+        case UIGestureRecognizerStateBegan:{
+            CGPoint location = [recognizer locationInView:view];
+            if (location.x <  CGRectGetMidX(view.bounds) && self.navigationController.viewControllers.count > 1) { // left half
+                self.interaction = [UIPercentDrivenInteractiveTransition new];
+                [self.navigationController popViewControllerAnimated:YES];
+            }
+        }
+            break;
+        case UIGestureRecognizerStateChanged:{
+            CGPoint translation = [recognizer translationInView:view];
+            CGFloat d = translation.x / view.width;
+            [self.interaction updateInteractiveTransition:d];
+        }
+            break;
+        case UIGestureRecognizerStateEnded:
+        case UIGestureRecognizerStateCancelled:{
+            if ([recognizer locationInView:view].x > view.width * .5f) {
+                [self.interaction finishInteractiveTransition];
+            } else {
+                [self.interaction cancelInteractiveTransition];
+            }
+            self.interaction = nil;
+        }
+            break;
+        default:
+            break;
+    }
+}
+
+#pragma mark - UINavigationControllerDelegate
+- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
+{
+
+}
+
+
+- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated
+{
+    
+}
+
+
+- (nullable id <UIViewControllerInteractiveTransitioning>)navigationController:(UINavigationController *)navigationController
+                                   interactionControllerForAnimationController:(id <UIViewControllerAnimatedTransitioning>) animationController
+{
+    return self.interaction;
+}
+
+
+- (nullable id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
+                                            animationControllerForOperation:(UINavigationControllerOperation)operation
+                                                         fromViewController:(UIViewController *)fromVC
+                                                           toViewController:(UIViewController *)toVC
+{
+    self.currentOperation = operation;
+    self.animator.currentOpearation = operation;
+    BOOL cross = [self isUseClearBar:fromVC] || [self isUseClearBar:toVC];
+    self.animator.animationType = cross ? NTESNavigationAnimationTypeCross : NTESNavigationAnimationTypeNormal;
+    
+    if (operation == UINavigationControllerOperationPop) {
+        [fromVC.view.layer addSublayer:self.uiPopShadow];
+    }
+    return self.animator;
+}
+
+#pragma mark - UIGestureRecognizerDelegate
+
+- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
+{
+    BOOL forbid = [self isForbidInteractivePop:self.navigationController.topViewController];
+    if (forbid || self.isAnimating) {
+        return NO;
+    }
+    UIView* view = gestureRecognizer.view;
+    CGPoint location = [gestureRecognizer locationInView:view];
+    return location.x < 44.f;
+}
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(nonnull UIGestureRecognizer *)otherGestureRecognizer
+{
+    return [otherGestureRecognizer.view.superview isKindOfClass:[UITableView class]];
+}
+
+
+
+#pragma mark - Get
+- (CAGradientLayer *)uiPopShadow
+{
+    if (!_uiPopShadow) {
+        _uiPopShadow = [CAGradientLayer layer];
+        _uiPopShadow.frame = CGRectMake(-6, 0, 6, [NTESMainTabController instance].view.frame.size.height);
+        _uiPopShadow.startPoint = CGPointMake(1.0, 0.5);
+        _uiPopShadow.endPoint = CGPointMake(0, 0.5);
+        _uiPopShadow.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.0 alpha:0.2f] CGColor], (id)[[UIColor clearColor] CGColor], nil];
+    }
+    return _uiPopShadow;
+}
+
+#pragma mark - NTESNavigationAnimatorDelegate
+- (void)animationWillStart:(NTESNavigationAnimator *)animator
+{
+    self.isAnimating = YES;
+}
+
+- (void)animationDidEnd:(NTESNavigationAnimator *)animator
+{
+    self.isAnimating = NO;
+}
+
+#pragma mark - Private
+- (BOOL)isUseClearBar:(UIViewController *)vc
+{
+    SEL  sel = NSSelectorFromString(@"useClearBar");
+    BOOL use = NO;
+    if ([vc respondsToSelector:sel]) {
+        SuppressPerformSelectorLeakWarning(use = (BOOL)[vc performSelector:sel]);
+    }
+    return use;
+}
+
+- (BOOL)isForbidInteractivePop:(UIViewController *)vc{
+    SEL  sel = NSSelectorFromString(@"forbidInteractivePop");
+    BOOL use = NO;
+    if ([vc respondsToSelector:sel]) {
+        SuppressPerformSelectorLeakWarning(use = (BOOL)[vc performSelector:sel]);
+    }
+    return use;
+}
+
+@end
+
+

+ 34 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESAvatarImageView.h

@@ -0,0 +1,34 @@
+//
+//  AvatarImageView.h
+//  NIMDemo
+//
+//  Created by chris on 15/2/10.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NTESAvatarImageView : UIControl
+
+@property (nonatomic,strong)    UIImage *image;
+
+@property (nonatomic,strong)    UIImage *hilghtedImage;
+
+@property (nonatomic,assign)    BOOL    clipPath;
+
+@end
+
+
+
+@interface NTESAvatarImageView(NIMDemo)
+
++ (instancetype)demoInstanceRecentSessionList;  //Demo最近会话头像
+
++ (instancetype)demoInstanceContactDataList;    //Demo通讯录头像
+
++ (instancetype)demoInstanceTeamCardHeader;    //Demo讨论组名片头像
+
++ (instancetype)demoInstanceTeamMember;        //Demo高级群名片头像
+
++ (instancetype)demoInstanceUserList;          //Demo用户列表
+@end

+ 163 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESAvatarImageView.m

@@ -0,0 +1,163 @@
+//
+//  AvatarImageView.m
+//  NIMDemo
+//
+//  Created by chris on 15/2/10.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "NTESAvatarImageView.h"
+#import "UIView+NTES.h"
+
+@interface NTESAvatarImageView()
+@property(nonatomic,strong) UIImage * defaultImage;
+@end
+
+@implementation NTESAvatarImageView
+
+- (id)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self)
+    {
+        self.backgroundColor = [UIColor clearColor];
+        self.layer.geometryFlipped = YES;
+        self.clipPath = YES;
+        self.defaultImage = [UIImage imageNamed:@"avatar_user"];
+    }
+    return self;
+}
+
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    if (self = [super initWithCoder:aDecoder])
+    {
+        self.backgroundColor = [UIColor clearColor];
+        self.layer.geometryFlipped = YES;
+        self.clipPath = YES;
+    }
+    return self;
+}
+
+
+- (void)setImage:(UIImage *)image
+{
+    image = image ? image : self.defaultImage;
+    if (_image != image)
+    {
+        _image = image;
+        [self setNeedsDisplay];
+    }
+}
+
+- (void)setHilghtedImage:(UIImage *)hilghtedImage{
+    if (_hilghtedImage != hilghtedImage) {
+        _hilghtedImage = hilghtedImage;
+        [self setNeedsDisplay];
+    }
+}
+
+
+- (CGPathRef)path
+{
+    return [[UIBezierPath bezierPathWithRoundedRect:self.bounds
+                                       cornerRadius:CGRectGetWidth(self.bounds) / 2] CGPath];
+}
+
+- (void)setHighlighted:(BOOL)highlighted{
+    [super setHighlighted:highlighted];
+    [self setNeedsDisplay];
+}
+
+- (void)setSelected:(BOOL)selected{
+    [super setSelected:selected];
+    [self setNeedsDisplay];
+}
+
+
+- (UIImage*)showImage{
+    UIImage *showImage = (self.state == UIControlStateHighlighted || self.state ==UIControlStateSelected) && self.hilghtedImage ? self.hilghtedImage : self.image;
+    return showImage;
+}
+
+#pragma mark Draw
+- (void)drawRect:(CGRect)rect
+{
+    if (!self.width || !self.height) {
+        return;
+    }
+    
+    CGContextRef context = UIGraphicsGetCurrentContext();
+    
+    CGContextSaveGState(context);
+    if (_clipPath)
+    {
+        CGContextAddPath(context, [self path]);
+        CGContextClip(context);
+    }
+    
+    UIImage * image  = self.showImage;
+    if (image && image.size.height && image.size.width)
+    {
+        //ScaleAspectFill模式
+        CGPoint center   = CGPointMake(self.width * .5f, self.height * .5f);
+        //哪个小按哪个缩
+        CGFloat scaleW   = image.size.width  / self.width;
+        CGFloat scaleH   = image.size.height / self.height;
+        CGFloat scale    = scaleW < scaleH ? scaleW : scaleH;
+        CGSize  size     = CGSizeMake(image.size.width / scale, image.size.height / scale);
+        CGRect  drawRect = CGRectWithCenterAndSize(center, size);
+        CGContextDrawImage(context, drawRect, self.showImage.CGImage);
+        
+    }
+    CGContextRestoreGState(context);
+}
+
+CGRect CGRectWithCenterAndSize(CGPoint center, CGSize size){
+    return CGRectMake(center.x - (size.width/2), center.y - (size.height/2), size.width, size.height);
+}
+
+
+@end
+
+
+
+
+@implementation NTESAvatarImageView (NIMDemo)
+
++ (instancetype)demoInstanceRecentSessionList{
+    return [NTESAvatarImageView demoInstance40x40];
+}
+
++ (instancetype)demoInstanceContactDataList{
+    return [NTESAvatarImageView demoInstance30x30];
+}
+
++ (instancetype)demoInstanceUserList{
+    return [NTESAvatarImageView demoInstance40x40];
+}
+
++ (instancetype)demoInstance40x40{
+    NTESAvatarImageView *avatarImageView = [[NTESAvatarImageView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
+    avatarImageView.image = [UIImage imageNamed:@"avatar_user.png"];
+    return avatarImageView;
+}
+
++ (instancetype)demoInstance30x30{
+    NTESAvatarImageView *avatarImageView = [[NTESAvatarImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
+    avatarImageView.image = [UIImage imageNamed:@"avatar_user.png"];
+    return avatarImageView;
+}
+
++ (instancetype)demoInstanceTeamCardHeader{
+    NTESAvatarImageView *avatarImageView = [[NTESAvatarImageView alloc] initWithFrame:CGRectMake(0, 0, 55, 55)];
+    return avatarImageView;
+}
+
++ (instancetype)demoInstanceTeamMember{
+    NTESAvatarImageView *avatarImageView = [[NTESAvatarImageView alloc] initWithFrame:CGRectMake(0, 0, 37, 37)];
+    return avatarImageView;
+}
+
+@end

+ 18 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESBadgeView.h

@@ -0,0 +1,18 @@
+//
+//  NTESBadgeView.h
+//  NIMDemo
+//
+//  Created by chris on 15/2/12.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NTESBadgeView : UIView
+
+@property (nonatomic, copy) NSString *badgeValue;
+
++ (instancetype)viewWithBadgeTip:(NSString *)badgeValue;
+
+
+@end

+ 165 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESBadgeView.m

@@ -0,0 +1,165 @@
+//
+//  NTESBadgeView.m
+//  NIMDemo
+//
+//  Created by chris on 15/2/12.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+
+#import "NTESBadgeView.h"
+#import "NSString+NTES.h"
+
+@interface NTESBadgeView ()
+
+@property (strong) UIColor *badgeBackgroundColor;
+
+@property (strong) UIColor *badgeTextColor;
+
+@property (nonatomic) UIFont *badgeTextFont;
+
+@property (nonatomic) CGFloat badgeTopPadding; //数字顶部到红圈的距离
+
+@property (nonatomic) CGFloat badgeLeftPadding; //数字左部到红圈的距离
+
+@property (nonatomic) CGFloat whiteCircleWidth; //最外层白圈的宽度
+
+@end
+
+@implementation NTESBadgeView
+
++ (instancetype)viewWithBadgeTip:(NSString *)badgeValue{
+    if (!badgeValue) {
+        badgeValue = @"";
+    }
+    NTESBadgeView *instance = [[NTESBadgeView alloc] init];
+    instance.frame = [instance frameWithStr:badgeValue];
+    instance.badgeValue = badgeValue;
+    
+    return instance;
+}
+
+- (id)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        self.backgroundColor  = [UIColor clearColor];
+        _badgeBackgroundColor = [UIColor redColor];
+        _badgeTextColor       = [UIColor whiteColor];
+        _badgeTextFont        = [UIFont boldSystemFontOfSize:12];
+        _whiteCircleWidth     = 2.f;
+    }
+    return self;
+}
+
+
+- (void)drawRect:(CGRect)rect
+{
+    CGContextRef context = UIGraphicsGetCurrentContext();
+    CGContextSaveGState(context);
+    if ([[self badgeValue] length]) {
+        [self drawWithContent:rect context:context];
+    }else{
+        [self drawWithOutContent:rect context:context];
+    }
+    CGContextRestoreGState(context);
+}
+
+- (void)setBadgeValue:(NSString *)badgeValue {
+    _badgeValue = badgeValue;
+    if (_badgeValue.integerValue > 9) {
+       _badgeLeftPadding     = 6.f;
+    }else{
+       _badgeLeftPadding     = 2.f;
+    }
+    _badgeTopPadding      = 2.f;
+
+    self.frame = [self frameWithStr:badgeValue];
+    
+    
+    [self setNeedsDisplay];
+}
+
+- (CGSize)badgeSizeWithStr:(NSString *)badgeValue{
+    if (!badgeValue || badgeValue.length == 0) {
+        return CGSizeZero;
+    }
+    CGSize size = [badgeValue sizeWithAttributes:@{NSFontAttributeName:self.badgeTextFont}];
+    if (size.width < size.height) {
+        size = CGSizeMake(size.height, size.height);
+    }
+    return size;
+}
+
+- (CGRect)frameWithStr:(NSString *)badgeValue{
+    CGSize badgeSize = [self badgeSizeWithStr:badgeValue];
+    CGRect badgeFrame = CGRectMake(self.frame.origin.x, self.frame.origin.y, badgeSize.width + self.badgeLeftPadding * 2 + self.whiteCircleWidth * 2, badgeSize.height + self.badgeTopPadding * 2 + self.whiteCircleWidth * 2);//8=2*2(红圈-文字)+2*2(白圈-红圈)
+    return badgeFrame;
+}
+
+
+
+#pragma mark - Private
+- (void)drawWithContent:(CGRect)rect context:(CGContextRef)context{
+    CGRect bodyFrame = self.bounds;
+    CGRect bkgFrame = CGRectInset(self.bounds, self.whiteCircleWidth, self.whiteCircleWidth);
+    CGRect badgeSize = CGRectInset(self.bounds, self.whiteCircleWidth + self.badgeLeftPadding, self.whiteCircleWidth + self.badgeTopPadding);
+    if ([self badgeBackgroundColor]) {//外白色描边
+        CGContextSetFillColorWithColor(context, [[UIColor whiteColor] CGColor]);
+        if ([self badgeValue].integerValue > 9) {
+            CGFloat circleWith = bodyFrame.size.height;
+            CGFloat totalWidth = bodyFrame.size.width;
+            CGFloat diffWidth = totalWidth - circleWith;
+            CGPoint originPoint = bodyFrame.origin;
+            CGRect leftCicleFrame = CGRectMake(originPoint.x, originPoint.y, circleWith, circleWith);
+            CGRect centerFrame = CGRectMake(originPoint.x +circleWith/2, originPoint.y, diffWidth, circleWith);
+            CGRect rightCicleFrame = CGRectMake(originPoint.x +(totalWidth - circleWith), originPoint.y, circleWith, circleWith);
+            CGContextFillEllipseInRect(context, leftCicleFrame);
+            CGContextFillRect(context, centerFrame);
+            CGContextFillEllipseInRect(context, rightCicleFrame);
+            
+        }else{
+            CGContextFillEllipseInRect(context, bodyFrame);
+        }
+        // badge背景色
+        CGContextSetFillColorWithColor(context, [[self badgeBackgroundColor] CGColor]);
+        if ([self badgeValue].integerValue > 9) {
+            CGFloat circleWith = bkgFrame.size.height;
+            CGFloat totalWidth = bkgFrame.size.width;
+            CGFloat diffWidth = totalWidth - circleWith;
+            CGPoint originPoint = bkgFrame.origin;
+            CGRect leftCicleFrame = CGRectMake(originPoint.x, originPoint.y, circleWith, circleWith);
+            CGRect centerFrame = CGRectMake(originPoint.x +circleWith/2, originPoint.y, diffWidth, circleWith);
+            CGRect rightCicleFrame = CGRectMake(originPoint.x +(totalWidth - circleWith), originPoint.y, circleWith, circleWith);
+            CGContextFillEllipseInRect(context, leftCicleFrame);
+            CGContextFillRect(context, centerFrame);
+            CGContextFillEllipseInRect(context, rightCicleFrame);
+        }else{
+            CGContextFillEllipseInRect(context, bkgFrame);
+        }
+    }
+    
+    CGContextSetFillColorWithColor(context, [[self badgeTextColor] CGColor]);
+    NSMutableParagraphStyle *badgeTextStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy];
+    [badgeTextStyle setLineBreakMode:NSLineBreakByWordWrapping];
+    [badgeTextStyle setAlignment:NSTextAlignmentCenter];
+    
+    
+    NSDictionary *badgeTextAttributes = @{
+                                          NSFontAttributeName: [self badgeTextFont],
+                                          NSForegroundColorAttributeName: [self badgeTextColor],
+                                          NSParagraphStyleAttributeName: badgeTextStyle,
+                                          };
+    [[self badgeValue] drawInRect:CGRectMake(self.whiteCircleWidth + self.badgeLeftPadding,
+                                             self.whiteCircleWidth + self.badgeTopPadding,
+                                             badgeSize.size.width, badgeSize.size.height)
+                   withAttributes:badgeTextAttributes];
+}
+
+
+- (void)drawWithOutContent:(CGRect)rect context:(CGContextRef)context{
+    CGRect bodyFrame = self.bounds;
+    CGContextSetFillColorWithColor(context, [[UIColor redColor] CGColor]);
+    CGContextFillEllipseInRect(context, bodyFrame);
+}
+
+@end

+ 15 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESFPSLabel.h

@@ -0,0 +1,15 @@
+//
+//  NTESFPSLabel.h
+//  NIM
+//
+//  Created by chris on 15/11/16.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NTESFPSLabel : UILabel
+
+- (void)invalidate;
+
+@end

+ 61 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESFPSLabel.m

@@ -0,0 +1,61 @@
+//
+//  NTESFPSLabel.m
+//  NIM
+//
+//  Created by chris on 15/11/16.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+ 
+#import "NTESFPSLabel.h"
+
+@implementation NTESFPSLabel{
+    CADisplayLink *_link;
+    NSUInteger _count;
+    NSTimeInterval _lastTime;
+    UIFont *_font;
+}
+
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    if (frame.size.width == 0 && frame.size.height == 0) {
+        frame.size = CGSizeMake(70, 20);
+    }
+    self = [super initWithFrame:frame];
+    
+    self.textAlignment = NSTextAlignmentCenter;
+    self.userInteractionEnabled = NO;
+    self.backgroundColor = [UIColor clearColor];
+    
+    _font = [UIFont fontWithName:@"Menlo" size:13];
+    _link = [CADisplayLink displayLinkWithTarget:self selector:@selector(tick:)];
+    [_link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
+    return self;
+}
+
+- (void)invalidate
+{
+    [_link invalidate];
+}
+
+- (CGSize)sizeThatFits:(CGSize)size {
+    return CGSizeMake(70, 20);;
+}
+
+- (void)tick:(CADisplayLink *)link {
+    if (_lastTime == 0) {
+        _lastTime = link.timestamp;
+        return;
+    }
+    
+    _count++;
+    NSTimeInterval delta = link.timestamp - _lastTime;
+    if (delta < 1) return;
+    _lastTime = link.timestamp;
+    float fps = _count / delta;
+    _count = 0;
+    
+    
+    self.text = [NSString stringWithFormat:@"%d FPS",(int)round(fps)];
+}
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESMarginButton.h

@@ -0,0 +1,13 @@
+//
+//  NTESMarginButton.h
+//  NIM
+//
+//  Created by amao on 4/14/15.
+//  Copyright (c) 2015 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NTESMarginButton : UIButton
+
+@end

+ 28 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESMarginButton.m

@@ -0,0 +1,28 @@
+//
+//  NTESMarginButton.m
+//  NIM
+//
+//  Created by amao on 4/14/15.
+//  Copyright (c) 2015 Netease. All rights reserved.
+//
+
+#import "NTESMarginButton.h"
+
+@implementation NTESMarginButton
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
+{
+    CGFloat margin = 20;
+    CGRect hitRect = CGRectMake(0 - margin, 0 - margin, self.bounds.size.width + 2 * margin, self.bounds.size.height + 2 * margin);
+    return CGRectContainsPoint(hitRect, point) ? self : nil;
+}
+
+@end

+ 44 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESPageView.h

@@ -0,0 +1,44 @@
+//
+//  NTESPageView.h
+//  NIM
+//
+//  Created by chris on 15/12/16.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@class NTESPageView;
+
+@protocol NTESPageViewDataSource <NSObject>
+- (NSInteger)numberOfPages: (NTESPageView *)pageView;
+- (UIView *)pageView: (NTESPageView *)pageView viewInPage: (NSInteger)index;
+@end
+
+@protocol NTESPageViewDelegate <NSObject>
+@optional
+- (void)pageViewScrollEnd: (NTESPageView *)pageView
+             currentIndex: (NSInteger)index
+               totolPages: (NSInteger)pages;
+
+- (void)pageViewDidScroll: (NTESPageView *)pageView;
+- (BOOL)needScrollAnimation;
+@end
+
+
+@interface NTESPageView : UIView<UIScrollViewDelegate>
+@property (nonatomic,strong)    UIScrollView   *scrollView;
+@property (nonatomic,weak)    id<NTESPageViewDataSource>  dataSource;
+@property (nonatomic,weak)    id<NTESPageViewDelegate>    pageViewDelegate;
+- (void)scrollToPage: (NSInteger)pages;
+- (void)reloadData;
+- (UIView *)viewAtIndex: (NSInteger)index;
+- (NSInteger)currentPage;
+
+
+//旋转相关方法,这两个方法必须配对调用,否则会有问题
+- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+                                duration:(NSTimeInterval)duration;
+
+- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+                                         duration:(NSTimeInterval)duration;
+@end

+ 327 - 0
NIMDemo/NIMDemo/Classes/Common/View/NTESPageView.m

@@ -0,0 +1,327 @@
+//
+//  NTESPageView.m
+//  NIM
+//
+//  Created by chris on 15/12/16.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import "NTESPageView.h"
+
+@interface NTESPageScrollView : UIScrollView
+
+@end
+
+@interface NTESPageView ()
+{
+    NSInteger   _currentPage;
+    NSInteger   _currentPageForRotation;
+}
+
+@property (nonatomic,strong)    NSMutableArray  *pages;
+
+- (void)setupControls;
+
+//重新载入的流程
+- (void)calculatePageNumbers;
+- (void)reloadPage;
+- (void)raisePageIndexChangedDelegate;
+@end
+
+@implementation NTESPageView
+
+- (id)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self)
+    {
+        [self setupControls];
+    }
+    return self;
+}
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    if (self = [super initWithCoder:aDecoder])
+    {
+        [self setupControls];
+    }
+    return self;
+}
+
+- (void)setFrame:(CGRect)frame{
+    CGFloat originalWidth = self.frame.size.width;
+    [super setFrame:frame];
+    if (originalWidth != frame.size.width) {
+        [self reloadData];
+    }
+}
+
+- (void)dealloc
+{
+    _scrollView.delegate = nil;
+}
+
+- (void)layoutSubviews
+{
+    [super layoutSubviews];
+    [_scrollView setFrame:self.bounds];
+    
+    CGSize size = self.bounds.size;
+    [self.scrollView setContentSize:CGSizeMake(size.width * [self.pages count], size.height)];
+    for (NSInteger i = 0; i < [self.pages count]; i++)
+    {
+        id obj = [self.pages objectAtIndex:i];
+        if ([obj isKindOfClass:[UIView class]])
+        {
+            [(UIView *)obj setFrame:CGRectMake(size.width * i, 0, size.width, size.height)];
+        }
+    }
+    
+    //CGSize size = self.bounds.size;
+    BOOL animation = NO;
+    if (self.pageViewDelegate && [self.pageViewDelegate respondsToSelector:@selector(needScrollAnimation)])
+    {
+        animation = [self.pageViewDelegate needScrollAnimation];
+    }
+    [self.scrollView scrollRectToVisible:CGRectMake(_currentPage * size.width, 0, size.width, size.height)
+                                animated:animation];
+    
+}
+
+- (void)setupControls
+{
+    if (_scrollView == nil)
+    {
+        _scrollView = [[NTESPageScrollView alloc]initWithFrame:self.bounds];
+        _scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+        [self addSubview:_scrollView];
+        _scrollView.pagingEnabled = YES;
+        _scrollView.showsVerticalScrollIndicator = NO;
+        _scrollView.showsHorizontalScrollIndicator = NO;
+        _scrollView.delegate = self;
+        _scrollView.scrollsToTop = NO;
+    }
+}
+
+#pragma mark - 对外接口
+- (void)scrollToPage: (NSInteger)page
+{
+    if (_currentPage != page || page == 0)
+    {
+        _currentPage = page;
+        [self reloadData];
+    }
+    
+}
+
+- (void)reloadData
+{
+    [self calculatePageNumbers];
+    [self reloadPage];
+}
+
+- (UIView *)viewAtIndex: (NSInteger)index
+{
+    UIView *view = nil;
+    if (index >= 0 && index < [_pages count])
+    {
+        id obj = [_pages objectAtIndex:index];
+        if ([obj isKindOfClass:[UIView class]])
+        {
+            view = obj;
+        }
+    }
+    return view;
+}
+
+- (NSInteger)currentPage
+{
+    return _currentPage;
+}
+
+- (NSInteger)pageInBound:(NSInteger)value min:(NSInteger)min max:(NSInteger)max{
+    if (max < min) {
+        max = min;
+    }
+    NSInteger bounded = value;
+    if (bounded > max) {
+        bounded = max;
+    }
+    if (bounded < min) {
+        bounded = min;
+    }
+    return bounded;
+}
+
+#pragma mark - Page载入和销毁
+- (void)loadPagesForCurrentPage:(NSInteger)currentPage
+{
+    NSUInteger count = [_pages count];
+    if (count == 0)
+    {
+        return;
+    }
+    NSInteger first = [self pageInBound:currentPage - 1 min:0 max:count - 1];
+    NSInteger last  = [self pageInBound:currentPage + 1 min:0 max:count - 1];
+    NSRange range = NSMakeRange(first, last - first + 1);
+    
+    for (NSUInteger index = 0; index < count; index++)
+    {
+        if (NSLocationInRange(index, range))
+        {
+            id obj = [_pages objectAtIndex:index];
+            if (![obj isKindOfClass:[UIView class]])
+            {
+                if (_dataSource && [_dataSource respondsToSelector:@selector(pageView:viewInPage:)])
+                {
+                    UIView *view = [_dataSource pageView:self viewInPage:index];
+                    [_pages replaceObjectAtIndex:index withObject:view];
+                    [self.scrollView addSubview:view];
+                    CGSize size = self.bounds.size;
+                    [view setFrame:CGRectMake(size.width * index, 0, size.width, size.height)];
+                }
+                else
+                {
+                    assert(0);
+                }
+            }
+            
+        }
+        else
+        {
+            id obj = [_pages objectAtIndex:index];
+            if ([obj isKindOfClass:[UIView class]])
+            {
+                [obj removeFromSuperview];
+                [_pages replaceObjectAtIndex:index withObject:[NSNull null]];
+            }
+        }
+    }
+}
+
+
+- (void)calculatePageNumbers
+{
+    NSInteger numberOfPages = 0;
+    for (id obj in _pages)
+    {
+        if ([obj isKindOfClass:[UIView class]])
+        {
+            [(UIView *)obj removeFromSuperview];
+        }
+    }
+    if(_dataSource && [_dataSource respondsToSelector:@selector(numberOfPages:)])
+    {
+        numberOfPages = [_dataSource numberOfPages:self];
+    }
+    self.pages = [NSMutableArray arrayWithCapacity:numberOfPages];
+    for (NSInteger i = 0; i < numberOfPages; i ++)
+    {
+        [_pages addObject:[NSNull null]];
+    }
+    //注意,这里设置delegate是因为计算contentsize的时候会引起scrollViewDidScroll执行,修改currentpage的值,这样在贴图(举个例子)前面的分类页数比后面的分类页数多,前面的分类滚动到最后面一页后,再显示后面的分类,会显示不正确
+    self.scrollView.delegate = nil;
+    CGSize size = self.bounds.size;
+    [self.scrollView setContentSize:CGSizeMake(size.width * numberOfPages, size.height)];
+    self.scrollView.delegate = self;
+}
+
+- (void)reloadPage
+{
+    //reload的时候尽量记住上次的位置
+    if (_currentPage >= [_pages count])
+    {
+        _currentPage = [_pages count] - 1;
+    }
+    if (_currentPage < 0)
+    {
+        _currentPage = 0;
+    }
+    
+    [self loadPagesForCurrentPage:_currentPage];
+    [self raisePageIndexChangedDelegate];
+    [self setNeedsLayout];
+}
+
+
+#pragma mark - ScrollView Delegate
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView
+{
+    CGFloat width = scrollView.bounds.size.width;
+    CGFloat offsetX = scrollView.contentOffset.x;
+    NSInteger page = (NSInteger)(fabs(offsetX / width));
+    if (page >= 0 && page < [_pages count])
+    {
+        if (_currentPage == page) {
+            return;
+        }
+        _currentPage = page;
+        [self loadPagesForCurrentPage:_currentPage];
+    }
+    
+    if (_pageViewDelegate && [_pageViewDelegate respondsToSelector:@selector(pageViewDidScroll:)])
+    {
+        [_pageViewDelegate pageViewDidScroll:self];
+    }
+}
+
+- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
+{
+    [self raisePageIndexChangedDelegate];
+}
+
+#pragma mark - 辅助方法
+- (void)raisePageIndexChangedDelegate
+{
+    if (_pageViewDelegate && [_pageViewDelegate respondsToSelector:@selector(pageViewScrollEnd:currentIndex:totolPages:)])
+    {
+        [_pageViewDelegate pageViewScrollEnd:self
+                                currentIndex:_currentPage
+                                  totolPages:[_pages count]];
+    }
+}
+
+- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+                                duration:(NSTimeInterval)duration
+{
+    _scrollView.delegate = nil;
+    _currentPageForRotation = _currentPage;
+}
+
+- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+                                         duration:(NSTimeInterval)duration
+{
+    CGSize size = self.bounds.size;
+    _scrollView.contentSize = CGSizeMake(size.width * [_pages count], size.height);
+    for (NSUInteger i = 0; i < [_pages count]; i++)
+    {
+        id obj = [_pages objectAtIndex:i];
+        if ([obj isKindOfClass:[UIView class]])
+        {
+            [(UIView *)obj setFrame:CGRectMake(size.width * i, 0, size.width, size.height)];
+            
+            /*
+             //这里有点ugly,先这样吧...
+             if ([obj respondsToSelector:@selector(reset)])
+             {
+             [obj performSelector:@selector(reset)];
+             }*/
+        }
+    }
+    _scrollView.contentOffset = CGPointMake(_currentPageForRotation * self.bounds.size.width, 0);
+    _scrollView.delegate = self;
+    
+}
+
+@end
+
+
+@implementation NTESPageScrollView
+//fix: swipe to delete in a UITableView which is embeded in a UIScrollView
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(nonnull UIGestureRecognizer *)otherGestureRecognizer
+{
+    return [otherGestureRecognizer.view.superview isKindOfClass:[UITableView class]];
+}
+
+@end

+ 14 - 0
NIMDemo/NIMDemo/Classes/LayoutConfig/NTESCellLayoutConfig.h

@@ -0,0 +1,14 @@
+//
+//  NTESCellLayoutConfig.h
+//  NIM
+//
+//  Created by amao on 2016/11/22.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "NIMKit.h"
+
+@interface NTESCellLayoutConfig : NIMCellLayoutConfig<NIMCellLayoutConfig>
+
+@end

+ 218 - 0
NIMDemo/NIMDemo/Classes/LayoutConfig/NTESCellLayoutConfig.m

@@ -0,0 +1,218 @@
+//
+//  NTESCellLayoutConfig.m
+//  NIM
+//
+//  Created by amao on 2016/11/22.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "NTESCellLayoutConfig.h"
+#import "NTESSessionCustomContentConfig.h"
+#import "NTESChatroomTextContentConfig.h"
+#import "NTESWhiteboardAttachment.h"
+
+@interface NTESCellLayoutConfig ()
+@property (nonatomic,strong)    NSArray    *types;
+@property (nonatomic,strong)    NTESSessionCustomContentConfig  *sessionCustomconfig;
+@property (nonatomic,strong)    NTESChatroomTextContentConfig   *chatroomTextConfig;
+@end
+
+@implementation NTESCellLayoutConfig
+
+- (instancetype)init
+{
+    if (self = [super init])
+    {
+        _types =  @[
+                   @"NTESJanKenPonAttachment",
+                   @"NTESSnapchatAttachment",
+                   @"NTESChartletAttachment",
+                   @"NTESWhiteboardAttachment"
+                   ];
+        _sessionCustomconfig = [[NTESSessionCustomContentConfig alloc] init];
+        _chatroomTextConfig = [[NTESChatroomTextContentConfig alloc] init];
+    }
+    return self;
+}
+
+#pragma mark - NIMCellLayoutConfig
+- (CGSize)contentSize:(NIMMessageModel *)model cellWidth:(CGFloat)width{
+    
+    NIMMessage *message = model.message;
+    //检查是不是当前支持的自定义消息类型
+    if ([self isSupportedCustomMessage:message]) {
+        return [_sessionCustomconfig contentSize:width message:message];
+    }
+
+    //检查是不是聊天室文本消息
+    if ([self isChatroomTextMessage:message]) {
+        return [_chatroomTextConfig contentSize:width message:message];
+    }
+    
+    //如果没有特殊需求,就走默认处理流程
+    return [super contentSize:model
+                    cellWidth:width];
+
+}
+
+- (NSString *)cellContent:(NIMMessageModel *)model{
+    
+    NIMMessage *message = model.message;
+    //检查是不是当前支持的自定义消息类型
+    if ([self isSupportedCustomMessage:message]) {
+        return [_sessionCustomconfig cellContent:message];
+    }
+    
+    //检查是不是聊天室文本消息
+    if ([self isChatroomTextMessage:message]) {
+        return [_chatroomTextConfig cellContent:message];
+    }
+    
+    //如果没有特殊需求,就走默认处理流程
+    return [super cellContent:model];
+}
+
+- (UIEdgeInsets)contentViewInsets:(NIMMessageModel *)model
+{
+    NIMMessage *message = model.message;
+    //检查是不是当前支持的自定义消息类型
+    if ([self isSupportedCustomMessage:message]) {
+        return [_sessionCustomconfig contentViewInsets:message];
+    }
+    
+    //检查是不是聊天室文本消息
+    if ([self isChatroomTextMessage:message]) {
+        return [_chatroomTextConfig contentViewInsets:message];
+    }
+    
+    //如果没有特殊需求,就走默认处理流程
+    return [super contentViewInsets:model];
+}
+
+- (UIEdgeInsets)cellInsets:(NIMMessageModel *)model
+{
+    NIMMessage *message = model.message;
+    
+    //检查是不是聊天室消息
+    if (message.session.sessionType == NIMSessionTypeChatroom) {
+        return UIEdgeInsetsZero;
+    }
+    
+    //如果没有特殊需求,就走默认处理流程
+    return [super cellInsets:model];
+}
+
+
+
+
+- (BOOL)shouldShowAvatar:(NIMMessageModel *)model
+{
+    if ([self isSupportedChatroomMessage:model.message]) {
+        return NO;
+    }
+    if ([self isWhiteboardCloseNotificationMessage:model.message]){
+        return NO;
+    }
+    return [super shouldShowAvatar:model];
+}
+
+- (BOOL)shouldShowLeft:(NIMMessageModel *)model{
+    if ([self isSupportedChatroomMessage:model.message]) {
+        return YES;
+    }
+    return [super shouldShowLeft:model];
+}
+
+
+- (BOOL)shouldShowNickName:(NIMMessageModel *)model{
+    if ([self isSupportedChatroomMessage:model.message]) {
+        return YES;
+    }
+    return [super shouldShowNickName:model];
+}
+
+- (CGFloat)nickNameMargin:(NIMMessageModel *)model{
+
+    if ([self isSupportedChatroomMessage:model.message]) {
+        NSDictionary *ext = model.message.remoteExt;
+        NIMChatroomMemberType type = [ext[@"type"] integerValue];
+        switch (type) {
+            case NIMChatroomMemberTypeManager:
+            case NIMChatroomMemberTypeCreator:
+                return 50.f;
+            default:
+                break;
+        }
+        return 15.f;
+
+    }
+    return [super nickNameMargin:model];
+}
+
+- (NSArray *)customViews:(NIMMessageModel *)model
+{
+    if ([self isSupportedChatroomMessage:model.message]) {
+        NSDictionary *ext = model.message.remoteExt;
+        NIMChatroomMemberType type = [ext[@"type"] integerValue];
+        NSString *imageName;
+        switch (type) {
+            case NIMChatroomMemberTypeManager:
+                imageName = @"chatroom_role_manager";
+                break;
+            case NIMChatroomMemberTypeCreator:
+                imageName = @"chatroom_role_master";
+                break;
+            default:
+                break;
+        }
+        UIImageView *imageView;
+        if (imageName.length) {
+            UIImage *image = [UIImage imageNamed:imageName];
+            imageView = [[UIImageView alloc] initWithImage:image];
+            CGFloat leftMargin = 15.f;
+            CGFloat topMatgin  = 0.f;
+            CGRect frame = imageView.frame;
+            frame.origin = CGPointMake(leftMargin, topMatgin);
+            imageView.frame = frame;
+        }
+        return imageView ? @[imageView] : nil;
+    }
+    return [super customViews:model];
+}
+
+
+
+#pragma mark - misc
+- (BOOL)isSupportedCustomMessage:(NIMMessage *)message
+{
+    NIMCustomObject *object = message.messageObject;
+    return [object isKindOfClass:[NIMCustomObject class]] &&
+    [_types indexOfObject:NSStringFromClass([object.attachment class])] != NSNotFound;
+    
+}
+
+
+- (BOOL)isSupportedChatroomMessage:(NIMMessage *)message
+{
+    return message.session.sessionType == NIMSessionTypeChatroom &&
+    (message.messageType == NIMMessageTypeText || [self isSupportedCustomMessage:message]);
+}
+
+- (BOOL)isChatroomTextMessage:(NIMMessage *)message
+{
+    return message.session.sessionType == NIMSessionTypeChatroom &&
+    message.messageObject == NIMMessageTypeText;
+}
+
+
+- (BOOL)isWhiteboardCloseNotificationMessage:(NIMMessage *)message
+{
+    if (message.messageType == NIMMessageTypeCustom) {
+        NIMCustomObject *object = message.messageObject;
+        if ([object.attachment isKindOfClass:[NTESWhiteboardAttachment class]]) {
+            return [(NTESWhiteboardAttachment *)object.attachment flag] == CustomWhiteboardFlagClose;
+        }
+    }
+    return NO;
+}
+@end

+ 14 - 0
NIMDemo/NIMDemo/Classes/LayoutConfig/NTESChatroomTextContentConfig.h

@@ -0,0 +1,14 @@
+//
+//  NTESChatroomTextContentConfig.h
+//  NIM
+//
+//  Created by chris on 16/1/13.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "NIMBaseSessionContentConfig.h"
+
+@interface NTESChatroomTextContentConfig : NSObject<NIMSessionContentConfig>
+
+
+@end

+ 59 - 0
NIMDemo/NIMDemo/Classes/LayoutConfig/NTESChatroomTextContentConfig.m

@@ -0,0 +1,59 @@
+//
+//  NTESChatroomTextContentConfig.m
+//  NIM
+//
+//  Created by chris on 16/1/13.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "NTESChatroomTextContentConfig.h"
+#import "M80AttributedLabel+NIMKit.h"
+#import "NIMGlobalMacro.h"
+
+@interface NTESChatroomTextContentConfig()
+
+@property (nonatomic, strong) M80AttributedLabel *label;
+
+@end
+
+@implementation NTESChatroomTextContentConfig
+
+- (instancetype)init{
+    self = [super init];
+    if (self) {
+
+    }
+    return self;
+}
+
+- (CGSize)contentSize:(CGFloat)cellWidth message:(NIMMessage *)message
+{
+    NSString *text = message.text;
+    [self.label nim_setText:text];
+    CGFloat msgBubbleMaxWidth    = (cellWidth - 130);
+    CGFloat bubbleLeftToContent  = 15;
+    CGFloat contentRightToBubble = 0;
+    CGFloat msgContentMaxWidth = (msgBubbleMaxWidth - contentRightToBubble - bubbleLeftToContent);
+    return [self.label sizeThatFits:CGSizeMake(msgContentMaxWidth, CGFLOAT_MAX)];
+}
+
+- (NSString *)cellContent:(NIMMessage *)message
+{
+    return @"NTESChatroomTextContentView";
+}
+
+- (UIEdgeInsets)contentViewInsets:(NIMMessage *)message
+{
+    return UIEdgeInsetsMake(20,15,10,0);
+}
+
+- (M80AttributedLabel *)label
+{
+    if (!_label) {
+        _label = [[M80AttributedLabel alloc] initWithFrame:CGRectZero];
+        _label.font = [UIFont systemFontOfSize:Chatroom_Message_Font_Size];
+    }
+    return _label;
+}
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/LayoutConfig/NTESSessionCustomContentConfig.h

@@ -0,0 +1,13 @@
+//
+//  NTESSessionCustomContentConfig.h
+//  NIM
+//
+//  Created by chris on 16/1/14.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "NIMBaseSessionContentConfig.h"
+
+@interface NTESSessionCustomContentConfig : NSObject<NIMSessionContentConfig>
+
+@end

+ 43 - 0
NIMDemo/NIMDemo/Classes/LayoutConfig/NTESSessionCustomContentConfig.m

@@ -0,0 +1,43 @@
+//
+//  NTESSessionCustomContentConfig.m
+//  NIM
+//
+//  Created by chris on 16/1/14.
+//  Copyright © 2016年 Netease. All rights reserved.
+//
+
+#import "NTESSessionCustomContentConfig.h"
+#import "NTESCustomAttachmentDefines.h"
+
+@interface NTESSessionCustomContentConfig()
+
+@end
+
+@implementation NTESSessionCustomContentConfig
+
+- (CGSize)contentSize:(CGFloat)cellWidth message:(NIMMessage *)message
+{
+    NIMCustomObject *object = message.messageObject;
+    NSAssert([object isKindOfClass:[NIMCustomObject class]], @"message must be custom");
+    id<NTESCustomAttachmentInfo> info = (id<NTESCustomAttachmentInfo>)object.attachment;
+    return [info contentSize:message cellWidth:cellWidth];
+}
+
+- (NSString *)cellContent:(NIMMessage *)message
+{
+    NIMCustomObject *object = message.messageObject;
+    NSAssert([object isKindOfClass:[NIMCustomObject class]], @"message must be custom");
+    id<NTESCustomAttachmentInfo> info = (id<NTESCustomAttachmentInfo>)object.attachment;
+    return [info cellContent:message];
+}
+
+- (UIEdgeInsets)contentViewInsets:(NIMMessage *)message
+{
+    NIMCustomObject *object = message.messageObject;
+    NSAssert([object isKindOfClass:[NIMCustomObject class]], @"message must be custom");
+    id<NTESCustomAttachmentInfo> info = (id<NTESCustomAttachmentInfo>)object.attachment;
+    return [info contentViewInsets:message];
+}
+
+
+@end

+ 14 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESCardPortraitCell.h

@@ -0,0 +1,14 @@
+//
+//  NTESCardPortraitCell.h
+//  NIM
+//
+//  Created by chris on 15/9/28.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "NIMCommonTableViewCell.h"
+
+@interface NTESCardPortraitCell : UITableViewCell<NIMCommonTableViewCell>
+
+@end

+ 117 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESCardPortraitCell.m

@@ -0,0 +1,117 @@
+//
+//  NTESCardPortraitCell.m
+//  NIM
+//
+//  Created by chris on 15/9/28.
+//  Copyright © 2015年 Netease. All rights reserved.
+//
+
+#import "NTESCardPortraitCell.h"
+#import "NIMAvatarImageView.h"
+#import "NIMCommonTableData.h"
+#import "UIView+NTES.h"
+#import "NTESSessionUtil.h"
+
+
+@interface NTESCardPortraitCell()
+
+@property (nonatomic,strong) NIMAvatarImageView *avatar;
+
+@property (nonatomic,strong) UILabel *nameLabel;
+
+@property (nonatomic,strong) UILabel *nickNameLabel;
+
+@property (nonatomic,strong) UILabel *accountLabel;
+
+@property (nonatomic,strong) UIImageView *genderIcon;
+
+@end
+
+@implementation NTESCardPortraitCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        CGFloat avatarWidth = 55.f;
+        _avatar = [[NIMAvatarImageView alloc] initWithFrame:CGRectMake(0, 0, avatarWidth, avatarWidth)];
+        [self addSubview:_avatar];
+        _nameLabel      = [[UILabel alloc] initWithFrame:CGRectZero];
+        _nameLabel.font = [UIFont systemFontOfSize:18.f];
+        [self addSubview:_nameLabel];
+        _nickNameLabel  = [[UILabel alloc] initWithFrame:CGRectZero];
+        _nickNameLabel.font = [UIFont systemFontOfSize:13.f];
+        _nickNameLabel.textColor = [UIColor grayColor];
+        [self addSubview:_nickNameLabel];
+        _accountLabel   = [[UILabel alloc] initWithFrame:CGRectZero];
+        _accountLabel.font = [UIFont systemFontOfSize:13.f];
+        _accountLabel.textColor = [UIColor grayColor];
+        [self addSubview:_accountLabel];
+        _genderIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 14, 14)];
+        [self addSubview:_genderIcon];
+    }
+    return self;
+}
+
+- (void)refreshData:(NIMCommonTableRow *)rowData tableView:(UITableView *)tableView{
+    self.textLabel.text       = rowData.title;
+    self.detailTextLabel.text = rowData.detailTitle;
+    NSString *uid = rowData.extraInfo;
+    if ([uid isKindOfClass:[NSString class]]) {
+        NIMUser *user = [[NIMSDK sharedSDK].userManager userInfo:uid];
+        NIMKitInfo *info = [[NIMKit sharedKit] infoByUser:uid option:nil];
+        self.nameLabel.text   = info.showName ;
+        self.accountLabel.text = [NSString stringWithFormat:@"帐号:%@",uid];
+        [self.accountLabel sizeToFit];
+        [self.avatar nim_setImageWithURL:[NSURL URLWithString:info.avatarUrlString] placeholderImage:info.avatarImage options:SDWebImageRetryFailed];
+        if (user.userInfo.gender == NIMUserGenderMale) {
+            _genderIcon.image = [UIImage imageNamed:@"icon_gender_male"];
+            _genderIcon.hidden = NO;
+        }
+        else if(user.userInfo.gender == NIMUserGenderFemale) {
+            _genderIcon.image = [UIImage imageNamed:@"icon_gender_female"];
+            _genderIcon.hidden = NO;
+        }
+        else {
+            _genderIcon.hidden = YES;
+        }
+        NSString *nickName  = user.userInfo.nickName ? user.userInfo.nickName : @"";
+        _nickNameLabel.hidden = !user.alias.length;
+        _nickNameLabel.text = [NSString stringWithFormat:@"昵称:%@",nickName];
+        [_nickNameLabel sizeToFit];
+    }
+}
+
+
+#define AvatarLeft 30
+#define TitleAndAvatarSpacing 12
+#define TitleTop 22
+#define AccountBottom 22
+#define GenderIconAndTitleSpacing 12
+
+- (void)layoutSubviews{
+    [super layoutSubviews];
+    self.avatar.left    = AvatarLeft;
+    self.avatar.centerY = self.height * .5f;
+    
+    CGFloat scale = self.width / 320;
+    CGFloat maxTextLabelWidth = 180 * scale;
+    [self.nameLabel sizeToFit];
+    self.nameLabel.width = MIN(self.nameLabel.width, maxTextLabelWidth);
+    self.nameLabel.left = self.avatar.right + TitleAndAvatarSpacing;
+    self.nameLabel.top  = TitleTop;
+    
+    if (self.nickNameLabel.hidden) {
+        self.accountLabel.left    = self.nameLabel.left;
+        self.accountLabel.bottom  = self.height - AccountBottom;
+    }else{
+        self.nickNameLabel.left    = self.nameLabel.left;
+        self.nickNameLabel.bottom  = self.height - AccountBottom;
+        self.accountLabel.left     = self.nameLabel.left;
+        self.accountLabel.centerY  = (self.nickNameLabel.top + self.nameLabel.bottom) * .5f;
+    }
+
+    self.genderIcon.left    = self.nameLabel.right + GenderIconAndTitleSpacing;
+    self.genderIcon.centerY = self.nameLabel.centerY;
+}
+
+@end

+ 31 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESColorButtonCell.h

@@ -0,0 +1,31 @@
+//
+//  NTESColorButtonCell.h
+//  NIM
+//
+//  Created by chris on 15/3/11.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "NIMCommonTableViewCell.h"
+
+typedef NS_ENUM(NSInteger, ColorButtonCellStyle){
+    ColorButtonCellStyleRed,
+    ColorButtonCellStyleBlue,
+};
+
+@class NTESColorButton;
+
+@interface NTESColorButtonCell : UITableViewCell<NIMCommonTableViewCell>
+
+@property (nonatomic,strong) NTESColorButton *button;
+
+@end
+
+
+
+@interface NTESColorButton : UIButton
+
+@property (nonatomic,assign) ColorButtonCellStyle style;
+
+@end

+ 110 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/View/NTESColorButtonCell.m

@@ -0,0 +1,110 @@
+//
+//  NTESColorButtonCell.m
+//  NIM
+//
+//  Created by chris on 15/3/11.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "NTESColorButtonCell.h"
+#import "UIView+NTES.h"
+#import "NIMCommonTableData.h"
+
+@interface NTESColorButtonCell()
+
+@property (nonatomic,strong) NIMCommonTableRow *rowData;
+
+@end
+
+@implementation NTESColorButtonCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        self.backgroundColor = [UIColor clearColor];
+        _button = [[NTESColorButton alloc] initWithFrame:CGRectZero];
+        _button.size = [_button sizeThatFits:CGSizeMake(self.width, CGFLOAT_MAX)];
+        _button.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+        [self addSubview:_button];
+    }
+    return self;
+}
+
+- (void)refreshData:(NIMCommonTableRow *)rowData tableView:(UITableView *)tableView{
+    self.rowData = rowData;
+    [self.button setTitle:rowData.title forState:UIControlStateNormal];
+    ColorButtonCellStyle style = [rowData.extraInfo integerValue];
+    self.button.style = style;
+    [self.button removeTarget:tableView.viewController action:NULL forControlEvents:UIControlEventTouchUpInside];
+    if (rowData.cellActionName.length) {
+        SEL action = NSSelectorFromString(rowData.cellActionName);
+        [_button addTarget:tableView.viewController action:action forControlEvents:UIControlEventTouchUpInside];
+    }
+}
+
+- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
+    if (self.rowData.cellActionName.length) {
+        return [super hitTest:point withEvent:event];
+    }
+    return self;
+}
+
+- (void)layoutSubviews{
+    [super layoutSubviews];
+    _button.centerX = self.width * .5f;
+    _button.centerY = self.height * .5f;
+}
+
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated{
+    [_button setSelected:selected];
+}
+
+- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
+    [_button setHighlighted:highlighted];
+}
+
+@end
+
+
+@implementation NTESColorButton : UIButton
+
+- (instancetype)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self reset];
+    }
+    return self;
+}
+
+- (void)setStyle:(ColorButtonCellStyle)style{
+    _style = style;
+    [self reset];
+}
+
+- (void)reset{
+    NSString *imageNormalName = @"";
+    NSString *imageHighLightName  = @"";
+    switch (self.style) {
+        case ColorButtonCellStyleRed:
+            imageNormalName = @"icon_cell_red_normal";
+            imageHighLightName  = @"icon_cell_red_pressed";
+            break;
+        case ColorButtonCellStyleBlue:
+            imageNormalName = @"icon_cell_blue_normal";
+            imageHighLightName  = @"icon_cell_blue_pressed";
+            break;
+        default:
+            break;
+    }
+    UIImage *imageNormal = [[UIImage imageNamed:imageNormalName] resizableImageWithCapInsets:UIEdgeInsetsMake(10, 10, 10, 10) resizingMode:UIImageResizingModeStretch];
+    UIImage *imageHighLight = [[UIImage imageNamed:imageHighLightName] resizableImageWithCapInsets:UIEdgeInsetsMake(10, 10, 10, 10) resizingMode:UIImageResizingModeStretch];
+    [self setBackgroundImage:imageNormal forState:UIControlStateNormal];
+    [self setBackgroundImage:imageHighLight forState:UIControlStateHighlighted];
+}
+
+- (CGSize)sizeThatFits:(CGSize)size{
+    return CGSizeMake(size.width - 20, 45);
+}
+
+@end

+ 15 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESJionTeamViewController.h

@@ -0,0 +1,15 @@
+//
+//  NTESJionTeamViewController.h
+//  NIM
+//
+//  Created by Xuhui on 15/3/19.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NTESJionTeamViewController : UIViewController
+
+@property (nonatomic, strong) NIMTeam *joinTeam;
+
+@end

+ 86 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESJionTeamViewController.m

@@ -0,0 +1,86 @@
+//
+//  NTESJionTeamViewController.m
+//  NIM
+//
+//  Created by Xuhui on 15/3/19.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "NTESJionTeamViewController.h"
+#import "SVProgressHUD.h"
+#import "UIView+Toast.h"
+#import "NTESSessionViewController.h"
+#import "UIAlertView+NTESBlock.h"
+
+@interface NTESJionTeamViewController ()
+@property (strong, nonatomic) IBOutlet UIImageView *imageView;
+@property (strong, nonatomic) IBOutlet UILabel *teamNameLabel;
+@property (strong, nonatomic) IBOutlet UIButton *jionTeamBtn;
+@property (strong, nonatomic) IBOutlet UILabel *teamIdLabel;
+
+@end
+
+@implementation NTESJionTeamViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view from its nib.
+    self.navigationItem.title = @"加入群组";
+    self.teamNameLabel.text = self.joinTeam.teamName;
+    self.teamIdLabel.text = [NSString stringWithFormat:@"群号:%@", self.joinTeam.teamId];
+    if(self.joinTeam.joinMode == NIMTeamJoinModeRejectAll) {
+        [self.jionTeamBtn setTitle:@"该群无法申请加入" forState:UIControlStateNormal];
+        self.jionTeamBtn.userInteractionEnabled = NO;
+    }
+}
+
+- (IBAction)onJionTeamBtnClick:(id)sender {
+    __weak typeof(self) wself = self;
+    if(self.joinTeam.joinMode == NIMTeamJoinModeNoAuth) {
+        [self joinTeam:self.joinTeam.teamId withMessage:@""];
+    } else {
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"输入验证信息" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
+        alert.alertViewStyle = UIAlertViewStylePlainTextInput;
+        [alert showAlertWithCompletionHandler:^(NSInteger index) {
+            NSString *message = [alert textFieldAtIndex:0].text ? : @"";
+            [wself joinTeam:wself.joinTeam.teamId withMessage:message];
+        }];
+    }
+    
+}
+
+- (void)joinTeam:(NSString *)teamId withMessage:(NSString *)message {
+    [SVProgressHUD show];
+    
+    [[NIMSDK sharedSDK].teamManager applyToTeam:self.joinTeam.teamId message:message completion:^(NSError *error,NIMTeamApplyStatus applyStatus) {
+        [SVProgressHUD dismiss];
+        if (!error) {
+            switch (applyStatus) {
+                case NIMTeamApplyStatusAlreadyInTeam:{
+                    NIMSession *session = [NIMSession session:self.joinTeam.teamId type:NIMSessionTypeTeam];
+                    NTESSessionViewController * vc = [[NTESSessionViewController alloc] initWithSession:session];
+                    [self.navigationController pushViewController:vc animated:YES];
+                    break;
+                }
+                case NIMTeamApplyStatusWaitForPass:
+                    [self.view makeToast:@"申请成功,等待验证" duration:2.0 position:CSToastPositionCenter];
+                default:
+                    break;
+            }
+        }else{
+            DDLogDebug(@"Jion team failed: %@", error.localizedDescription);
+            switch (error.code) {
+                case NIMRemoteErrorCodeTeamAlreadyIn:
+                    [self.view makeToast:@"已经在群里" duration:2.0 position:CSToastPositionCenter];
+                    break;
+                default:
+                    [self.view makeToast:@"群申请失败" duration:2.0 position:CSToastPositionCenter];
+                    break;
+            }
+        }
+        DDLogDebug(@"Jion team status: %zd", applyStatus);
+    }];
+
+}
+
+@end

+ 62 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESJionTeamViewController.xib

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NTESJionTeamViewController">
+            <connections>
+                <outlet property="imageView" destination="Z3H-L8-FB3" id="EDI-he-FVa"/>
+                <outlet property="jionTeamBtn" destination="eZV-LA-DJB" id="sJL-3I-rVb"/>
+                <outlet property="teamIdLabel" destination="VYu-pZ-RXs" id="nsd-ll-Jgs"/>
+                <outlet property="teamNameLabel" destination="tRI-15-kCr" id="D8d-Hn-bp5"/>
+                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="范冰冰粉丝群" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tRI-15-kCr">
+                    <rect key="frame" x="0.0" y="170" width="320" height="17"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="VYu-pZ-RXs">
+                    <rect key="frame" x="0.0" y="197" width="320" height="13"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                    <color key="textColor" red="0.6705882352941176" green="0.6705882352941176" blue="0.6705882352941176" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar_team.png" id="Z3H-L8-FB3">
+                    <rect key="frame" x="140" y="106" width="49" height="49"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                </imageView>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="eZV-LA-DJB">
+                    <rect key="frame" x="8" y="265" width="305" height="45"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    <fontDescription key="fontDescription" type="system" pointSize="19"/>
+                    <state key="normal" title="申请加入" backgroundImage="icon_cell_red_normal.png">
+                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                    </state>
+                    <connections>
+                        <action selector="onJionTeamBtnClick:" destination="-1" eventType="touchUpInside" id="ryP-9H-fMB"/>
+                    </connections>
+                </button>
+            </subviews>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+            <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
+            <point key="canvasLocation" x="271" y="254"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="avatar_team.png" width="50" height="50"/>
+        <image name="icon_cell_red_normal.png" width="304" height="45"/>
+    </resources>
+</document>

+ 19 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESPersonalCardViewController.h

@@ -0,0 +1,19 @@
+//
+//  NTESPersonalCardViewController.h
+//  NIM
+//
+//  Created by chris on 15/8/18.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class ContactDataMember;
+
+@interface NTESPersonalCardViewController : UIViewController
+
+- (instancetype)initWithUserId:(NSString *)userId;
+
+@property (nonatomic, strong) UITableView *tableView;
+
+@end

+ 365 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESPersonalCardViewController.m

@@ -0,0 +1,365 @@
+//
+//  NTESPersonCardViewController.m
+//  NIM
+//
+//  Created by chris on 15/8/18.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "NTESPersonalCardViewController.h"
+#import "NIMCommonTableDelegate.h"
+#import "NIMCommonTableData.h"
+#import "UIView+Toast.h"
+#import "SVProgressHUD.h"
+#import "NTESColorButtonCell.h"
+#import "UIView+NTES.h"
+#import "NTESSessionViewController.h"
+#import "NTESBundleSetting.h"
+#import "UIAlertView+NTESBlock.h"
+#import "NTESUserUtil.h"
+#import "NTESUserInfoSettingViewController.h"
+#import "NTESAliasSettingViewController.h"
+
+@interface NTESPersonalCardViewController ()<NIMUserManagerDelegate>
+
+@property (nonatomic,strong) NIMCommonTableDelegate *delegator;
+
+@property (nonatomic,copy  ) NSArray                 *data;
+
+@property (nonatomic,copy  ) NSString                *userId;
+
+@property (nonatomic,strong) NIMUser                 *user;
+
+@property (nonatomic,strong) UILongPressGestureRecognizer *longPressGesture;
+
+@end
+
+@implementation NTESPersonalCardViewController
+
+- (instancetype)initWithUserId:(NSString *)userId{
+    self = [super initWithNibName:nil bundle:nil];
+    if (self) {
+        _userId = userId;
+    }
+    return self;
+}
+
+- (void)dealloc{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    [[NIMSDK sharedSDK].userManager removeDelegate:self];
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self setUpNav];
+    
+    [[NIMSDK sharedSDK].userManager addDelegate:self];
+    
+
+    __weak typeof(self) wself = self;
+    self.delegator = [[NIMCommonTableDelegate alloc] initWithTableData:^NSArray *{
+        return wself.data;
+    }];
+    self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
+    self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+    [self.view addSubview:self.tableView];
+    self.tableView.backgroundColor = UIColorFromRGB(0xe3e6ea);
+    self.tableView.separatorStyle  = UITableViewCellSeparatorStyleNone;
+    self.tableView.delegate   = self.delegator;
+    self.tableView.dataSource = self.delegator;
+    [self refresh];
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    self.longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onLongPressNavbar:)];
+    [self.navigationController.navigationBar addGestureRecognizer:self.longPressGesture];
+}
+
+- (void)viewWillDisappear:(BOOL)animated{
+    [super viewWillDisappear:animated];
+    [self.navigationController.navigationBar removeGestureRecognizer:self.longPressGesture];
+}
+
+- (void)setUpNav{
+    self.navigationItem.title = @"个人名片";
+    if ([self.userId isEqualToString:[[NIMSDK sharedSDK].loginManager currentAccount]]) {
+        self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"编辑" style:UIBarButtonItemStyleDone target:self action:@selector(onActionEditMyInfo:)];
+        self.navigationItem.rightBarButtonItem.tintColor = [UIColor blackColor];
+    }
+}
+
+- (void)refresh{
+    self.user = [[NIMSDK sharedSDK].userManager userInfo:self.userId];
+    [self buildData];
+    [self.tableView reloadData];
+}
+
+
+- (void)buildData{
+    BOOL isMe          = [self.userId isEqualToString:[NIMSDK sharedSDK].loginManager.currentAccount];
+    BOOL isMyFriend    = [[NIMSDK sharedSDK].userManager isMyFriend:self.userId];
+    BOOL isInBlackList = [[NIMSDK sharedSDK].userManager isUserInBlackList:self.userId];
+    BOOL needNotify    = [[NIMSDK sharedSDK].userManager notifyForNewMsg:self.userId];
+    NSArray *data = @[
+                        @{
+                          HeaderTitle:@"",
+                          RowContent :@[
+                                           @{
+                                              ExtraInfo     : self.userId.length ? self.user.userId : [NSNull null],
+                                              CellClass     : @"NTESCardPortraitCell",
+                                              RowHeight     : @(100),
+                                            },
+                                       ],
+                          FooterTitle:@""
+                          },
+                        @{
+                            HeaderTitle:@"",
+                            RowContent :@[
+                                           @{
+                                                Title        : @"备注名",
+                                                DetailTitle  : self.user.alias.length ? self.user.alias : @"",
+                                                CellAction   : @"onActionEditAlias:",
+                                                ShowAccessory: @(YES),
+                                                Disable      : @(!isMyFriend),
+                                            },
+                                            @{
+                                                Title        : @"生日",
+                                                DetailTitle  : self.user.userInfo.birth.length ? self.user.userInfo.birth : @"",
+                                                Disable      : @(!self.user.userInfo.birth.length),
+                                             },
+                                            @{
+                                                Title        : @"手机",
+                                                DetailTitle  : self.user.userInfo.mobile.length ? self.user.userInfo.mobile : @"",
+                                                Disable      : @(!self.user.userInfo.mobile.length),
+                                             },
+                                            @{
+                                                Title        : @"邮箱",
+                                                DetailTitle  : self.user.userInfo.email.length ? self.user.userInfo.email : @"",
+                                                Disable      : @(!self.user.userInfo.email.length),
+                                             },
+                                            @{
+                                                Title        : @"签名",
+                                                DetailTitle  : self.user.userInfo.sign.length ? self.user.userInfo.sign : @"",
+                                                Disable      : @(!self.user.userInfo.sign.length),
+                                             },
+                                          ],
+                            FooterTitle:@""
+                            },
+                         @{
+                            HeaderTitle:@"",
+                            RowContent :@[
+                                    @{
+                                        Title        : @"消息提醒",
+                                        CellClass    : @"NTESSettingSwitcherCell",
+                                        CellAction   : @"onActionNeedNotifyValueChange:",
+                                        ExtraInfo    : @(needNotify),
+                                        Disable      : @(isMe),
+                                        ForbidSelect : @(YES)
+                                        },
+                                    ],
+                            FooterTitle:@""
+                            },
+                          @{
+                            HeaderTitle:@"",
+                            RowContent :@[
+                                           @{
+                                                Title        : @"黑名单",
+                                                CellClass    : @"NTESSettingSwitcherCell",
+                                                CellAction   : @"onActionBlackListValueChange:",
+                                                ExtraInfo    : @(isInBlackList),
+                                                Disable      : @(isMe),
+                                                ForbidSelect : @(YES)
+                                            },
+                                    ],
+                            FooterTitle:@""
+                            },
+                          @{
+                            HeaderTitle:@"",
+                            RowContent :@[
+                                    @{
+                                        Title        : @"聊天",
+                                        CellClass    : @"NTESColorButtonCell",
+                                        CellAction   : @"chat",
+                                        ExtraInfo    : @(ColorButtonCellStyleBlue),
+                                        Disable      : @(isMe),
+                                        RowHeight    : @(60),
+                                        ForbidSelect : @(YES),
+                                        SepLeftEdge  : @(self.view.width),
+                                        },
+                                    @{
+                                        Title        : @"删除好友",
+                                        CellClass    : @"NTESColorButtonCell",
+                                        CellAction   : @"deleteFriend",
+                                        ExtraInfo    : @(ColorButtonCellStyleRed),
+                                        Disable      : @(!isMyFriend || isMe),
+                                        RowHeight    : @(60),
+                                        ForbidSelect : @(YES),
+                                        SepLeftEdge  : @(self.view.width),
+                                        },
+                                    @{
+                                        Title        : @"添加好友",
+                                        CellClass    : @"NTESColorButtonCell",
+                                        CellAction   : @"addFriend",
+                                        ExtraInfo    : @(ColorButtonCellStyleBlue),
+                                        Disable      : @(isMyFriend  || isMe),
+                                        RowHeight    : @(60),
+                                        ForbidSelect : @(YES),
+                                        SepLeftEdge  : @(self.view.width),
+                                        },
+                                    ],
+                            FooterTitle:@"",
+                            },
+                      ];
+    self.data = [NIMCommonTableSection sectionsWithData:data];
+}
+
+#pragma mark - Action
+- (void)onActionEditAlias:(id)sender{
+    NTESAliasSettingViewController *vc = [[NTESAliasSettingViewController alloc] initWithUserId:self.userId];
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+- (void)onActionEditMyInfo:(id)sender{
+    NTESUserInfoSettingViewController *vc = [[NTESUserInfoSettingViewController alloc] initWithNibName:nil bundle:nil];
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+- (void)onActionBlackListValueChange:(id)sender{
+    UISwitch *switcher = sender;
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    if (switcher.on) {
+        [[NIMSDK sharedSDK].userManager addToBlackList:self.userId completion:^(NSError *error) {
+            [SVProgressHUD dismiss];
+            if (!error) {
+                [wself.view makeToast:@"拉黑成功"duration:2.0f position:CSToastPositionCenter];
+            }else{
+                [wself.view makeToast:@"拉黑失败"duration:2.0f position:CSToastPositionCenter];
+                [wself refresh];
+            }
+        }];
+    }else{
+        [[NIMSDK sharedSDK].userManager removeFromBlackBlackList:self.userId completion:^(NSError *error) {
+            [SVProgressHUD dismiss];
+            if (!error) {
+                [wself.view makeToast:@"移除黑名单成功"duration:2.0f position:CSToastPositionCenter];
+            }else{
+                [wself.view makeToast:@"移除黑名单失败"duration:2.0f position:CSToastPositionCenter];
+                [wself refresh];
+            }
+        }];
+    }
+}
+
+- (void)onActionNeedNotifyValueChange:(id)sender{
+    UISwitch *switcher = sender;
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    [[NIMSDK sharedSDK].userManager updateNotifyState:switcher.on forUser:self.userId completion:^(NSError *error) {            [SVProgressHUD dismiss];
+        if (error) {
+            [wself.view makeToast:@"操作失败"duration:2.0f position:CSToastPositionCenter];
+            [wself refresh];
+        }
+    }];
+}
+
+
+- (void)chat{
+    UINavigationController *nav = self.navigationController;
+    NIMSession *session = [NIMSession session:self.userId type:NIMSessionTypeP2P];
+    NTESSessionViewController *vc = [[NTESSessionViewController alloc] initWithSession:session];
+    [nav pushViewController:vc animated:YES];
+    UIViewController *root = nav.viewControllers[0];
+    nav.viewControllers = @[root,vc];
+}
+
+- (void)addFriend{
+    NIMUserRequest *request = [[NIMUserRequest alloc] init];
+    request.userId = self.userId;
+    request.operation = NIMUserOperationAdd;
+    if ([[NTESBundleSetting sharedConfig] needVerifyForFriend]) {
+        request.operation = NIMUserOperationRequest;
+        request.message = @"跪求通过";
+    }
+    NSString *successText = request.operation == NIMUserOperationAdd ? @"添加成功" : @"请求成功";
+    NSString *failedText =  request.operation == NIMUserOperationAdd ? @"添加失败" : @"请求失败";
+    
+    __weak typeof(self) wself = self;
+    [SVProgressHUD show];
+    [[NIMSDK sharedSDK].userManager requestFriend:request completion:^(NSError *error) {
+        [SVProgressHUD dismiss];
+        if (!error) {
+            [wself.view makeToast:successText
+                         duration:2.0f
+                         position:CSToastPositionCenter];
+            [wself refresh];
+        }else{
+            [wself.view makeToast:failedText
+                         duration:2.0f
+                         position:CSToastPositionCenter];
+        }
+    }];
+}
+
+- (void)deleteFriend{
+    __weak typeof(self) wself = self;
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"删除好友" message:@"删除好友后,将同时解除双方的好友关系" delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
+    [alert showAlertWithCompletionHandler:^(NSInteger index) {
+        if (index == 1) {
+            [SVProgressHUD show];
+            [[NIMSDK sharedSDK].userManager deleteFriend:wself.userId completion:^(NSError *error) {
+                [SVProgressHUD dismiss];
+                if (!error) {
+                    [wself.view makeToast:@"删除成功"duration:2.0f position:CSToastPositionCenter];
+                    [wself refresh];
+                }else{
+                    [wself.view makeToast:@"删除失败"duration:2.0f position:CSToastPositionCenter];
+                }
+            }];
+        }
+    }];
+}
+
+
+#pragma mark - NIMUserManagerDelegate
+
+- (void)onUserInfoChanged:(NIMUser *)user
+{
+    if ([user.userId isEqualToString:self.userId]) {
+        [self refresh];
+    }
+}
+
+- (void)onFriendChanged:(NIMUser *)user{
+    if ([user.userId isEqualToString:self.userId]) {
+        [self refresh];
+    }
+}
+
+- (void)onBlackListChanged{
+    [self refresh];
+}
+
+- (void)onMuteListChanged
+{
+    [self refresh];
+}
+
+
+#pragma mark - Private 
+- (void)onLongPressNavbar:(UIGestureRecognizer *)gesture{
+    if (gesture.state == UIGestureRecognizerStateBegan) {
+        NSString *title = self.user.description;
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"个人信息" message:title delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
+        [alert show];
+    }
+}
+
+#pragma mark - 旋转处理 (iOS7)
+- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+{
+    [self.tableView reloadData];
+}
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESSearchTeamViewController.h

@@ -0,0 +1,13 @@
+//
+//  NTESSearchTeamViewController.h
+//  NIM
+//
+//  Created by Xuhui on 15/3/19.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NTESSearchTeamViewController : UIViewController
+
+@end

+ 56 - 0
NIMDemo/NIMDemo/Classes/Sections/Card/ViewController/NTESSearchTeamViewController.m

@@ -0,0 +1,56 @@
+//
+//  NTESSearchTeamViewController.m
+//  NIM
+//
+//  Created by Xuhui on 15/3/19.
+//  Copyright (c) 2015年 Netease. All rights reserved.
+//
+
+#import "NTESSearchTeamViewController.h"
+#import "SVProgressHUD.h"
+#import "UIView+Toast.h"
+#import "NTESJionTeamViewController.h"
+
+@interface NTESSearchTeamViewController () <UITextFieldDelegate>
+@property (strong, nonatomic) IBOutlet UITextField *textField;
+
+@end
+
+@implementation NTESSearchTeamViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view from its nib.
+    self.navigationItem.title = @"搜索加入群组";
+    self.textField.delegate = self;
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+    
+}
+
+#pragma mark - UITextFieldDelegate
+
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+    [self.textField endEditing:YES];
+    [SVProgressHUD show];
+    [[NIMSDK sharedSDK].teamManager fetchTeamInfo:textField.text completion:^(NSError *error, NIMTeam *team) {
+        [SVProgressHUD dismiss];
+        if(!error) {
+            NTESJionTeamViewController *vc = [[NTESJionTeamViewController alloc] initWithNibName:nil bundle:nil];
+            vc.joinTeam = team;
+            [self.navigationController pushViewController:vc animated:YES];
+        } else {
+            [self.view makeToast:error.localizedDescription
+                        duration:2
+                        position:CSToastPositionCenter];
+            DDLogDebug(@"Fetch team info failed: %@", error.localizedDescription);
+        }
+    }];
+
+    return YES;
+}
+
+@end

Some files were not shown because too many files changed in this diff