Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinzhow committed Feb 3, 2016
2 parents 8645cad + 82dfc6d commit 90fe787
Show file tree
Hide file tree
Showing 75 changed files with 251 additions and 2,871 deletions.
7 changes: 3 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ def pods
pod 'Appsee'
pod 'Alamofire'
pod 'DeviceGuru'
pod '1PasswordExtension', '~> 1.5'
pod '1PasswordExtension'
pod 'KeyboardMan'
pod 'Ruler'
pod 'Proposer'
pod 'APAddressBook/Swift'
pod 'FXBlurView'
pod 'Kingfisher'
pod 'TPKeyboardAvoiding', '~> 1.2'
pod 'TPKeyboardAvoiding'
pod 'pop'
# pod 'MZFayeClient', :path => '../CatchLib-iOS/MZFayeClient/'
pod 'Base64'
pod 'SocketRocket'
pod 'RealmSwift'
pod 'MonkeyKing', '0.0.2'
pod 'JPush'
pod 'JPush-iOS-SDK', '1.8.8'
pod 'Fabric'
pod 'Crashlytics'
end
Expand Down
52 changes: 26 additions & 26 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
PODS:
- 1PasswordExtension (1.7)
- Alamofire (3.1.4)
- APAddressBook/Core (0.2.2)
- APAddressBook/Swift (0.2.2):
- Alamofire (3.1.5)
- APAddressBook/Core (0.2.3)
- APAddressBook/Swift (0.2.3):
- APAddressBook/Core
- Appsee (2.1.5)
- Base64 (1.0.1)
- Crashlytics (3.5.0):
- Fabric (~> 1.6.0)
- Crashlytics (3.6.0):
- Fabric (~> 1.6.3)
- DeviceGuru (1.3.3)
- Fabric (1.6.2)
- Fabric (1.6.4)
- FXBlurView (1.6.4)
- JPush (2.1.0)
- Kanna (1.0.3)
- JPush-iOS-SDK (1.8.8)
- Kanna (1.0.4)
- KeyboardMan (0.5.2)
- Kingfisher (1.9.1)
- Kingfisher (2.0.1)
- MonkeyKing (0.0.2)
- Navi (0.3.9)
- pop (1.0.8)
- Proposer (0.7.1)
- Realm (0.97.0):
- Realm/Headers (= 0.97.0)
- Realm/Headers (0.97.0)
- RealmSwift (0.97.0):
- Realm (= 0.97.0)
- Realm (0.97.1):
- Realm/Headers (= 0.97.1)
- Realm/Headers (0.97.1)
- RealmSwift (0.97.1):
- Realm (= 0.97.1)
- Ruler (0.6)
- SocketRocket (0.4.2)
- TPKeyboardAvoiding (1.2.11)

DEPENDENCIES:
- 1PasswordExtension (~> 1.5)
- 1PasswordExtension
- Alamofire
- APAddressBook/Swift
- Appsee
Expand All @@ -38,7 +38,7 @@ DEPENDENCIES:
- DeviceGuru
- Fabric
- FXBlurView
- JPush
- JPush-iOS-SDK (= 1.8.8)
- Kanna
- KeyboardMan
- Kingfisher
Expand All @@ -49,28 +49,28 @@ DEPENDENCIES:
- RealmSwift
- Ruler
- SocketRocket
- TPKeyboardAvoiding (~> 1.2)
- TPKeyboardAvoiding

SPEC CHECKSUMS:
1PasswordExtension: a22573ad528dd63bd79c1f3b3813b17c2f86b91b
Alamofire: fbc829692f351fa1d8a31dd75fd7f7f56fea31fb
APAddressBook: 26473a739b8b9c9535c98ec66bf78015b4081dab
Alamofire: 5f730ba29fd113b7ddd71c1e65d0c630acf5d7b0
APAddressBook: 2a91bf05999548bea210ec9d1a68073f4dc8bfce
Appsee: 77f144701aa1a53d854d319a46667561849e8cf5
Base64: 4924bf3ca6fa559a5161ef717291bd450eb7bd1a
Crashlytics: fabfd45d0e8b8dc936c682b97e302b9a49a1c827
Crashlytics: e4e8d02914f2608fbc7bf42b1a7af838b0db67a2
DeviceGuru: 49c6178d77693f8459ace21cecaf4d1d26297d08
Fabric: e8296d4a1abb3c5eed770cc86b311c862f51d340
Fabric: ed41fd62173c6bdea24ab02c9d7707161eabb750
FXBlurView: db786c2561cb49a09ae98407f52460096ab8a44f
JPush: 92cb879829f0d81ab17b2c9ad009fdb88c6cf6e5
Kanna: 10c7f20762846e808ec5716e4191427bd71bf1c2
JPush-iOS-SDK: d4c097d8abbdd0837e24d44b41aacf64a6feddfd
Kanna: 537762df5e2203714769f8351340b3c724adb2bd
KeyboardMan: b081c254c5c0adc794a49b4e97a86cb4ac917a66
Kingfisher: 98fedd5d44d982b331fc7303f9f6144b7d8ba289
Kingfisher: 3af2020040453f710507819e6aa5f5721da03d9b
MonkeyKing: 9be24307843a80f4cd3eca66adc12c67aefb83bb
Navi: 24f5c81aeb46b89d27168ec1d459581230ae2675
pop: bb773ae2c791ca2629de13b347e7a8b450fa6a57
Proposer: e9759ad71a6702fd94315a0bff1f8c116edf6f07
Realm: b498a6fb9d288b171ff98d0e2d4384c295be8990
RealmSwift: d014810dec75c9a3f1a33926d2dabfed855c582c
Realm: 6854f49cc788171573a0605fe5e55d3224bc39f9
RealmSwift: 21aa38ae5210a8e7d3ca2fd02a0ce82476672101
Ruler: b36ec3bbc5fc6c3b7f629a6052cc1c17ada4b280
SocketRocket: ffe08119b00ef982f6c37052a4705a057c8494ad
TPKeyboardAvoiding: e5ce146b313de063957bfa75a13f1e9b0ff18ab7
Expand Down
46 changes: 12 additions & 34 deletions Yep.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions Yep/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
cacheInAdvance()

