Permalink
Browse files

Merge branch 'develop'

Conflicts:
	Yep/AppDelegate.swift
  • Loading branch information...
kevinzhow committed May 5, 2016
2 parents 4d4f7fc + f856344 commit a56298a15df790c78f55f9e2c7536b86ea69478e
Showing with 4,280 additions and 1,927 deletions.
  1. +3 −1 Podfile
  2. +14 −14 Podfile.lock
  3. +299 −84 Yep.xcodeproj/project.pbxproj
  4. +1 −1 Yep/Activities/WeChatActivity.swift
  5. +8 −4 Yep/AlbumListController.swift
  6. +59 −16 Yep/AppDelegate.swift
  7. +2 −53 Yep/Base.lproj/Intro.storyboard
  8. +1 −1 Yep/Caches/ImageCache.swift
  9. +1 −1 Yep/Caches/SendingMessagePool.swift
  10. +1 −1 Yep/Configs/YepConfig.swift
  11. +6 −0 Yep/Configs/YepHelper.swift
  12. +336 −0 Yep/DataSample.swift
  13. +22 −0 Yep/Extensions/DeviceGuru+Yep.swift
  14. +118 −0 Yep/Extensions/String+Yep.swift
  15. +5 −3 Yep/Extensions/UIImage+Yep.swift
  16. +1 −1 Yep/Helpers/KVO/ObjectKeypathObserver.swift
  17. +1 −1 Yep/Helpers/YepAlert.swift
  18. +1 −1 Yep/Helpers/YepHUD.swift
  19. +1 −1 Yep/Helpers/YepSoundEffect.swift
  20. +21 −1 Yep/Helpers/YepUserDefaults.swift
  21. +1 −1 Yep/Operations/UploadAttachmentOperation.swift
  22. +48 −0 Yep/Protocols/SearchActionRepresentation.swift
  23. +44 −0 Yep/Protocols/SearchTriggerRepresentation.swift
  24. +94 −14 Yep/Realm/Models.swift
  25. +1 −1 Yep/Services/FayeService.swift
  26. +1 −1 Yep/Services/YepAudioService.swift
  27. +1 −1 Yep/Services/YepDownloader.swift
  28. +1 −1 Yep/Services/YepLocationService.swift
  29. +1 −1 Yep/Services/YepNetworking.swift
  30. +215 −45 Yep/Services/YepService.swift
  31. +95 −17 Yep/Services/YepServiceSync.swift
  32. +215 −0 Yep/Shortcuts/ShortcutItems.swift
  33. +17 −0 Yep/Shortcuts/ShortcutType.swift
  34. +13 −11 Yep/{ViewControllers/Feeds/FeedsSearchTransition.swift → Transitions/SearchTransition.swift}
  35. +2 −2 Yep/ViewControllers/About/AboutViewController.swift
  36. +33 −4 Yep/ViewControllers/AddFriends/AddFriendsViewController.swift
  37. +1 −1 Yep/ViewControllers/Base/BaseViewController.swift
  38. +2 −2 Yep/ViewControllers/BlackList/BlackListViewController.swift
  39. +116 −0 Yep/ViewControllers/ChangeMobile/ChangeMobile.storyboard
  40. +202 −0 Yep/ViewControllers/ChangeMobile/ChangeMobileViewController.swift
  41. +0 −144 Yep/ViewControllers/Contacts/ContactsSearchTransition.swift
  42. +34 −50 Yep/ViewControllers/Contacts/ContactsViewController.swift
  43. +1 −1 Yep/ViewControllers/Conversation/ConversationLayout.swift
  44. +13 −13 Yep/ViewControllers/Conversation/ConversationMoreViewManager.swift
  45. +82 −20 Yep/ViewControllers/Conversation/ConversationViewController.swift
  46. +0 −112 Yep/ViewControllers/Conversations/ConversationsSearchTransition.swift
  47. +25 −29 Yep/ViewControllers/Conversations/ConversationsViewController.swift
  48. +1 −1 Yep/ViewControllers/CreatorsOfBlockedFeeds/CreatorsOfBlockedFeedsViewController.swift
  49. +2 −2 Yep/ViewControllers/CustomNavigationBar/CustomNavigationBarViewController.swift
  50. +1 −1 Yep/ViewControllers/Discover/DiscoverCollectionView.swift
  51. +1 −1 Yep/ViewControllers/Discover/DiscoverFlowLayout.swift
  52. +1 −1 Yep/ViewControllers/Discover/DiscoverViewController.swift
  53. +1 −1 Yep/ViewControllers/DoNotDisturbPeriod/DoNotDisturbPeriodViewController.swift
  54. +1 −1 Yep/ViewControllers/EditNicknameAndBadge/EditNicknameAndBadgeViewController.swift
  55. +29 −27 Yep/ViewControllers/EditProfile/EditProfile.storyboard
  56. +38 −4 Yep/ViewControllers/EditProfile/EditProfileViewController.swift
  57. +1 −1 Yep/ViewControllers/EditSkills/EditSkillsViewController.swift
  58. +1 −1 Yep/ViewControllers/FeedConversations/FeedConversationsViewController.swift
  59. +1 −1 Yep/ViewControllers/Feedback/FeedbackViewController.swift
  60. +1 −1 Yep/ViewControllers/Feeds/FeedsMoreViewManager.swift
  61. +57 −64 Yep/ViewControllers/Feeds/FeedsViewController.swift
  62. +2 −3 Yep/ViewControllers/FriendsInContacts/FriendsInContacts.storyboard
  63. +1 −1 Yep/ViewControllers/FriendsInContacts/FriendsInContactsViewController.swift
  64. +1 −1 Yep/ViewControllers/Login/LoginByMobileViewController.swift
  65. +1 −1 Yep/ViewControllers/Login/LoginVerifyMobileViewController.swift
  66. +1 −1 Yep/ViewControllers/MediaPreview/MediaPreviewViewController.swift
  67. +1 −1 Yep/ViewControllers/Nav/YepNavigationController.swift
  68. +1 −1 Yep/ViewControllers/NewFeed/NewFeedPreviewViewController.swift
  69. +2 −2 Yep/ViewControllers/NewFeed/NewFeedViewController.swift
  70. +1 −1 Yep/ViewControllers/NewFeedVoiceRecord/NewFeedVoiceRecordViewController.swift
  71. +1 −1 Yep/ViewControllers/Notifications/NotificationsViewController.swift
  72. +1 −1 Yep/ViewControllers/OAuth/OAuthViewController.swift
  73. +1 −1 Yep/ViewControllers/PickLocation/LocationPin.swift
  74. +1 −1 Yep/ViewControllers/PickLocation/PickLocationViewController.swift
  75. +1 −1 Yep/ViewControllers/PickPhotos/ImageCacheController.swift
  76. +13 −7 Yep/ViewControllers/PickPhotos/PickPhotosViewController.swift
  77. +29 −6 Yep/ViewControllers/PodsHelpYep/PodsHelpYep.storyboard
  78. +65 −11 Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift
  79. +1 −1 Yep/ViewControllers/Profile/ProfileLayout.swift
  80. +7 −73 Yep/ViewControllers/Profile/ProfileViewController.swift
  81. +8 −147 Yep/ViewControllers/Register/RegisterPickAvatarViewController.swift
  82. +1 −1 Yep/ViewControllers/Register/RegisterPickMobileViewController.swift
  83. +1 −1 Yep/ViewControllers/Register/RegisterPickNameViewController.swift
  84. +1 −1 Yep/ViewControllers/Register/RegisterPickSkillsLayout.swift
  85. +1 −1 Yep/ViewControllers/Register/RegisterPickSkillsSelectSkillsTransitionManager.swift
  86. +1 −1 Yep/ViewControllers/Register/RegisterPickSkillsViewController.swift
  87. +1 −1 Yep/ViewControllers/Register/RegisterSelectSkillsLayout.swift
  88. +1 −1 Yep/ViewControllers/Register/RegisterSelectSkillsViewController.swift
  89. +1 −1 Yep/ViewControllers/Register/RegisterSkillsLayout.swift
  90. +3 −3 Yep/ViewControllers/Register/RegisterVerifyMobileViewController.swift
  91. +4 −22 Yep/ViewControllers/SearchContacts/SearchContactsViewController.swift
  92. +6 −29 Yep/ViewControllers/SearchConversations/SearchConversationsViewController.swift
  93. +69 −31 Yep/ViewControllers/SearchFeeds/SearchFeedsViewController.swift
  94. +1 −1 Yep/ViewControllers/SearchedUserMessages/SearchedUserMessagesViewController.swift
  95. +1 −1 Yep/ViewControllers/SearchedUsers/SearchedUsersViewController.swift
  96. +1 −1 Yep/ViewControllers/Settings/SettingsViewController.swift
  97. +1 −1 Yep/ViewControllers/Show/ShowStepGeniusViewController.swift
  98. +1 −1 Yep/ViewControllers/Show/ShowStepMatchViewController.swift
  99. +1 −1 Yep/ViewControllers/Show/ShowStepMeetViewController.swift
  100. +2 −2 Yep/ViewControllers/Show/ShowViewController.swift
  101. +1 −1 Yep/ViewControllers/SkillHome/SkillHomeViewController.swift
  102. +1 −1 Yep/ViewControllers/SocialWorks/SocialWorkDribbbleViewController.swift
  103. +1 −1 Yep/ViewControllers/SocialWorks/SocialWorkGithubViewController.swift
  104. +1 −1 Yep/ViewControllers/SocialWorks/SocialWorkInstagramViewController.swift
  105. +28 −15 Yep/ViewControllers/TabBar/YepTabBarController.swift
  106. +98 −0 Yep/ViewControllers/VerifyChangedMobile/VerifyChangedMobile.storyboard
  107. +226 −0 Yep/ViewControllers/VerifyChangedMobile/VerifyChangedMobileViewController.swift
  108. +1 −1 Yep/ViewControllers/Welcome/WelcomeViewController.swift
  109. +7 −7 Yep/Views/ActionSheet/ActionSheetView.swift
  110. +1 −1 Yep/Views/AudioWaves/SampleView.swift
  111. +2 −2 Yep/Views/AudioWaves/VoiceRecordSampleView.swift
  112. +1 −1 Yep/Views/AudioWaves/Waver.swift
  113. +1 −1 Yep/Views/AudioWaves/YepWaverView.swift
  114. +1 −1 Yep/Views/Badge/BadgeView.swift
  115. +1 −1 Yep/Views/Buttons/BorderButton.swift
  116. +1 −1 Yep/Views/Buttons/EdgeBorderButton.swift
  117. +2 −2 Yep/Views/Buttons/MessageTypeButton.swift
  118. +1 −1 Yep/Views/Buttons/RecordButton.swift
  119. +2 −2 Yep/Views/Buttons/SkillCategoryButton.swift
  120. +1 −1 Yep/Views/Buttons/YepButton.swift
  121. +1 −1 Yep/Views/CameraPreview/CameraPreviewView.swift
  122. +2 −8 Yep/Views/Cells/About/AboutCell.swift
  123. +1 −1 Yep/Views/Cells/AddFriendMore/AddFriendMoreCell.swift
  124. +1 −1 Yep/Views/Cells/AddFriendSearch/AddFriendSearchCell.swift
  125. +1 −1 Yep/Views/Cells/Camera/CameraCell.swift
  126. +1 −1 Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift
  127. +1 −2 Yep/Views/Cells/ChatLeftImage/ChatLeftImageCell.swift
  128. +1 −1 Yep/Views/Cells/ChatLeftLocation/ChatLeftLocationCell.swift
  129. +9 −148 Yep/Views/Cells/ChatLeftShareFeed/LeftShareFeedCell.swift
  130. +1 −1 Yep/Views/Cells/ChatLeftSocialWork/ChatLeftSocialWorkCell.swift
  131. +1 −1 Yep/Views/Cells/ChatLeftTextURL/ChatLeftTextURLCell.swift
  132. +1 −1 Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift
  133. +1 −1 Yep/Views/Cells/ChatRightAudio/ChatRightAudioCell.swift
  134. +2 −2 Yep/Views/Cells/ChatRightImage/ChatRightImageCell.swift
  135. +1 −1 Yep/Views/Cells/ChatRightLocation/ChatRightLocationCell.swift
  136. +123 −1 Yep/Views/Cells/ChatRightShareFeed/RightShareFeedCell.swift
  137. +1 −1 Yep/Views/Cells/ChatRightTextURL/ChatRightTextURLCell.swift
  138. +1 −1 Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift
  139. +1 −1 Yep/Views/Cells/ChatSectionDate/ChatSectionDateCell.swift
  140. +2 −2 Yep/Views/Cells/ChatTextIndicator/ChatTextIndicatorCell.swift
  141. +1 −1 Yep/Views/Cells/Contacts/ContactsCell.swift
  142. +1 −1 Yep/Views/Cells/Contacts/SearchedContactsCell.swift
  143. +1 −1 Yep/Views/Cells/Conversation/ConversationCell.swift
  144. +1 −1 Yep/Views/Cells/DeletedFeedConversation/DeletedFeedConversationCell.swift
  145. +1 −1 Yep/Views/Cells/DiscoverCardUser/DiscoverCardUserCell.swift
  146. +3 −3 Yep/Views/Cells/DiscoverCardUser/MiniCardSkillLayout.swift
  147. +1 −1 Yep/Views/Cells/DiscoverNormalUser/DiscoverNormalUserCell.swift
  148. +1 −1 Yep/Views/Cells/DiscoverSkill/DiscoverSkillCell.swift
  149. +1 −1 Yep/Views/Cells/DoNotDisturb/DoNotDisturbPeriodCell.swift
  150. +3 −3 Yep/Views/Cells/DoNotDisturb/DoNotDisturbSwitchCell.swift
  151. +1 −1 Yep/Views/Cells/DribbbleShot/DribbbleShotCell.swift
  152. +1 −1 Yep/Views/Cells/EditProfileColoredTitle/EditProfileColoredTitleCell.swift
  153. +1 −1 Yep/Views/Cells/EditProfileLessInfo/EditProfileLessInfoCell.swift
  154. +1 −1 Yep/Views/Cells/EditProfileMoreInfo/EditProfileMoreInfoCell.swift
  155. +1 −1 Yep/Views/Cells/EditSkill/EditSkillCell.swift
  156. +12 −31 Yep/Views/Cells/Feed/FeedAnyImagesCell.swift
  157. +31 −87 Yep/Views/Cells/Feed/FeedBasicCell.swift
  158. +12 −29 Yep/Views/Cells/Feed/FeedBiggerImageCell.swift
  159. +21 −40 Yep/Views/Cells/Feed/FeedDribbbleShotCell.swift
  160. +19 −40 Yep/Views/Cells/Feed/FeedGithubRepoCell.swift
  161. +12 −34 Yep/Views/Cells/Feed/FeedLocationCell.swift
  162. +15 −37 Yep/Views/Cells/Feed/FeedNormalImagesCell.swift
  163. +12 −23 Yep/Views/Cells/Feed/FeedURLCell.swift
  164. +12 −31 Yep/Views/Cells/Feed/FeedVoiceCell.swift
  165. +1 −1 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedAnyImagesCell.swift
  166. +10 −2 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedBasicCell.swift
  167. +1 −1 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedDribbbleShotCell.swift
  168. +1 −1 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedGithubRepoCell.swift
  169. +1 −1 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedLocationCell.swift
  170. +1 −1 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedNormalImagesCell.swift
  171. +1 −1 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedURLCell.swift
  172. +1 −1 Yep/Views/Cells/Feed/SearchedFeed/SearchedFeedVoiceCell.swift
  173. +1 −1 Yep/Views/Cells/FeedConversation/FeedConversationCell.swift
  174. +2 −10 Yep/Views/Cells/FeedConversation/FeedConversationCell.xib
  175. +1 −1 Yep/Views/Cells/FeedConversationDock/FeedConversationDockCell.swift
  176. +1 −1 Yep/Views/Cells/FeedMedia/FeedMediaCell.swift
  177. +1 −1 Yep/Views/Cells/FeedMediaAdd/FeedMediaAddCell.swift
  178. +1 −1 Yep/Views/Cells/FeedSkillUsers/FeedSkillUsersCell.swift
  179. +1 −1 Yep/Views/Cells/GithubRepo/GithubRepoCell.swift
  180. +1 −1 Yep/Views/Cells/InstagramMedia/InstagramMediaCell.swift
  181. +1 −1 Yep/Views/Cells/LoadMore/LoadMoreCollectionViewCell.swift
  182. +1 −1 Yep/Views/Cells/LoadMore/LoadMoreTableViewCell.swift
  183. +1 −1 Yep/Views/Cells/MediaView/MediaViewCell.swift
  184. +1 −1 Yep/Views/Cells/NewFeedPreview/AlbumListCell.swift
  185. +1 −1 Yep/Views/Cells/NewFeedPreview/NewFeedPreviewCell.swift
  186. +1 −1 Yep/Views/Cells/Photo/PhotoCell.swift
  187. +1 −1 Yep/Views/Cells/PickLocation/PickLocationCell.swift
  188. +1 −1 Yep/Views/Cells/ProfileFeeds/ProfileFeedsCell.swift
  189. +1 −1 Yep/Views/Cells/ProfileFooter/ProfileFooterCell.swift
  190. +1 −1 Yep/Views/Cells/ProfileHeader/ProfileHeaderCell.swift
  191. +1 −1 Yep/Views/Cells/ProfileSeparationLine/ProfileSeparationLineCell.swift
  192. +1 −1 Yep/Views/Cells/ProfileSocialAccount/ProfileSocialAccountCell.swift
  193. +1 −1 Yep/Views/Cells/ProfileSocialAccount/ProfileSocialAccountGithubCell.swift
  194. +1 −1 Yep/Views/Cells/ProfileSocialAccount/ProfileSocialAccountImagesCell.swift
  195. +1 −1 Yep/Views/Cells/QuickPickPhotos/QuickPickPhotosCell.swift
  196. +1 −1 Yep/Views/Cells/SearchMoreResults/SearchMoreResultsCell.swift
  197. +1 −1 Yep/Views/Cells/SearchSectionTitle/SearchSectionTitleCell.swift
  198. +1 −1 Yep/Views/Cells/SearchedDiscoveredUser/SearchedDiscoveredUserCell.swift
  199. +1 −1 Yep/Views/Cells/SearchedFeed/SearchedFeedCell.swift
  200. +1 −1 Yep/Views/Cells/SearchedMessage/SearchedMessageCell.swift
  201. +1 −1 Yep/Views/Cells/SearchedUser/SearchedUserCell.swift
  202. +1 −1 Yep/Views/Cells/SettingsMore/SettingsMoreCell.swift
  203. +1 −1 Yep/Views/Cells/SettingsUser/SettingsUserCell.swift
  204. +1 −1 Yep/Views/Cells/Skill/SkillCell.swift
  205. +1 −1 Yep/Views/Cells/SkillAdd/SkillAddCell.swift
  206. +1 −1 Yep/Views/Cells/SkillCategory/SkillCategoryCell.swift
  207. +1 −1 Yep/Views/Cells/SkillRank/SkillRankCell.swift
  208. +1 −1 Yep/Views/Cells/SkillSelection/SkillSelectionCell.swift
  209. +1 −1 Yep/Views/Cells/Title/TitleCell.swift
  210. +1 −1 Yep/Views/Cells/UserState/UserStateCell.swift
  211. +2 −2 Yep/Views/ContainerViews/FeedGithubRepoContainerView.swift
  212. +2 −2 Yep/Views/ContainerViews/FeedLocationContainerView.swift
  213. +2 −2 Yep/Views/ContainerViews/FeedMediaContainerView.swift
  214. +4 −4 Yep/Views/ContainerViews/FeedURLContainerView.swift
  215. +3 −3 Yep/Views/ContainerViews/FeedUploadingErrorContainerView.swift
  216. +2 −2 Yep/Views/ContainerViews/FeedVoiceContainerView.swift
  217. +2 −2 Yep/Views/ContainerViews/IconTitleContainerView.swift
  218. +2 −2 Yep/Views/ContainerViews/LinkContainerView.swift
  219. +2 −2 Yep/Views/ConversationTitle/ConversationTitleView.swift
  220. +9 −9 Yep/Views/Feed/FeedMediaView.swift
  221. +4 −4 Yep/Views/Feed/FeedView.swift
  222. +200 −23 Yep/Views/Footers/SearchFeedsFooterView.swift
  223. +2 −2 Yep/Views/FriendRequest/FriendRequestView.swift
  224. +1 −1 Yep/Views/HorizontalLine/HorizontalLineView.swift
  225. +2 −2 Yep/Views/InfoView/InfoView.swift
  226. +1 −1 Yep/Views/Labels/FPSLabel.swift
  227. +1 −1 Yep/Views/Labels/NavigationTitleLabel.swift
  228. +2 −2 Yep/Views/Media/MediaControlView.swift
  229. +2 −2 Yep/Views/Media/MediaPreviewView.swift
  230. +2 −2 Yep/Views/Media/MediaView.swift
  231. +3 −3 Yep/Views/Mention/MentionView.swift
  232. +45 −38 Yep/Views/MessageToolbar/MessageToolbar.swift
  233. +2 −2 Yep/Views/MessageToolbar/VoiceRecordButton.swift
  234. +2 −2 Yep/Views/MoreMessageTypes/MoreMessageTypesView.swift
  235. +1 −1 Yep/Views/PickerItems/FeedSkill/FeedSkillPickerItemView.swift
  236. +1 −1 Yep/Views/ProgressViews/MessageLoadingProgressView.swift
  237. +2 −2 Yep/Views/PullToRefresh/PullToRefreshView.swift
  238. +2 −2 Yep/Views/PullToRefresh/YepRefreshView.swift
  239. +1 −1 Yep/Views/Rank/RankView.swift
  240. +1 −1 Yep/Views/ReusableViews/AddSkills/AddSkillsReusableView.swift
  241. +1 −1 Yep/Views/ReusableViews/ProfileSectionHeader/ProfileSectionHeaderReusableView.swift
  242. +1 −1 Yep/Views/ReusableViews/SkillAnnotationHeader/SkillAnnotationHeader.swift
  243. +2 −2 Yep/Views/ReusableViews/TableSectionTitle/TableSectionTitleView.swift
  244. +2 −2 Yep/Views/SayHi/BottomButtonView.swift
  245. +1 −1 Yep/Views/ScrollView/YepChildScrollView.swift
  246. +1 −1 Yep/Views/ShareProfileView/ShareProfileView.swift
  247. +1 −1 Yep/Views/SkillHomeHeaderView/SkillHomeHeaderView.swift
  248. +1 −1 Yep/Views/SkillHomeSectionButton/SkillHomeSectionButton.swift
  249. +3 −3 Yep/Views/Subscribe/SubscribeView.swift
  250. +1 −1 Yep/Views/TextFields/BorderTextField.swift
  251. +1 −1 Yep/Views/TextFields/UnderLineTextField.swift
  252. +1 −1 Yep/Views/TextViews/ChatTextView.swift
  253. +1 −1 Yep/Views/TextViews/FeedTextView.swift
  254. +3 −3 Yep/Views/TitleViews/ActivityIndicatorTitleView.swift
  255. +1 −1 Yep/Views/TouchClosures/TouchClosuresView.swift
  256. +5 −1 Yep/Yep-Bridging-Header.h
  257. +8 −2 Yep/en.lproj/Localizable.strings
  258. +19 −4 Yep/zh-Hans.lproj/Localizable.strings
  259. +54 −0 YepTests/ClearTests.swift
  260. +27 −0 YepTests/Extensions/NSURL+YepTests.swift
  261. +6 −0 YepTests/Images.xcassets/Contents.json
  262. +21 −0 YepTests/Images.xcassets/coolie.imageset/Contents.json
  263. BIN YepTests/Images.xcassets/coolie.imageset/coolie.png
  264. +54 −0 YepTests/OpenGraphTests.swift
  265. +50 −0 YepTests/RealmTests.swift
  266. +164 −0 YepTests/ServiceTests.swift
  267. +65 −0 YepTests/SyncTests.swift
  268. +5 −6 YepTests/YepTests.swift
  269. +28 −0 YepUITests/Extensions/XCUIElement+Yep.swift
  270. +24 −0 YepUITests/Info.plist
  271. +138 −0 YepUITests/YepUITests.swift
