├── Track
├── AVOS
│ ├── .gitignore
│ ├── AVOSCloud
│ │ ├── Utils
│ │ │ ├── UserAgent.h
│ │ │ ├── LCDatabaseCommon.h
│ │ │ ├── NSDictionary+LCHash.h
│ │ │ ├── LCSSLChallenger.h
│ │ │ ├── LCURLConnection.h
│ │ │ ├── LCDatabaseCoordinator.h
│ │ │ ├── LCKeyValueStore.h
│ │ │ ├── AVErrorUtils.h
│ │ │ ├── LCKeyValueSQL.h
│ │ │ ├── LCDatabaseMigrator.h
│ │ │ ├── NSDictionary+LCHash.m
│ │ │ ├── LCURLConnection.m
│ │ │ └── AVHelpers.h
│ │ ├── ThirdParty
│ │ │ ├── LCDB
│ │ │ │ └── LCDB.h
│ │ │ ├── libextobjc
│ │ │ │ └── EXTScope.m
│ │ │ └── JNKeychain
│ │ │ │ └── AVKeychain.h
│ │ ├── CloudCode
│ │ │ └── AVCloud_Internal.h
│ │ ├── IM
│ │ │ ├── AVSignature.m
│ │ │ ├── Commands
│ │ │ │ ├── AVSessionInCommand.m
│ │ │ │ ├── AVDirectInCommand.m
│ │ │ │ ├── AVRcpCommand.h
│ │ │ │ ├── AVSessionInCommand.h
│ │ │ │ ├── AVRcpCommand.m
│ │ │ │ ├── AVAckCommand.m
│ │ │ │ ├── AVAckCommand.h
│ │ │ │ ├── AVDirectInCommand.h
│ │ │ │ ├── AVDynamicBase.h
│ │ │ │ ├── AVSessionOutCommand.h
│ │ │ │ ├── AVDirectOutCommand.h
│ │ │ │ ├── AVPresenceCommand.h
│ │ │ │ ├── AVPresenceCommand.m
│ │ │ │ ├── AVCommandCommon.h
│ │ │ │ ├── AVDirectCommand.h
│ │ │ │ ├── AVDirectOutCommand.m
│ │ │ │ ├── AVSessionCommand.h
│ │ │ │ ├── AVSessionOutCommand.m
│ │ │ │ ├── AVSessionCommand.m
│ │ │ │ ├── AVRoomCommand.h
│ │ │ │ ├── AVCommand.h
│ │ │ │ └── AVDirectCommand.m
│ │ │ ├── AVCommandDictionary.h
│ │ │ ├── AVHistoryMessage.h
│ │ │ ├── AVHistoryMessage.m
│ │ │ ├── AVWebSocketWrapper.h
│ │ │ ├── AVCommandDictionary.m
│ │ │ ├── AVGroup_Internal.h
│ │ │ ├── AVMessage.h
│ │ │ └── AVSession_Internal.h
│ │ ├── Query
│ │ │ ├── AVFriendQuery.h
│ │ │ ├── AVCloudQueryResult_Internal.h
│ │ │ ├── AVCloudQueryResult.m
│ │ │ ├── AVCloudQueryResult.h
│ │ │ ├── AVQuery_Internal.h
│ │ │ └── AVFriendQuery.m
│ │ ├── Object
│ │ │ ├── AVSaveOption_internal.h
│ │ │ ├── AVRelation_Internal.h
│ │ │ ├── AVSaveOption.h
│ │ │ ├── AVSaveOption.m
│ │ │ ├── AVRequestManager.h
│ │ │ └── AVRelation.h
│ │ ├── File
│ │ │ ├── AVPartialInputStream.h
│ │ │ ├── AVFileHTTPRequestOperation.h
│ │ │ ├── AVFileHTTPRequestOperation.m
│ │ │ ├── AVUploaderManager.h
│ │ │ ├── AVFile_Internal.h
│ │ │ └── AVFileQuery.h
│ │ ├── ACL
│ │ │ ├── AVACL_Internal.h
│ │ │ └── AVRole_Internal.h
│ │ ├── AVOSCloud_Art.txt
│ │ ├── Router
│ │ │ └── LCRouter_internal.h
│ │ ├── Analytics
│ │ │ ├── AVAnalytics_Internal.h
│ │ │ ├── AVExceptionHandler.h
│ │ │ ├── AVDuration.h
│ │ │ ├── AVAnalyticsActivity.h
│ │ │ └── AVAnalyticsUtils.h
│ │ ├── AVConfiguration_extension.h
│ │ ├── Geo
│ │ │ ├── AVGeoPoint_Internal.h
│ │ │ └── AVLocationManager.h
│ │ ├── Cache
│ │ │ ├── AVScheduler.h
│ │ │ ├── AVCacheManager.h
│ │ │ └── AVPersistenceUtils.h
│ │ ├── AVConfiguration.h
│ │ ├── Statistics
│ │ │ └── LCNetworkStatistics.h
│ │ ├── Request
│ │ │ ├── AVPaasClient_internal.h
│ │ │ ├── AFNetworkingFix.h
│ │ │ └── AVRequestOperation.h
│ │ ├── Push
│ │ │ ├── AVInstallation_Internal.h
│ │ │ └── AVPush_Internal.h
│ │ ├── AVConfiguration.m
│ │ ├── AVOSCloud_Internal.h
│ │ ├── User
│ │ │ └── AVUser_Internal.h
│ │ ├── AVGlobal.h
│ │ └── AVAvailability.h
│ ├── fabfile.pyc
│ ├── AVOSCloudIMTests
│ │ ├── testAudio.mp3
│ │ ├── testImage.png
│ │ ├── AVIMCustomMessage.h
│ │ ├── AVIMTestBase.h
│ │ ├── AVIMCustomMessage.m
│ │ └── Info.plist
│ ├── AVOSCloudTests
│ │ └── LogicTests
│ │ │ ├── alpacino.jpg
│ │ │ ├── TestDescriptionKey.json
│ │ │ ├── AVCustomUser.h
│ │ │ ├── AVCustomUser.m
│ │ │ ├── UserBar.m
│ │ │ ├── UserInfo.m
│ │ │ ├── UserBar.h
│ │ │ ├── Armor.m
│ │ │ ├── UserArmor.m
│ │ │ ├── Armor.h
│ │ │ ├── Thread.m
│ │ │ ├── TestInstallationSave.json
│ │ │ ├── AVSearchSortBuilderTest.m
│ │ │ ├── AVUtilsTest.m
│ │ │ ├── TestDictionaryForObject.json
│ │ │ ├── AVOSCloudTest.m
│ │ │ ├── UserInfo.h
│ │ │ ├── Thread.h
│ │ │ ├── UserArmor.h
│ │ │ └── AVPersistentUtilsTest.m
│ ├── build.sh
│ ├── AVOS.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── xcschemes
│ │ │ │ └── xcschememanagement.plist
│ │ └── xcuserdata
│ │ │ └── Kenvin.xcuserdatad
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ ├── AVOSCloudIM
│ │ ├── AVIMSignature.m
│ │ ├── AVIMMessageOption.m
│ │ ├── AVIMClientOpenOption.m
│ │ ├── Commands
│ │ │ ├── AVIMCommandCommon.h
│ │ │ ├── AVIMDirectCommand+DirectCommandAdditions.h
│ │ │ ├── AVIMDirectCommand+DirectCommandAdditions.m
│ │ │ ├── AVIMDynamicObject.h
│ │ │ ├── AVIMConversationOutCommand.m
│ │ │ ├── AVIMCommandFormatter.h
│ │ │ └── AVIMConversationOutCommand.h
│ │ ├── Utilities
│ │ │ ├── AVIMErrorUtil.h
│ │ │ ├── AVIMRuntimeHelper.h
│ │ │ └── AVIMBlockHelper.h
│ │ ├── AVIMUserOptions.m
│ │ ├── InternalObjects
│ │ │ ├── AVIMMessageObject.m
│ │ │ ├── AVIMGeneralObject.m
│ │ │ ├── AVIMTypedMessageObject.h
│ │ │ ├── AVIMMessageObject.h
│ │ │ ├── AVIMGeneralObject.h
│ │ │ └── AVIMTypedMessageObject.m
│ │ ├── AVIMClientOpenOption.h
│ │ ├── TypedMessages
│ │ │ ├── AVIMFileMessage.h
│ │ │ ├── AVIMFileMessage.m
│ │ │ ├── AVIMTextMessage.h
│ │ │ ├── AVIMTextMessage.m
│ │ │ ├── AVIMVideoMessage.h
│ │ │ ├── AVIMAudioMessage.h
│ │ │ ├── AVIMImageMessage.h
│ │ │ ├── AVIMLocationMessage.h
│ │ │ ├── AVIMLocationMessage.m
│ │ │ └── AVIMVideoMessage.m
│ │ ├── AVIMConversationQuery_Internal.h
│ │ ├── AVIMUserOptions.h
│ │ ├── AVIMConversationUpdateBuilder_Internal.h
│ │ ├── AVMPMessagePack
│ │ │ ├── AVMPMessagePack.h
│ │ │ ├── AVMPMessagePackWriter.h
│ │ │ ├── AVMPDefines.h
│ │ │ ├── AVMPMessagePackReader.h
│ │ │ └── AVMPOrderedDictionary.h
│ │ ├── AVIMCommon.m
│ │ ├── LCIMClientSessionTokenCacheStore.h
│ │ ├── AVIMMessageOption.h
│ │ ├── AVIMKeyedConversation_internal.h
│ │ ├── MessageCache
│ │ │ └── CacheStore
│ │ │ │ ├── LCIMConversationQueryCacheStore.h
│ │ │ │ ├── LCIMCacheStore.h
│ │ │ │ ├── LCIMCacheStore.m
│ │ │ │ └── LCIMMessageCacheStore.h
│ │ ├── AVOSCloudIM.m
│ │ ├── AVIMConversationUpdateBuilder.h
│ │ ├── AVIMAvailability.h
│ │ ├── AVIMMessage_Internal.h
│ │ ├── AVIMKeyedConversation.h
│ │ └── AVIMConversation_Internal.h
│ ├── TestBase
│ │ ├── AVTestUtil.h
│ │ └── XCTestCase+AsyncTesting.h
│ ├── common.function
│ ├── AVOSCloudCrashReporting
│ │ ├── AVOSCloudCrashReporting_Internal.h
│ │ └── AVOSCloudCrashReporting.h
│ ├── Resources
│ │ ├── AVOSCloud-macOSTests.Info.plist
│ │ ├── AVOSCloudIM-macOSTests.Info.plist
│ │ ├── AVOSCloud-iOS.Info.plist
│ │ ├── AVOSCloud-tvOS.Info.plist
│ │ ├── AVOSCloud-watchOS.Info.plist
│ │ ├── AVOSCloudIM-iOS.Info.plist
│ │ ├── AVOSCloud-iOSTests.Info.plist
│ │ ├── AVOSCloudCrashReporting-iOS.Info.plist
│ │ ├── AVOSCloudIM-iOSTests.Info.plist
│ │ ├── AVOSCloud-macOS.Info.plist
│ │ └── AVOSCloudIM-macOS.Info.plist
│ └── deploy-sdk-not-upload.sh
├── Track.xcodeproj
│ ├── xcuserdata
│ │ └── Kenvin.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── Track
│ ├── MainHomeController.h
│ ├── ViewController.h
│ ├── MJExtension
│ │ ├── MJFoundation.h
│ │ ├── MJExtension.h
│ │ ├── MJPropertyKey.h
│ │ ├── MJPropertyKey.m
│ │ ├── MJExtensionConst.m
│ │ ├── MJPropertyType.h
│ │ ├── NSObject+MJCoding.h
│ │ ├── NSString+MJExtension.h
│ │ ├── MJProperty.h
│ │ └── MJFoundation.m
│ ├── AppDelegate.h
│ ├── Track
│ │ ├── Sender.h
│ │ ├── TrackerModel.m
│ │ ├── Tracker.h
│ │ ├── TrackRequest.h
│ │ ├── LogData.h
│ │ └── TrackerModel.h
│ ├── main.m
│ ├── MainHomeController.m
│ ├── ViewController.m
│ └── Info.plist
├── TrackTests
│ ├── Info.plist
│ └── TrackTests.m
└── TrackUITests
│ ├── Info.plist
│ └── TrackUITests.m
├── AspectTrack.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── Kenvin.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── Kenvin.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
└── AspectTrack
├── ViewController.h
├── BIPVBase.h
├── AppDelegate.h
├── main.m
├── Aspects
├── MOAspectsHookRange.m
├── MOAspectsStore.h
├── MOAspectsHookRange.h
├── MOAspectsTarget.h
├── MOAspects.h
└── MOAspectsStore.m
├── BIStatistics.h
├── ViewController.m
├── BIPVBase.m
├── BIStatistics.m
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Base.lproj
└── Main.storyboard
└── Info.plist
/Track/AVOS/.gitignore:
--------------------------------------------------------------------------------
1 | /build/
2 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/UserAgent.h:
--------------------------------------------------------------------------------
1 | #define SDK_VERSION @"v3.6.1"
2 |
--------------------------------------------------------------------------------
/Track/AVOS/fabfile.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/summerHearts/AspectTrack/HEAD/Track/AVOS/fabfile.pyc
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIMTests/testAudio.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/summerHearts/AspectTrack/HEAD/Track/AVOS/AVOSCloudIMTests/testAudio.mp3
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIMTests/testImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/summerHearts/AspectTrack/HEAD/Track/AVOS/AVOSCloudIMTests/testImage.png
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/alpacino.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/summerHearts/AspectTrack/HEAD/Track/AVOS/AVOSCloudTests/LogicTests/alpacino.jpg
--------------------------------------------------------------------------------
/Track/AVOS/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # target_dir = $1 or current pwd if $1 is not present
4 | target_dir=${1:-.}
5 | sh +x build-framework.sh $target_dir
6 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/ThirdParty/LCDB/LCDB.h:
--------------------------------------------------------------------------------
1 | #import "LCDatabase.h"
2 | #import "LCResultSet.h"
3 | #import "LCDatabaseAdditions.h"
4 | #import "LCDatabaseQueue.h"
5 | #import "LCDatabasePool.h"
6 |
--------------------------------------------------------------------------------
/Track/Track.xcodeproj/xcuserdata/Kenvin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Track/Track.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AspectTrack.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AspectTrack.xcodeproj/project.xcworkspace/xcuserdata/Kenvin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/summerHearts/AspectTrack/HEAD/AspectTrack.xcodeproj/project.xcworkspace/xcuserdata/Kenvin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/CloudCode/AVCloud_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCloud_Internal.h
3 | // LeanCloud
4 | //
5 | // Created by Summer on 13-5-2.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVCloud.h"
10 |
11 | @interface AVCloud ()
12 | @end
13 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVSignature.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVSignature.m
3 | // paas
4 | //
5 | // Created by yang chaozhong on 5/15/14.
6 | // Copyright (c) 2014 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVSignature.h"
10 |
11 | @implementation AVSignature
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/TestDescriptionKey.json:
--------------------------------------------------------------------------------
1 | {"description":"description","updatedAt":"2015-08-20T12:37:09.268Z","parent":"0","objectId":"55d1aab1e4b095c1aef1a314","createdAt":"2015-08-17T09:34:41.026Z","taxonomy":"product_tag","count":"1","term_taxonomy_id":"7764","term_id":"7418"}
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVSessionInCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVSessionInCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVSessionInCommand.h"
10 |
11 | @implementation AVSessionInCommand
12 | @dynamic onlineSessionPeerIds;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMSignature.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMSignature.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/4/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMSignature.h"
10 |
11 | @implementation AVIMSignature
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/Track/MainHomeController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MainHomeController.h
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/11/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MainHomeController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/Track/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/03/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/AspectTrack/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVDirectInCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVDirectInCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVDirectInCommand.h"
10 |
11 | @implementation AVDirectInCommand
12 | @dynamic id, fromPeerId, timestamp, offline;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMMessageOption.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMMessageOption.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 9/13/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMMessageOption.h"
10 |
11 | @implementation AVIMMessageOption
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMClientOpenOption.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMClientOpenOption.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/8/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMClientOpenOption.h"
10 |
11 | @implementation AVIMClientOpenOption
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/AspectTrack/BIPVBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // BIPVBase.h
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BIPVBase : NSObject
12 |
13 | + (NSDictionary *)statisticsBIPVBase;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVRcpCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVRcpCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 11/5/14.
6 | //
7 | //
8 |
9 | #import "AVCommand.h"
10 |
11 | @interface AVRcpCommand : AVCommand
12 | @property(nonatomic, strong)NSString *id;
13 | @property(nonatomic)int64_t t;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Query/AVFriendQuery.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVFriendQuery.h
3 | // paas
4 | //
5 | // Created by Travis on 14-1-26.
6 | // Copyright (c) 2014年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVQuery.h"
10 |
11 | @interface AVFriendQuery : AVQuery
12 | @property(nonatomic, copy) NSString *targetFeild;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVSessionInCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVSessionInCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVSessionCommand.h"
10 |
11 | @interface AVSessionInCommand : AVSessionCommand
12 | @property(nonatomic, strong)NSArray *onlineSessionPeerIds;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCDatabaseCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCDatabaseCommon.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/1/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class LCDatabase;
12 |
13 | typedef void(^LCDatabaseJob)(LCDatabase *db);
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Object/AVSaveOption_internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Header.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/12/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVSaveOption ()
12 |
13 | - (NSDictionary *)dictionary;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJFoundation.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJFoundation.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 14/7/16.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MJFoundation : NSObject
12 | + (BOOL)isClassFromFoundation:(Class)c;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/NSDictionary+LCHash.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+LCHash.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 7/15/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSDictionary (LCHash)
12 |
13 | - (NSString *)lc_SHA1String;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/File/AVPartialInputStream.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVPartialInputStream.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 8/21/14.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface AVPartialInputStream : NSInputStream
12 | @property (nonatomic) uint64_t offset;
13 | @property (nonatomic) uint64_t maxLength;
14 | @end
15 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Commands/AVIMCommandCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMCommandCommon.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/4/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "MessagesProtoOrig.pbobjc.h"
10 | #import "AVIMGenericCommand+AVIMMessagesAdditions.h"
11 | #import "AVIMCommandFormatter.h"
12 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/ACL/AVACL_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVACL_Internal.h
3 | // AVOSCloud
4 | //
5 | // Created by Zhu Zeng on 3/13/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVACL.h"
10 |
11 | @interface AVACL ()
12 |
13 | @property (nonatomic, readwrite, strong) NSMutableDictionary *permissionsById;
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/Track/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/03/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/AspectTrack/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/AVCustomUser.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCustomUser.h
3 | // AVOS
4 | //
5 | // Created by lzw on 15/10/22.
6 | // Copyright © 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVCustomUser : AVUser
12 |
13 | @property (nonatomic, copy) NSString *title;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/AVOSCloud_Art.txt:
--------------------------------------------------------------------------------
1 | __ ________ __
2 | / / ___ ____ _____ / ____/ /___ __ ______/ /
3 | / / / _ \/ __ `/ __ \ / / / / __ \/ / / / __ /
4 | / /___/ __/ /_/ / / / / / /___/ / /_/ / /_/ / /_/ /
5 | /_____/\___/\__,_/_/ /_/ \____/_/\____/\__,_/\__,_/
6 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/File/AVFileHTTPRequestOperation.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVFileHTTPRequestOperation.h
3 | // paas
4 | //
5 | // Created by Summer on 13-5-27.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVJSONRequestOperation.h"
10 |
11 | @interface AVFileHTTPRequestOperation : AVJSONRequestOperation
12 | @property (copy) NSString *localPath;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Utilities/AVIMErrorUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMErrorUtil.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/20/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVIMErrorUtil : NSObject
12 | + (NSError *)errorWithCode:(NSInteger)code reason:(NSString *)reason;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/Track/Track/Sender.h:
--------------------------------------------------------------------------------
1 | //
2 | // Sender.h
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/03/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface Sender : NSObject
12 |
13 | + (id)sharedInstance;
14 |
15 | - (void)addToSendingList:(NSString*)data;
16 |
17 | - (void)exit;
18 |
19 | @end
20 |
21 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/ThirdParty/libextobjc/EXTScope.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXTScope.m
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2011-05-04.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTScope.h"
11 |
12 | void lc_executeCleanupBlock (__strong ext_cleanupBlock_t *block) {
13 | (*block)();
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/AVCustomUser.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVCustomUser.m
3 | // AVOS
4 | //
5 | // Created by lzw on 15/10/22.
6 | // Copyright © 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVCustomUser.h"
10 |
11 | @implementation AVCustomUser
12 |
13 | @dynamic title;
14 |
15 | + (NSString *)parseClassName {
16 | return @"_User";
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVCommandDictionary.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCommandDictionary.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 7/22/14.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface AVCommandDictionary : NSObject
12 | - (void)setObject:(id)object forKey:(NSString *)key;
13 | - (void)removeObjectForKey:(NSString *)key;
14 | - (NSString *)JSONString;
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Router/LCRouter_internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCRouter_internal.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 5/10/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVOSCloud.h"
10 |
11 | @interface LCRouter ()
12 |
13 | /// Service region of router.
14 | @property (nonatomic, assign) AVServiceRegion serviceRegion;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Analytics/AVAnalytics_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVAnalytics_Internal.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 10/29/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVConstants.h"
11 | #import "AVAnalytics.h"
12 |
13 | @interface AVAnalytics ()
14 |
15 | +(void)startInternally;
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVRcpCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVRcpCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 11/5/14.
6 | //
7 | //
8 |
9 | #import "AVRcpCommand.h"
10 |
11 | @implementation AVRcpCommand
12 | @dynamic id, t;
13 |
14 | - (instancetype)init {
15 | if ((self = [super init])) {
16 | self.cmd = AVCommandRcp;
17 | }
18 | return self;
19 | }
20 | @end
21 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVAckCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVAckCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVAckCommand.h"
10 |
11 | @implementation AVAckCommand
12 | @dynamic ids, t, uid;
13 |
14 | - (instancetype)init {
15 | if ((self = [super init])) {
16 | self.cmd = AVCommandAck;
17 | }
18 | return self;
19 | }
20 | @end
21 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMUserOptions.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMUserOptions.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 8/18/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMUserOptions.h"
10 |
11 | NSString *const AVIMUserOptionUseUnread = @"AVIMUserOptionUseUnread";
12 | NSString *const AVIMUserOptionCustomProtocols = @"AVIMUserOptionCustomProtocols";
13 |
--------------------------------------------------------------------------------
/Track/AVOS/TestBase/AVTestUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVTestUtil.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 1/27/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVTestUtil : NSObject
12 | + (void)registerUserWithName:(NSString *)name;
13 | + (void)loginUserWithName:(NSString *)name;
14 | + (void)logoutUser;
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/Track/Track/TrackerModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // TrackerModel.m
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/11/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import "TrackerModel.h"
10 |
11 | @implementation TrackerModel
12 |
13 | + (NSDictionary *)objectClassInArray{
14 | return @{@"data" : [Data class]};
15 | }
16 | @end
17 |
18 | @implementation Data
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Track/Track/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/11/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/AspectTrack/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/AVConfiguration_extension.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVConfiguration_internal.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 7/29/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | @interface AVConfiguration ()
10 |
11 | @property (nonatomic, copy, readwrite) NSString *applicationId;
12 | @property (nonatomic, copy, readwrite) NSString *applicationKey;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Geo/AVGeoPoint_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVGeoPoint_Internal.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 3/12/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVGeoPoint.h"
10 |
11 | @interface AVGeoPoint ()
12 |
13 | +(NSDictionary *)dictionaryFromGeoPoint:(AVGeoPoint *)point;
14 | +(AVGeoPoint *)geoPointFromDictionary:(NSDictionary *)dict;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVHistoryMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVHistoryMessage.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 10/21/14.
6 | //
7 | //
8 |
9 | #import
10 | #import "AVMessage.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface AVHistoryMessage : AVMessage
15 |
16 | @property (nonatomic, strong) NSString *conversationId;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVAckCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVAckCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVCommand.h"
10 |
11 | @interface AVAckCommand : AVCommand
12 | //@property(nonatomic, strong)NSString *peerId;
13 | @property(nonatomic, strong)NSArray *ids;
14 | @property(nonatomic)int64_t t;
15 | @property(nonatomic, strong)NSString *uid;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/InternalObjects/AVIMMessageObject.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMMessageObject.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 1/28/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMMessageObject.h"
10 |
11 | @implementation AVIMMessageObject
12 | @dynamic ioType, status, messageId, clientId, conversationId, content, sendTimestamp, deliveredTimestamp;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/InternalObjects/AVIMGeneralObject.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMGeneralObject.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/15/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMGeneralObject.h"
10 |
11 | @implementation AVIMGeneralObject
12 | @dynamic width, height, size, duration, name, format, longitude, latitude, location, metaData, objId, url;
13 | @end
14 |
--------------------------------------------------------------------------------
/Track/Track/MainHomeController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MainHomeController.m
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/11/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import "MainHomeController.h"
10 |
11 | @interface MainHomeController ()
12 |
13 | @end
14 |
15 | @implementation MainHomeController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 |
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Query/AVCloudQueryResult_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCloudQueryResult_Internal.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/22/14.
6 | //
7 | //
8 |
9 | #import
10 | #import "AVCloudQueryResult.h"
11 |
12 | @interface AVCloudQueryResult()
13 | - (void)setClassName:(NSString *)className;
14 | - (void)setCount:(NSUInteger)count;
15 | - (void)setResults:(NSArray *)results;
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCSSLChallenger.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCSSLChallenger.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/30/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LCSSLChallenger : NSObject
12 |
13 | + (instancetype)sharedInstance;
14 |
15 | - (void)acceptChallenge:(NSURLAuthenticationChallenge *)challenge;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/AspectTrack/Aspects/MOAspectsHookRange.m:
--------------------------------------------------------------------------------
1 | //
2 | // MOAspectsHookRange.m
3 | // MOAspectsDemo
4 | //
5 | // Created by HiromiMotodera on 7/4/15.
6 | // Copyright (c) 2015 MOAI. All rights reserved.
7 | //
8 |
9 | #import "MOAspectsHookRange.h"
10 |
11 | MOAspectsHookRange const MOAspectsHookRangeAll = { .location = 0, .length = INT_MAX };
12 |
13 | MOAspectsHookRange const MOAspectsHookRangeSingle = { .location = 0, .length = 0 };
14 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVDirectInCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVDirectInCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVDirectCommand.h"
10 |
11 | @interface AVDirectInCommand : AVDirectCommand
12 | @property(nonatomic, strong)NSString *id;
13 | @property(nonatomic, strong)NSString *fromPeerId;
14 | @property(nonatomic)int64_t timestamp;
15 | @property(nonatomic)bool offline;
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMClientOpenOption.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMClientOpenOption.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/8/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface AVIMClientOpenOption : NSObject
14 |
15 | @property (nonatomic, assign) BOOL force;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVHistoryMessage.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVHistoryMessage.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 10/21/14.
6 | //
7 | //
8 |
9 | #import "AVHistoryMessage.h"
10 |
11 | @implementation AVHistoryMessage
12 | - (id)copyWithZone:(NSZone *)zone {
13 | AVHistoryMessage *message = [super copy];
14 | if (message) {
15 | message.conversationId = _conversationId;
16 | }
17 | return message;
18 | }
19 | @end
20 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVDynamicBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVDynamicBase.h
3 | // RuntimeTest
4 | //
5 | // Created by Qihe Bian on 9/3/14.
6 | // Copyright (c) 2014 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVDynamicBase : NSObject
12 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary;
13 | - (instancetype)initWithJSON:(NSString *)json;
14 | - (NSString *)JSONString;
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVSessionOutCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVSessionOutCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVSessionCommand.h"
10 | #import "AVSignature.h"
11 |
12 | @interface AVSessionOutCommand : AVSessionCommand
13 | @property(nonatomic) NSString *appId;
14 | @property(nonatomic, strong)NSArray *sessionPeerIds;
15 | @property(nonatomic, strong)AVSignature *signature;
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCURLConnection.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCURLConnection.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 12/10/15.
6 | // Copyright © 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LCURLConnection : NSObject
12 |
13 | + (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)error;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMFileMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMFileMessage.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 7/30/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTypedMessage.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * 文件消息类
15 | */
16 | @interface AVIMFileMessage : AVIMTypedMessage
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Commands/AVIMDirectCommand+DirectCommandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMDirectCommand+DirectCommandAdditions.h
3 | // AVOS
4 | //
5 | // Created by 陈宜龙 on 16/1/8.
6 | // Copyright © 2016年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "MessagesProtoOrig.pbobjc.h"
10 | #import "AVIMMessage.h"
11 |
12 | @interface AVIMDirectCommand (DirectCommandAdditions)
13 |
14 | @property(nonatomic, strong) AVIMMessage *message;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Cache/AVScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVScheduler.h
3 | // paas
4 | //
5 | // Created by Summer on 13-8-22.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVScheduler : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger queryCacheExpiredDays;
14 | @property (nonatomic, assign) NSInteger fileCacheExpiredDays;
15 |
16 | + (AVScheduler *)sharedInstance;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMFileMessage.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMFileMessage.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 7/30/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMFileMessage.h"
10 |
11 | @implementation AVIMFileMessage
12 |
13 | + (void)load {
14 | [self registerSubclass];
15 | }
16 |
17 | + (AVIMMessageMediaType)classMediaType {
18 | return kAVIMMessageMediaTypeFile;
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Track/Track/Track/Tracker.h:
--------------------------------------------------------------------------------
1 | //
2 | // Track.h
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/03/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "LogData.h"
11 |
12 | @interface Tracker : NSObject
13 |
14 | + (id)sharedInstance;
15 |
16 | /**
17 | * @brief 设置UUID
18 | */
19 | + (void)setUUID:(NSString*)uuid;
20 |
21 | - (void)addLog:(LogData*)logData;
22 |
23 | - (void)exit;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/AspectTrack/BIStatistics.h:
--------------------------------------------------------------------------------
1 | //
2 | // BIAop.h
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BIPVConst.h"
11 | #define EventSelector @"EventSelector"
12 | #define EventHandlerBlock @"EventHandlerBlock"
13 |
14 | @interface BIStatistics : NSObject
15 |
16 | /**
17 | * 初始化BI统计
18 | */
19 |
20 | + (void)setupBIStatistics;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Object/AVRelation_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVRelation_Internal.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 3/8/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVRelation.h"
10 |
11 | @interface AVRelation ()
12 |
13 | @property (nonatomic, readwrite, copy) NSString * key;
14 | @property (nonatomic, readwrite, weak) AVObject * parent;
15 |
16 | +(AVRelation *)relationFromDictionary:(NSDictionary *)dict;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIMTests/AVIMCustomMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMCustomMessage.h
3 | // AVOS
4 | //
5 | // Created by lzw on 15/7/7.
6 | // Copyright (c) 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTestBase.h"
10 |
11 | static NSInteger const kAVIMMessageMediaTypeCustom = 1;
12 |
13 | @interface AVIMCustomMessage : AVIMTypedMessage
14 |
15 | + (instancetype)messageWithAttributes:(NSDictionary *)attributes;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/AVConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVConfiguration.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 7/29/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVConfiguration : NSObject
12 |
13 | + (instancetype)sharedInstance;
14 |
15 | @property (nonatomic, copy, readonly) NSString *applicationId;
16 | @property (nonatomic, copy, readonly) NSString *applicationKey;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVDirectOutCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVDirectOutCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVDirectCommand.h"
10 | #import "AVMessage.h"
11 |
12 | @interface AVDirectOutCommand : AVDirectCommand
13 | @property(nonatomic, strong)NSArray *toPeerIds;
14 | @property(nonatomic)bool r;
15 |
16 | - (void)setReceiptCallback:(AVCommandResultBlock)callback;
17 | - (AVCommandResultBlock)receiptCallback;
18 | @end
19 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVPresenceCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVPresenceCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/5/14.
6 | //
7 | //
8 |
9 | #import "AVCommand.h"
10 | extern NSString *const AVPresenceStatusOn;
11 | extern NSString *const AVPresenceStatusOff;
12 |
13 | @interface AVPresenceCommand : AVCommand
14 | @property(nonatomic, strong)NSArray *sessionPeerIds;
15 | @property(nonatomic, strong)NSString *status;
16 | //@property(nonatomic, strong)NSString *peerId;
17 | @end
18 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/File/AVFileHTTPRequestOperation.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVFileHTTPRequestOperation.m
3 | // paas
4 | //
5 | // Created by Summer on 13-5-27.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVFileHTTPRequestOperation.h"
10 |
11 | @implementation AVFileHTTPRequestOperation
12 |
13 | + (BOOL)canProcessRequest:(NSURLRequest *)request {
14 | return [[self class] isEqual:[AVFileHTTPRequestOperation class]] || [super canProcessRequest:request];
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Object/AVSaveOption.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVSaveOption.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/12/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class AVQuery;
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface AVSaveOption : NSObject
16 |
17 | @property (nonatomic, assign) BOOL fetchWhenSave;
18 | @property (nonatomic, strong, nullable) AVQuery *query;
19 |
20 | @end
21 |
22 | NS_ASSUME_NONNULL_END
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/ACL/AVRole_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVRole_Internal.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 3/13/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVRole.h"
10 |
11 | @class AVACL;
12 |
13 | @interface AVRole ()
14 |
15 | @property (nonatomic, readwrite, strong) AVACL * acl;
16 | @property (nonatomic, readwrite, strong) NSMutableDictionary * relationData;
17 |
18 | +(instancetype)role;
19 |
20 | +(NSString *)className;
21 | +(NSString *)endPoint;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVPresenceCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVPresenceCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/5/14.
6 | //
7 | //
8 |
9 | #import "AVPresenceCommand.h"
10 | NSString *const AVPresenceStatusOn = @"on";
11 | NSString *const AVPresenceStatusOff = @"off";
12 |
13 | @implementation AVPresenceCommand
14 | @dynamic sessionPeerIds, status;
15 |
16 | - (instancetype)init {
17 | if ((self = [super init])) {
18 | self.cmd = AVCommandPresence;
19 | }
20 | return self;
21 | }
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMConversationQuery_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMConversationQuery_Internal.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 2/11/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | @class AVIMClient;
11 |
12 | @interface AVIMConversationQuery ()
13 |
14 | @property (nonatomic, strong) NSMutableDictionary *where;
15 | @property (nonatomic, strong) NSString *order;
16 | @property (nonatomic, strong) AVIMClient *client;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIMTests/AVIMTestBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMTestBase.h
3 | // AVOS
4 | //
5 | // Created by lzw on 15/7/6.
6 | // Copyright (c) 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVTestBase.h"
10 | #import "AVOSCloudIM.h"
11 |
12 | @interface AVIMTestBase : AVTestBase
13 |
14 | - (void)openClientForTest;
15 |
16 | - (AVIMConversation *)queryConversationById:(NSString *)convid;
17 |
18 | - (AVIMConversation *)conversationForTest;
19 | - (AVIMConversation *)transientConversationForTest;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/UserBar.m:
--------------------------------------------------------------------------------
1 | //
2 | // UserBar.m
3 | //
4 | //
5 | // Created by Summer on 13-9-9.
6 | //
7 | //
8 |
9 | #import "UserBar.h"
10 | #import "AVObject+Subclass.h"
11 |
12 | @implementation UserBar
13 |
14 | @dynamic displayName;
15 | @dynamic rupees;
16 | @dynamic fireproof;
17 |
18 | @dynamic testDoubleValue;
19 | @dynamic nameForTextCopy;
20 |
21 | @dynamic testFloatValue;
22 | @dynamic testCGFloatValue;
23 |
24 | + (NSString *)parseClassName {
25 | return @"_User";
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Query/AVCloudQueryResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVCloudQueryResult.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/22/14.
6 | //
7 | //
8 |
9 | #import "AVCloudQueryResult.h"
10 | #import "AVCloudQueryResult_Internal.h"
11 |
12 | @implementation AVCloudQueryResult
13 |
14 | - (void)setClassName:(NSString *)className {
15 | _className = className;
16 | }
17 |
18 | - (void)setResults:(NSArray *)results {
19 | _results = results;
20 | }
21 |
22 | - (void)setCount:(NSUInteger)count {
23 | _count = count;
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMUserOptions.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMUserOptions.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 8/18/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*
14 | * 开启未读通知,关闭离线消息推送。
15 | */
16 | FOUNDATION_EXPORT NSString *const AVIMUserOptionUseUnread;
17 |
18 | /*
19 | * 自定义消息传输协议。如果没有特殊目的,不应该使用这个选项。
20 | */
21 | FOUNDATION_EXPORT NSString *const AVIMUserOptionCustomProtocols;
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMConversationUpdateBuilder_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMConversationUpdateBuilder_Internal.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/8/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMConversationUpdateBuilder.h"
10 | #import "AVIMConversation.h"
11 | #import "AVIMDynamicObject.h"
12 |
13 | @interface AVIMConversationUpdateBuilder ()
14 | //@property(nonatomic, weak)AVIMConversation *conversation;
15 | @property(nonatomic, strong)AVIMDynamicObject *object;
16 | @end
17 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVMPMessagePack/AVMPMessagePack.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVMPMessagePack.h
3 | // AVMPMessagePack
4 | //
5 | // Created by Gabriel on 7/3/14.
6 | // Copyright (c) 2014 Gabriel Handford. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AVMPDefines.h"
12 | #import "AVMPMessagePackWriter.h"
13 | #import "AVMPMessagePackReader.h"
14 |
15 | //#import "NSDictionary+AVMPMessagePack.h"
16 | //#import "NSArray+AVMPMessagePack.h"
17 | //#import "NSData+AVMPMessagePack.h"
18 |
19 | #import "AVMPOrderedDictionary.h"
--------------------------------------------------------------------------------
/Track/Track/Track/TrackRequest.h:
--------------------------------------------------------------------------------
1 | //
2 | // TrackRequest.h
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/03/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TrackRequest : NSObject
12 |
13 | #pragma mark - 发送Track数据
14 |
15 | /**
16 | * 发送给BI Track数据
17 | *
18 | *
19 | */
20 |
21 | +(BOOL)sendTrackDataSync:(NSString *)data;
22 |
23 |
24 | /**
25 | * 发送给OTS Track数据
26 | *
27 | *
28 | */
29 |
30 | +(BOOL)sendTrackOTSDataSync:(NSString *)data;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Analytics/AVExceptionHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVExceptionHandler.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 8/19/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | extern NSString * const AVOS_UncaughtExceptionHandlerAddressesKey;
12 |
13 | @interface AVExceptionHandler : NSObject
14 |
15 | +(void)installAVOSUncaughtExceptionHandler;
16 | +(void)uninstallAVOSUncaughtExceptionHandler;
17 | + (NSArray *)backtrace;
18 | + (NSString*)appBuildUUID;
19 | @end
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Statistics/LCNetworkStatistics.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCNetworkStatistics.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/26/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LCNetworkStatistics : NSObject
12 |
13 | + (instancetype)sharedInstance;
14 |
15 | - (void)addIncrementalAttribute:(NSInteger)amount forKey:(NSString *)key;
16 | - (void)addAverageAttribute:(double)amount forKey:(NSString *)key;
17 |
18 | - (void)start;
19 | - (void)stop;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMCommon.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMCommon.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/26/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 | #import
9 |
10 | /* AVOSCloud IM code key */
11 | NSString *const kAVIMCodeKey = @"code";
12 | /* AVOSCloud IM appCode key */
13 | NSString *const kAVIMAppCodeKey = @"appCode";
14 | /* AVOSCloud IM reason key */
15 | NSString *const kAVIMReasonKey = @"reason";
16 | /* AVOSCloud IM detail key */
17 | NSString *const kAVIMDetailKey = @"detail";
18 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJExtension.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | // 代码地址:https://github.com/CoderMJLee/MJExtension
8 | // 代码地址:http://code4app.com/ios/%E5%AD%97%E5%85%B8-JSON-%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/5339992a933bf062608b4c57
9 |
10 | #import "NSObject+MJCoding.h"
11 | #import "NSObject+MJProperty.h"
12 | #import "NSObject+MJClass.h"
13 | #import "NSObject+MJKeyValue.h"
14 | #import "NSString+MJExtension.h"
15 | #import "MJExtensionConst.h"
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/UserInfo.m:
--------------------------------------------------------------------------------
1 | //
2 | // userInfo.m
3 | // AVOS_DEMO
4 | //
5 | // Created by Albert on 13-9-8.
6 | // Copyright (c) 2013年 Albert. All rights reserved.
7 | //
8 |
9 | #import "UserInfo.h"
10 | #import
11 |
12 | @implementation UserInfo
13 |
14 | //@dynamic brithday,constellation,zodiac,telephone,mobile,address,zipcode,nationality,brithProvince,graduateSchool,company,education,bloodType,QQ,MSN,interest,abums;
15 |
16 |
17 | + (NSString *)parseClassName {
18 | return @"UserInfoSub";
19 | }
20 |
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Request/AVPaasClient_internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVPaasClient_internal.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 5/23/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 |
10 | @interface AVPaasClient()
11 |
12 | /**
13 | A table of requests indexed by URL.
14 |
15 | If request task is not retained by application,
16 | the request will be removed from this table automaticly after request did finish.
17 | Thanks to the feature of NSMapTable.
18 | */
19 | @property (nonatomic, strong) NSMapTable *requestTable;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Push/AVInstallation_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVInstallation_Internal.h
3 | // LeanCloud
4 | //
5 | // Created by Zhu Zeng on 3/27/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVInstallation.h"
10 |
11 | @interface AVInstallation ()
12 |
13 | @property (nonatomic, copy) NSString *timeZone;
14 | @property (nonatomic, copy) NSString *deviceType;
15 |
16 | +(AVQuery *)installationQuery;
17 | +(AVInstallation *)installation;
18 |
19 |
20 | +(NSString *)deviceType;
21 |
22 | +(NSString *)className;
23 | +(NSString *)endPoint;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVCommandCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCommandCommon.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #ifndef AVOS_AVCommandCommon_h
10 | #define AVOS_AVCommandCommon_h
11 |
12 | #import "AVCommand.h"
13 | #import "AVAckCommand.h"
14 | #import "AVDirectCommand.h"
15 | #import "AVDirectInCommand.h"
16 | #import "AVDirectOutCommand.h"
17 | #import "AVPresenceCommand.h"
18 | #import "AVRoomCommand.h"
19 | #import "AVSessionCommand.h"
20 | #import "AVSessionInCommand.h"
21 | #import "AVSessionOutCommand.h"
22 | #import "AVRcpCommand.h"
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVDirectCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVDirectCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/5/14.
6 | //
7 | //
8 |
9 | #import "AVCommand.h"
10 | #import "AVMessage.h"
11 |
12 | @interface AVDirectCommand : AVCommand
13 | @property(nonatomic, strong)NSString *msg;
14 | //@property(nonatomic, strong)NSString *peerId;
15 | @property(nonatomic, strong)NSString *roomId;
16 |
17 | @property(nonatomic, strong)AVMessage *message;
18 | @property(nonatomic)bool transient;
19 |
20 | + (instancetype)commandWithMessage:(AVMessage *)message transient:(BOOL)transient;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/UserBar.h:
--------------------------------------------------------------------------------
1 | //
2 | // UserBar.h
3 | //
4 | //
5 | // Created by Summer on 13-9-9.
6 | //
7 | //
8 |
9 | #import
10 | #import "AVSubclassing.h"
11 |
12 | @interface UserBar : AVUser
13 |
14 | + (NSString *)parseClassName;
15 |
16 | @property (retain) NSString *displayName;
17 | @property int rupees;
18 | @property BOOL fireproof;
19 | @property (assign) double testDoubleValue;
20 | @property (copy, nonatomic) NSString *nameForTextCopy;
21 |
22 | @property float testFloatValue;
23 | @property CGFloat testCGFloatValue;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCDatabaseCoordinator.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCDatabaseCoordinator.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/1/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "LCDatabaseCommon.h"
11 |
12 | @interface LCDatabaseCoordinator : NSObject
13 |
14 | @property (readonly) NSString *databasePath;
15 |
16 | - (instancetype)initWithDatabasePath:(NSString *)databasePath;
17 |
18 | - (void)executeTransaction:(LCDatabaseJob)job fail:(LCDatabaseJob)fail;
19 |
20 | - (void)executeJob:(LCDatabaseJob)job;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/AspectTrack/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/Armor.m:
--------------------------------------------------------------------------------
1 | //
2 | // Armor.m
3 | // paas
4 | //
5 | // Created by Summer on 13-4-2.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "Armor.h"
10 | #import "AVObject+Subclass.h"
11 |
12 | @implementation Armor
13 |
14 | @dynamic displayName;
15 | @dynamic rupees;
16 | @dynamic fireproof;
17 |
18 | @dynamic testDoubleValue;
19 | @dynamic nameForTextCopy;
20 |
21 | @dynamic testFloatValue;
22 | @dynamic testCGFloatValue;
23 | @dynamic type,seller;
24 |
25 | @dynamic userBar;
26 |
27 | + (NSString *)parseClassName {
28 | return @"Armor";
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Track/AVOS/common.function:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function fail_and_exit()
4 | {
5 | echo "$*, Failed and EXIT "
6 | exit 1
7 | }
8 |
9 | function get_current_branch()
10 | {
11 | git branch | sed -n -e 's/^\* \(.*\)/\1/p'
12 | }
13 |
14 | function json_replace()
15 | {
16 | # if hash key does not exist, will append to json
17 | ruby -e "
18 | require 'rubygems'
19 | require 'json'
20 |
21 | exit 1 unless ARGV.count > 2
22 | json = JSON.parse( File.read( ARGV[0] ) )
23 | json[ ARGV[1] ] = ARGV[2]
24 | File.open( ARGV[0], 'w' ) { | file | file.write( JSON.dump( json ) ) }
25 | exit 0
26 | " $1 $2 $3
27 | }
28 |
--------------------------------------------------------------------------------
/AspectTrack.xcodeproj/xcuserdata/Kenvin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AspectTrack.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 23D876D11C89B6140059EE01
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Utilities/AVIMRuntimeHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMRuntimeHelper.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/26/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVIMRuntimeHelper : NSObject
12 | + (void)callMethodWithTarget:(id)target selector:(SEL)selector arguments:(NSArray *)arguments returnValue:(void *)returnValue;
13 | + (void)callMethodWithTarget:(id)target selector:(SEL)selector arguments:(NSArray *)arguments;
14 | + (void)callMethodInMainThreadWithTarget:(id)target selector:(SEL)selector arguments:(NSArray *)arguments;
15 | @end
16 |
--------------------------------------------------------------------------------
/AspectTrack/Aspects/MOAspectsStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // MOAspectsStore.h
3 | // MOAspects
4 | //
5 | // Created by Hiromi Motodera on 2015/03/15.
6 | // Copyright (c) 2015 MOAI. All rights reserved
7 | //
8 |
9 | #import
10 | #import "MOAspectsTarget.h"
11 |
12 | @interface MOAspectsStore : NSObject
13 |
14 | + (instancetype)sharedStore;
15 |
16 | + (NSString *)keyWithClass:(Class)clazz
17 | selector:(SEL)selector
18 | methodType:(MOAspectsTargetMethodType)methodType;
19 |
20 | - (void)setTarget:(MOAspectsTarget * )target forKey:(NSString *)key;
21 |
22 | - (MOAspectsTarget *)targetForKey:(NSString *)key;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/InternalObjects/AVIMTypedMessageObject.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMTypedMessageObject.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/8/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMDynamicObject.h"
10 | #import "AVIMCommon.h"
11 |
12 | @interface AVIMTypedMessageObject : AVIMDynamicObject
13 | @property(nonatomic)int8_t _lctype;
14 | @property(nonatomic, strong)NSString *_lctext;
15 | @property(nonatomic, strong)NSDictionary *_lcfile;
16 | @property(nonatomic, strong)NSDictionary *_lcloc;
17 | @property(nonatomic, strong)NSDictionary *_lcattrs;
18 |
19 | - (BOOL)isValidTypedMessageObject;
20 | @end
21 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMTextMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMTextMessage.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTypedMessage.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Text Message.
15 | */
16 | @interface AVIMTextMessage : AVIMTypedMessage
17 |
18 | /*!
19 | 创建文本消息。
20 | @param text - 消息文本.
21 | @param attributes - 用户附加属性
22 | */
23 | + (instancetype)messageWithText:(NSString *)text
24 | attributes:(nullable NSDictionary *)attributes;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCKeyValueStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCKeyValueStore.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/26/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LCKeyValueStore : NSObject
12 |
13 | + (instancetype)sharedInstance;
14 |
15 | - (instancetype)initWithDatabasePath:(NSString *)databasePath;
16 |
17 | - (instancetype)initWithDatabasePath:(NSString *)databasePath tableName:(NSString *)tableName;
18 |
19 | - (NSData *)dataForKey:(NSString *)key;
20 |
21 | - (void)setData:(NSData *)data forKey:(NSString *)key;
22 |
23 | - (void)deleteKey:(NSString *)key;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Commands/AVIMDirectCommand+DirectCommandAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMDirectCommand+DirectCommandAdditions.m
3 | // AVOS
4 | //
5 | // Created by 陈宜龙 on 16/1/8.
6 | // Copyright © 2016年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMDirectCommand+DirectCommandAdditions.h"
10 | #import
11 |
12 | @implementation AVIMDirectCommand (DirectCommandAdditions)
13 |
14 | - (AVIMMessage *)message {
15 | return objc_getAssociatedObject(self, @selector(message));
16 | }
17 |
18 | - (void)setMessage:(AVIMMessage *)message {
19 | objc_setAssociatedObject(self, @selector(message), message, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/AVConfiguration.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVConfiguration.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 7/29/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVConfiguration.h"
10 | #import "AVConfiguration_extension.h"
11 |
12 | @implementation AVConfiguration
13 |
14 | + (instancetype)sharedInstance {
15 | static AVConfiguration *sharedInstance = nil;
16 |
17 | if (sharedInstance) {
18 | return sharedInstance;
19 | }
20 |
21 | static dispatch_once_t onceToken;
22 |
23 | dispatch_once(&onceToken, ^{
24 | sharedInstance = [[AVConfiguration alloc] init];
25 | });
26 |
27 | return sharedInstance;
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/LCIMClientSessionTokenCacheStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCIMClientSessionTokenCacheStore.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 10/16/15.
6 | // Copyright © 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | FOUNDATION_EXPORT NSString *const LCIMTagDefault;
12 |
13 | @interface LCIMClientSessionTokenCacheStore : NSObject
14 |
15 | + (instancetype)sharedInstance;
16 |
17 | - (void)setSessionToken:(NSString *)sessionToken TTL:(NSTimeInterval)TTL forClientId:(NSString *)clientId tag:(NSString *)tag;
18 |
19 | - (NSString *)sessionTokenForClientId:(NSString *)clientId tag:(NSString *)tag;
20 |
21 | - (void)clearForClientId:(NSString *)clientId;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Object/AVSaveOption.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVSaveOption.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/12/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVSaveOption.h"
10 | #import "AVSaveOption_internal.h"
11 | #import "AVQuery.h"
12 | #import "AVQuery_Internal.h"
13 |
14 | @implementation AVSaveOption
15 |
16 | - (NSDictionary *)dictionary {
17 | NSMutableDictionary *result = [NSMutableDictionary dictionary];
18 |
19 | if (self.fetchWhenSave)
20 | result[@"fetchWhenSave"] = @(YES);
21 |
22 | NSDictionary *where = [self.query.where copy];
23 |
24 | if (where)
25 | result[@"where"] = where;
26 |
27 | return result;
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJPropertyKey.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJPropertyKey.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/8/11.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | MJPropertyKeyTypeDictionary = 0, // 字典的key
13 | MJPropertyKeyTypeArray // 数组的key
14 | } MJPropertyKeyType;
15 |
16 | /**
17 | * 属性的key
18 | */
19 | @interface MJPropertyKey : NSObject
20 | /** key的名字 */
21 | @property (copy, nonatomic) NSString *name;
22 | /** key的种类,可能是@"10",可能是@"age" */
23 | @property (assign, nonatomic) MJPropertyKeyType type;
24 |
25 | /**
26 | * 根据当前的key,也就是name,从object(字典或者数组)中取值
27 | */
28 | - (id)valueInObject:(id)object;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVDirectOutCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVDirectOutCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVDirectOutCommand.h"
10 |
11 | @interface AVDirectOutCommand () {
12 | AVCommandResultBlock _receiptCallback;
13 | }
14 | @end
15 |
16 | @implementation AVDirectOutCommand
17 | @dynamic toPeerIds, transient, r;
18 |
19 | - (void)addOrRefreshSerialId {
20 | if (!self.transient) {
21 | self.i = [[self class] nextSerialId];
22 | }
23 | }
24 |
25 | - (void)setReceiptCallback:(AVCommandResultBlock)callback {
26 | _receiptCallback = [callback copy];
27 | }
28 |
29 | - (AVCommandResultBlock)receiptCallback {
30 | return _receiptCallback;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVSessionCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVSessionCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVCommand.h"
10 |
11 | extern NSString *const AVSessionOperationOpen;
12 | extern NSString *const AVSessionOperationOpened;
13 | extern NSString *const AVSessionOperationAdd;
14 | extern NSString *const AVSessionOperationAdded;
15 | extern NSString *const AVSessionOperationRemove;
16 | extern NSString *const AVSessionOperationClose;
17 | extern NSString *const AVSessionOperationQuery;
18 | extern NSString *const AVSessionOperationQueryResult;
19 |
20 | @interface AVSessionCommand : AVCommand
21 | @property(nonatomic, strong) NSString *op;
22 | //@property(nonatomic, strong)NSString *peerId;
23 | @end
24 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/InternalObjects/AVIMMessageObject.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMMessageObject.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/28/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMDynamicObject.h"
10 | #import "AVIMMessage.h"
11 |
12 | @interface AVIMMessageObject : AVIMDynamicObject
13 | @property(nonatomic)AVIMMessageIOType ioType;
14 | @property(nonatomic)AVIMMessageStatus status;
15 | @property(nonatomic, strong)NSString *messageId;
16 | @property(nonatomic, strong)NSString *clientId;
17 | @property(nonatomic, strong)NSString *conversationId;
18 | @property(nonatomic, strong)NSString *content;
19 | @property(nonatomic)int64_t sendTimestamp;
20 | @property(nonatomic)int64_t deliveredTimestamp;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJPropertyKey.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJPropertyKey.m
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/8/11.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJPropertyKey.h"
10 |
11 | @implementation MJPropertyKey
12 |
13 | - (id)valueInObject:(id)object
14 | {
15 | if ([object isKindOfClass:[NSDictionary class]] && self.type == MJPropertyKeyTypeDictionary) {
16 | return object[self.name];
17 | } else if ([object isKindOfClass:[NSArray class]] && self.type == MJPropertyKeyTypeArray) {
18 | NSArray *array = object;
19 | NSUInteger index = self.name.intValue;
20 | if (index < array.count) return array[index];
21 | return nil;
22 | }
23 | return nil;
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/File/AVUploaderManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVUploaderManager.h
3 | // IconMan
4 | //
5 | // Created by Zhu Zeng on 3/16/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVOSCloud.h"
11 |
12 | @interface AVUploaderManager : NSObject
13 |
14 | @property (nonatomic, assign) AVStorageType storageType;
15 | @property (nonatomic, assign) AVServiceRegion serviceRegion;
16 |
17 | +(AVUploaderManager *)sharedInstance;
18 | + (NSString *)generateRandomString:(int)length;
19 | + (NSString *)generateQiniuKey;
20 | -(void)cancelWithLocalPath:(NSString *)path;
21 |
22 | - (void)uploadWithAVFile:(AVFile *)file progressBlock:(AVProgressBlock)progressBlock resultBlock:(AVBooleanResultBlock)resultBlock;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Track/TrackTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Push/AVPush_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVPush_Internal.h
3 | // Paas
4 | //
5 | // Created by Zhu Zeng on 3/28/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVPush.h"
10 | #import "AVQuery.h"
11 |
12 | @interface AVPush ()
13 |
14 | @property (nonatomic, readwrite, strong) AVQuery * pushQuery;
15 | @property (nonatomic, readwrite, strong) NSMutableArray * pushChannels;
16 | @property (nonatomic, readwrite, strong) NSMutableDictionary * pushData;
17 | @property (nonatomic, readwrite, strong) NSDate * expirationDate;
18 | @property (nonatomic, readwrite, strong) NSDate * pushTime;
19 | @property (nonatomic, readwrite) NSTimeInterval expireTimeInterval;
20 | @property (nonatomic, readwrite, strong) NSMutableArray * pushTarget;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Query/AVCloudQueryResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCloudQueryResult.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/22/14.
6 | //
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface AVCloudQueryResult : NSObject
14 | /**
15 | * 查询结果的 className
16 | */
17 | @property(nonatomic, copy, readonly) NSString *className;
18 |
19 | /**
20 | * 查询的结果 AVObject 对象列表
21 | */
22 | @property(nonatomic, strong, readonly) NSArray *results;
23 |
24 | /**
25 | * 查询 count 结果, 只有使用 select count(*) ... 时有效
26 | */
27 | @property(nonatomic, assign, readonly) NSUInteger count;
28 |
29 | @end
30 |
31 | typedef void(^AVCloudQueryCallback)(AVCloudQueryResult * _Nullable result, NSError * _Nullable error);
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/Track/TrackUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMTextMessage.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMTextMessage.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTextMessage.h"
10 | #import "AVIMTypedMessage_Internal.h"
11 |
12 | @implementation AVIMTextMessage
13 |
14 | + (void)load {
15 | [self registerSubclass];
16 | }
17 |
18 | + (AVIMMessageMediaType)classMediaType {
19 | return kAVIMMessageMediaTypeText;
20 | }
21 |
22 | + (instancetype)messageWithText:(NSString *)text
23 | attributes:(NSDictionary *)attributes {
24 | AVIMTextMessage *message = [[self alloc] init];
25 | message.text = text;
26 | message.attributes = attributes;
27 | return message;
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/UserArmor.m:
--------------------------------------------------------------------------------
1 | //
2 | // UserArmor.m
3 | // paas
4 | //
5 | // Created by Summer on 13-9-9.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "UserArmor.h"
10 | #import "AVObject+Subclass.h"
11 |
12 | @implementation UserArmor
13 |
14 | @dynamic displayName;
15 | @dynamic rupees;
16 | @dynamic fireproof;
17 |
18 | @dynamic testDoubleValue;
19 | @dynamic nameForTextCopy;
20 |
21 | @dynamic testFloatValue;
22 | @dynamic testCGFloatValue;
23 |
24 | @dynamic headView;
25 | @dynamic nickName, registerIp, credits, numberOfRemind;//新提醒数
26 | @dynamic location, userInfo, QQWeibo, SinaWeibo, RenRen, WeChat;
27 |
28 | @dynamic armor;
29 | @dynamic friends;
30 |
31 | + (NSString *)parseClassName {
32 | return @"_User";
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/AVOSCloud_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVOSCloud_Internal.h
3 | // paas
4 | //
5 | // Created by Travis on 14-2-11.
6 | // Copyright (c) 2014年 AVOS. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | FOUNDATION_EXPORT NSString *const LCRootDomain;
13 | FOUNDATION_EXPORT NSString *const LCRootCertificate;
14 |
15 | @protocol AVOSCloudModule
16 |
17 | + (void)AVOSCloudDidInitializeWithApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey;
18 |
19 | @end
20 |
21 | @interface AVOSCloud ()
22 |
23 | /**
24 | * Get versioned REST endpoint.
25 | * @return A versioned REST URL string, for example, "https://api.leancloud.cn/1.1".
26 | */
27 | + (NSURL *)RESTBaseURL;
28 |
29 | + (void)enableAVOSCloudModule:(Class)cls;
30 |
31 | @end
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMVideoMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMVideoMessage.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTypedMessage.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Video Message.
15 | */
16 | @interface AVIMVideoMessage : AVIMTypedMessage
17 |
18 | /// File size in bytes.
19 | @property(nonatomic, assign, readonly) uint64_t size;
20 |
21 | /// Duration of the video in seconds.
22 | @property(nonatomic, assign, readonly) float duration;
23 |
24 | /// Video format, mp4, m4v, etc. Simply get it from the file extension.
25 | @property(nonatomic, copy, readonly, nullable) NSString *format;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/AspectTrack/BIPVBase.m:
--------------------------------------------------------------------------------
1 | //
2 | // BIPVBase.m
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import "BIPVBase.h"
10 | #import "BIStatistics.h"
11 | #import "BIPVConst.h"
12 | #import "ViewController.h"
13 | @implementation BIPVBase
14 |
15 | + (NSDictionary *)statisticsBIPVBase{
16 | return @{@"ViewController":@[
17 | @{
18 | EventSelector: @"viewWillAppear:",
19 | EventHandlerBlock: ^(ViewController *controller,
20 | BOOL animated ) {
21 | NSLog(@"埋雷了,小心!");
22 | }
23 | },
24 |
25 | ]};
26 | }
27 | @end
28 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIMTests/AVIMCustomMessage.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMCustomMessage.m
3 | // AVOS
4 | //
5 | // Created by lzw on 15/7/7.
6 | // Copyright (c) 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMCustomMessage.h"
10 |
11 | @implementation AVIMCustomMessage
12 |
13 | + (void)load {
14 | [self registerSubclass];
15 | }
16 |
17 | + (AVIMMessageMediaType)classMediaType {
18 | return kAVIMMessageMediaTypeCustom;
19 | }
20 |
21 | - (instancetype)init {
22 | if ((self = [super init])) {
23 | self.mediaType = [[self class] classMediaType];
24 | }
25 | return self;
26 | }
27 |
28 | + (instancetype)messageWithAttributes:(NSDictionary *)attributes {
29 | AVIMCustomMessage *message = [[self alloc] init];
30 | message.attributes = attributes;
31 | return message;
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/Armor.h:
--------------------------------------------------------------------------------
1 | //
2 | // Armor.h
3 | // paas
4 | //
5 | // Created by Summer on 13-4-2.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVOSCloud.h"
10 | #import "AVSubclassing.h"
11 | #import "UserBar.h"
12 |
13 | typedef enum{
14 | Type1=1,
15 | Type2=2
16 | }TypeEnum;
17 |
18 | @interface Armor : AVObject
19 |
20 | @property (retain) NSString *displayName;
21 | @property TypeEnum type;
22 | @property(nonatomic) AVObject *seller;
23 | @property int rupees;
24 | @property BOOL fireproof;
25 | @property (assign) double testDoubleValue;
26 | @property (copy, nonatomic) NSString *nameForTextCopy;
27 |
28 | @property float testFloatValue;
29 | @property CGFloat testCGFloatValue;
30 |
31 | @property (nonatomic, strong) UserBar *userBar;
32 |
33 | @end
34 |
35 |
--------------------------------------------------------------------------------
/Track/Track/Track/LogData.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface LogData : NSObject
4 |
5 | @property (nonatomic, strong) NSMutableDictionary *dictionary;
6 |
7 | + (LogData*)create;
8 |
9 | - (LogData*)pv:(NSString*)pv;
10 |
11 | - (LogData*)event:(NSString*)event;
12 |
13 | - (LogData*)append:(NSDictionary*)dictionary;
14 |
15 | - (LogData*)append:(NSString*)key withString:(NSString*)value;
16 |
17 | - (LogData*)append:(NSString *)key withInt:(int)value;
18 |
19 | - (LogData*)append:(NSString *)key withBool:(bool)value;
20 |
21 | - (LogData*)append:(NSString *)key withFloat:(float)value;
22 |
23 | - (LogData*)append:(NSString *)key withDouble:(double)value;
24 |
25 | - (LogData*)append:(NSString *)key withLong:(long)value;
26 |
27 | - (LogData*)append:(NSString *)key withLongLong:(long long)value;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVMPMessagePack/AVMPMessagePackWriter.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVMPMessagePackWriter.h
3 | // AVMPMessagePack
4 | //
5 | // Created by Gabriel on 7/3/14.
6 | // Copyright (c) 2014 Gabriel Handford. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSInteger, AVMPMessagePackWriterOptions) {
12 | AVMPMessagePackWriterOptionsSortDictionaryKeys = 1 << 0,
13 | };
14 |
15 | @interface AVMPMessagePackWriter : NSObject
16 |
17 | - (NSMutableData *)writeObject:(id)obj options:(AVMPMessagePackWriterOptions)options error:(NSError * __autoreleasing *)error;
18 |
19 | + (NSMutableData *)writeObject:(id)obj error:(NSError * __autoreleasing *)error;
20 |
21 | + (NSMutableData *)writeObject:(id)obj options:(AVMPMessagePackWriterOptions)options error:(NSError * __autoreleasing *)error;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Geo/AVLocationManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVLocationManager.h
3 | // paas
4 | //
5 | // Created by Summer on 13-3-16.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class AVGeoPoint,CLLocation,CLLocationManager;
12 |
13 |
14 | /**
15 | * 管理地理位置
16 | */
17 | @interface AVLocationManager : NSObject
18 |
19 | /**
20 | * 系统的 CLLocationManager
21 | */
22 | @property (nonatomic, strong, readonly) CLLocationManager *locationManager;
23 |
24 | /**
25 | * 最后一次获取到的地理位置
26 | */
27 | @property (nonatomic, strong, readonly) CLLocation *lastLocation;
28 |
29 | + (AVLocationManager *)sharedInstance;
30 |
31 | /**
32 | * 刷新当前地理位置
33 | *
34 | * @param block 回调结果
35 | */
36 | - (void)updateWithBlock:(void(^)(AVGeoPoint *geoPoint, NSError *error))block;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMAudioMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMAudioMessage.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTypedMessage.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Audio Message. Can be created by the audio's file path.
15 | */
16 | @interface AVIMAudioMessage : AVIMTypedMessage
17 |
18 | /// File size in bytes.
19 | @property(nonatomic, assign, readonly) uint64_t size;
20 |
21 | /// Audio's duration in seconds.
22 | @property(nonatomic, assign, readonly) float duration;
23 |
24 | /// Audio format, mp3, aac, etc. Simply get it by the file extension.
25 | @property(nonatomic, copy, readonly, nullable) NSString *format;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Track/AVOS/TestBase/XCTestCase+AsyncTesting.h:
--------------------------------------------------------------------------------
1 | //
2 | // XCTestCase+AsyncTesting.h
3 | // AsyncXCTestingKit
4 | //
5 | // Created by 小野 将司 on 12/03/17.
6 | // Modified for XCTest by Vincil Bishop
7 | // Copyright (c) 2012年 AppBankGames Inc. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 |
13 | enum {
14 | XCTAsyncTestCaseStatusUnknown = 0,
15 | XCTAsyncTestCaseStatusWaiting,
16 | XCTAsyncTestCaseStatusSucceeded,
17 | XCTAsyncTestCaseStatusFailed,
18 | XCTAsyncTestCaseStatusCancelled,
19 | };
20 | typedef NSUInteger XCTAsyncTestCaseStatus;
21 |
22 |
23 | @interface XCTestCase (AsyncTesting)
24 |
25 | - (void)waitForStatus:(XCTAsyncTestCaseStatus)status timeout:(NSTimeInterval)timeout;
26 | - (void)waitForTimeout:(NSTimeInterval)timeout;
27 | - (void)notify:(XCTAsyncTestCaseStatus)status;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Request/AFNetworkingFix.h:
--------------------------------------------------------------------------------
1 | //
2 | // AFNetworkingFix.h
3 | // paas
4 | //
5 | // Created by Travis on 13-12-9.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVNetworking.h"
10 |
11 | #ifndef _AFNETWORKING_
12 | #define _AFNETWORKING_
13 | #define AFMultipartFormData AVMultipartFormData
14 |
15 | typedef AVHTTPClient AFHTTPClient;
16 | typedef AVHTTPRequestOperation AFHTTPRequestOperation;
17 | typedef AVJSONRequestOperation AFJSONRequestOperation;
18 | typedef AVXMLRequestOperation AFXMLRequestOperation;
19 | typedef AVURLConnectionOperation AFURLConnectionOperation;
20 | typedef AVHTTPClient AFHTTPClient;
21 | typedef AVImageRequestOperation AFImageRequestOperation;
22 | typedef AVNetworkActivityIndicatorManager AFNetworkActivityIndicatorManager;
23 | #endif
24 |
25 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudCrashReporting/AVOSCloudCrashReporting_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVOSCloudCrashReporting_Internal.h
3 | // AVOSCloudCrashReporting
4 | //
5 | // Created by Qihe Bian on 3/10/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVOSCloudCrashReporting.h"
10 | #import "AVOSCloud_Internal.h"
11 | #import "BreakpadController.h"
12 |
13 | @interface AVOSCloudCrashReporting () {
14 | BreakpadController *_crashReporter;
15 | }
16 | //@property(nonatomic, getter=isCrashReportingEnabled) BOOL crashReportingEnabled;
17 |
18 | + (void)AVOSCloudDidInitializeWithApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey;
19 | //- (void)processPendingCrashReports;
20 | - (void)enableCrashReportingWithApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey;
21 | @end
22 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Commands/AVIMDynamicObject.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMDynamicObject.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/4/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVIMDynamicObject : NSObject
12 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary;
13 | - (instancetype)initWithMutableDictionary:(NSMutableDictionary *)dictionary;
14 | - (instancetype)initWithJSON:(NSString *)json;
15 | - (instancetype)initWithMessagePack:(NSData *)data;
16 | - (NSString *)JSONString;
17 | - (NSDictionary *)dictionary;
18 | - (NSData *)messagePack;
19 |
20 | - (BOOL)hasKey:(NSString *)key;
21 | - (id)objectForKey:(NSString *)key;
22 | - (void)setObject:(id)object forKey:(NSString *)key;
23 | - (void)removeObjectForKey:(NSString *)key;
24 | @end
25 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/Thread.m:
--------------------------------------------------------------------------------
1 | //
2 | // Thread.m
3 | //
4 | //
5 | // Created by Albert on 13-9-13.
6 | // Copyright (c) 2013年 Albert. All rights reserved.
7 | //
8 |
9 | #import "Thread.h"
10 | #import "AVObject+Subclass.h"
11 |
12 | @implementation Thread
13 |
14 | @dynamic title, postUser, lastPoster, tags;
15 | @dynamic price, views, viewsOfToday, viewsOfYesterday;//昨天阅览次数
16 |
17 | @dynamic faviconUser, location, place, state, numberOfPosts;
18 |
19 | @dynamic posts;
20 |
21 | + (NSString *)parseClassName
22 | {
23 | return @"Thread";
24 | }
25 |
26 | @end
27 |
28 |
29 |
30 | @implementation AVComment
31 |
32 | @dynamic state;
33 |
34 | + (NSString *)parseClassName
35 | {
36 | return @"SubclassComment";
37 | }
38 |
39 | @end
40 |
41 |
42 | @implementation AVSubComment
43 |
44 | @dynamic subState;
45 |
46 | @end
47 |
48 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloud-macOSTests.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloudIM-macOSTests.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Track/Track.xcodeproj/xcuserdata/Kenvin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Track.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | AE0922171DD3A658007CB32D
16 |
17 | primary
18 |
19 |
20 | AE0922301DD3A658007CB32D
21 |
22 | primary
23 |
24 |
25 | AE09223B1DD3A658007CB32D
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/InternalObjects/AVIMGeneralObject.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMGeneralObject.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/15/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMDynamicObject.h"
10 |
11 | @interface AVIMGeneralObject : AVIMDynamicObject
12 | @property(nonatomic)uint width;
13 | @property(nonatomic)uint height;
14 | @property(nonatomic)uint64_t size;
15 | @property(nonatomic)float duration;
16 | @property(nonatomic, strong)NSString *name;
17 | @property(nonatomic, strong)NSString *format;
18 | @property(nonatomic, strong)NSString *url;
19 | @property(nonatomic, strong)NSString *objId;
20 | @property(nonatomic)float longitude;
21 | @property(nonatomic)float latitude;
22 | @property(nonatomic, strong)AVIMGeneralObject *metaData;
23 | @property(nonatomic, strong)AVIMGeneralObject *location;
24 | @end
25 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIMTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | cn.leancloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Cache/AVCacheManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCacheManager.h
3 | // LeanCloud
4 | //
5 | // Created by Summer on 13-3-19.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVConstants.h"
11 |
12 | @interface AVCacheManager : NSObject
13 |
14 | + (AVCacheManager *)sharedInstance;
15 |
16 | // cache
17 | - (void)getWithKey:(NSString *)key maxCacheAge:(NSTimeInterval)maxCacheAge block:(AVIdResultBlock)block;
18 | - (void)saveJSON:(id)JSON forKey:(NSString *)key;
19 |
20 | - (BOOL)hasCacheForKey:(NSString *)key;
21 | - (BOOL)hasCacheForMD5Key:(NSString *)key;
22 |
23 | // clear
24 | + (BOOL)clearAllCache;
25 | + (BOOL)clearCacheMoreThanOneDay;
26 | + (BOOL)clearCacheMoreThanDays:(NSInteger)numberOfDays;
27 | - (void)clearCacheForKey:(NSString *)key;
28 | - (void)clearCacheForMD5Key:(NSString *)key;
29 | @end
30 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVSessionOutCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVSessionOutCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVSessionOutCommand.h"
10 |
11 | @interface AVSessionOutCommand () {
12 | AVSignature *_signature;
13 | }
14 | @property (nonatomic, strong)NSString *s;
15 | @property (nonatomic)int64_t t;
16 | @property (nonatomic, strong)NSString *n;
17 | @end
18 | @implementation AVSessionOutCommand
19 | @dynamic appId, sessionPeerIds, s, t, n;
20 |
21 | - (void)setSignature:(AVSignature *)signature {
22 | _signature = signature;
23 | if (signature) {
24 | self.s = signature.signature;
25 | self.t = signature.timestamp;
26 | self.n = signature.nonce;
27 | self.sessionPeerIds = signature.signedPeerIds;
28 | }
29 | }
30 |
31 | - (AVSignature *)signature {
32 | return _signature;
33 | }
34 | @end
35 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMMessageOption.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMMessageOption.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 9/13/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSInteger, AVIMMessagePriority) {
12 | AVIMMessagePriorityDefault = 0,
13 | AVIMMessagePriorityHigh = 1,
14 | AVIMMessagePriorityNormal = 2,
15 | AVIMMessagePriorityLow = 3,
16 | };
17 |
18 | NS_ASSUME_NONNULL_BEGIN
19 |
20 | @interface AVIMMessageOption : NSObject
21 |
22 | @property (nonatomic, assign) BOOL receipt;
23 | @property (nonatomic, assign) BOOL transient;
24 | @property (nonatomic, assign) AVIMMessagePriority priority;
25 | @property (nonatomic, strong, nullable) NSDictionary *pushData;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/TestInstallationSave.json:
--------------------------------------------------------------------------------
1 | {
2 | "valid": true,
3 | "timeZone": "Asia/Shanghai",
4 | "deviceToken": "60805ee7ff1705c73062abd417c0ec5e4aa0bbd0a211ee2ad4be8171c6dc9cba",
5 | "enableNoDisturb": false,
6 | "deviceType": "ios",
7 | "badge": 0,
8 | "user": {
9 | "__type": "Pointer",
10 | "className": "_User",
11 | "objectId": "55f287f860b2de2d9ee7c91a"
12 | },
13 | "channels": [
14 | "FollowedForecast",
15 | "FollowedLiving",
16 | "HotLiving",
17 | "55f287f860b2de2d9ee7c91a"
18 | ],
19 | "ACL": {
20 | "*": {
21 | "read": true,
22 | "write": true
23 | }
24 | },
25 | "objectId": "oQIJsi8pLezaAbYzxJQp9nkMqKCssdPg",
26 | "createdAt": "2015-09-17T09:12:40.989Z",
27 | "updatedAt": "2015-09-25T15:51:59.851Z"
28 | }
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVMPMessagePack/AVMPDefines.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVMPDefines.h
3 | // AVMPMessagePack
4 | //
5 | // Created by Gabriel on 12/13/14.
6 | // Copyright (c) 2014 Gabriel Handford. All rights reserved.
7 | //
8 |
9 | #undef AVMPDebug
10 | #define AVMPDebug(fmt, ...) do {} while(0)
11 | #undef AVMPErr
12 | #define AVMPErr(fmt, ...) do {} while(0)
13 |
14 | #if DEBUG
15 | #undef AVMPDebug
16 | #define AVMPDebug(fmt, ...) NSLog((@"%s:%d: " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
17 | #undef AVMPErr
18 | #define AVMPErr(fmt, ...) NSLog((@"%s:%d: " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
19 | #endif
20 |
21 | typedef void (^AVMPCompletion)(NSError *error);
22 |
23 | #define AVMPMakeError(CODE, fmt, ...) [NSError errorWithDomain:@"AVMPMessagePack" code:CODE userInfo:@{NSLocalizedDescriptionKey:[NSString stringWithFormat:fmt, ##__VA_ARGS__]}]
24 |
25 | #define AVMPIfNull(obj, val) ([obj isEqual:NSNull.null] ? val : obj)
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMImageMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMImageMessage.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTypedMessage.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Image Message. Can be created by the image's file path.
15 | */
16 | @interface AVIMImageMessage : AVIMTypedMessage
17 |
18 | /// Width of the image in pixels.
19 | @property(nonatomic, assign, readonly) uint width;
20 |
21 | /// Height of the image in pixels.
22 | @property(nonatomic, assign, readonly) uint height;
23 |
24 | /// File size in bytes.
25 | @property(nonatomic, assign, readonly) uint64_t size;
26 |
27 | /// Image format, png, jpg, etc. Simply get it from the file extension.
28 | @property(nonatomic, copy, readonly, nullable) NSString *format;
29 |
30 | @end
31 |
32 | NS_ASSUME_NONNULL_END
33 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/AVErrorUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVErrorUtils.h
3 | // LeanCloud
4 | //
5 | // Created by Zhu Zeng on 3/23/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | extern NSString * const kAVErrorDomain;
12 | extern NSString * const kAVErrorUnknownText;
13 |
14 | typedef NS_ENUM(NSInteger, AVLocalErrorCode) {
15 | AVLocalErrorCodeInvalidArgument = 10000
16 | };
17 |
18 | @interface AVErrorUtils : NSObject
19 |
20 | +(NSError *)errorWithCode:(NSInteger)code;
21 | +(NSError *)errorWithCode:(NSInteger)code errorText:(NSString *)text;
22 | + (NSError *)errorWithText:(NSString *)text;
23 |
24 | +(NSError *)internalServerError;
25 | +(NSError *)fileNotFoundError;
26 | +(NSError *)dataNotAvailableError;
27 |
28 | + (NSError *)errorFromJSON:(id)JSON;
29 | + (NSString *)errorTextFromError:(NSError *)error;
30 | + (NSError *)errorFromAVError:(NSError *)error;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVMPMessagePack/AVMPMessagePackReader.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVMPMessagePackReader.h
3 | // AVMPMessagePack
4 | //
5 | // Created by Gabriel on 7/3/14.
6 | // Copyright (c) 2014 Gabriel Handford. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSInteger, AVMPMessagePackReaderOptions) {
12 | AVMPMessagePackReaderOptionsUseOrderedDictionary = 1 << 0,
13 | };
14 |
15 |
16 | @interface AVMPMessagePackReader : NSObject
17 |
18 | @property (readonly) size_t index;
19 |
20 | - (instancetype)initWithData:(NSData *)data;
21 | - (instancetype)initWithData:(NSData *)data options:(AVMPMessagePackReaderOptions)options;
22 |
23 | - (id)readObject:(NSError * __autoreleasing *)error;
24 |
25 | + (id)readData:(NSData *)data error:(NSError * __autoreleasing *)error;
26 |
27 | + (id)readData:(NSData *)data options:(AVMPMessagePackReaderOptions)options error:(NSError * __autoreleasing *)error;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloud-iOS.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.avoscloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloud-tvOS.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.avoscloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloud-watchOS.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.avoscloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloudIM-iOS.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.avoscloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMKeyedConversation_internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCIMKeyedConversation_internal.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMKeyedConversation.h"
10 |
11 | @interface AVIMKeyedConversation ()
12 |
13 | @property (nonatomic, copy) NSString *conversationId;
14 | @property (nonatomic, copy) NSString *clientId;
15 | @property (nonatomic, copy) NSString *creator;
16 | @property (nonatomic, strong) NSDate *createAt;
17 | @property (nonatomic, strong) NSDate *updateAt;
18 | @property (nonatomic, strong) NSDate *lastMessageAt;
19 | @property (nonatomic, copy) NSString *name;
20 | @property (nonatomic, strong) NSArray *members;
21 | @property (nonatomic, strong) NSDictionary *attributes;
22 | @property (nonatomic, assign) BOOL transient;
23 | @property (nonatomic, assign) BOOL muted;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloud-iOSTests.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | cn.leancloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | LSApplicationCategoryType
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloudCrashReporting-iOS.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.avoscloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloudIM-iOSTests.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | cn.leancloud.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | LSApplicationCategoryType
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/AVSearchSortBuilderTest.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestAVSearchSortBuilder.m
3 | // paas
4 | //
5 | // Created by yang chaozhong on 6/13/14.
6 | // Copyright (c) 2014 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVTestBase.h"
10 | #import "AVPaasClient.h"
11 | #import "AVSearchSortBuilder.h"
12 | #import "AVGeoPoint.h"
13 |
14 | @interface AVSearchSortBuilderTest : AVTestBase
15 |
16 | @end
17 |
18 | @implementation AVSearchSortBuilderTest
19 |
20 | - (void)testSortBuilder
21 | {
22 | AVSearchSortBuilder *sortBuilder = [AVSearchSortBuilder newBuilder];
23 | [sortBuilder orderByAscending:@"key1"];
24 | [sortBuilder orderByAscending:@"key2" withMode:@"sum"];
25 | [sortBuilder orderByAscending:@"key3" withMode:@"avg" andMissing:@"first"];
26 | [sortBuilder whereNear:@"location" point:[AVGeoPoint geoPointWithLatitude:45.0f longitude:60.0f]];
27 |
28 | NSArray *fields = sortBuilder.sortFields;
29 | NSLog(@"%@", fields);
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/AVUtilsTest.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVUtilsTest.m
3 | // AVOS
4 | //
5 | // Created by lzw on 15/11/12.
6 | // Copyright © 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVTestBase.h"
10 | #import "AVUtils.h"
11 | #import "AVLogger.h"
12 |
13 | @interface AVUtilsTest : AVTestBase
14 |
15 | @end
16 |
17 | @implementation AVUtilsTest
18 |
19 | - (void)setUp {
20 | [super setUp];
21 | }
22 |
23 | - (void)tearDown {
24 | [super tearDown];
25 | }
26 |
27 | - (void)testLog {
28 | // [INFO] -[AVUtilsTest testLog] [Line 29] Now running testLog
29 | AVLoggerI(@"Now running testLog");
30 | AVLoggerE(@"Network error");
31 | AVLoggerI(@"Test format %@ %s %d", @"string", "c string", 10);
32 | }
33 |
34 | - (void)testLogEnabled {
35 | // 观察日志是否输出
36 | [AVOSCloud setAllLogsEnabled:NO];
37 | AVLoggerD(@"debug");
38 | [[AVInstallation currentInstallation] save];
39 | [AVOSCloud setAllLogsEnabled:YES];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJExtensionConst.m:
--------------------------------------------------------------------------------
1 | #ifndef __MJExtensionConst__M__
2 | #define __MJExtensionConst__M__
3 |
4 | #import
5 |
6 | /**
7 | * 成员变量类型(属性类型)
8 | */
9 | NSString *const MJPropertyTypeInt = @"i";
10 | NSString *const MJPropertyTypeShort = @"s";
11 | NSString *const MJPropertyTypeFloat = @"f";
12 | NSString *const MJPropertyTypeDouble = @"d";
13 | NSString *const MJPropertyTypeLong = @"l";
14 | NSString *const MJPropertyTypeLongLong = @"q";
15 | NSString *const MJPropertyTypeChar = @"c";
16 | NSString *const MJPropertyTypeBOOL1 = @"c";
17 | NSString *const MJPropertyTypeBOOL2 = @"b";
18 | NSString *const MJPropertyTypePointer = @"*";
19 |
20 | NSString *const MJPropertyTypeIvar = @"^{objc_ivar=}";
21 | NSString *const MJPropertyTypeMethod = @"^{objc_method=}";
22 | NSString *const MJPropertyTypeBlock = @"@?";
23 | NSString *const MJPropertyTypeClass = @"#";
24 | NSString *const MJPropertyTypeSEL = @":";
25 | NSString *const MJPropertyTypeId = @"@";
26 |
27 | #endif
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Analytics/AVDuration.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVDuration.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 10/10/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | // life cycle, like android activity.
12 | @interface AVDuration : NSObject
13 |
14 |
15 | @property (nonatomic, readwrite) NSTimeInterval resumeTimeStamp;
16 | @property (nonatomic, readwrite) NSTimeInterval duration;
17 |
18 | /// Duration set by user. Sometimes, developers want to record duration by themselves.
19 | @property (nonatomic, readwrite) NSTimeInterval userDuration;
20 |
21 |
22 | -(void)start;
23 | -(void)stop;
24 | -(BOOL)isStopped;
25 |
26 | -(void)resume;
27 | -(void)pause;
28 |
29 | /// Sync duration. Let duration += Now - Last.
30 | -(void)sync;
31 |
32 | -(void)setDurationWithMilliSeconds:(long)ms;
33 | -(void)addDurationWithMilliSeconds:(long)ms;
34 | -(NSTimeInterval)createTimeStampInMilliSeconds;
35 |
36 | +(NSTimeInterval)currentTS;
37 |
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/User/AVUser_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVUser_Internal.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 3/14/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVUser.h"
10 |
11 | #define AnonymousIdKey @"LeanCloud.AnonymousId"
12 |
13 | @interface AVUser ()
14 |
15 | @property (nonatomic, readwrite, copy) NSString *facebookToken;
16 | @property (nonatomic, readwrite, copy) NSString *twitterToken;
17 | @property (nonatomic, readwrite, copy) NSString *sinaWeiboToken;
18 | @property (nonatomic, readwrite, copy) NSString *qqWeiboToken;
19 | @property (nonatomic, readwrite) BOOL isNew;
20 | @property (nonatomic, readwrite) BOOL mobilePhoneVerified;
21 |
22 | + (AVUser *)userOrSubclassUser;
23 |
24 | +(NSString *)userTag;
25 | +(BOOL)isAutomaticUserEnabled;
26 | +(void)disableAutomaticUser;
27 |
28 | +(NSString *)endPoint;
29 | -(NSString *)internalClassName;
30 | -(void)setNewFlag:(BOOL)isNew;
31 |
32 | +(void)removeCookies;
33 |
34 | - (NSArray *)linkedServiceNames;
35 | @end
36 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/MessageCache/CacheStore/LCIMConversationQueryCacheStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCIMConversationQueryCacheStore.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 8/31/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "LCKeyValueStore.h"
10 |
11 | @class AVIMConversationOutCommand;
12 |
13 | @interface LCIMConversationQueryCacheStore : LCKeyValueStore
14 |
15 | @property (copy, readonly) NSString *clientId;
16 |
17 | - (instancetype)initWithClientId:(NSString *)clientId;
18 |
19 | - (void)cacheConversationIds:(NSArray *)conversationIds forCommand:(AVIMConversationOutCommand *)command;
20 |
21 | - (void)removeConversationIdsForCommand:(AVIMConversationOutCommand *)command;
22 |
23 | /*!
24 | * Get conversation id list for a given command.
25 | * @param command AVIMConversationOutCommand object.
26 | * @return A conversation id list or nil if cache not found.
27 | */
28 | - (NSArray *)conversationIdsForCommand:(AVIMConversationOutCommand *)command;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVSessionCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVSessionCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVSessionCommand.h"
10 |
11 | NSString *const AVSessionOperationOpen = @"open";
12 | NSString *const AVSessionOperationOpened = @"opened";
13 | NSString *const AVSessionOperationAdd = @"add";
14 | NSString *const AVSessionOperationAdded = @"added";
15 | NSString *const AVSessionOperationRemove = @"remove";
16 | NSString *const AVSessionOperationClose = @"close";
17 | NSString *const AVSessionOperationQuery = @"query";
18 | NSString *const AVSessionOperationQueryResult = @"query-result";
19 |
20 | @implementation AVSessionCommand
21 | @dynamic op;
22 |
23 | - (instancetype)init {
24 | if ((self = [super init])) {
25 | self.cmd = AVCommandSession;
26 | }
27 | return self;
28 | }
29 |
30 | - (NSString *)description {
31 | NSString *des = [[NSString alloc] initWithFormat:@"%@ operation:%@", [super description], self.op];
32 | return des;
33 | }
34 | @end
35 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVOSCloudIM.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVOSCloudIM.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/6/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AVOSCloudIM.h"
12 |
13 | @implementation AVOSCloudIM
14 |
15 | + (void)registerForRemoteNotification {
16 | [AVOSCloud registerForRemoteNotification];
17 | }
18 |
19 | + (void)registerForRemoteNotificationTypes:(NSUInteger)types categories:(NSSet *)categories {
20 | [AVOSCloud registerForRemoteNotificationTypes:types categories:categories];
21 | }
22 |
23 | + (void)handleRemoteNotificationsWithDeviceToken:(NSData *)deviceToken constructingInstallationWithBlock:(void (^)(AVInstallation *))block {
24 | [AVOSCloud handleRemoteNotificationsWithDeviceToken:deviceToken constructingInstallationWithBlock:block];
25 | }
26 |
27 | + (void)handleRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
28 | [AVOSCloud handleRemoteNotificationsWithDeviceToken:deviceToken];
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloud-macOS.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSHumanReadableCopyright
24 | Copyright © 2015年 LeanCloud Inc. All rights reserved.
25 | NSPrincipalClass
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Track/Track/Track/TrackerModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // TrackerModel.h
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/11/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 | @class Data;
11 |
12 | @interface TrackerModel : NSObject
13 |
14 | @property (nonatomic, strong) NSArray *data;
15 |
16 | @end
17 |
18 |
19 |
20 | @interface Data : NSObject
21 |
22 | @property (nonatomic, copy) NSString *district;
23 |
24 | @property (nonatomic, copy) NSString *deviceId;
25 |
26 | @property (nonatomic, copy) NSString *os;
27 |
28 | @property (nonatomic, copy) NSString *channel;
29 |
30 | @property (nonatomic, copy) NSString *eventType;
31 |
32 | @property (nonatomic, copy) NSString *userId;
33 |
34 | @property (nonatomic, copy) NSString *model;
35 |
36 | @property (nonatomic, copy) NSString *dataName;
37 |
38 | @property (nonatomic, copy) NSString *timeStamp;
39 |
40 | @property (nonatomic, copy) NSString *version;
41 |
42 | @property (nonatomic, copy) NSString *packageName;
43 |
44 | @end
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Track/AVOS/Resources/AVOSCloudIM-macOS.Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSHumanReadableCopyright
24 | Copyright © 2015年 LeanCloud Inc. All rights reserved.
25 | NSPrincipalClass
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Request/AVRequestOperation.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVRequestOperation.h
3 | // AVOSCloud
4 | //
5 | // Created by Zhu Zeng on 7/9/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVConstants.h"
11 |
12 | @interface AVRequestOperation : NSObject
13 |
14 | @property (nonatomic, readwrite, strong) NSMutableArray * batchRequest;
15 | @property (nonatomic, readwrite, copy) AVBooleanResultBlock block;
16 | @property (nonatomic, readwrite) int sequence;
17 |
18 | +(AVRequestOperation *)operation:(NSArray *)request;
19 |
20 | @end
21 |
22 |
23 | @interface AVRequestOperationQueue : NSObject
24 |
25 | @property (nonatomic, readwrite) NSMutableArray * queue;
26 | @property (nonatomic, readwrite) int currentSequence;
27 |
28 | -(void)increaseSequence;
29 | -(AVRequestOperation *)addOperation:(NSArray *)request
30 | withBlock:(AVBooleanResultBlock)block;
31 | -(AVRequestOperation *)popHead;
32 | -(BOOL)noPendingRequest;
33 | -(void)clearOperationWithSequence:(int)seq;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudCrashReporting/AVOSCloudCrashReporting.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVOSCloudCrashReporting.h
3 | // AVOSCloudCrashReporting
4 | //
5 | // Created by Qihe Bian on 4/24/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*!
14 | The `AVOSCloudCrashReporting` class is responsible for enabling crash reporting in your application.
15 | */
16 | @interface AVOSCloudCrashReporting : NSObject
17 |
18 | ///--------------------------------------
19 | /// @name Crash Reporting
20 | ///--------------------------------------
21 |
22 | /*!
23 | @abstract Enables crash reporting for your app.
24 |
25 | @warning This must be called before you set Application ID and Client Key on AVOSCloud.
26 | */
27 | + (void)enable;
28 |
29 | /*!
30 | @abstract Indicates whether crash reporting is currently enabled.
31 |
32 | @returns `YES` if crash reporting is enabled, `NO` - otherwise.
33 | */
34 | + (BOOL)isCrashReportingEnabled;
35 |
36 | @end
37 |
38 | NS_ASSUME_NONNULL_END
39 |
--------------------------------------------------------------------------------
/Track/TrackTests/TrackTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TrackTests.m
3 | // TrackTests
4 | //
5 | // Created by Kenvin on 2016/11/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TrackTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation TrackTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Utilities/AVIMBlockHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMBlockHelper.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/9/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMCommon.h"
10 |
11 | @interface AVIMBlockHelper : NSObject
12 |
13 | + (void)callBooleanResultBlock:(AVIMBooleanResultBlock)block
14 | error:(NSError *)error;
15 |
16 | + (void)callIntegerResultBlock:(AVIMIntegerResultBlock)block
17 | number:(NSInteger)number
18 | error:(NSError *)error;
19 |
20 | + (void)callArrayResultBlock:(AVIMArrayResultBlock)block
21 | array:(NSArray *)array
22 | error:(NSError *)error;
23 |
24 | + (void)callConversationResultBlock:(AVIMConversationResultBlock)block
25 | conversation:(AVIMConversation *)conversation
26 | error:(NSError *)error;
27 |
28 | + (AVIMBooleanResultBlock)calledOnceBlockWithBooleanResultBlock:(AVIMBooleanResultBlock)block;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCKeyValueSQL.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCKeyValueSQL.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/26/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #ifndef AVOS_LCKeyValueSQL_h
10 | #define AVOS_LCKeyValueSQL_h
11 |
12 | #define LC_TABLE_KEY_VALUE @"key_value_table"
13 | #define LC_FIELD_KEY @"key"
14 | #define LC_FIELD_VALUE @"value"
15 |
16 | #define LC_SQL_CREATE_KEY_VALUE_TABLE_FMT \
17 | @"CREATE TABLE IF NOT EXISTS %@ (" \
18 | LC_FIELD_KEY @" TEXT, " \
19 | LC_FIELD_VALUE @" BLOB, " \
20 | @"PRIMARY KEY(" LC_FIELD_KEY @")" \
21 | @")"
22 |
23 | #define LC_SQL_SELECT_KEY_VALUE_FMT \
24 | @"SELECT * FROM %@ WHERE " LC_FIELD_KEY @" = ?"
25 |
26 | #define LC_SQL_UPDATE_KEY_VALUE_FMT \
27 | @"INSERT OR REPLACE INTO %@ " \
28 | @"(" LC_FIELD_KEY @", " LC_FIELD_VALUE @") " \
29 | @"VALUES(?, ?)"
30 |
31 | #define LC_SQL_DELETE_KEY_VALUE_FMT \
32 | @"DELETE FROM %@ WHERE " LC_FIELD_KEY @" = ?"
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMLocationMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMLocationMessage.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTypedMessage.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Location Message.
15 | */
16 | @interface AVIMLocationMessage : AVIMTypedMessage
17 |
18 | /**
19 | * Latitude. Should be 0~90.
20 | */
21 | @property(nonatomic, assign, readonly) float latitude;
22 |
23 | /**
24 | * Longitude, Should be 0~360.
25 | */
26 | @property(nonatomic, assign, readonly) float longitude;
27 |
28 | /*!
29 | 创建位置消息。
30 | @param text - 消息文本.
31 | @param latitude - 纬度
32 | @param longitude - 经度
33 | @param attributes - 用户附加属性
34 | */
35 | + (instancetype)messageWithText:(NSString *)text
36 | latitude:(float)latitude
37 | longitude:(float)longitude
38 | attributes:(nullable NSDictionary *)attributes;
39 |
40 | @end
41 |
42 | NS_ASSUME_NONNULL_END
43 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/InternalObjects/AVIMTypedMessageObject.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMTypedMessageObject.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/8/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMTypedMessageObject.h"
10 | #import "AVIMTypedMessage_Internal.h"
11 |
12 | @implementation AVIMTypedMessageObject
13 | @dynamic _lctype, _lctext, _lcattrs, _lcfile, _lcloc;
14 |
15 | - (BOOL)isValidTypedMessageObject {
16 | BOOL hasTypeKey = [self hasKey:@"_lctype"];
17 | if (!hasTypeKey) {
18 | return NO;
19 | }
20 | BOOL __block isSupportedThisVersion = NO;
21 | NSNumber *type = [self objectForKey:@"_lctype"];
22 | [_typeDict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
23 | if ([key intValue] == [type intValue]) {
24 | isSupportedThisVersion = YES;
25 | *stop = YES;
26 | return;
27 | }
28 | }];
29 | BOOL isValidTypedMessageObject = hasTypeKey && isSupportedThisVersion;
30 | return isValidTypedMessageObject;
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/AVGlobal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVGlobal.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 9/24/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define classNameTag @"className"
12 | #define ACLTag @"ACL"
13 | #define channelsTag @"channels"
14 | #define badgeTag @"badge"
15 | #define topicTag @"apnsTopic"
16 | #define deviceTokenTag @"deviceToken"
17 | #define deviceProfileTag @"deviceProfile"
18 | #define timeZoneTag @"timeZone"
19 | #define usernameTag @"username"
20 | #define passwordTag @"password"
21 | #define emailTag @"email"
22 | #define mobilePhoneVerifiedTag @"mobilePhoneVerified"
23 | #define mobilePhoneNumberTag @"mobilePhoneNumber"
24 | #define smsCodeTag @"smsCode"
25 | #define deviceTypeTag @"deviceType"
26 | #define installationIdTag @"installationId"
27 | #define authDataTag @"authData"
28 |
29 | #define enableTag @"enable"
30 |
31 | #define kAVTypeTag @"__type"
32 |
33 | #define AV_DATE_FORMAT @"yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSS'Z'"
34 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJPropertyType.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJPropertyType.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | // 包装一种类型
8 |
9 | #import
10 |
11 | /**
12 | * 包装一种类型
13 | */
14 | @interface MJPropertyType : NSObject
15 | /** 类型标识符 */
16 | @property (nonatomic, copy) NSString *code;
17 |
18 | /** 是否为id类型 */
19 | @property (nonatomic, readonly, getter=isIdType) BOOL idType;
20 |
21 | /** 是否为基本数字类型:int、float等 */
22 | @property (nonatomic, readonly, getter=isNumberType) BOOL numberType;
23 |
24 | /** 是否为BOOL类型 */
25 | @property (nonatomic, readonly, getter=isBoolType) BOOL boolType;
26 |
27 | /** 对象类型(如果是基本数据类型,此值为nil) */
28 | @property (nonatomic, readonly) Class typeClass;
29 |
30 | /** 类型是否来自于Foundation框架,比如NSString、NSArray */
31 | @property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation;
32 | /** 类型是否不支持KVC */
33 | @property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled;
34 |
35 | /**
36 | * 获得缓存的类型对象
37 | */
38 | + (instancetype)cachedTypeWithCode:(NSString *)code;
39 | @end
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Commands/AVIMConversationOutCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMConversationOutCommand.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/8/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMConversationOutCommand.h"
10 | #import "AVIMSignature.h"
11 |
12 | @interface AVIMConversationOutCommand () {
13 | AVIMSignature *_signature;
14 | }
15 | @property (nonatomic, strong) NSString *s;
16 | @property (nonatomic, assign) int64_t t;
17 | @property (nonatomic, strong) NSString *n;
18 | @end
19 |
20 | @implementation AVIMConversationOutCommand
21 |
22 | @dynamic i, cmd, code, appCode, reason, peerId, needResponse, callback, op, cid, m, transient, muted, s, t, n, signature, attr, where, sort, skip, limit, unique;
23 |
24 | - (void)setSignature:(AVIMSignature *)signature {
25 | _signature = signature;
26 | if (signature) {
27 | self.s = signature.signature;
28 | self.t = signature.timestamp;
29 | self.n = signature.nonce;
30 | }
31 | }
32 |
33 | - (AVIMSignature *)signature {
34 | return _signature;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVRoomCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVRoomCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/9/14.
6 | //
7 | //
8 |
9 | #import "AVCommand.h"
10 | #import "AVSignature.h"
11 |
12 | extern NSString *const AVRoomOperationJoin;
13 | extern NSString *const AVRoomOperationLeave;
14 | extern NSString *const AVRoomOperationInvite;
15 | extern NSString *const AVRoomOperationKick;
16 | extern NSString *const AVRoomOperationJoined;
17 | extern NSString *const AVRoomOperationReject;
18 | extern NSString *const AVRoomOperationLeft;
19 | extern NSString *const AVRoomOperationInvited;
20 | extern NSString *const AVRoomOperationKicked;
21 | extern NSString *const AVRoomOperationMembersJoined;
22 | extern NSString *const AVRoomOperationMembersLeft;
23 |
24 | @interface AVRoomCommand : AVCommand
25 | @property(nonatomic, strong) NSString *op;
26 | @property(nonatomic, strong)NSString *byPeerId;
27 | @property(nonatomic, strong)NSString *roomId;
28 | @property(nonatomic, strong)NSArray *roomPeerIds;
29 | @property(nonatomic)bool transient;
30 | //used for join,invite,kick
31 | @property(nonatomic, strong)AVSignature *signature;
32 | @end
33 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/MessageCache/CacheStore/LCIMCacheStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCIMCacheStore.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 8/29/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "LCDB.h"
11 |
12 | #ifdef DEBUG
13 | #define LCIM_SHOULD_LOG_ERRORS YES
14 | #else
15 | #define LCIM_SHOULD_LOG_ERRORS NO
16 | #endif
17 |
18 | #define LCIM_OPEN_DATABASE(db, routine) do { \
19 | LCDatabaseQueue *dbQueue = [self databaseQueue]; \
20 | \
21 | [dbQueue inDatabase:^(LCDatabase *db) { \
22 | db.logsErrors = LCIM_SHOULD_LOG_ERRORS; \
23 | routine; \
24 | }]; \
25 | } while (0)
26 |
27 | @interface LCIMCacheStore : NSObject
28 |
29 | @property (nonatomic, readonly, copy) NSString *clientId;
30 |
31 | + (NSString *)databasePathWithName:(NSString *)name;
32 |
33 | - (instancetype)initWithClientId:(NSString *)clientId;
34 |
35 | - (LCDatabaseQueue *)databaseQueue;
36 |
37 | - (void)databaseQueueDidLoad;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/TestDictionaryForObject.json:
--------------------------------------------------------------------------------
1 | {
2 | "totalWatchingDuration": 0,
3 | "watchNum": 26,
4 | "shareNum": 0,
5 | "followeeNumber": 10,
6 | "personalCode": "kb55l9p",
7 | "nickname": "ASen",
8 | "username": "j0y0j5vz2e7hhqmnab3tsir2q",
9 | "totalVideoNum": 9,
10 | "playbackVideoNum": 1,
11 | "followerNumber": 4,
12 | "emailVerified": false,
13 | "enableOBS": true,
14 | "priority": 1000,
15 | "weight": 0,
16 | "hitNum": 612,
17 | "lifeStation": "程序手。现实世界才是最优秀的运行环境。",
18 | "blacklistUser": false,
19 | "activeUser": false,
20 | "shareType": 1,
21 | "invitationCode": "kb55l9p",
22 | "totalLiveDuration": 11,
23 | "vmark": 0,
24 | "mobilePhoneVerified": false,
25 | "ACL": {
26 | "*": {
27 | "read": true,
28 | "write": true
29 | }
30 | },
31 | "recentlyLoginDate": {
32 | "__type": "Date",
33 | "iso": "2015-09-25T16:33:11.363Z"
34 | },
35 | "objectId": "55dac28e60b296e567ebec20",
36 | "createdAt": "2015-08-24T15:06:54.339Z",
37 | "updatedAt": "2015-09-25T16:33:11.236Z"
38 | }
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCDatabaseMigrator.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCDatabaseMigrator.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/1/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "LCDatabaseCommon.h"
11 |
12 | /*!
13 | * Database migration object.
14 | */
15 | @interface LCDatabaseMigration : NSObject
16 |
17 | /*!
18 | * The job of current migration.
19 | */
20 | @property (readonly) LCDatabaseJob block;
21 |
22 | + (instancetype)migrationWithBlock:(LCDatabaseJob)block;
23 |
24 | - (instancetype)initWithBlock:(LCDatabaseJob)block;
25 |
26 | @end
27 |
28 | /*!
29 | * SQLite database migrator.
30 | */
31 | @interface LCDatabaseMigrator : NSObject
32 |
33 | @property (readonly) NSString *databasePath;
34 |
35 | - (instancetype)initWithDatabasePath:(NSString *)databasePath;
36 |
37 | /*!
38 | * Migrate database with migrations.
39 | * @param migrations An array of object confirms LCDatabaseMigration protocol.
40 | * NOTE: migration can not be removed, only can be added.
41 | * @return void.
42 | */
43 | - (void)executeMigrations:(NSArray *)migrations;
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/NSDictionary+LCHash.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+LCHash.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 7/15/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "NSDictionary+LCHash.h"
10 | #import
11 |
12 | @implementation NSDictionary (LCHash)
13 |
14 | - (NSString *)lc_SHA1String {
15 | NSMutableArray *orderedKeyValues = [NSMutableArray array];
16 | NSArray *orderedKeys = [[self allKeys] sortedArrayUsingSelector:@selector(compare:)];
17 |
18 | for (NSString *key in orderedKeys) {
19 | [orderedKeyValues addObject:@[key, self[key]]];
20 | }
21 |
22 | NSData *data = [NSKeyedArchiver archivedDataWithRootObject:orderedKeyValues];
23 |
24 | unsigned int size = CC_SHA1_DIGEST_LENGTH;
25 | unsigned char output[size];
26 |
27 | CC_SHA1(data.bytes, (unsigned int)data.length, output);
28 |
29 | NSMutableString* hash = [NSMutableString stringWithCapacity:size * 2];
30 |
31 | for (unsigned int i = 0; i < size; i++) {
32 | [hash appendFormat:@"%02x", output[i]];
33 | }
34 |
35 | return hash;
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/AspectTrack/BIStatistics.m:
--------------------------------------------------------------------------------
1 | //
2 | // BIAop.m
3 | // AspectTrack
4 | //
5 | // Created by 佐毅 on 16/3/4.
6 | // Copyright © 2016年 上海乐住信息技术有限公司. All rights reserved.
7 | //
8 |
9 | #import "BIStatistics.h"
10 | #import "BIPVBase.h"
11 | #import "MOAspects.h"
12 | @implementation BIStatistics
13 |
14 | + (void)setupBIStatistics{
15 |
16 | [self setupWithConfiguration:[BIPVBase statisticsBIPVBase]];
17 |
18 | }
19 |
20 |
21 | + (void)setupWithConfiguration:(NSDictionary *)configs{
22 |
23 | for (NSString *className in configs) {
24 | Class class = NSClassFromString(className);
25 | for (NSDictionary *event in configs[className]) {
26 | SEL selector = NSSelectorFromString(event[EventSelector]);
27 | id block = event[EventHandlerBlock];
28 | [MOAspects hookInstanceMethodForClass:class
29 | selector:selector
30 | aspectsPosition:MOAspectsPositionBefore
31 | hookRange:MOAspectsHookRangeAll
32 | usingBlock:block];
33 | }
34 | }
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/File/AVFile_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVFile_Internal.h
3 | // LeanCloud
4 | //
5 | // Created by Zhu Zeng on 3/20/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVFile.h"
10 | #import "AVNetworking.h"
11 |
12 | @interface AVFile ()
13 |
14 | @property (readwrite) NSString *name;
15 | @property (nonatomic, readwrite) NSString *localPath;
16 | @property (nonatomic, readwrite, copy) NSString *bucket;
17 | @property (readwrite) NSString *url;
18 | @property (readwrite, strong) NSData * data;
19 | @property (readwrite, strong) AVHTTPRequestOperation * downloadOperation;
20 | @property (nonatomic) BOOL isDirty;
21 | @property (atomic, assign) BOOL onceCallGetFileSize;
22 |
23 | @property(nonatomic, strong) NSString *cachePath;
24 |
25 | +(AVFile *)fileFromDictionary:(NSDictionary *)dict;
26 | +(NSDictionary *)dictionaryFromFile:(AVFile *)file;
27 |
28 | +(NSString *)className;
29 | -(NSString *)mimeType;
30 | -(NSDictionary *)updateMetaData;
31 | - (void)addACLToDict:(NSMutableDictionary *)dict;
32 |
33 | + (void)saveData:(NSData *)data withRemotePath:(NSString *)remotePath;
34 | + (void)cacheFile:(AVFile *)file;
35 | @end
36 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Commands/AVIMCommandFormatter.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMCommandFormatter.h
3 | // AVOSCloudIM
4 | //
5 | // Created by CHEN YI LONG on 15/11/17.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | @import Foundation;
10 | #import "AVIMCommandCommon.h"
11 | #import "AVIMSignature.h"
12 |
13 | FOUNDATION_EXPORT const NSInteger LCIMErrorCodeSessionTokenExpired;
14 |
15 | @interface AVIMCommandFormatter : NSObject
16 |
17 | /*!
18 | 获取消息类型的字符串表示
19 | @param commandType - 消息类型(枚举类型)
20 | @return 消息类型的字符串表示
21 | */
22 | + (NSString *)commandType:(AVIMCommandType)commandType;
23 |
24 | /*!
25 | 判断消息AVIMOpType类型转化为字符串类型
26 | @param action - 消息操作类型枚举:AVIMOpType类型
27 | @return AVIMOpType类型转化的字符串类型
28 | */
29 | + (NSString *)signatureActionForKey:(AVIMOpType)action;
30 |
31 | /*!
32 | 字典转 protobuf 对象
33 | @param dictionary - 字典
34 | @return protobuf 对象
35 | */
36 | + (AVIMJsonObjectMessage *)JSONObjectWithDictionary:(NSDictionary *)dictionary;
37 |
38 | /*!
39 | protobuf 对象转字典
40 | @param JSONObject - protobuf 对象
41 | @return 字典对象
42 | */
43 | + (NSData *)dataWithJSONObject:(AVIMJsonObjectMessage *)JSONObject;
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/NSObject+MJCoding.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MJCoding.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MJExtensionConst.h"
11 |
12 | /**
13 | * Codeing协议
14 | */
15 | @protocol MJCoding
16 | @optional
17 | /**
18 | * 这个数组中的属性名才会进行归档
19 | */
20 | + (NSArray *)mj_allowedCodingPropertyNames;
21 | /**
22 | * 这个数组中的属性名将会被忽略:不进行归档
23 | */
24 | + (NSArray *)mj_ignoredCodingPropertyNames;
25 | @end
26 |
27 | @interface NSObject (MJCoding)
28 | /**
29 | * 解码(从文件中解析对象)
30 | */
31 | - (void)mj_decode:(NSCoder *)decoder;
32 | /**
33 | * 编码(将对象写入文件中)
34 | */
35 | - (void)mj_encode:(NSCoder *)encoder;
36 | @end
37 |
38 | /**
39 | 归档的实现
40 | */
41 | #define MJCodingImplementation \
42 | - (id)initWithCoder:(NSCoder *)decoder \
43 | { \
44 | if (self = [super init]) { \
45 | [self mj_decode:decoder]; \
46 | } \
47 | return self; \
48 | } \
49 | \
50 | - (void)encodeWithCoder:(NSCoder *)encoder \
51 | { \
52 | [self mj_encode:encoder]; \
53 | }
54 |
55 | #define MJExtensionCodingImplementation MJCodingImplementation
--------------------------------------------------------------------------------
/AspectTrack/Aspects/MOAspectsHookRange.h:
--------------------------------------------------------------------------------
1 | //
2 | // MOAspectsHookRange.h
3 | // MOAspectsDemo
4 | //
5 | // Created by HiromiMotodera on 7/4/15.
6 | // Copyright (c) 2015 MOAI. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef struct _MOAspectsHookRange {
12 | NSUInteger location;
13 | NSUInteger length;
14 | } MOAspectsHookRange;
15 |
16 | /* Make a range from `(location, length)'. */
17 |
18 | NS_INLINE MOAspectsHookRange MOAspectsMakeHookRange(NSUInteger location, NSUInteger length) {
19 | MOAspectsHookRange range;
20 | range.location = location;
21 | range.length = length;
22 | return range;
23 | }
24 |
25 | NS_INLINE BOOL MOAspectsEqualHookRanges(MOAspectsHookRange range1, MOAspectsHookRange range2) {
26 | return (range1.location == range2.location && range1.length == range2.length);
27 | }
28 |
29 | /* The "All" range -- equivalent to MOAspectsMakeHookRange(0, INT_MAX). */
30 |
31 | FOUNDATION_EXTERN const MOAspectsHookRange MOAspectsHookRangeAll;
32 |
33 | /* The "Single" range -- equivalent to MOAspectsMakeHookRange(0, 0). */
34 |
35 | FOUNDATION_EXTERN const MOAspectsHookRange MOAspectsHookRangeSingle;
36 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVMPMessagePack/AVMPOrderedDictionary.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVMPOrderedDictionary.h
3 | // AVMPMessagePack
4 | //
5 | // Created by Gabriel on 7/8/14.
6 | // Copyright (c) 2014 Gabriel Handford. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVMPOrderedDictionary : NSObject
12 |
13 | @property (readonly) NSUInteger count;
14 |
15 | - (instancetype)initWithCapacity:(NSUInteger)capacity;
16 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary;
17 | + (instancetype)dictionary;
18 |
19 | - (void)setObject:(id)object forKey:(id)key;
20 | - (id)objectForKey:(id)key;
21 |
22 | - (void)setObject:(id)obj forKeyedSubscript:(id)key;
23 | - (id)objectForKeyedSubscript:(id)key;
24 |
25 | - (void)sortKeysUsingSelector:(SEL)selector deepSort:(BOOL)deepSort;
26 | - (NSArray *)allKeys;
27 |
28 | - (void)addEntriesFromDictionary:(NSDictionary *)dictionary;
29 |
30 | - (NSEnumerator *)keyEnumerator;
31 | - (NSEnumerator *)reverseKeyEnumerator;
32 |
33 | - (NSData *)avmp_messagePack;
34 |
35 | - (NSDictionary *)toDictionary;
36 |
37 | - (void)addObject:(id)object forKey:(id)key;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Cache/AVPersistenceUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVPersistenceUtils.h
3 | // paas
4 | //
5 | // Created by Summer on 13-3-25.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVPersistenceUtils : NSObject
12 |
13 | + (NSString *)avCacheDirectory;
14 | + (NSString *)avFileDirectory;
15 |
16 | + (NSString *)currentUserArchivePath;
17 | + (NSString *)currentUserClassArchivePath;
18 | + (NSString *)currentInstallationArchivePath;
19 |
20 | + (NSString *)eventuallyPath;
21 |
22 | + (NSString *)messageCachePath;
23 | + (NSString *)messageCacheDatabasePathWithName:(NSString *)name;
24 |
25 | + (NSString *)keyValueDatabasePath;
26 | + (NSString *)commandCacheDatabasePath;
27 | + (NSString *)clientSessionTokenCacheDatabasePath;
28 |
29 | + (BOOL)saveJSON:(id)JSON toPath:(NSString *)path;
30 | + (id)getJSONFromPath:(NSString *)path;
31 |
32 | +(BOOL)removeFile:(NSString *)path;
33 | +(BOOL)fileExist:(NSString *)path;
34 | +(BOOL)createFile:(NSString *)path;
35 |
36 | + (BOOL)deleteFilesInDirectory:(NSString *)dirPath moreThanDays:(NSInteger)numberOfDays;
37 | + (NSDate *)lastModified:(NSString *)fullPath;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/LCURLConnection.m:
--------------------------------------------------------------------------------
1 | //
2 | // LCURLConnection.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 12/10/15.
6 | // Copyright © 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "LCURLConnection.h"
10 |
11 | @implementation LCURLConnection
12 |
13 | + (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse *__autoreleasing *)response error:(NSError *__autoreleasing *)error {
14 | #if !TARGET_OS_WATCH
15 | return [NSURLConnection sendSynchronousRequest:request returningResponse:response error:error];
16 | #else
17 | __block NSData *data = nil;
18 | dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
19 |
20 | [[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *taskData, NSURLResponse *taskResponse, NSError *taskError) {
21 | data = taskData;
22 |
23 | if (response)
24 | *response = taskResponse;
25 |
26 | if (error)
27 | *error = taskError;
28 |
29 | dispatch_semaphore_signal(semaphore);
30 | }] resume];
31 |
32 | dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
33 |
34 | return data;
35 | #endif
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/ThirdParty/JNKeychain/AVKeychain.h:
--------------------------------------------------------------------------------
1 | //
2 | // JNKeychain.h
3 | //
4 | // Created by Jeremias Nunez on 5/10/13.
5 | // Copyright (c) 2013 Jeremias Nunez. All rights reserved.
6 | //
7 | // Based on Anomie's great answer - http://stackoverflow.com/a/5251820
8 | //
9 | // jeremias.np@gmail.com
10 |
11 | #import
12 |
13 | @interface AVKeychain : NSObject
14 |
15 | /**
16 | @abstract Saves a given value to the Keychain
17 | @param value The value to store.
18 | @param key The key identifying the value you want to save.
19 | @return YES if saved successfully, NO otherwise.
20 | */
21 | + (BOOL)saveValue:(id)value forKey:(NSString*)key;
22 |
23 | /**
24 | @abstract Deletes a given value from the Keychain
25 | @param key The key identifying the value you want to delete.
26 | @return YES if deletion was successful, NO if the value was not found or some other error ocurred.
27 | */
28 | + (BOOL)deleteValueForKey:(NSString *)key;
29 |
30 | /**
31 | @abstract Loads a given value from the Keychain
32 | @param key The key identifying the value you want to load.
33 | @return The value identified by key or nil if it doesn't exist.
34 | */
35 | + (id)loadValueForKey:(NSString*)key;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVCommand.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/4/14.
6 | //
7 | //
8 |
9 | #import "AVDynamicBase.h"
10 |
11 | extern NSString *const AVCommandPresence;
12 | extern NSString *const AVCommandDirect;
13 | extern NSString *const AVCommandSession;
14 | extern NSString *const AVCommandAckReq;
15 | extern NSString *const AVCommandAck;
16 | extern NSString *const AVCommandRoom;
17 | extern NSString *const AVCommandRcp;
18 |
19 | typedef enum : NSUInteger {
20 | AVCommandIOTypeIn,
21 | AVCommandIOTypeOut,
22 | } AVCommandIOType;
23 |
24 | @class AVCommand;
25 |
26 | typedef void (^AVCommandResultBlock)(AVCommand *outCommand, AVCommand *inCommand, NSError *error);
27 |
28 | @interface AVCommand : AVDynamicBase
29 | @property(nonatomic) uint16_t i;
30 | @property(nonatomic) NSString *cmd;
31 | @property(nonatomic) NSString *peerId;
32 |
33 | + (instancetype)commandWithJSON:(NSString *)json ioType:(AVCommandIOType)ioType;
34 | + (instancetype)commandWithDictionary:(NSDictionary *)dictionary ioType:(AVCommandIOType)ioType;
35 | + (uint16_t)nextSerialId;
36 |
37 | - (void)addOrRefreshSerialId;
38 | - (void)setCallback:(AVCommandResultBlock)callback;
39 | - (AVCommandResultBlock)callback;
40 | @end
41 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/AVOSCloudTest.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVOSCloudTest.m
3 | // AVOS
4 | //
5 | // Created by lzw on 15/8/18.
6 | // Copyright (c) 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVTestBase.h"
10 |
11 | /*!
12 | * Test for AVOSCloud.h
13 | */
14 | @interface AVOSCloudTest : AVTestBase
15 |
16 | @end
17 |
18 | @implementation AVOSCloudTest
19 |
20 | - (void)testServerDate {
21 | NSError *error;
22 | NSDate *date = [AVOSCloud getServerDate:&error];
23 | XCTAssertNotNil(date);
24 |
25 | [AVOSCloud getServerDateWithBlock:^(NSDate *date, NSError *error) {
26 | XCTAssertNil(error);
27 | XCTAssertNotNil(date);
28 | [self postNotification:AVTestNotification];
29 | }];
30 | [self waitNotification:AVTestNotification];
31 | }
32 |
33 | - (void)testNetworkTimeoutConfig {
34 | NSTimeInterval timerInterval = [AVOSCloud networkTimeoutInterval];
35 | [AVOSCloud setNetworkTimeoutInterval:0.01];
36 | NSError *error;
37 | NSDate *date = [AVOSCloud getServerDate:&error];
38 | XCTAssertNil(date);
39 | XCTAssertNotNil(error);
40 | XCTAssertEqual(error.code, NSURLErrorTimedOut);
41 | [AVOSCloud setNetworkTimeoutInterval:timerInterval];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVWebSocketWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVWebSocketWrapper.h
3 | // paas
4 | //
5 | // Created by yang chaozhong on 5/14/14.
6 | // Copyright (c) 2014 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVCommandCommon.h"
11 |
12 | #define PUSH_GROUP_CN @"g0"
13 | #define PUSH_GROUP_US @"a0"
14 |
15 | #define USE_DEBUG_SERVER 0
16 | #define DEBUG_SERVER @"ws://puppet.leancloud.cn:5779/"
17 |
18 | @interface AVWebSocketWrapper : NSObject
19 |
20 | @property (nonatomic, retain) NSMutableDictionary *delegateDict;
21 |
22 | + (instancetype)sharedInstance;
23 | + (void)setDefaultPushGroup:(NSString *)pushGroup;
24 | - (BOOL)messageIdExists:(NSString *)messageId;
25 | - (void)addMessageId:(NSString *)messageId;
26 | - (void)openWebSocketConnection;
27 | - (void)closeWebSocketConnection;
28 | - (void)closeWebSocketConnectionRetry:(BOOL)retry;
29 | - (void)sendCommand:(AVCommand *)command;
30 | - (void)sendMessage:(id)data;
31 | - (void)sendPing;
32 | - (BOOL)isConnectionOpen;
33 | @end
34 |
35 | @protocol AVWebSocketWrapperDelegate
36 | @optional
37 | - (void)onWebSocketOpen;
38 | - (void)onWebSocketClosed;
39 | - (void)onReceiveMessage:(id)message;
40 | - (void)onReceiveCommand:(AVCommand *)command;
41 | @end
42 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Utils/AVHelpers.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVHelpers.h
3 | // paas
4 | //
5 | // Created by Travis on 13-12-17.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSDate (AVServerTimezone)
12 |
13 | /* 根据传入字符串生成服务器时区的时间
14 | * @warning 目前服务器时区为定值: 东八区 即CST时间
15 | * @param fullTimeString 需要转换成时间的字符串 格式固定, 如`2013-12-17 00:00:00` 即希望得到服务器时区2013年12月17日零时的NSDate.
16 | * @return 返回服务器时区NSDate时间. 如 fullTimeString为`2013-08-29 13:28:15` 则返回`2013-08-29 05:28:15 +0000`的标准时间
17 | */
18 | +(NSDate *)serverTimeZoneDateFromString:(NSString*)fullTimeString;
19 |
20 | @end
21 |
22 |
23 | @interface NSData (AVBase64)
24 |
25 | /* 根据传入的base64编码字符串生成NSData
26 | * @param aString 需要转换的base64格式字符串
27 | * @return 返回生成的data
28 | */
29 | + (NSData *)AVdataFromBase64String:(NSString *)aString;
30 |
31 | /* 获得当前data的base64编码字符串 */
32 | - (NSString *)AVbase64EncodedString;
33 |
34 | @end
35 |
36 | @interface NSString (AVMD5)
37 |
38 | /* 返回当前字符串的*大写*MD5值
39 | * @return 返回当前字符串的*大写*MD5值
40 | */
41 | - (NSString *)AVMD5String;
42 |
43 | @end
44 |
45 |
46 | @interface NSURLRequest (curl)
47 | /* 获得当前请求的curl命令行代码, 方便命令行调试 对比结果
48 | * @return 当前请求的curl命令行代码
49 | */
50 | - (NSString *)cURLCommand;
51 | @end
52 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/NSString+MJExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+MJExtension.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/6/7.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MJExtensionConst.h"
11 |
12 | @interface NSString (MJExtension)
13 | /**
14 | * 驼峰转下划线(loveYou -> love_you)
15 | */
16 | - (NSString *)mj_underlineFromCamel;
17 | /**
18 | * 下划线转驼峰(love_you -> loveYou)
19 | */
20 | - (NSString *)mj_camelFromUnderline;
21 | /**
22 | * 首字母变大写
23 | */
24 | - (NSString *)mj_firstCharUpper;
25 | /**
26 | * 首字母变小写
27 | */
28 | - (NSString *)mj_firstCharLower;
29 |
30 | - (BOOL)mj_isPureInt;
31 |
32 | - (NSURL *)mj_url;
33 | @end
34 |
35 | @interface NSString (MJExtensionDeprecated_v_2_5_16)
36 | - (NSString *)underlineFromCamel MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
37 | - (NSString *)camelFromUnderline MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
38 | - (NSString *)firstCharUpper MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
39 | - (NSString *)firstCharLower MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
40 | - (BOOL)isPureInt MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
41 | - (NSURL *)url MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***");
42 | @end
43 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVCommandDictionary.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVCommandDictionary.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 7/22/14.
6 | //
7 | //
8 |
9 | #import "AVCommandDictionary.h"
10 |
11 | @interface AVCommandDictionary () {
12 | NSMutableDictionary *_fileds;
13 | }
14 |
15 | @end
16 | @implementation AVCommandDictionary
17 | - (instancetype)init {
18 | if ((self = [super init])) {
19 | _fileds = [NSMutableDictionary dictionary];
20 | }
21 | return self;
22 | }
23 | - (void)setObject:(id)object forKey:(NSString *)key {
24 | if (object && key) {
25 | [_fileds setObject:object forKey:key];
26 | }
27 | }
28 |
29 | - (void)removeObjectForKey:(NSString *)key {
30 | if (key) {
31 | [_fileds removeObjectForKey:key];
32 | }
33 | }
34 |
35 | - (NSString *)JSONString {
36 | @try {
37 | NSError *error = nil;
38 | NSData *data = [NSJSONSerialization dataWithJSONObject:_fileds options:NSJSONWritingPrettyPrinted error:&error];
39 | if (error) {
40 | return nil;
41 | } else {
42 | return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
43 | }
44 | }
45 | @catch (NSException *exception) {
46 | return nil;
47 | }
48 | }
49 | @end
50 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMLocationMessage.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMLocationMessage.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AVIMLocationMessage.h"
12 | #import "AVIMGeneralObject.h"
13 | #import "AVIMTypedMessage_Internal.h"
14 |
15 | @implementation AVIMLocationMessage
16 |
17 | + (void)load {
18 | [self registerSubclass];
19 | }
20 |
21 | + (AVIMMessageMediaType)classMediaType {
22 | return kAVIMMessageMediaTypeLocation;
23 | }
24 |
25 | + (instancetype)messageWithText:(NSString *)text
26 | latitude:(float)latitude
27 | longitude:(float)longitude
28 | attributes:(NSDictionary *)attributes {
29 | AVIMLocationMessage *message = [[self alloc] init];
30 | message.text = text;
31 | message.attributes = attributes;
32 | AVGeoPoint *location = [AVGeoPoint geoPointWithLatitude:latitude longitude:longitude];
33 | message.location = location;
34 | return message;
35 | }
36 |
37 | - (float)longitude {
38 | return self.location.longitude;
39 | }
40 |
41 | - (float)latitude {
42 | return self.location.latitude;
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/File/AVFileQuery.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVFileQuery.h
3 | // AVOS-DynamicFramework
4 | //
5 | // Created by lzw on 15/10/8.
6 | // Copyright © 2015年 tang3w. All rights reserved.
7 | //
8 |
9 | #import "AVQuery.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * AVFile 查询类
15 | */
16 | @interface AVFileQuery : AVQuery
17 |
18 | + (instancetype)query;
19 |
20 | /**
21 | * 查找一组文件,同步方法
22 | * @param error 通常是网络错误或者查找权限未开启
23 | * @return 返回一组 AVFile 对象
24 | */
25 | - (nullable NSArray *)findFiles:(NSError **)error;
26 |
27 | /**
28 | * 查找一组文件,异步方法
29 | * @see findFiles:
30 | * @param resultBlock 回调 block
31 | */
32 | - (void)findFilesInBackgroundWithBlock:(AVArrayResultBlock)resultBlock;
33 |
34 |
35 | /**
36 | * 根据 objectId 来查找文件,同步方法
37 | * @param objectId 目标文件的 objectId
38 | * @param error 通过是网络错误或查找权限未开启
39 | * @return 返回 AVFile 对象
40 | */
41 | - (nullable AVFile *)getFileWithId:(NSString *)objectId error:(NSError **)error;
42 |
43 | /**
44 | * 根据 objectId 来查找文件,异步方法
45 | * @see getFileWithId:error
46 | * @param objectId 目标文件的 objectId
47 | * @param block 回调 block
48 | */
49 | - (void)getFileInBackgroundWithId:(NSString *)objectId
50 | block:(AVFileResultBlock)block;
51 |
52 |
53 | @end
54 |
55 | NS_ASSUME_NONNULL_END
56 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Analytics/AVAnalyticsActivity.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVAnalyticsActivity.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 8/2/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVDuration.h"
11 |
12 | @interface AVAnalyticsActivity : NSObject
13 |
14 | @property (nonatomic, readwrite, strong) AVDuration * durationImpl;
15 | @property (nonatomic, readwrite, copy) NSString * activityName;
16 |
17 | -(id)initWithName:(NSString *)name;
18 | -(void)pause;
19 | -(void)resume;
20 | -(NSDictionary *)jsonDictionary;
21 |
22 | @end
23 |
24 |
25 | @interface AVAnalyticsEvent : NSObject
26 |
27 | @property (nonatomic, readwrite, copy) NSString * eventName;
28 | @property (nonatomic, readwrite, copy) NSString * labelName;
29 | @property (nonatomic, readwrite, copy) NSString * primaryKey;
30 | @property (nonatomic, readwrite) int acc;
31 | @property (nonatomic, readwrite) NSMutableDictionary * attributes;
32 | @property (nonatomic, readwrite, strong) AVDuration * durationImpl;
33 |
34 | -(id)initWithName:(NSString *)name;
35 | -(void)pause;
36 | -(void)resume;
37 | -(NSDictionary *)jsonDictionary:(NSDictionary *)additionalDict;
38 | -(BOOL)match:(NSString *)name
39 | label:(NSString *)label
40 | key:(NSString *)key;
41 |
42 | @end
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/AVAvailability.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVAvailability.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/6/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | #ifndef AV_IOS_UNAVAILABLE
13 | # ifdef __IOS_UNAVILABLE
14 | # define AV_IOS_UNAVAILABLE __IOS_UNAVAILABLE
15 | # else
16 | # define AV_IOS_UNAVAILABLE
17 | # endif
18 | #endif
19 |
20 | #ifndef AV_OSX_UNAVAILABLE
21 | # if TARGET_OS_MAC
22 | # define AV_OSX_UNAVAILABLE __OSX_UNAVAILABLE
23 | # else
24 | # define AV_OSX_UNAVAILABLE
25 | # endif
26 | #endif
27 |
28 | #ifndef AV_WATCH_UNAVAILABLE
29 | # ifdef __WATCHOS_UNAVAILABLE
30 | # define AV_WATCH_UNAVAILABLE __WATCHOS_UNAVAILABLE
31 | # else
32 | # define AV_WATCH_UNAVAILABLE
33 | # endif
34 | #endif
35 |
36 | #ifndef AV_TV_UNAVAILABLE
37 | # ifdef __TVOS_PROHIBITED
38 | # define AV_TV_UNAVAILABLE __TVOS_PROHIBITED
39 | # else
40 | # define AV_TV_UNAVAILABLE
41 | # endif
42 | #endif
43 |
44 | #define AV_IOS_ONLY (TARGET_OS_IPHONE)
45 | #define AV_OSX_ONLY (TARGET_OS_MAC && !TARGET_OS_IPHONE)
46 |
47 | #define AV_TARGET_OS_OSX (TARGET_OS_MAC && !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV)
48 | #define AV_TARGET_OS_IOS (TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV)
49 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMConversationUpdateBuilder.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMConversationUpdateBuilder.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/8/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMCommon.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Dictionary Builder to update conversation
15 | */
16 | @interface AVIMConversationUpdateBuilder : NSObject
17 | /*!
18 | 名称
19 | */
20 | @property (nonatomic, copy, nullable) NSString *name;
21 |
22 | /*!
23 | 属性合集,修改此属性会覆盖 setObject:forKey: 和 removeObjectForKey: 所做的修改
24 | */
25 | @property (nonatomic, strong, nullable) NSDictionary *attributes;
26 |
27 | /*!
28 | 生成更新字典。之后可调用 -[AVIMConversation update:callback:] 来更新对话。
29 | @return 更新用的字典
30 | */
31 | - (NSDictionary *)dictionary;
32 |
33 | /*!
34 | 获取 attributes 中 key 对应的值
35 | @param key 获取数据的 key 值
36 | @return key 对应的值
37 | */
38 | - (nullable id)objectForKey:(NSString *)key;
39 |
40 | /*!
41 | 设置 attributes 中 key 对应的值为 object
42 | @param object 设置的对象,传 [NSNull null] 将在服务器端删除对应的 key
43 | @param key 设置的 key 值
44 | */
45 | - (void)setObject:(nullable id)object forKey:(NSString *)key;
46 |
47 | /*!
48 | 移除 attributes 中的 key
49 | @param key 移除的 key 值
50 | */
51 | - (void)removeObjectForKey:(NSString *)key;
52 |
53 | @end
54 |
55 | NS_ASSUME_NONNULL_END
56 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Analytics/AVAnalyticsUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVAnalyticsUtils.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 8/15/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVAvailability.h"
11 |
12 | #define kAVSessionIdTag @"sessionId"
13 | #define kAVPrimaryKeyTag @"primaryKey"
14 | #define kAVDurationTag @"duration"
15 | #define kAVEventDurationTag @"du"
16 | #define kAVEventTag @"name"
17 | #define kAVLabelTag @"tag"
18 | #define kAVAccTag @"acc"
19 | #define kAVAttributesTag @"attributes"
20 | #define kAVTSTag @"ts"
21 | #define kAVDateTag @"date"
22 | #define kAVActivitiesTag @"activities"
23 |
24 | #define AV_SESSIONID_LENGTH 32
25 | #define AV_MESSAGE_COUNT_THRESHOLD 30
26 | #define AV_DEFAULT_REPORT_INTERVAL 20
27 | #define AV_REGARD_NEW_SESSION 20
28 |
29 | @interface AVAnalyticsUtils : NSObject
30 |
31 |
32 | +(NSMutableDictionary *)deviceInfo;
33 | +(NSString *)randomString:(int)length;
34 | +(NSTimeInterval)currentTimestamp;
35 |
36 | +(BOOL)inSimulator;
37 | +(BOOL)inDebug;
38 | +(BOOL)isStringEqual:(NSString *)source
39 | with:(NSString *)target;
40 |
41 | +(NSString *)safeString:(NSString *)string;
42 |
43 | +(BOOL)isWiFiConnection AV_WATCH_UNAVAILABLE;
44 | +(NSString *)deviceId AV_WATCH_UNAVAILABLE AV_OSX_UNAVAILABLE;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/AspectTrack/Aspects/MOAspectsTarget.h:
--------------------------------------------------------------------------------
1 | //
2 | // MOAspectsTarget.h
3 | // MOAspects
4 | //
5 | // Created by Hiromi Motodera on 2015/03/15.
6 | // Copyright (c) 2015 MOAI. All rights reserved
7 | //
8 |
9 | #import
10 |
11 | #import "MOAspectsHookRange.h"
12 |
13 | typedef NS_ENUM(NSInteger, MOAspectsTargetMethodType)
14 | {
15 | MOAspectsTargetMethodTypeClass,
16 | MOAspectsTargetMethodTypeInstance
17 | };
18 |
19 | @interface MOAspectsTarget : NSObject
20 |
21 | @property (nonatomic, readonly) Class class;
22 |
23 | @property (nonatomic, readonly) SEL selector;
24 |
25 | @property (nonatomic, readonly) MOAspectsTargetMethodType methodType;
26 |
27 | @property (nonatomic, readonly) MOAspectsHookRange hookRange;
28 |
29 | @property (nonatomic) NSMutableArray *beforeSelectors; // NSValue array
30 |
31 | @property (nonatomic) NSMutableArray *afterSelectors; // NSValue array
32 |
33 | - (instancetype)initWithClass:(Class)clazz
34 | mehodType:(MOAspectsTargetMethodType)methodType
35 | methodSelector:(SEL)selector
36 | hookRange:(MOAspectsHookRange)hookRange;
37 |
38 | - (void)addBeforeSelector:(SEL)selector forClass:(Class)clazz;
39 |
40 | - (void)addAfterSelector:(SEL)selector forClass:(Class)clazz;
41 |
42 | - (Class)classForSelector:(SEL)selector;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVGroup_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVGroup_Internal.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 7/22/14.
6 | //
7 | //
8 | #import
9 | #import "AVConstants.h"
10 | #import "AVCommandCommon.h"
11 |
12 | @class AVSession;
13 | @interface AVGroup () {
14 | NSString *_peerId;
15 | }
16 | - (void)setGroupId:(NSString *)groupId;
17 | + (instancetype)getGroupWithGroupId:(NSString *)groupId session:(AVSession *)session useDefaultDelegate:(BOOL)useDefaultDelegate;
18 | + (instancetype)getGroupNoCreateWithGroupId:(NSString *)groupId session:(AVSession *)session;
19 | + (void)onReceiveGroupCreatedCommand:(AVRoomCommand *)command;
20 | + (void)onWebSocketClosed;
21 | + (void)addGroup:(AVGroup *)group;
22 |
23 | - (instancetype)initWithGroupId:(NSString *)groupId peerId:(NSString *)peerId session:(AVSession *)session;
24 | - (instancetype)initWithGroupId:(NSString *)groupId peerId:(NSString *)peerId session:(AVSession *)session useDefaultDelegate:(BOOL)useDefaultDelegate;
25 | //- (void)onSession:(AVSession *)session groupMessage:(id)message;
26 | //- (void)onSession:(AVSession *)session groupStatusUpdate:(id)message;
27 |
28 | - (void)onReceiveCommand:(AVCommand *)command;
29 | - (void)messageSendFinished:(AVMessage *)message;
30 | - (void)messageSendFailed:(AVMessage *)message error:(NSError *)error;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Track/TrackUITests/TrackUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TrackUITests.m
3 | // TrackUITests
4 | //
5 | // Created by Kenvin on 2016/11/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TrackUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation TrackUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/AspectTrack/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Object/AVRequestManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVRequestManager.h
3 | // paas
4 | //
5 | // Created by Zhu Zeng on 9/10/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVRequestManager : NSObject
12 |
13 | @property (nonatomic, readwrite, strong) NSMutableArray * dictArray;
14 |
15 | - (void)synchronize:(void(^)(void))action;
16 |
17 | -(void)setRequestForKey:(NSString *)key
18 | object:(id)object;
19 |
20 | -(void)unsetRequestForKey:(NSString *)key;
21 |
22 | -(void)addObjectRequestForKey:(NSString *)key
23 | object:(id)object;
24 |
25 | -(void)addUniqueObjectRequestForKey:(NSString *)key
26 | object:(id)object;
27 |
28 | -(void)removeObjectRequestForKey:(NSString *)key
29 | object:(id)object;
30 |
31 | -(void)addRelationRequestForKey:(NSString *)key
32 | object:(id)object;
33 |
34 | -(void)removeRelationRequestForKey:(NSString *)key
35 | object:(id)object;
36 |
37 | -(void)incRequestForKey:(NSString *)key
38 | value:(double)value;
39 |
40 | -(NSMutableDictionary *)initialSetDict;
41 | -(NSMutableDictionary *)initialSetAndAddRelationDict;
42 | -(NSMutableDictionary *)setDict;
43 | -(NSMutableArray *)jsonForCloud;
44 |
45 | -(BOOL)containsRequest;
46 | -(void)clear;
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOS.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AVOSCloudIMTests.xcscheme
8 |
9 | orderHint
10 | 7
11 |
12 | AVOSCloudTests.xcscheme
13 |
14 | orderHint
15 | 10
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 8C255D251AE9F815008A6FFC
21 |
22 | primary
23 |
24 |
25 | 8C255D2F1AE9F817008A6FFC
26 |
27 | primary
28 |
29 |
30 | 8C8419851A5A791300C5C6C4
31 |
32 | primary
33 |
34 |
35 | 8C8419901A5A791300C5C6C4
36 |
37 | primary
38 |
39 |
40 | 8C8419C21A5A796000C5C6C4
41 |
42 | primary
43 |
44 |
45 | 8C8419CC1A5A796000C5C6C4
46 |
47 | primary
48 |
49 |
50 | 8C841C4D1A5A8A3100C5C6C4
51 |
52 | primary
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMAvailability.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMAvailability.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 1/6/16.
6 | // Copyright © 2016 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | #ifndef AVIM_IOS_UNAVAILABLE
13 | # ifdef __IOS_UNAVILABLE
14 | # define AVIM_IOS_UNAVAILABLE __IOS_UNAVAILABLE
15 | # else
16 | # define AVIM_IOS_UNAVAILABLE
17 | # endif
18 | #endif
19 |
20 | #ifndef AVIM_OSX_UNAVAILABLE
21 | # if TARGET_OS_MAC
22 | # define AVIM_OSX_UNAVAILABLE __OSX_UNAVAILABLE
23 | # else
24 | # define AVIM_OSX_UNAVAILABLE
25 | # endif
26 | #endif
27 |
28 | #ifndef AVIM_WATCH_UNAVAILABLE
29 | # ifdef __WATCHOS_UNAVAILABLE
30 | # define AVIM_WATCH_UNAVAILABLE __WATCHOS_UNAVAILABLE
31 | # else
32 | # define AVIM_WATCH_UNAVAILABLE
33 | # endif
34 | #endif
35 |
36 | #ifndef AVIM_TV_UNAVAILABLE
37 | # ifdef __TVOS_PROHIBITED
38 | # define AVIM_TV_UNAVAILABLE __TVOS_PROHIBITED
39 | # else
40 | # define AVIM_TV_UNAVAILABLE
41 | # endif
42 | #endif
43 |
44 | #define AVIM_IOS_ONLY (TARGET_OS_IPHONE)
45 | #define AVIM_OSX_ONLY (TARGET_OS_MAC && !TARGET_OS_IPHONE)
46 |
47 | #define AVIM_TARGET_OS_OSX (TARGET_OS_MAC && !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV)
48 | #define AVIM_TARGET_OS_IOS (TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV)
49 |
50 | #define AVIM_DEPRECATED(explain) __attribute__((deprecated(explain)))
51 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJProperty.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJProperty.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 15/4/17.
6 | // Copyright (c) 2015年 小码哥. All rights reserved.
7 | // 包装一个成员属性
8 |
9 | #import
10 | #import
11 | #import "MJPropertyType.h"
12 | #import "MJPropertyKey.h"
13 |
14 | /**
15 | * 包装一个成员
16 | */
17 | @interface MJProperty : NSObject
18 | /** 成员属性 */
19 | @property (nonatomic, assign) objc_property_t property;
20 | /** 成员属性的名字 */
21 | @property (nonatomic, readonly) NSString *name;
22 |
23 | /** 成员属性的类型 */
24 | @property (nonatomic, readonly) MJPropertyType *type;
25 | /** 成员属性来源于哪个类(可能是父类) */
26 | @property (nonatomic, assign) Class srcClass;
27 |
28 | /**** 同一个成员属性 - 父类和子类的行为可能不一致(originKey、propertyKeys、objectClassInArray) ****/
29 | /** 设置最原始的key */
30 | - (void)setOriginKey:(id)originKey forClass:(Class)c;
31 | /** 对应着字典中的多级key(里面存放的数组,数组里面都是MJPropertyKey对象) */
32 | - (NSArray *)propertyKeysForClass:(Class)c;
33 |
34 | /** 模型数组中的模型类型 */
35 | - (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c;
36 | - (Class)objectClassInArrayForClass:(Class)c;
37 | /**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/
38 |
39 | /**
40 | * 设置object的成员变量值
41 | */
42 | - (void)setValue:(id)value forObject:(id)object;
43 | /**
44 | * 得到object的成员属性值
45 | */
46 | - (id)valueForObject:(id)object;
47 |
48 | /**
49 | * 初始化
50 | */
51 | + (instancetype)cachedPropertyWithProperty:(objc_property_t)property;
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/MessageCache/CacheStore/LCIMCacheStore.m:
--------------------------------------------------------------------------------
1 | //
2 | // LCIMCacheStore.m
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 8/29/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "LCIMCacheStore.h"
10 | #import "AVPersistenceUtils.h"
11 |
12 | @interface LCIMCacheStore ()
13 |
14 | @property (copy, readwrite) NSString *clientId;
15 |
16 | @end
17 |
18 | @implementation LCIMCacheStore {
19 | LCDatabaseQueue *_databaseQueue;
20 | }
21 |
22 | + (NSString *)databasePathWithName:(NSString *)name {
23 | return [AVPersistenceUtils messageCacheDatabasePathWithName:name];
24 | }
25 |
26 | - (instancetype)initWithClientId:(NSString *)clientId {
27 | self = [super init];
28 |
29 | if (self) {
30 | _clientId = [clientId copy];
31 | }
32 |
33 | return self;
34 | }
35 |
36 | - (LCDatabaseQueue *)databaseQueue {
37 | @synchronized(self) {
38 | if (_databaseQueue)
39 | return _databaseQueue;
40 |
41 | if (self.clientId) {
42 | NSString *path = [[self class] databasePathWithName:self.clientId];
43 | _databaseQueue = [LCDatabaseQueue databaseQueueWithPath:path];
44 |
45 | if (_databaseQueue) {
46 | [self databaseQueueDidLoad];
47 | }
48 | }
49 | }
50 |
51 | return _databaseQueue;
52 | }
53 |
54 | - (void)databaseQueueDidLoad {
55 | // Stub
56 | }
57 |
58 | - (void)dealloc {
59 | [_databaseQueue close];
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Track/Track/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // Track
4 | //
5 | // Created by Kenvin on 2016/03/10.
6 | // Copyright © 2016年 Kenvin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "Tracker.h"
11 | #import "MainHomeController.h"
12 | static NSString *const viewWillAppear = @"viewWillAppear";
13 |
14 | static NSString *const viewWillDisappear = @"viewWillDisappear";
15 |
16 |
17 | @interface ViewController ()
18 | @property (weak, nonatomic) IBOutlet UIButton *pushButton;
19 | - (IBAction)pushAction:(id)sender;
20 |
21 | @end
22 |
23 | @implementation ViewController
24 |
25 | - (void)viewDidLoad {
26 | [super viewDidLoad];
27 | }
28 |
29 |
30 | - (void)viewWillAppear:(BOOL)animated{
31 | [super viewWillAppear:animated];
32 | [[Tracker sharedInstance] addLog:[[LogData create]
33 | event:viewWillAppear]];
34 | }
35 |
36 | - (void)viewWillDisappear:(BOOL)animated{
37 | [super viewWillDisappear:animated];
38 | [[Tracker sharedInstance] addLog:[[LogData create]
39 | event:viewWillDisappear]];
40 | }
41 |
42 | - (void)didReceiveMemoryWarning {
43 | [super didReceiveMemoryWarning];
44 | // Dispose of any resources that can be recreated.
45 | }
46 |
47 |
48 | - (IBAction)pushAction:(id)sender {
49 | MainHomeController *mainHomeController = [[MainHomeController alloc]init];
50 | [self.navigationController pushViewController:mainHomeController animated:YES];
51 | }
52 | @end
53 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/Commands/AVIMConversationOutCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMConversationOutCommand.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/8/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | // 处于兼容性考虑,保留该类。该类仅仅用在conversation 缓存时,生成 SQL 中 conversationID 对应的 key。
8 |
9 | #import "AVIMSignature.h"
10 | #import "AVIMDynamicObject.h"
11 | #import "AVIMCommandCommon.h"
12 |
13 | @interface AVIMConversationOutCommand : AVIMDynamicObject
14 |
15 | @property (nonatomic, assign) uint16_t i;
16 | @property (nonatomic, copy) NSString *cmd;
17 | @property (nonatomic, assign) NSInteger code;
18 | @property (nonatomic, assign) NSInteger appCode;
19 | @property (nonatomic, copy) NSString *reason;
20 | @property (nonatomic, copy) NSString *peerId;
21 | @property (nonatomic, assign) BOOL needResponse;
22 | @property (nonatomic, copy) AVIMCommandResultBlock callback;
23 |
24 | @property(nonatomic, strong) NSString *op;
25 | @property(nonatomic, strong) NSString *cid;
26 | @property(nonatomic, strong) NSArray *m;
27 | @property(nonatomic, assign) bool transient;
28 | @property(nonatomic, assign) bool muted;
29 |
30 | @property (nonatomic, strong) AVIMSignature *signature;
31 | @property (nonatomic, strong) NSDictionary *attr;
32 | @property (nonatomic, strong) NSDictionary *where;
33 | @property (nonatomic, strong) NSString *sort;
34 | @property (nonatomic, assign) uint32_t skip;
35 | @property (nonatomic, assign) uint32_t limit;
36 | @property (nonatomic, assign) BOOL unique;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMMessage_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMMessage_Internal.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/28/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMMessage.h"
10 |
11 | @interface AVIMMessage ()
12 |
13 | /*!
14 | * Wether message has breakpoint or not
15 | */
16 | @property (assign) BOOL breakpoint;
17 |
18 | /*!
19 | * Wether message is offline or not
20 | */
21 | @property (nonatomic, assign) BOOL offline;
22 |
23 | /*!
24 | * Wether has more messages before current message
25 | */
26 | @property (nonatomic, assign) BOOL hasMore;
27 |
28 | /*!
29 | * Id of local client which owns the message
30 | */
31 | @property (nonatomic, copy) NSString *localClientId;
32 |
33 | /*!
34 | * Wether message is transient or not
35 | */
36 | @property (nonatomic, assign) BOOL transient;
37 |
38 | /*!
39 | * Payload of current message, it is a JSON string or plain text message
40 | */
41 | - (NSString *)payload;
42 |
43 | //======================================================================
44 | //====== override readonly property to readwrite for internal use ======
45 | //======================================================================
46 |
47 | /* 表示消息状态*/
48 | @property (nonatomic, assign) AVIMMessageStatus status;
49 | /*消息 id*/
50 | @property (nonatomic, copy) NSString *messageId;
51 | /*消息发送/接收方 id*/
52 | @property (nonatomic, copy) NSString *clientId;
53 | /*消息所属对话的 id*/
54 | @property (nonatomic, copy) NSString *conversationId;
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/UserInfo.h:
--------------------------------------------------------------------------------
1 | //
2 | // userInfo.h
3 | // AVOS_DEMO
4 | //
5 | // Created by Albert on 13-9-8.
6 | // Copyright (c) 2013年 Albert. All rights reserved.
7 | //
8 |
9 |
10 | #import "AVSubclassing.h"
11 | #import
12 | #import "AVSubclassing.h"
13 |
14 |
15 | //@class User;
16 |
17 | @interface UserInfo : AVObject
18 |
19 | //@property (nonatomic, retain) User *user;
20 |
21 | @property (nonatomic, retain) NSDate *brithday;//生日
22 |
23 | @property (nonatomic, readonly) NSString *constellation;//星座
24 |
25 | @property (nonatomic, readonly) NSString *zodiac;//生肖
26 |
27 | @property (nonatomic, retain) NSString *telephone;//固定电话
28 |
29 | @property (nonatomic, retain) NSString *mobile;//手机
30 |
31 | @property (nonatomic, retain) NSString *address;//地址
32 |
33 | @property (nonatomic, retain) NSString *zipcode;//邮编
34 |
35 | @property (nonatomic, retain) NSString *nationality;//国籍
36 |
37 | @property (nonatomic, retain) NSString *brithProvince;//出生地
38 |
39 | @property (nonatomic, retain) NSString *graduateSchool;//毕业校
40 |
41 | @property (nonatomic, retain) NSString *company;//公司
42 |
43 | @property (nonatomic, retain) NSString *education;//学历
44 |
45 | @property (nonatomic, retain) NSString *bloodType;//血型
46 |
47 | @property (nonatomic, retain) NSString *QQ;//qq
48 |
49 | @property (nonatomic, retain) NSString *MSN;//msn
50 |
51 | @property (nonatomic, retain) NSString *interest;//兴趣
52 |
53 | @property (nonatomic, retain) AVRelation *abums;//相册
54 |
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/Thread.h:
--------------------------------------------------------------------------------
1 | //
2 | // Thread.h
3 | //
4 | //
5 | // Created by Albert on 13-9-13.
6 | // Copyright (c) 2013年 Albert. All rights reserved.
7 | //
8 |
9 | #import "AVObject.h"
10 | #import "AVSubclassing.h"
11 | #import "UserArmor.h"
12 |
13 |
14 | @interface Thread : AVObject
15 |
16 | @property (nonatomic, retain) NSString *title;//主题名
17 |
18 |
19 | @property (nonatomic, retain) UserArmor *postUser;//作者
20 | @property (nonatomic, retain) UserArmor *lastPoster;//最后回帖人
21 | @property (nonatomic, retain) NSString *tags;//标签 [tag]xxx[/tag]
22 | @property (nonatomic, assign) int price;//积分
23 |
24 | @property (nonatomic, assign) int views;//阅览次数
25 |
26 | @property (nonatomic, assign) int viewsOfToday;//今天阅览次数
27 |
28 | @property (nonatomic, assign) int viewsOfYesterday;//昨天阅览次数
29 |
30 | @property (nonatomic, retain) AVRelation *faviconUser;//收藏人 //user
31 |
32 | @property (nonatomic, retain) AVGeoPoint *location;//发帖地点
33 |
34 | @property (nonatomic, retain) NSString *place;//发帖地点
35 |
36 | @property (nonatomic, assign) int state;//状态 -1:关闭 0:一般 1:完成
37 |
38 | @property (nonatomic, assign) int numberOfPosts;
39 |
40 | @property (nonatomic, retain) AVRelation *posts;//回复主题的帖子 //Post
41 |
42 |
43 | @end
44 |
45 |
46 | @interface AVComment : AVObject
47 |
48 |
49 | @property (nonatomic, assign) int state;//状态 0:一般
50 |
51 | @end
52 |
53 | @interface AVSubComment : AVComment
54 |
55 |
56 | @property (nonatomic, assign) int subState;//状态 0:一般
57 |
58 | @end
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/Track/Track/MJExtension/MJFoundation.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJFoundation.m
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 14/7/16.
6 | // Copyright (c) 2014年 小码哥. All rights reserved.
7 | //
8 |
9 | #import "MJFoundation.h"
10 | #import "MJExtensionConst.h"
11 | #import
12 |
13 | static NSSet *foundationClasses_;
14 |
15 | @implementation MJFoundation
16 |
17 | + (NSSet *)foundationClasses
18 | {
19 | if (foundationClasses_ == nil) {
20 | // 集合中没有NSObject,因为几乎所有的类都是继承自NSObject,具体是不是NSObject需要特殊判断
21 | foundationClasses_ = [NSSet setWithObjects:
22 | [NSURL class],
23 | [NSDate class],
24 | [NSValue class],
25 | [NSData class],
26 | [NSError class],
27 | [NSArray class],
28 | [NSDictionary class],
29 | [NSString class],
30 | [NSAttributedString class], nil];
31 | }
32 | return foundationClasses_;
33 | }
34 |
35 | + (BOOL)isClassFromFoundation:(Class)c
36 | {
37 | if (c == [NSObject class] || c == [NSManagedObject class]) return YES;
38 |
39 | __block BOOL result = NO;
40 | [[self foundationClasses] enumerateObjectsUsingBlock:^(Class foundationClass, BOOL *stop) {
41 | if ([c isSubclassOfClass:foundationClass]) {
42 | result = YES;
43 | *stop = YES;
44 | }
45 | }];
46 | return result;
47 | }
48 | @end
49 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/MessageCache/CacheStore/LCIMMessageCacheStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // LCIMMessageCacheStore.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 5/21/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "LCIMCacheStore.h"
10 |
11 | @class AVIMMessage;
12 |
13 | @interface LCIMMessageCacheStore : LCIMCacheStore
14 |
15 | @property (nonatomic, readonly, copy) NSString *conversationId;
16 |
17 | - (instancetype)initWithClientId:(NSString *)clientId conversationId:(NSString *)conversationId;
18 |
19 | - (void)insertMessages:(NSArray *)messages;
20 | - (void)insertMessage:(AVIMMessage *)message;
21 | - (void)insertMessage:(AVIMMessage *)message withBreakpoint:(BOOL)breakpoint;
22 |
23 | - (void)updateBreakpoint:(BOOL)breakpoint forMessages:(NSArray *)messages;
24 | - (void)updateBreakpoint:(BOOL)breakpoint forMessage:(AVIMMessage *)message;
25 |
26 | - (void)updateMessageWithoutBreakpoint:(AVIMMessage *)message;
27 |
28 | - (void)deleteMessageForId:(NSString *)messageId;
29 |
30 | - (BOOL)containMessage:(AVIMMessage *)message;
31 |
32 | - (AVIMMessage *)messageForId:(NSString *)messageId;
33 |
34 | - (AVIMMessage *)nextMessageForId:(NSString *)messageId timestamp:(int64_t)timestamp;
35 |
36 | - (NSArray *)messagesBeforeTimestamp:(int64_t)timestamp
37 | messageId:(NSString *)messageId
38 | limit:(NSUInteger)limit;
39 |
40 | - (NSArray *)latestMessagesWithLimit:(NSUInteger)limit;
41 |
42 | - (AVIMMessage *)latestNoBreakpointMessage;
43 |
44 | - (void)cleanCache;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/UserArmor.h:
--------------------------------------------------------------------------------
1 | //
2 | // UserArmor.h
3 | // paas
4 | //
5 | // Created by Summer on 13-9-9.
6 | // Copyright (c) 2013年 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AVSubclassing.h"
11 | #import "UserInfo.h"
12 | #import "Armor.h"
13 |
14 |
15 | @interface UserArmor : AVUser
16 |
17 | + (NSString *)parseClassName;
18 |
19 | @property (retain) NSString *displayName;
20 | @property int rupees;
21 | @property BOOL fireproof;
22 | @property (assign) double testDoubleValue;
23 | @property (copy, nonatomic) NSString *nameForTextCopy;
24 |
25 | @property float testFloatValue;
26 | @property CGFloat testCGFloatValue;
27 | @property (nonatomic, retain) UserInfo *userInfo;
28 |
29 |
30 | @property (nonatomic, retain) NSString *nickName;//昵称
31 |
32 | @property (nonatomic, retain) AVFile *headView;//头像
33 |
34 | @property (nonatomic, retain) NSString *registerIp;//注册ip
35 |
36 | @property (nonatomic, readonly) double credits;//积分
37 |
38 | @property (nonatomic, readonly) NSInteger numberOfRemind;//新提醒数
39 |
40 | @property (nonatomic, retain) AVGeoPoint *location;
41 |
42 |
43 | //@property (nonatomic, retain) UserCount *userCount;
44 |
45 | @property (nonatomic, retain) NSString *QQWeibo;
46 |
47 | @property (nonatomic, retain) NSString *SinaWeibo;
48 |
49 | @property (nonatomic, retain) NSString *RenRen;
50 |
51 | @property (nonatomic, retain) NSString *WeChat;
52 |
53 | @property (nonatomic, strong) Armor *armor;
54 |
55 | @property (nonatomic, strong) AVRelation * friends;
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/AspectTrack/Aspects/MOAspects.h:
--------------------------------------------------------------------------------
1 | //
2 | // MOAspects.h
3 | // MOAspects
4 | //
5 | // Created by Hiromi Motodera on 2015/03/15.
6 | // Copyright (c) 2015 MOAI. All rights reserved
7 | //
8 |
9 | #import
10 |
11 | #import "MOAspectsHookRange.h"
12 |
13 | typedef NS_ENUM(NSInteger, MOAspectsPosition)
14 | {
15 | MOAspectsPositionBefore,
16 | MOAspectsPositionAfter
17 | };
18 |
19 | @interface MOAspects : NSObject
20 |
21 | #pragma mark - Hook instance method
22 |
23 | + (BOOL)hookInstanceMethodForClass:(Class)clazz
24 | selector:(SEL)selector
25 | aspectsPosition:(MOAspectsPosition)aspectsPosition
26 | usingBlock:(id)block;
27 |
28 | + (BOOL)hookInstanceMethodForClass:(Class)clazz
29 | selector:(SEL)selector
30 | aspectsPosition:(MOAspectsPosition)aspectsPosition
31 | hookRange:(MOAspectsHookRange)hookRange
32 | usingBlock:(id)block;
33 |
34 | #pragma mark - Hook class method
35 |
36 | + (BOOL)hookClassMethodForClass:(Class)clazz
37 | selector:(SEL)selector
38 | aspectsPosition:(MOAspectsPosition)aspectsPosition
39 | usingBlock:(id)block;
40 |
41 | + (BOOL)hookClassMethodForClass:(Class)clazz
42 | selector:(SEL)selector
43 | aspectsPosition:(MOAspectsPosition)aspectsPosition
44 | hookRange:(MOAspectsHookRange)hookRange
45 | usingBlock:(id)block;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOS.xcodeproj/xcuserdata/Kenvin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SuppressBuildableAutocreation
6 |
7 | 704F3B6D1BE0D0180033245C
8 |
9 | primary
10 |
11 |
12 | 704F3B761BE0D0180033245C
13 |
14 | primary
15 |
16 |
17 | 70CA7F671BDE2DC3000A3B21
18 |
19 | primary
20 |
21 |
22 | 70F315311BDE503B00D691B3
23 |
24 | primary
25 |
26 |
27 | 8320F87A1C1918C60024B45E
28 |
29 | primary
30 |
31 |
32 | 83D8CE731C17DAF50094279D
33 |
34 | primary
35 |
36 |
37 | 8C255D251AE9F815008A6FFC
38 |
39 | primary
40 |
41 |
42 | 8C8419851A5A791300C5C6C4
43 |
44 | primary
45 |
46 |
47 | 8C8419901A5A791300C5C6C4
48 |
49 | primary
50 |
51 |
52 | 8C8419C21A5A796000C5C6C4
53 |
54 | primary
55 |
56 |
57 | 8C8419CC1A5A796000C5C6C4
58 |
59 | primary
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVMessage.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 8/6/14.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @class AVSession;
12 | @class AVGroup;
13 | typedef enum : NSUInteger {
14 | AVMessageTypePeerIn = 1,
15 | AVMessageTypePeerOut,
16 | AVMessageTypeGroupIn,
17 | AVMessageTypeGroupOut,
18 | } AVMessageType;
19 |
20 | NS_ASSUME_NONNULL_BEGIN
21 |
22 | @interface AVMessage : NSObject
23 |
24 | @property (nonatomic, assign) AVMessageType type;
25 | @property (nonatomic, copy, nullable) NSString *payload;
26 | @property (nonatomic, copy, nullable) NSString *fromPeerId;
27 | @property (nonatomic, copy, nullable) NSString *toPeerId;
28 | @property (nonatomic, copy, nullable) NSString *groupId;
29 | @property (nonatomic, assign) int64_t timestamp;
30 | @property (nonatomic, assign) int64_t receiptTimestamp;
31 | @property (nonatomic, assign) BOOL offline;
32 |
33 | /*!
34 | * 构造一个发送到group的message对象
35 | * @param group 要发送的group
36 | * @param payload 消息载体
37 | * @return message 对象
38 | */
39 | + (instancetype)messageForGroup:(AVGroup *)group payload:(NSString *)payload;
40 |
41 | /*!
42 | * 构造一个发送给 toPeerId 的message对象
43 | * @param session 服务器会话
44 | * @param toPeerId 要发往的 peerId
45 | * @param payload 消息载体
46 | * @return message 对象
47 | */
48 | + (instancetype)messageForPeerWithSession:(AVSession *)session
49 | toPeerId:(NSString *)toPeerId
50 | payload:(NSString *)payload;
51 |
52 | @end
53 |
54 | NS_ASSUME_NONNULL_END
55 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Query/AVQuery_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVQuery_Internal.h
3 | // Paas
4 | //
5 | // Created by Zhu Zeng on 3/28/13.
6 | // Copyright (c) 2013 AVOS. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AVQuery ()
12 | @property (nonatomic, readwrite, strong) NSMutableDictionary *parameters;
13 | @property (nonatomic, readwrite, strong) NSMutableDictionary *where;
14 | @property (nonatomic, readwrite, strong) NSMutableSet * selectedKeys;
15 | @property (nonatomic, strong) NSMutableDictionary *extraParameters;
16 |
17 | - (NSDictionary *)assembleParameters;
18 | + (NSDictionary *)dictionaryFromIncludeKeys:(NSArray *)array;
19 | - (NSString *)queryPath;
20 | -(void)queryWithBlock:(NSString *)path
21 | parameters:(NSDictionary *)parameters
22 | block:(AVArrayResultBlock)resultBlock;
23 | - (AVObject *)getFirstObjectWithBlock:(AVObjectResultBlock)resultBlock
24 | waitUntilDone:(BOOL)wait
25 | error:(NSError **)theError;
26 |
27 | /**
28 | * Convert server response json to AVObjects. Indend to be overridden.
29 | * @param results "results" value of the server response.
30 | * @param className The class name for parsing. If nil, the query's className will be used.
31 | * @return AVObject array.
32 | */
33 | - (NSMutableArray *)processResults:(NSArray *)results className:(NSString *)className;
34 |
35 | /**
36 | * Process end value of server response. Used in AVStatusQuery.
37 | * @param end end value
38 | */
39 | - (void)processEnd:(BOOL)end;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Track/AVOS/deploy-sdk-not-upload.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | test -f common.function && source common.function || exit 2
4 |
5 | if hostname | grep -iE '(avos|builder)' > /dev/null 2>&1 ; then
6 | release_sdk_path="/Users/avos/jenkins/workspace/avoscloud-sdk/"
7 | elif hostname | grep -i hj > /dev/null 2>&1 ; then
8 | release_sdk_path="/Users/hong/avos/code/avoscloud-sdk"
9 | fi
10 | branch=$(get_current_branch)
11 | if [ x"$branch" = "xmaster" ]; then
12 | echo "|==> BRANCH CAN NOT BE MASTER ! EXIT"
13 | exit 1
14 | fi
15 | version=${branch//v/} # cut off character 'v'
16 |
17 |
18 | if [ "x$1" == "xiOS" ]; then
19 | cd $release_sdk_path && {
20 | echo "|==> Prepare $release_sdk_path git repo for iOS"
21 | git stash && git pull origin master
22 | echo "|==> Delete $release_sdk_path/iOS/release-${branch} if existed"
23 | rm -rfv $release_sdk_path/iOS/release-${branch}
24 | }
25 |
26 | cd -
27 | #cd iOS/paas/
28 | test -d ~/Library/Developer/Xcode/DerivedData/ && rm -rf ~/Library/Developer/Xcode/DerivedData/
29 | # test sdk
30 | #xcodebuild test -scheme AVOSCloud -sdk iphonesimulator -configuration Release || fail_and_exit $0
31 | # build ios sdk
32 | ./build-framework.sh $release_sdk_path || fail_and_exit "$0"
33 | echo
34 | elif [ "x$1" == "xOSX" ];then
35 | cd iOS/paas/
36 | test -d ~/Library/Developer/Xcode/DerivedData/ && rm -rf ~/Library/Developer/Xcode/DerivedData/
37 | # build OSX sdk
38 | ./deploy.osx-sdk.sh $release_sdk_path || fail_and_exit "$0"
39 | echo
40 | else
41 | echo "Argument \$1 = $1, SHOULD BE IN iOS/OSX, EXIT !"
42 | exit 1
43 | fi
44 |
45 |
--------------------------------------------------------------------------------
/Track/Track/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/AspectTrack/Aspects/MOAspectsStore.m:
--------------------------------------------------------------------------------
1 | //
2 | // MOAspectsStore.m
3 | // MOAspects
4 | //
5 | // Created by Hiromi Motodera on 2015/03/15.
6 | // Copyright (c) 2015 MOAI. All rights reserved
7 | //
8 |
9 | #import "MOAspectsStore.h"
10 |
11 | #import "MOARuntime.h"
12 |
13 | @interface MOAspectsStore()
14 |
15 | @property (nonatomic) NSMutableDictionary *targetStore;
16 |
17 | @end
18 |
19 | @implementation MOAspectsStore
20 |
21 | NSString * const MOAspectsStoreKeyFormat = @"%@[%@ %@]";
22 |
23 | + (instancetype)sharedStore
24 | {
25 | static MOAspectsStore *sharedStore;
26 | @synchronized(self) {
27 | if (!sharedStore) {
28 | sharedStore = [[MOAspectsStore alloc] init];
29 | }
30 | }
31 | return sharedStore;
32 | }
33 |
34 | - (NSMutableDictionary *)targetStore
35 | {
36 | if (!_targetStore) {
37 | _targetStore = [@{} mutableCopy];
38 | }
39 | return _targetStore;
40 | }
41 |
42 | + (NSString *)keyWithClass:(Class)clazz
43 | selector:(SEL)selector
44 | methodType:(MOAspectsTargetMethodType)methodType
45 | {
46 | return [NSString stringWithFormat:MOAspectsStoreKeyFormat,
47 | methodType == MOAspectsTargetMethodTypeClass ? @"+" : @"-",
48 | [MOARuntime stringWithClass:clazz],
49 | NSStringFromSelector(selector)];
50 | }
51 |
52 | - (void)setTarget:(MOAspectsTarget *)target forKey:(NSString *)key
53 | {
54 | [self.targetStore setValue:target forKey:key];
55 | }
56 |
57 | - (MOAspectsTarget *)targetForKey:(NSString *)key
58 | {
59 | return [self.targetStore valueForKey:key];
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/AVSession_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVSession_Internal.h
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 7/22/14.
6 | //
7 | //
8 | #import
9 | #import "AVSession.h"
10 | #import "AVWebSocketWrapper.h"
11 | #import "AVConstants.h"
12 | #import "AVGroup.h"
13 | #import "AVCommandCommon.h"
14 |
15 | #define AVIM_NOTIFICATION_WEBSOCKET_CLOSED @"AVIM_NOTIFICATION_WEBSOCKET_CLOSED_V1"
16 |
17 | @interface AVSession() {
18 | // NSString *_peerId;
19 | NSMutableSet *_watchedPeerIds;
20 | NSMutableSet *_onlinePeerIds;
21 | BOOL _opened;
22 | BOOL _paused;
23 | NSMutableArray *_queryCallbackQueue;
24 | // NSMutableArray *_messageQueue;
25 | NSMutableArray *_ackCommandQueue;
26 | AVSignature *_signatureForOpenCommand;
27 | NSTimer *_ackTimer;
28 | BOOL _ackRecieved;
29 | // AVGroup *_group;
30 | // NSMutableDictionary *_groups;
31 | NSMutableArray *_unInitializedGroups;
32 | // BOOL _isGroupSession;
33 | // AVSessionOutCommand *_openCommand;
34 | NSMutableDictionary *_receiptDictionary;
35 | }
36 | //@property (nonatomic, strong)NSMutableDictionary *joinedGroupsDict;
37 | //@property (nonatomic) int sessionId;
38 | //- (AVSignature *)generateSignature:(NSArray *)peerIds action:(NSString *)action;
39 | //- (void)sendMessage:(NSString *)message isTransient:(BOOL)transient peerIds:(NSArray *)peerIds groupId:(NSString *)groupId;
40 | //- (void)sendPayload:(NSString *)payload isTransient:(BOOL)transient;
41 | + (dispatch_queue_t)sessionQueue;
42 | - (void)sendCommand:(AVCommand *)command;
43 | - (void)failWithError:(NSError *)error;
44 |
45 | @end
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Query/AVFriendQuery.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVFriendQuery.m
3 | // paas
4 | //
5 | // Created by Travis on 14-1-26.
6 | // Copyright (c) 2014年 AVOS. All rights reserved.
7 | //
8 |
9 | #import "AVFriendQuery.h"
10 | #import "AVQuery_Internal.h"
11 | #import "AVObjectUtils.h"
12 | #import "AVErrorUtils.h"
13 | #import "AVQuery_Internal.h"
14 |
15 | @implementation AVFriendQuery
16 |
17 | //-(void)queryWithBlock:(NSString *)path
18 | // parameters:(NSDictionary *)parameters
19 | // block:(AVArrayResultBlock)resultBlock {
20 | // _end = NO;
21 | // [super queryWithBlock:path parameters:parameters block:resultBlock];
22 | //}
23 | //
24 | //- (AVObject *)getFirstObjectWithBlock:(AVObjectResultBlock)resultBlock
25 | // waitUntilDone:(BOOL)wait
26 | // error:(NSError **)theError {
27 | // _end = NO;
28 | // return [super getFirstObjectWithBlock:resultBlock waitUntilDone:wait error:theError];
29 | //}
30 | // only called in findobjects, these object's data is ready
31 | - (NSMutableArray *)processResults:(NSArray *)results className:(NSString *)className
32 | {
33 | NSMutableArray * users = [NSMutableArray array];
34 |
35 | for (NSDictionary *dict in [results copy]) {
36 | id target = dict[self.targetFeild];
37 | if (target && [target isKindOfClass:[NSDictionary class]]) {
38 | AVObject *obj= [AVObjectUtils avobjectFromDictionary:target];
39 | [users addObject:obj];
40 | }
41 | }
42 |
43 | return (id)users;
44 | }
45 |
46 | //- (void)processEnd:(BOOL)end {
47 | // _end = end;
48 | //}
49 | @end
50 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMKeyedConversation.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMKeyedConversation.h
3 | // AVOS
4 | //
5 | // Created by Tang Tianyong on 6/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class AVIMClient;
12 | @class AVIMConversation;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | * Represents a conversation which intends to be archived. Can get this object from AVIMConversation by -[AVIMConversation keyedConversation]. Can convert this object to AVIMConverstaion by -[AVIMClient conversationWithKeyedConversation:].
18 | */
19 | @interface AVIMKeyedConversation : NSObject
20 |
21 | @property (nonatomic, copy, readonly, nullable) NSString *conversationId; // 对话 id
22 | @property (nonatomic, copy, readonly, nullable) NSString *creator; // 创建者 id
23 | @property (nonatomic, strong, readonly, nullable) NSDate *createAt; // 创建时间
24 | @property (nonatomic, strong, readonly, nullable) NSDate *updateAt; // 最后更新时间
25 | @property (nonatomic, strong, readonly, nullable) NSDate *lastMessageAt; // 对话中最后一条消息的发送时间
26 | @property (nonatomic, copy, readonly, nullable) NSString *name; // 对话名字
27 | @property (nonatomic, strong, readonly, nullable) NSArray *members; // 对话参与者列表
28 | @property (nonatomic, strong, readonly, nullable) NSDictionary *attributes; // 自定义属性
29 | @property (nonatomic, assign, readonly) BOOL transient; // 是否为临时会话(开放群组)
30 | @property (nonatomic, assign, readonly) BOOL muted; // 静音状态
31 |
32 | @end
33 |
34 | NS_ASSUME_NONNULL_END
35 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/Object/AVRelation.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVRelation.h
3 | // LeanCloud
4 | //
5 | //
6 |
7 | #import
8 | #import "AVObject.h"
9 | #import "AVQuery.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*!
14 | A class that is used to access all of the children of a many-to-many relationship. Each instance
15 | of AVRelation is associated with a particular parent object and key.
16 | */
17 | @interface AVRelation : NSObject {
18 |
19 | }
20 |
21 | @property (nonatomic, copy, nullable) NSString *targetClass;
22 |
23 |
24 | #pragma mark Accessing objects
25 | /*!
26 | @return A AVQuery that can be used to get objects in this relation.
27 | */
28 | - (AVQuery *)query;
29 |
30 |
31 | #pragma mark Modifying relations
32 |
33 | /*!
34 | Adds a relation to the passed in object.
35 | @param object AVObject to add relation to.
36 | */
37 | - (void)addObject:(AVObject *)object;
38 |
39 | /*!
40 | Removes a relation to the passed in object.
41 | @param object AVObject to add relation to.
42 | */
43 | - (void)removeObject:(AVObject *)object;
44 |
45 | /*!
46 | @return A AVQuery that can be used to get parent objects in this relation.
47 | */
48 |
49 | /**
50 | * A AVQuery that can be used to get parent objects in this relation.
51 | *
52 | * @param parentClassName parent Class Name
53 | * @param relationKey relation Key
54 | * @param child child object
55 | *
56 | * @return the Query
57 | */
58 | +(AVQuery *)reverseQuery:(NSString *)parentClassName
59 | relationKey:(NSString *)relationKey
60 | childObject:(AVObject *)child;
61 |
62 | @end
63 |
64 | NS_ASSUME_NONNULL_END
65 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudTests/LogicTests/AVPersistentUtilsTest.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVPersistentUtilsTest.m
3 | // AVOS
4 | //
5 | // Created by lzw on 15/10/27.
6 | // Copyright © 2015年 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVTestBase.h"
10 | #import "AVPersistenceUtils.h"
11 |
12 | @interface AVPersistentUtilsTest : AVTestBase
13 |
14 | @end
15 |
16 | @implementation AVPersistentUtilsTest
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | }
21 |
22 | - (void)tearDown {
23 | [super tearDown];
24 | }
25 |
26 | - (void)assertPath:(NSString *)path equalToRelativePath:(NSString *)relativePath {
27 | NSString *home = NSHomeDirectory();
28 | #if AV_OSX_ONLY
29 | home = [home stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Application Support/LeanCloud/%@", [AVOSCloud getApplicationId]]];
30 | #endif
31 | path = [path stringByReplacingOccurrencesOfString:home withString:@"~"];
32 | XCTAssertEqualObjects(path, relativePath);
33 | }
34 |
35 | - (void)testCurrentUserArchivePath {
36 | NSString *path = [AVPersistenceUtils currentUserArchivePath];
37 | [self assertPath:path equalToRelativePath:@"~/Library/Private Documents/AVPaas/currentUser"];
38 | }
39 |
40 | - (void)testMessageCacheDatabasePath {
41 | NSString *path = [AVPersistenceUtils messageCacheDatabasePathWithName:@"chat"];
42 | [self assertPath:path equalToRelativePath:@"~/Library/Caches/LeanCloud/MessageCache/chat"];
43 | }
44 |
45 | - (void)testCommandCacheDatabasePath {
46 | NSString *path = [AVPersistenceUtils commandCacheDatabasePath];
47 | [self assertPath:path equalToRelativePath:@"~/Documents/LeanCloud/CommandCache"];
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/AspectTrack/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/AVIMConversation_Internal.h:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMConversation_Internal.h
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 12/12/14.
6 | // Copyright (c) 2014 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import "AVIMConversation.h"
10 |
11 | #define KEY_NAME @"name"
12 | #define KEY_ATTR @"attr"
13 | #define KEY_TIMESTAMP @"timestamp"
14 | #define KEY_DATA @"data"
15 | #define KEY_FROM @"from"
16 | #define KEY_MSGID @"msgId"
17 |
18 | @class AVIMConversationUpdateBuilder;
19 |
20 | @interface AVIMConversation ()
21 |
22 | @property(nonatomic, copy) NSString *name; // 对话名字
23 | @property(nonatomic, strong) NSDate *createAt; // 创建时间
24 | @property(nonatomic, strong) NSDate *updateAt; // 最后更新时间
25 | @property(nonatomic, strong) NSDate *lastMessageAt; // 对话中最后一条消息的发送时间
26 | @property(nonatomic, strong) NSDictionary *attributes; // 自定义属性
27 | @property(nonatomic, assign) BOOL muted; // 静音状态
28 | @property(nonatomic, assign) BOOL transient; // 是否为临时会话(开放群组)
29 |
30 | //@property(nonatomic, strong)AVIMConversationUpdateBuilder *updateBuilder;
31 | - (instancetype)initWithConversationId:(NSString *)conversationId;
32 | - (void)setConversationId:(NSString *)conversationId;
33 | - (void)setMembers:(NSArray *)members;
34 | - (void)setCreator:(NSString *)creator;
35 | - (void)setImClient:(AVIMClient *)imClient;
36 | - (void)addMembers:(NSArray *)members;
37 | - (void)addMember:(NSString *)clientId;
38 | - (void)removeMembers:(NSArray *)members;
39 | - (void)removeMember:(NSString *)clientId;
40 |
41 | - (void)setKeyedConversation:(AVIMKeyedConversation *)keyedConversation;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/AspectTrack/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloud/IM/Commands/AVDirectCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVDirectCommand.m
3 | // AVOS
4 | //
5 | // Created by Qihe Bian on 9/5/14.
6 | //
7 | //
8 |
9 | #import "AVDirectCommand.h"
10 | #import "AVCommandCommon.h"
11 |
12 | @implementation AVDirectCommand
13 | @dynamic msg, roomId, transient;
14 |
15 | + (instancetype)commandWithMessage:(AVMessage *)message transient:(BOOL)transient{
16 | AVMessageType type = message.type;
17 | id result = nil;
18 | switch (type) {
19 | case AVMessageTypePeerOut: {
20 | AVDirectOutCommand *r = [[AVDirectOutCommand alloc] init];
21 | r.peerId = message.fromPeerId;
22 | r.toPeerIds = @[message.toPeerId];
23 | r.msg = message.payload;
24 | r.transient = transient;
25 | r.message = message;
26 | result = r;
27 | }
28 | break;
29 | case AVMessageTypeGroupOut: {
30 | AVDirectOutCommand *r = [[AVDirectOutCommand alloc] init];
31 | r.peerId = message.fromPeerId;
32 | r.roomId = message.groupId;
33 | r.msg = message.payload;
34 | r.transient = transient;
35 | r.message = message;
36 | result = r;
37 | }
38 | break;
39 |
40 | default:
41 | break;
42 | }
43 | return result;
44 | }
45 |
46 |
47 | - (instancetype)init {
48 | if ((self = [super init])) {
49 | self.cmd = AVCommandDirect;
50 | }
51 | return self;
52 | }
53 |
54 | - (NSString *)description {
55 | NSString *des = [[NSString alloc] initWithFormat:@"%@ message:%@", [super description], self.msg];
56 | return des;
57 | }
58 | @end
59 |
--------------------------------------------------------------------------------
/Track/AVOS/AVOSCloudIM/TypedMessages/AVIMVideoMessage.m:
--------------------------------------------------------------------------------
1 | //
2 | // AVIMVideoMessage.m
3 | // AVOSCloudIM
4 | //
5 | // Created by Qihe Bian on 1/12/15.
6 | // Copyright (c) 2015 LeanCloud Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AVIMVideoMessage.h"
12 | #import "AVIMGeneralObject.h"
13 | #import "AVIMTypedMessage_Internal.h"
14 |
15 | @implementation AVIMVideoMessage
16 |
17 | + (void)load {
18 | [self registerSubclass];
19 | }
20 |
21 | + (AVIMMessageMediaType)classMediaType {
22 | return kAVIMMessageMediaTypeVideo;
23 | }
24 |
25 | - (void)setSize:(uint64_t)size {
26 | AVIMGeneralObject *metaData = [[AVIMGeneralObject alloc] initWithMutableDictionary:self.file.metaData];
27 | metaData.size = size;
28 | }
29 |
30 | - (uint64_t)size {
31 | AVIMGeneralObject *metaData = [[AVIMGeneralObject alloc] initWithMutableDictionary:self.file.metaData];
32 | return metaData.size;
33 | }
34 |
35 | - (void)setFormat:(NSString *)format {
36 | AVIMGeneralObject *metaData = [[AVIMGeneralObject alloc] initWithMutableDictionary:self.file.metaData];
37 | metaData.format = format;
38 | }
39 |
40 | - (NSString *)format {
41 | AVIMGeneralObject *metaData = [[AVIMGeneralObject alloc] initWithMutableDictionary:self.file.metaData];
42 | return metaData.format;
43 | }
44 |
45 | - (void)setDuration:(float)duration {
46 | AVIMGeneralObject *metaData = [[AVIMGeneralObject alloc] initWithMutableDictionary:self.file.metaData];
47 | metaData.duration = duration;
48 | }
49 |
50 | - (float)duration {
51 | AVIMGeneralObject *metaData = [[AVIMGeneralObject alloc] initWithMutableDictionary:self.file.metaData];
52 | return metaData.duration;
53 | }
54 | @end
55 |
--------------------------------------------------------------------------------