delay(0.5) {
// Fabric.with([Crashlytics.self])
//Fabric.with([Crashlytics.self])
Fabric.with([Crashlytics.self, Appsee.self])

/*
#if STAGING
let apsForProduction = false
#else
let apsForProduction = true
#endif
JPUSHService.setupWithOption(launchOptions, appKey: "e521aa97cd4cd4eba5b73669", channel: "AppStore", apsForProduction: apsForProduction)
*/
APService.setupWithOption(launchOptions)
}

let _ = try? AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, withOptions: AVAudioSessionCategoryOptions.DefaultToSpeaker)
Expand Down Expand Up @@ -230,7 +233,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {

println("didReceiveRemoteNotification: \(userInfo)")
JPUSHService.handleRemoteNotification(userInfo)
//JPUSHService.handleRemoteNotification(userInfo)
APService.handleRemoteNotification(userInfo)

if YepUserDefaults.isLogined {

Expand Down Expand Up @@ -453,8 +457,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func registerThirdPartyPushWithDeciveToken(deviceToken: NSData, pusherID: String) {

JPUSHService.registerDeviceToken(deviceToken)
JPUSHService.setTags(Set(["iOS"]), alias: pusherID, callbackSelector:nil, object: nil)
//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)
}

func tagsAliasCallback(iResCode: Int, tags: NSSet, alias: NSString) {
Expand Down
11 changes: 1 addition & 10 deletions Yep/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ha4-ol-D2e">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ha4-ol-D2e">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
Expand Down Expand Up @@ -354,7 +354,6 @@
<outlet property="feedsTableView" destination="D86-dp-qKQ" id="rh9-wh-IqK"/>
<segue destination="h8b-7V-qPb" kind="show" identifier="showFeedsWithSkill" id="D1j-0N-VMH"/>
<segue destination="dYX-Ms-gWP" kind="show" identifier="showSkillHome" id="TTj-EA-7SS"/>
<segue destination="IEG-17-cLh" kind="show" identifier="showFeedMedia" id="DsA-Jb-0sJ"/>
<segue destination="iL2-os-eZV" kind="show" identifier="showConversation" id="tg0-ny-kGT"/>
<segue destination="oUx-zd-faH" kind="show" identifier="showProfile" id="Gdt-20-g91"/>
<segue destination="4oS-hQ-vpS" kind="presentation" identifier="presentNewFeed" id="4uC-Sk-gjF"/>
Expand Down Expand Up @@ -390,14 +389,6 @@
</objects>
<point key="canvasLocation" x="-296" y="638"/>
</scene>
<!--MessageMediaViewController-->
<scene sceneID="DvE-gL-l6T">
<objects>
<viewControllerPlaceholder storyboardName="MessageMedia" referencedIdentifier="MessageMediaViewController" id="IEG-17-cLh" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="ja9-fT-ObV" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="87" y="299"/>
</scene>
<!--ConversationViewController-->
<scene sceneID="pz7-gU-UIN">
<objects>
Expand Down
14 changes: 9 additions & 5 deletions Yep/Caches/ImageCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ class ImageCache {

//println("attachmentSideLengthKey: \(attachmentSideLengthKey)")

let OptionsInfos: KingfisherManager.Options = (forceRefresh: false, lowPriority: false, cacheMemoryOnly: false, shouldDecode: false, queue: cacheAttachmentQueue, scale: UIScreen.mainScreen().scale)
let options: KingfisherOptionsInfo = [
.CallbackDispatchQueue(cacheAttachmentQueue),
.ScaleFactor(UIScreen.mainScreen().scale),
]

//查找当前 Size 的 Cache
Kingfisher.ImageCache.defaultCache.retrieveImageForKey(attachmentSideLengthKey, options: OptionsInfos) { (image, type) -> () in

Kingfisher.ImageCache.defaultCache.retrieveImageForKey(attachmentSideLengthKey, options: options) { (image, type) -> () in

if let image = image?.decodedImage() {
dispatch_async(dispatch_get_main_queue()) {
Expand All @@ -52,7 +56,7 @@ class ImageCache {

//查找原图

Kingfisher.ImageCache.defaultCache.retrieveImageForKey(attachmentOriginKey, options: OptionsInfos) { (image, type) -> () in
Kingfisher.ImageCache.defaultCache.retrieveImageForKey(attachmentOriginKey, options: options) { (image, type) -> () in

if let image = image {

Expand All @@ -76,7 +80,7 @@ class ImageCache {

// 下载

ImageDownloader.defaultDownloader.downloadImageWithURL(attachmentURL, options: OptionsInfos, progressBlock: { receivedSize, totalSize in
ImageDownloader.defaultDownloader.downloadImageWithURL(attachmentURL, options: options, progressBlock: { receivedSize, totalSize in

}, completionHandler: { image, error , imageURL, originalData in

Expand Down
8 changes: 1 addition & 7 deletions Yep/Configs/YepConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let bigAvatarFadeTransitionDuration: NSTimeInterval = 0.15
let imageFadeTransitionDuration: NSTimeInterval = 0.2

let MediaOptionsInfos: KingfisherOptionsInfo = [
.Options([.BackgroundDecode, .LowPriority]),
.BackgroundDecode,
.Transition(ImageTransition.Fade(imageFadeTransitionDuration))
]

Expand Down Expand Up @@ -206,11 +206,6 @@ class YepConfig {
static let textAttributes:[String: NSObject] = [
NSFontAttributeName: UIFont.chatTextFont(),
]
// static let textAttributes: [String: NSObject] = [
// NSFontAttributeName: UIFont.chatTextFont(),
// NSKernAttributeName: 0.5,
// NSParagraphStyleAttributeName: NSParagraphStyle.chatTextParagraphStyle(),
// ]
}

struct FeedMedia {
Expand Down Expand Up @@ -296,6 +291,5 @@ class YepConfig {
static let timelineImage = UIImage(named: "wechat_timeline")!
}
}

}

17 changes: 3 additions & 14 deletions Yep/Configs/YepHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import Foundation
import RealmSwift
import Navi



typealias CancelableTask = (cancel: Bool) -> Void

extension String {
Expand Down Expand Up @@ -51,7 +49,8 @@ func cancel(cancelableTask: CancelableTask?) {

func unregisterThirdPartyPush() {
dispatch_async(dispatch_get_main_queue()) {
JPUSHService.setAlias(nil, callbackSelector: nil, object: nil)
//JPUSHService.setAlias(nil, callbackSelector: nil, object: nil)
APService.setAlias(nil, callbackSelector: nil, object: nil)
UIApplication.sharedApplication().applicationIconBadgeNumber = 0
}
}
Expand Down Expand Up @@ -134,6 +133,7 @@ extension UIImage {
}

extension UINavigationBar {

func hideBottomHairline() {
let navigationBarImageView = hairlineImageViewInNavigationBar(self)
navigationBarImageView?.hidden = true
Expand Down Expand Up @@ -162,14 +162,3 @@ extension UINavigationBar {
}
}

func GoogleAnalyticsTrackView(name: String) {

}

func GoogleAnalyticsTrackEvent(action: String, label: String, value: NSNumber) {

}

func GoogleAnalyticsTrackSocial(network: String, action: String, target: String) {

}
5 changes: 4 additions & 1 deletion Yep/Extensions/CGRect+Yep.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import UIKit

extension CGRect {

func largestCenteredSquare() -> CGRect {

let width = self.size.width
let height = self.size.height
let widthBigger = width / height > 1.0
Expand All @@ -19,4 +21,5 @@ extension CGRect {

return square
}
}
}

4 changes: 0 additions & 4 deletions Yep/Extensions/UIColor+Yep.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ extension UIColor {

class func yepBorderColor() -> UIColor {
return UIColor(red: 0.898, green: 0.898, blue: 0.898, alpha: 1)
// return UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1)
}

class func avatarBackgroundColor() -> UIColor {
Expand All @@ -56,7 +55,6 @@ extension UIColor {
}

class func rightWaveColor() -> UIColor {
//return UIColor(white: 0.0, alpha: 0.15)
return UIColor(red:0.176, green:0.537, blue:0.878, alpha:1)
}

Expand All @@ -69,13 +67,11 @@ extension UIColor {
}

class func messageToolBarColor() -> UIColor {
// return UIColor.yepTintColor()
return UIColor(red:0.557, green:0.557, blue:0.576, alpha:1)
}

class func messageToolBarHighlightColor() -> UIColor {
return UIColor.yepTintColor()
// return UIColor(red:0.557, green:0.557, blue:0.576, alpha:1)
}

class func messageToolBarNormalColor() -> UIColor {
Expand Down
Loading

0 comments on commit 90fe787

Please sign in to comment.