View
@@ -3,7 +3,7 @@ platform :ios, '8.0'
use_frameworks!
def pods
- pod 'Kanna'
+ pod 'Kanna', '1.0.2'
pod 'Navi'
pod 'Appsee'
pod 'Alamofire'
@@ -27,3 +27,5 @@ end
target 'Yep' do
pods
end
+
+
View
@@ -1,24 +1,24 @@
PODS:
- - 1PasswordExtension (1.8)
+ - 1PasswordExtension (1.8.1)
- Alamofire (3.3.1)
- Appsee (2.2)
- Base64 (1.1.2)
- DeviceGuru (1.3.7)
- Fabric (1.6.7)
- FXBlurView (1.6.4)
- JPush-iOS-SDK (1.8.8)
- - Kanna (1.0.6)
+ - Kanna (1.0.2)
- KeyboardMan (0.6.0)
- - Kingfisher (2.2.2)
+ - Kingfisher (2.3.1)
- MonkeyKing (0.0.2)
- Navi (0.4.2)
- pop (1.0.9)
- Proposer (0.8.0)
- - Realm (0.98.8):
- - Realm/Headers (= 0.98.8)
- - Realm/Headers (0.98.8)
- - RealmSwift (0.98.8):
- - Realm (= 0.98.8)
+ - Realm (0.99.1):
+ - Realm/Headers (= 0.99.1)
+ - Realm/Headers (0.99.1)
+ - RealmSwift (0.99.1):
+ - Realm (= 0.99.1)
- Ruler (0.7.0)
- SocketRocket (0.5.0)
- TPKeyboardAvoiding (1.3)
@@ -32,7 +32,7 @@ DEPENDENCIES:
- Fabric
- FXBlurView
- JPush-iOS-SDK (= 1.8.8)
- - Kanna
+ - Kanna (= 1.0.2)
- KeyboardMan
- Kingfisher
- MonkeyKing (= 0.0.2)
@@ -45,23 +45,23 @@ DEPENDENCIES:
- TPKeyboardAvoiding
SPEC CHECKSUMS:
- 1PasswordExtension: 627d5aecf210c7636968faf5a4c3546c9531385b
+ 1PasswordExtension: 00d6f4caae77c19ba33045b8569fbeb9689f0d1d
Alamofire: 369bc67b6f5ac33ded3648d7bd21c5bfb91c2ecc
Appsee: c95173e65acaab0ffc8a082c70633c9f5f45d5f0
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
DeviceGuru: f847629dc0da0145ba48a9fc314e613ca4aa9caf
Fabric: caf7580c725e64db144f610ac65cd60956911dc7
FXBlurView: db786c2561cb49a09ae98407f52460096ab8a44f
JPush-iOS-SDK: d4c097d8abbdd0837e24d44b41aacf64a6feddfd
- Kanna: 9f30945bbd293a609f698ea164687ccc0990ff60
+ Kanna: 059afb193a9f8ea34f46cb55a8b11bf4257efad8
KeyboardMan: 665211f180093f5bb3c6ff7e8b7f858c432c6ccf
- Kingfisher: 7e8de5b0cf7b5dc8ec559d193029a0859df93ef1
+ Kingfisher: 6d3fbada4829cbc7b89e883e8218c28afeb64e42
MonkeyKing: 9be24307843a80f4cd3eca66adc12c67aefb83bb
Navi: f743d94c9879e646ee399b404d0b53100c66a8bd
pop: f667631a5108a2e60d9e8797c9b32ddaf2080bce
Proposer: 17cd7fd2509b0d8d7c9e33815d648087c7dcaa81
- Realm: 0e293bb62999730599efc3048896bbd4f2e43bcd
- RealmSwift: 064262d38113f23ff3508fb20a0a922e696bec01
+ Realm: 522a0cc8e1f8755ee56d7dc16ca0fc380d045766
+ RealmSwift: 1d9c4299ef5dbf575c5da09fc706ed726327cfa0
Ruler: 51bd16cc00638702ef71713f80073588a6c7e682
SocketRocket: 2c51efccd2d73c99a923407ca4b06e7e9da95dbf
TPKeyboardAvoiding: a5138f318c06fb3e151f886e18ce4a72695d9cbe

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -9,7 +9,7 @@
import UIKit
import MonkeyKing
-class WeChatActivity: AnyActivity {
+final class WeChatActivity: AnyActivity {
enum Type {
@@ -11,7 +11,7 @@ import Photos
// @note use this model to store the album's 'result, 'count, 'name, 'startDate to avoid request and reserve too much times
-class Album: NSObject {
+final class Album: NSObject {
var results: PHFetchResult?
var count = 0
var name: String?
@@ -21,7 +21,7 @@ class Album: NSObject {
private let defaultAlbumIdentifier = "com.Yep.photoPicker"
-class AlbumListController: UITableViewController {
+final class AlbumListController: UITableViewController {
var pickedImageSet = Set<PHAsset>()
var pickedImages = [PHAsset]()
@@ -32,6 +32,7 @@ class AlbumListController: UITableViewController {
let albumlistCellIdentifier = "AlbumListCell"
var assetsCollection: [Album]?
+
lazy var pickPhotosVC: PickPhotosViewController = {
let vc = UIStoryboard(name: "PickPhotos", bundle: nil).instantiateViewControllerWithIdentifier("PickPhotosViewController") as! PickPhotosViewController
@@ -124,9 +125,11 @@ class AlbumListController: UITableViewController {
for (_, result) in results.enumerate() {
result.enumerateObjectsUsingBlock { (collection, idx, stop) in
- if let album = collection as? PHAssetCollection {
- let assetResults = PHAsset.fetchAssetsInAssetCollection(album, options: options)
+ if let album = collection as? PHAssetCollection{
+ guard album.localizedTitle != NSLocalizedString("Recently Deleted", comment: "") else { return }
+ let assetResults = PHAsset.fetchAssetsInAssetCollection(album, options: options)
+
var count = 0
switch album.assetCollectionType {
case .Album:
@@ -152,6 +155,7 @@ class AlbumListController: UITableViewController {
}
}
+
return list
}
View
@@ -16,7 +16,7 @@ import Appsee
import CoreSpotlight
@UIApplicationMain
-class AppDelegate: UIResponder, UIApplicationDelegate {
+final class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
@@ -40,10 +40,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// 默认将 Realm 放在 App Group 里
let directory: NSURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(YepConfig.appGroupID)!
- let realmPath = directory.URLByAppendingPathComponent("db.realm").path!
+ let realmFileURL = directory.URLByAppendingPathComponent("db.realm")
- return Realm.Configuration(path: realmPath, schemaVersion: 31, migrationBlock: { migration, oldSchemaVersion in
- })
+ var config = Realm.Configuration()
+ config.fileURL = realmFileURL
+ config.schemaVersion = 31
+ config.migrationBlock = { migration, oldSchemaVersion in
+ }
+
+ return config
}
enum RemoteNotificationType: String {
@@ -83,6 +88,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//Fabric.with([Crashlytics.self])
Fabric.with([Appsee.self])
+ #if JPUSH
/*
#if STAGING
let apsForProduction = false
@@ -92,15 +98,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
JPUSHService.setupWithOption(launchOptions, appKey: "e521aa97cd4cd4eba5b73669", channel: "AppStore", apsForProduction: apsForProduction)
*/
APService.setupWithOption(launchOptions)
+ #endif
}
let _ = try? AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, withOptions: AVAudioSessionCategoryOptions.DefaultToSpeaker)
application.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum)
// 全局的外观自定义
- customAppearance()
-
+ customAppearce()
+
let isLogined = YepUserDefaults.isLogined
if isLogined {
@@ -116,7 +123,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
} else {
startShowStory()
}
-
+
return true
}
@@ -151,6 +158,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
UIApplication.sharedApplication().applicationIconBadgeNumber = 0
+ // dynamic shortcut items
+
+ configureDynamicShortcuts()
+
+ // index searchable items
+
if YepUserDefaults.isLogined {
indexUserSearchableItems()
indexFeedSearchableItems()
@@ -238,8 +251,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
println("didReceiveRemoteNotification: \(userInfo)")
+
+ #if JPUSH
//JPUSHService.handleRemoteNotification(userInfo)
APService.handleRemoteNotification(userInfo)
+ #endif
guard YepUserDefaults.isLogined, let type = userInfo["type"] as? String, remoteNotificationType = RemoteNotificationType(rawValue: type) else {
completionHandler(UIBackgroundFetchResult.NoData)
@@ -260,9 +276,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
syncUnreadMessages() {
dispatch_async(dispatch_get_main_queue()) {
NSNotificationCenter.defaultCenter().postNotificationName(YepConfig.Notification.changedFeedConversation, object: nil)
- }
- completionHandler(UIBackgroundFetchResult.NewData)
+ configureDynamicShortcuts()
+
+ completionHandler(UIBackgroundFetchResult.NewData)
+ }
}
case .OfficialMessage:
@@ -301,14 +319,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
handleMessageDeletedFromServer(messageID: messageID)
+ configureDynamicShortcuts()
+
case .Mentioned:
syncUnreadMessagesAndDoFurtherAction({ _ in
dispatch_async(dispatch_get_main_queue()) {
NSNotificationCenter.defaultCenter().postNotificationName(YepConfig.Notification.changedFeedConversation, object: nil)
- }
- completionHandler(UIBackgroundFetchResult.NewData)
+ configureDynamicShortcuts()
+
+ completionHandler(UIBackgroundFetchResult.NewData)
+ }
})
}
}
@@ -318,11 +340,26 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
println(error.description)
}
+ // MARK: Shortcuts
+
+ func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -> Void) {
+
+ handleShortcutItem(shortcutItem)
+
+ completionHandler(true)
+ }
+
+ private func handleShortcutItem(shortcutItem: UIApplicationShortcutItem) {
+
+ if let window = window {
+ tryQuickActionWithShortcutItem(shortcutItem, inWindow: window)
+ }
+ }
+
// MARK: Open URL
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
-
if url.absoluteString.contains("/auth/success") {
NSNotificationCenter.defaultCenter().postNotificationName(YepConfig.Notification.OAuthResult, object: NSNumber(int: 1))
@@ -537,7 +574,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
refreshGroupTypeForAllGroups()
-
+
+ if !YepUserDefaults.isSyncedConversations {
+ syncMyConversations()
+ }
+
syncUnreadMessages {
syncFriendshipsAndDoFurtherAction {
syncGroupsAndDoFurtherAction {
@@ -564,10 +605,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func registerThirdPartyPushWithDeciveToken(deviceToken: NSData, pusherID: String) {
+ #if JPUSH
//JPUSHService.registerDeviceToken(deviceToken)
//JPUSHService.setTags(Set(["iOS"]), alias: pusherID, callbackSelector:nil, object: nil)
APService.registerDeviceToken(deviceToken)
APService.setTags(Set(["iOS"]), alias: pusherID, callbackSelector:nil, object: nil)
+ #endif
}
func tagsAliasCallback(iResCode: Int, tags: NSSet, alias: NSString) {
@@ -689,7 +732,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}
- private func customAppearance() {
+ private func customAppearce() {
window?.backgroundColor = UIColor.whiteColor()
@@ -712,14 +755,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return shadow
}()
- let textAttributes = [
+ let textAttributes: [String: AnyObject] = [
NSForegroundColorAttributeName: UIColor.yepNavgationBarTitleColor(),
NSShadowAttributeName: shadow,
NSFontAttributeName: UIFont.navigationBarTitleFont()
]
/*
- let barButtonTextAttributes = [
+ let barButtonTextAttributes: [String: AnyObject] = [
NSForegroundColorAttributeName: UIColor.yepTintColor(),
NSFontAttributeName: UIFont.barButtonFont()
]
Oops, something went wrong.

0 comments on commit a56298a

Please sign in to comment.