GithubHelp home page GithubHelp logo

hilen / tswechat Goto Github PK

View Code? Open in Web Editor NEW
3.8K 3.8K 791.0 28.95 MB

A WeChat alternative. Written in Swift 5.

License: MIT License

Ruby 0.42% Swift 97.56% Objective-C 0.10% PHP 0.65% Shell 1.28%
alamofire audio json keyboard project rxswift snapkit swift-3 ui wechat

tswechat's People

Contributors

cdoky avatar emerson233 avatar hilen avatar j-em avatar jkaunert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tswechat's Issues

赞一个

这么大一个工程,不知道博主是在什么毅力下完成的,在下佩服!

error: unknown argument: '-suppress-warnings'

您好!我是新手,编译时发现两个错误,都是一样的错误,发生在编译BSGridCollectionViewLayout 和Alamofire的时候。请问博主知道是什么原因吗?谢谢!
:0: error: unknown argument: '-suppress-warnings'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

表情位置问题

如题,在同一行内,微信内置表情(例如: [发怒] ),和文字不是同一水平线上的,表情看上去更高一些,或者说是表情显得更小一些。请问如何解决

bug in extension TSChatViewController

        guard textView.text.componentsSeparatedByString(" ").count < textView.text.length else {
            TSProgressHUD.ts_showWarningWithStatus("不能发送空白消息")
            return
        }

can't input a character

compilation error with bitcode

ld: 'TSWeChat-master/Pods/TSVoiceConverter/Sources/lib/libopencore-amrnb.a(wrapper.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I think I have already disabled bitcode, but the error still exists.

RxSwift某些方法不存在

下载下来重新pod之后,然后发现还是运行不了,提示RxSwift某些方法不存在,比如reduceWithSpanBetween reduceWithSpanBetween addingDispatchInterval

AVFAudio`-[AVAudioSession setActive:withOptions:error:]:

录音时偶现的bug,在stackoverflow找到了原因,应该是录音和播放使用的同一个AVAudioSession,导致崩溃。解决方法是在AudioPlayManager的stopPlayer()方法中加一句代码self.audioPlayer!.prepareToPlay()重置AVAudioSession:
func stopPlayer() {
if self.audioPlayer == nil {
return
}
self.audioPlayer!.delegate = nil
self.audioPlayer!.stop()
self.audioPlayer!.prepareToPlay() //必须加上这一句,否则有可能会出现AVFAudio`-[AVAudioSession setActive:withOptions:error:]:的bug
self.audioPlayer = nil
UIDevice.current.isProximityMonitoringEnabled = false
}

pod install fail

[!] Unable to find a specification for TimedSilver (= 1.0.0)

mac os : 10.12.6
pod --version : 1.3.1

pod两次了失败

[!] Error installing YYText
[!] /usr/local/bin/git clone https://github.com/ibireme/YYText.git /var/folders/4z/dctdgmh94j73gysppdm9lf5h0000gp/T/d20170223-2742-8sv9po --template= --single-branch --depth 1 --branch 1.0.7

Cloning into '/var/folders/4z/dctdgmh94j73gysppdm9lf5h0000gp/T/d20170223-2742-8sv9po'...
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

xcode10 跑不起来

使用xcode10打开项目,编译时报了35个错误,请问什么时候适配xcode10呢

录音过短时没有readyStopRecord

录音过短时没有stop recorder, 录音一直在录制,当超过60s时会回调stopRecord
if self.audioTimeInterval.int32Value > 60 { self.stopRecord() }
导致还会录音成功。

虽然在stopRecord里面调用了 self.operationQueue.cancelAllOperations() 如果录音时长小于0.5s时,但是子线程的while循环一直在跑,因为recorder.isRecording 是true
cancelAllOperations() 的文档是这样描述:
For operations that are already executing, the operation object itself must check for cancellation and stop what it is doing so that it can move to the finished state.

Performance anti-pattern in UI

Hello guys!

I found that in TSChatTimeCell and TSChatSystemCell, there are LabelViews with their background colors set to transparent (alpha between 0 and 1). I think it would be better not to use transparent or partially transparent views in repeating styles, like TableViewCells and inside for loops.

Due to my own experience and this Apple document, using transparency could be tricky, performance-wise.

Do you think it makes sense the code is refactored to improve performance?

音频录音下载出错

