Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjdongxie committed Sep 26, 2014
0 parents commit 587d323
Show file tree
Hide file tree
Showing 870 changed files with 136,745 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) [2014] [mogujie]

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.
6 changes: 6 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
join ios-im-develop by dingping
TT-IOS

Members:
* dingping
* chonglou
76 changes: 76 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
###项目背景
随着蘑菇街由导购向电商转型,蘑菇街自己的IM也应运而生,IM起初只是用于商家和
买家之间沟通的工具。后面我们问自己,既然已经有了用于客服的IM,为什么不自己
做一个IM,用于公司内部的沟通工具,来替换RTX呢,然后就有了TT(TeamTalk)
的雏形,现在蘑菇街内部的IM工具都是TT来完成的。随着TT的逐渐完善,我们再次
决定把TT开源,来回馈开源社区,我们希望国内的中小企业都能用上免费开源的
IM内部沟通工具。

###系统环境
服务端平台: Linux
客户端平台: Windows,Mac, iOS, Android

###子系统分类
各个子系统的详细说明请参考子系统的README文档

-TTPhpServer
TT的Web后台管理服务器

-TTCppServer
TT的服务器,包括登陆分配,长连接接入,消息路由,文件传输,
文件存储等功能的支持

-TTJavaServer
TT的服务器,主要是作为TT服务器操作MySQL和Redis的代理服务器

-TTWinClient
Window客户端

-TTMacClient
Mac系统客户端

-TTIOSClient
iOS客户端

-TTAndroidClient
Android客户端

###编译安装
详见各自子系统的INSTALL文件

###开发流程

开发者流程

- 开发者是指现在TeamTalk的开发人员,或者以后我们信任的贡献者转化而成的开发人员。

- 要成为开发者,需要在github上注册账号, 然后由管理者加入到相应项目的collaborators列表

- 开发主要用到master和develop两个分支, 平时开发都在develop分支上,只有代码
达到一个milestone的stable状态,才把develop分支merge到master分支

- 有时开发者可能想实现一个比较cool的feature,可以建立一个feature_x分支,
测试稳定后merge到master

贡献者流程

- 贡献者是指非TeamTalk项目组成员,热爱开源且希望为开源项目贡献代码的开发人员

- 贡献者可以在github上Fork一个子项目,然后在Fork的项目上提交代码,
再通过Pull Request把修改通知给项目开发者,由开发者code review后,
决定是否merge进入master分支, 具体可参考: [github协作流程](http://www.worldhello.net/gotgithub/04-work-with-others/010-fork-and-pull.html)

###版本迭代流程
- 版本迭代周期暂定为3个月
- 开发者和贡献者可以把想要实现的feature通过github的wiki功能提交上来
- 开始迭代前讨论本期版本要实现哪些feature,然后把要在本次迭代实现的featue列表写入版本的TODO feature list列表
- 制定大概的排期
- 开发,内部测试
- alpha版本发布,公测
- 把develop分支代码merge到master分支,stable版本发布

###开源协议
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)

###Remark
![](https://raw.githubusercontent.com/mogutt/TTiOSClient/develop/pic/we-need-you.png)
17 changes: 17 additions & 0 deletions TeamTalk/DDAppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// DDAppDelegate.h
// IOSDuoduo
//
// Created by 独嘉 on 14-5-23.
// Copyright (c) 2014年 dujia. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "std.h"
@interface DDAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property(nonatomic,strong)UINavigationController *nv;
@end
#define TheApp ([UIApplication sharedApplication])
#define TheAppDel ((DDAppDelegate*)TheApp.delegate)
87 changes: 87 additions & 0 deletions TeamTalk/DDAppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
//
// DDAppDelegate.m
// IOSDuoduo
//
// Created by 独嘉 on 14-5-23.
// Copyright (c) 2014年 dujia. All rights reserved.
//
// hunshou modify

#import "DDAppDelegate.h"
#import "LoginViewController.h"
#import "DDClientState.h"
#import "ChattingMainViewController.h"
#import "RuntimeStatus.h"

#import "DDClientStateMaintenanceManager.h"
#import "std.h"
@implementation DDAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//test



self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[RuntimeStatus instance];
LoginViewController* loginViewController = [LoginViewController new];

self.window.rootViewController = loginViewController;
[self.window makeKeyAndVisible];

// [MGJApp registerApp:@"mgj" type:@"iPhone" channel:@"NIMDEV" version:560 apiHost:@"www.mogujie.com" apiBasePath:[NSString stringWithFormat:@"app_mgj_v%d_", 560] enncryptionToken:@"mgj@xiangang" appleId:@"452176796"];


//=======
// [self.window makeKeyAndVisible];
//
// DDLoginViewController* loginViewController = [DDLoginViewController new];
// UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:loginViewController];
// [self.window setRootViewController:navigationController];
//
//>>>>>>> 5e49de23fb7c447ababd4d76ac6b7c244770d39d

return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
DDClientState* clientState = [DDClientState shareInstance];
[clientState setUseStateWithoutObserver:DDUserOffLine];
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
DDClientState* clientState = [DDClientState shareInstance];
[clientState setUseStateWithoutObserver:DDUserOffLine];
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{

if ([RuntimeStatus instance].user.userId !=nil) {
DDClientState* clientState = [DDClientState shareInstance];
clientState.userState=DDUserOffLine;
}
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{

// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
22 changes: 22 additions & 0 deletions TeamTalk/IOSDuoduo Tests/IOSDuoduo Tests-Info.plist
Original file line number Diff line number Diff line change
@@ -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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>Michael.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
10 changes: 10 additions & 0 deletions TeamTalk/IOSDuoduo Tests/IOSDuoduo Tests-Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
34 changes: 34 additions & 0 deletions TeamTalk/IOSDuoduo Tests/IOSDuoduo_Tests.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// IOSDuoduo_Tests.m
// IOSDuoduo Tests
//
// Created by Michael Scofield on 2014-08-22.
// Copyright (c) 2014 dujia. All rights reserved.
//

#import <XCTest/XCTest.h>

@interface IOSDuoduo_Tests : XCTestCase

@end

@implementation IOSDuoduo_Tests

- (void)setUp
{
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown
{
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}

- (void)testExample
{
XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
}

@end
2 changes: 2 additions & 0 deletions TeamTalk/IOSDuoduo Tests/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

14 changes: 14 additions & 0 deletions TeamTalk/IOSDuoduo/Category/NSDate+DDAddition.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// NSDate+DDAddition.h
// IOSDuoduo
//
// Created by 独嘉 on 14-6-5.
// Copyright (c) 2014年 dujia. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate (DDAddition)
- (NSString*)transformToFuzzyDate;
- (NSString*)promptDateString;
@end
Loading

0 comments on commit 587d323

Please sign in to comment.