‼️‼️‼️ 2018-06-06 13:56:19.760 [Error] [main] [AudioPlayManager.swift:176] downloadAudio > Failed with error: responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.inputFileReadFailed(file:///private/var/mobile/Containers/Data/Application/E7830B0F-4BD0-44C0-AC2C-B6B45B4F667C/tmp/CFNetworkDownload_m5q8qZ.tmp)) ‼️‼️‼️

无法运行在 Xcode 8.1, swift3 环境

Hi Hilen,
按照你所说,下载repo之后在项目下面运行 pod install,但是打开xcode的时候总是出现错误
screen shot 2016-11-29 at 12 07 02 pm
因为初学者,所以不是和你明白如何自行解决,貌似这个library是objective c,是不是需要在Xcode配置一些选项,谢谢啦。
Michael Chen

Error in running! How to solve this one?

/Users/macbookpro/Music/TSWeChat-master/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift:79:25: Value of type 'RxTime' (aka 'Date') has no member 'addingDispatchInterval'

/Users/macbookpro/Music/TSWeChat-master/Pods/RxSwift/RxSwift/Observables/Delay.swift:114:58: Value of type 'RxTimeInterval' (aka 'DispatchTimeInterval') has no member 'reduceWithSpanBetween'

/Users/macbookpro/Music/TSWeChat-master/Pods/RxSwift/RxSwift/Observables/Throttle.swift:74:53: Value of type 'RxTimeInterval' (aka 'DispatchTimeInterval') has no member 'reduceWithSpanBetween'

/Users/macbookpro/Music/TSWeChat-master/Pods/RxSwift/RxSwift/Observables/Throttle.swift:80:16: Value of type 'RxTimeInterval' (aka 'DispatchTimeInterval') has no member 'isNow'

新手求问

博主你好,我是一位新手,在看你的tswechat的时候,运行时发生这样的错误,请问该怎么解决呢?

diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

ios9.3 code7.3 真机调试 编译不过,libopencore 非bitcode

`Ld /Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Build/Products/Debug-iphoneos/TSVoiceConverter/TSVoiceConverter.framework/TSVoiceConverter normal arm64
cd /Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Pods
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -L/Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Build/Products/Debug-iphoneos/TSVoiceConverter -L/Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Pods/TSVoiceConverter/Sources/lib -F/Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Build/Products/Debug-iphoneos/TSVoiceConverter -filelist /Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Build/Intermediates/Pods.build/Debug-iphoneos/TSVoiceConverter.build/Objects-normal/arm64/TSVoiceConverter.LinkFileList -install_name @rpath/TSVoiceConverter.framework/TSVoiceConverter -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -no_deduplicate -fembed-bitcode-marker -lopencore-amrnb -lopencore-amrwb -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Build/Intermediates/Pods.build/Debug-iphoneos/TSVoiceConverter.build/Objects-normal/arm64/TSVoiceConverter.swiftmodule -framework Foundation -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Build/Intermediates/Pods.build/Debug-iphoneos/TSVoiceConverter.build/Objects-normal/arm64/TSVoiceConverter_dependency_info.dat -o /Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Build/Products/Debug-iphoneos/TSVoiceConverter/TSVoiceConverter.framework/TSVoiceConverter

ld: '/Users/joseph/Desktop/data/projects/react-native-project/PtApp/ios/Pods/TSVoiceConverter/Sources/lib/libopencore-amrnb.a(wrapper.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)`

Xcode 10.3无法编译通过

macOS Mojave 10.14.6
Xcode 10.3

执行pod install后显示以下信息,这个步骤应该没有问题,版本看上去都是对的
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.8.2)
Using BSGridCollectionViewLayout (1.2.3)
Using BSImagePicker (2.10.0)
Using BSImageView (1.0.3)
Using Dollar (9.0.0)
Using INTULocationManager (4.3.2)
Using KeychainAccess (3.2.0)
Using Kingfisher (5.7.0)
Using ObjcExceptionBridging (1.0.1)
Using ObjectMapper (3.5.1)
Using Reveal-SDK (4)
Using RxBlocking (5.0.0)
Using RxCocoa (5.0.0)
Using RxRelay (5.0.0)
Using RxSwift (5.0.0)
Using SVProgressHUD (2.0.4)
Using SnapKit (5.0.0)
Using SwiftyJSON (4.3.0)
Using TSVoiceConverter (0.1.6)
Using TimedSilver (1.2.0)
Using UIColor_Hex_Swift (5.1.0)
Using XCGLogger (7.0.0)
Using XLActionController (5.0.0)
Using YYText (1.0.7)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 20 dependencies from the Podfile and 24 total pods installed.

打开TSWeChat.xcworkspace,编译RxSwift的时候会报一些错误,导致后面无法编译通过,相关报错信息如下:

/Users/yanjiahua/LearningIOS/TSWeChat/Pods/RxSwift/RxSwift/Observables/Delay.swift:114:58: Value of type 'RxTimeInterval' (aka 'DispatchTimeInterval') has no member 'reduceWithSpanBetween'

/Users/yanjiahua/LearningIOS/TSWeChat/Pods/RxSwift/RxSwift/Observables/Throttle.swift:74:53: Value of type 'RxTimeInterval' (aka 'DispatchTimeInterval') has no member 'reduceWithSpanBetween'

/Users/yanjiahua/LearningIOS/TSWeChat/Pods/RxSwift/RxSwift/Observables/Throttle.swift:80:16: Value of type 'RxTimeInterval' (aka 'DispatchTimeInterval') has no member 'isNow'

/Users/yanjiahua/LearningIOS/TSWeChat/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift:79:25: Value of type 'RxTime' (aka 'Date') has no member 'addingDispatchInterval'

在网上查了有人碰到类似问题,删除Xcode缓存文件重启后解决问题,这边试了几次,还是无法解决,不知是否是Xcode新版本的问题

录音时长问题

松开手指结束录音时,貌似是没有立即停止导致循环执行多了一遍
default

聊天界面没有数据的时候菊花位置出现bug

一点击输入框弹出键盘后菊花就跑到输入框上方的位置,然后隐藏键盘后菊花才正常一点击输入框弹出键盘后菊花就跑到输入框上方的位置,然后隐藏键盘后菊花才正常,传不了图。。。

xcode10.2.1无法编译

最新clone的code,并使用xcode10.2.1编译后仍旧有15个错误(基本都为pod中的),看到有帖子说已经针对xcode和swift进行了升级,请问是哪里还需要配置么?谢谢

关于导航侧滑

您好!消息列表进入房间后,侧滑返回失效,但偶尔可以成功侧滑。是什么原因呢?

Emotion inputs don't have content offset

simulator screen shot sep 3 2016 12 24 02 am

I pull requested a solution for #13 , but after the cell expanded and user keeps going, the text content should have moved up while keeping the cell height fixed at the max height.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.