├── .gitignore ├── Framework ├── Weixin │ ├── WXApi.h │ ├── WXApiObject.h │ └── libWeChatSDK.a └── iflyMSC.framework │ ├── Headers │ ├── IFlyContact.h │ ├── IFlyDataDownloader.h │ ├── IFlyDataUploader.h │ ├── IFlyRecognizerView.h │ ├── IFlyRecognizerViewDelegate.h │ ├── IFlySetting.h │ ├── IFlySpeechConstant.h │ ├── IFlySpeechError.h │ ├── IFlySpeechRecognizer.h │ ├── IFlySpeechRecognizerDelegate.h │ ├── IFlySpeechSynthesizer.h │ ├── IFlySpeechSynthesizerDelegate.h │ ├── IFlySpeechUnderstander.h │ ├── IFlySpeechUtility.h │ ├── IFlyTextUnderstander.h │ └── IFlyUserWords.h │ └── iflyMSC ├── Podfile ├── README.md ├── ScreenShot ├── alipay_qr.jpg ├── home1_40.png ├── home2_40.png ├── share_40.png └── voice_40.png ├── VNNoteManager ├── Info.plist └── VNNoteManager.h ├── VNNoteManagerTests ├── Info.plist └── VNNoteManagerTests.m ├── Voice2Note.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── liaojinxing.xcuserdatad │ └── xcschemes │ ├── Voice2Note.xcscheme │ └── xcschememanagement.plist ├── Voice2Note.xcworkspace └── contents.xcworkspacedata ├── Voice2Note ├── AppDelegate.h ├── AppDelegate.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── logo_120.png │ │ ├── logo_58.png │ │ └── logo_80.png │ └── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── spalash.png │ │ └── spalash_960.png ├── Resource │ ├── Localizable.strings │ ├── ic_add_tab@2x.png │ ├── ic_more_white@2x.png │ ├── logo │ │ ├── logo.png │ │ ├── logo_120.png │ │ ├── logo_58.png │ │ ├── logo_80.png │ │ ├── spalash.png │ │ └── spalash_960.png │ ├── micro_small@2x.png │ └── save@2x.png ├── Source │ ├── AppContext.h │ ├── AppContext.m │ ├── Common │ │ ├── NSDate+Conversion.h │ │ ├── NSDate+Conversion.m │ │ ├── UIColor+VNHex.h │ │ ├── UIColor+VNHex.m │ │ ├── VNConstants.h │ │ └── VNConstants.m │ ├── Controller │ │ ├── NoteDetailController.h │ │ ├── NoteDetailController.m │ │ ├── NoteListCell.h │ │ ├── NoteListCell.m │ │ ├── NoteListController.h │ │ └── NoteListController.m │ ├── LaunchScreen.xib │ ├── Library │ │ └── Umeng │ │ │ ├── MobClick.h │ │ │ ├── MobClickSocialAnalytics.h │ │ │ └── libMobClickLibrary.a │ └── Model │ │ ├── NoteManager.h │ │ ├── NoteManager.m │ │ ├── VNNote.h │ │ └── VNNote.m ├── Voice2Note-Info.plist ├── Voice2Note-Prefix.pch ├── en.lproj │ └── InfoPlist.strings └── main.m └── Voice2NoteTests ├── Voice2NoteTests-Info.plist ├── Voice2NoteTests.m └── en.lproj └── InfoPlist.strings /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | #global 3 | *.orig 4 | 5 | #Pods 6 | Pods/ 7 | 8 | #ios 9 | .DS_Store 10 | *~ 11 | project.xcworkspace/ 12 | *.xccheckout 13 | xcuserdata/ 14 | .svn 15 | .idea 16 | # CocoaPods 17 | Pods 18 | Podfile.lock 19 | 20 | #CrashMonkey 21 | instrumentscli*.trace/ 22 | crash_monkey_result/ 23 | -------------------------------------------------------------------------------- /Framework/Weixin/WXApi.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXApi.h 3 | // ApiClient 4 | // 5 | // Created by Tencent on 12-2-28. 6 | // Copyright (c) 2012年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "WXApiObject.h" 12 | 13 | #pragma mark - 14 | /*! @brief 接收并处理来自微信终端程序的事件消息 15 | * 16 | * 接收并处理来自微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。 17 | * WXApiDelegate 会在handleOpenURL:delegate:中使用并触发。 18 | */ 19 | @protocol WXApiDelegate 20 | 21 | @optional 22 | 23 | /*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果 24 | * 25 | * 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。 26 | * 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。 27 | * @param req 具体请求内容,是自动释放的 28 | */ 29 | -(void) onReq:(BaseReq*)req; 30 | 31 | /*! @brief 发送一个sendReq后,收到微信的回应 32 | * 33 | * 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。 34 | * 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等。 35 | * @param resp具体的回应内容,是自动释放的 36 | */ 37 | -(void) onResp:(BaseResp*)resp; 38 | 39 | @end 40 | 41 | #pragma mark - 42 | 43 | /*! @brief 微信Api接口函数类 44 | * 45 | * 该类封装了微信终端SDK的所有接口 46 | */ 47 | @interface WXApi : NSObject 48 | 49 | /*! @brief WXApi的成员函数,向微信终端程序注册第三方应用。 50 | * 51 | * 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。 52 | * iOS7及以上系统需要调起一次微信才会出现在微信的可用应用列表中。 53 | * @attention 请保证在主线程中调用此函数 54 | * @param appid 微信开发者ID 55 | * @return 成功返回YES,失败返回NO。 56 | */ 57 | +(BOOL) registerApp:(NSString *)appid; 58 | 59 | /*! @brief WXApi的成员函数,向微信终端程序注册第三方应用。 60 | * 61 | * 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。 62 | * @see registerApp 63 | * @param appid 微信开发者ID 64 | * @param appdesc 应用附加信息,长度不超过1024字节 65 | * @return 成功返回YES,失败返回NO。 66 | */ 67 | +(BOOL) registerApp:(NSString *)appid withDescription:(NSString *)appdesc; 68 | 69 | /*! @brief 处理微信通过URL启动App时传递的数据 70 | * 71 | * 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。 72 | * @param url 微信启动第三方应用时传递过来的URL 73 | * @param delegate WXApiDelegate对象,用来接收微信触发的消息。 74 | * @return 成功返回YES,失败返回NO。 75 | */ 76 | +(BOOL) handleOpenURL:(NSURL *) url delegate:(id) delegate; 77 | 78 | /*! @brief 检查微信是否已被用户安装 79 | * 80 | * @return 微信已安装返回YES,未安装返回NO。 81 | */ 82 | +(BOOL) isWXAppInstalled; 83 | 84 | /*! @brief 判断当前微信的版本是否支持OpenApi 85 | * 86 | * @return 支持返回YES,不支持返回NO。 87 | */ 88 | +(BOOL) isWXAppSupportApi; 89 | 90 | /*! @brief 获取微信的itunes安装地址 91 | * 92 | * @return 微信的安装地址字符串。 93 | */ 94 | +(NSString *) getWXAppInstallUrl; 95 | 96 | /*! @brief 获取当前微信SDK的版本号 97 | * 98 | * @return 返回当前微信SDK的版本号 99 | */ 100 | +(NSString *) getApiVersion; 101 | 102 | /*! @brief 打开微信 103 | * 104 | * @return 成功返回YES,失败返回NO。 105 | */ 106 | +(BOOL) openWXApp; 107 | 108 | /*! @brief 发送请求到微信,等待微信返回onResp 109 | * 110 | * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型 111 | * SendAuthReq、SendMessageToWXReq等。 112 | * @param req 具体的发送请求,在调用函数后,请自己释放。 113 | * @return 成功返回YES,失败返回NO。 114 | */ 115 | +(BOOL) sendReq:(BaseReq*)req; 116 | 117 | /*! @brief 收到微信onReq的请求,发送对应的应答给微信,并切换到微信界面 118 | * 119 | * 函数调用后,会切换到微信的界面。第三方应用程序收到微信onReq的请求,异步处理该请求,完成后必须调用该函数。可能发送的相应有 120 | * GetMessageFromWXResp、ShowMessageFromWXResp等。 121 | * @param resp 具体的应答内容,调用函数后,请自己释放 122 | * @return 成功返回YES,失败返回NO。 123 | */ 124 | +(BOOL) sendResp:(BaseResp*)resp; 125 | 126 | @end 127 | -------------------------------------------------------------------------------- /Framework/Weixin/WXApiObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // MMApiObject.h 3 | // ApiClient 4 | // 5 | // Created by Tencent on 12-2-28. 6 | // Copyright (c) 2012年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! @brief 错误码 12 | * 13 | */ 14 | enum WXErrCode { 15 | 16 | WXSuccess = 0, /**< 成功 */ 17 | WXErrCodeCommon = -1, /**< 普通错误类型 */ 18 | WXErrCodeUserCancel = -2, /**< 用户点击取消并返回 */ 19 | WXErrCodeSentFail = -3, /**< 发送失败 */ 20 | WXErrCodeAuthDeny = -4, /**< 授权失败 */ 21 | WXErrCodeUnsupport = -5, /**< 微信不支持 */ 22 | }; 23 | 24 | /*! @brief 请求发送场景 25 | * 26 | */ 27 | enum WXScene { 28 | 29 | WXSceneSession = 0, /**< 聊天界面 */ 30 | WXSceneTimeline = 1, /**< 朋友圈 */ 31 | WXSceneFavorite = 2, /**< 收藏 */ 32 | }; 33 | 34 | /*! @brief 该类为微信终端SDK所有请求类的基类 35 | * 36 | */ 37 | @interface BaseReq : NSObject 38 | 39 | /** 请求类型 */ 40 | @property (nonatomic, assign) int type; 41 | @end 42 | 43 | /*! @brief 该类为微信终端SDK所有响应类的基类 44 | * 45 | */ 46 | @interface BaseResp : NSObject 47 | /** 错误码 */ 48 | @property (nonatomic, assign) int errCode; 49 | /** 错误提示字符串 */ 50 | @property (nonatomic, retain) NSString *errStr; 51 | /** 响应类型 */ 52 | @property (nonatomic, assign) int type; 53 | 54 | @end 55 | 56 | @class WXMediaMessage; 57 | 58 | /*! @brief 第三方程序发送消息至微信终端程序的接口 59 | * 60 | * 第三方程序向微信发送信息需要调用此接口,并传入具体请求类型作为参数。请求的信息内容包括文本消息和多媒体消息, 61 | * 分别对应于text和message成员。调用该方法后,微信处理完信息会向第三方程序发送一个处理结果。 62 | * @see SendMessageToWXResp 63 | */ 64 | @interface SendMessageToWXReq : BaseReq 65 | /** 发送消息的文本内容 66 | * @attention 文本长度必须大于0且小于10K 67 | */ 68 | @property (nonatomic, retain) NSString* text; 69 | /** 发送消息的多媒体内容 70 | * @see WXMediaMessage 71 | */ 72 | @property (nonatomic, retain) WXMediaMessage* message; 73 | /** 发送消息的类型,包括文本消息和多媒体消息两种 74 | * @attention 两者只能选择其一,不能同时发送文本和多媒体消息 75 | */ 76 | @property (nonatomic, assign) BOOL bText; 77 | 78 | /** 发送的目标场景,可以选择发送到聊天界面(WXSceneSession)、朋友圈(WXSceneTimeline)或收藏(WXSceneFavorite)。 79 | * @note 默认发送到聊天界面。 80 | * @see WXScene 81 | */ 82 | @property (nonatomic, assign) int scene; 83 | 84 | @end 85 | 86 | /*! @brief 第三方程序发送SendMessageToWXReq至微信,微信处理完成后返回的处理结果类型。 87 | * 88 | * 第三方程序向微信终端发送SendMessageToWXReq后,微信发送回来的处理结果,该结果用SendMessageToWXResp表示。 89 | */ 90 | @interface SendMessageToWXResp : BaseResp 91 | @end 92 | 93 | /*! @brief 微信终端向第三方程序请求提供内容请求类型。 94 | * 95 | * 微信终端向第三方程序请求提供内容,微信终端会向第三方程序发送GetMessageFromWXReq请求类型, 96 | * 需要第三方程序调用sendResp返回一个GetMessageFromWXResp消息结构体。 97 | */ 98 | @interface GetMessageFromWXReq : BaseReq 99 | @end 100 | 101 | /*! @brief 微信终端向第三方程序请求提供内容,第三方程序向微信终端返回处理结果类型。 102 | * 103 | * 微信终端向第三方程序请求提供内容,第三方程序调用sendResp向微信终端返回一个GetMessageFromWXResp消息结构体。 104 | */ 105 | @interface GetMessageFromWXResp : BaseResp 106 | /** 向微信终端提供的文本内容 107 | * @attention 文本长度必须大于0且小于10K 108 | */ 109 | @property (nonatomic, retain) NSString* text; 110 | /** 向微信终端提供的多媒体内容。 111 | * @see WXMediaMessage 112 | */ 113 | @property (nonatomic, retain) WXMediaMessage* message; 114 | /** 向微信终端提供内容的消息类型,包括文本消息和多媒体消息两种 115 | * @attention 两者只能选择其一,不能同时发送文本和多媒体消息 116 | */ 117 | @property (nonatomic, assign) BOOL bText; 118 | @end 119 | 120 | /*! @brief 微信通知第三方程序,要求第三方程序显示的消息结构体。 121 | * 122 | * 微信需要通知第三方程序显示或处理某些内容时,会向第三方程序发送ShowMessageFromWXReq消息结构体。 123 | * 第三方程序处理完内容后调用sendResp向微信终端发送ShowMessageFromWXResp。 124 | */ 125 | @interface ShowMessageFromWXReq : BaseReq 126 | /** 微信终端向第三方程序发送的要求第三方程序处理的多媒体内容 127 | * @see WXMediaMessage 128 | */ 129 | @property (nonatomic, retain) WXMediaMessage* message; 130 | @end 131 | 132 | /*! @brief 微信通知第三方程序,要求第三方程序显示或处理某些消息,第三方程序处理完后向微信终端发送的处理结果。 133 | * 134 | * 微信需要通知第三方程序显示或处理某些内容时,会向第三方程序发送ShowMessageFromWXReq消息结构体。 135 | * 第三方程序处理完内容后调用sendResp向微信终端发送ShowMessageFromWXResp。 136 | */ 137 | @interface ShowMessageFromWXResp : BaseResp 138 | @end 139 | 140 | /*! @brief 微信终端打开第三方程序请求类型 141 | * 142 | * 微信向第三方发送的结构体,第三方不需要返回 143 | */ 144 | @interface LaunchFromWXReq : BaseReq 145 | @end 146 | 147 | 148 | #pragma mark - WXMediaMessage 149 | 150 | /*! @brief 多媒体消息结构体 151 | * 152 | * 用于微信终端和第三方程序之间传递消息的多媒体消息内容 153 | */ 154 | @interface WXMediaMessage : NSObject 155 | 156 | +(WXMediaMessage *) message; 157 | 158 | /** 标题 159 | * @attention 长度不能超过512字节 160 | */ 161 | @property (nonatomic, retain) NSString *title; 162 | /** 描述内容 163 | * @attention 长度不能超过1K 164 | */ 165 | @property (nonatomic, retain) NSString *description; 166 | /** 缩略图数据 167 | * @attention 内存大小不能超过32K 168 | */ 169 | @property (nonatomic, retain) NSData *thumbData; 170 | /** 多媒体消息标签,第三方程序可选填此字段,用于数据运营统计等 171 | * @attention 长度不能超过64字节 172 | */ 173 | @property (nonatomic, retain) NSString *mediaTagName; 174 | /** 多媒体数据对象,可以为WXImageObject,WXMusicObject,WXVideoObject,WXWebpageObject等。 */ 175 | @property (nonatomic, retain) id mediaObject; 176 | 177 | /*! @brief 设置消息缩略图的方法 178 | * 179 | * @param image 缩略图 180 | * @attention 内存大小不能超过32K 181 | */ 182 | - (void) setThumbImage:(UIImage *)image; 183 | 184 | @end 185 | 186 | 187 | #pragma mark - 188 | /*! @brief 多媒体消息中包含的图片数据对象 189 | * 190 | * 微信终端和第三方程序之间传递消息中包含的图片数据对象。 191 | * @attention imageData和imageUrl成员不能同时为空 192 | * @see WXMediaMessage 193 | */ 194 | @interface WXImageObject : NSObject 195 | /*! @brief 返回一个WXImageObject对象 196 | * 197 | * @note 返回的WXImageObject对象是自动释放的 198 | */ 199 | +(WXImageObject *) object; 200 | 201 | /** 图片真实数据内容 202 | * @attention 大小不能超过10M 203 | */ 204 | @property (nonatomic, retain) NSData *imageData; 205 | /** 图片url 206 | * @attention 长度不能超过10K 207 | */ 208 | @property (nonatomic, retain) NSString *imageUrl; 209 | 210 | @end 211 | 212 | /*! @brief 多媒体消息中包含的音乐数据对象 213 | * 214 | * 微信终端和第三方程序之间传递消息中包含的音乐数据对象。 215 | * @attention musicUrl和musicLowBandUrl成员不能同时为空。 216 | * @see WXMediaMessage 217 | */ 218 | @interface WXMusicObject : NSObject 219 | /*! @brief 返回一个WXMusicObject对象 220 | * 221 | * @note 返回的WXMusicObject对象是自动释放的 222 | */ 223 | +(WXMusicObject *) object; 224 | 225 | /** 音乐网页的url地址 226 | * @attention 长度不能超过10K 227 | */ 228 | @property (nonatomic, retain) NSString *musicUrl; 229 | /** 音乐lowband网页的url地址 230 | * @attention 长度不能超过10K 231 | */ 232 | @property (nonatomic, retain) NSString *musicLowBandUrl; 233 | /** 音乐数据url地址 234 | * @attention 长度不能超过10K 235 | */ 236 | @property (nonatomic, retain) NSString *musicDataUrl; 237 | 238 | /**音乐lowband数据url地址 239 | * @attention 长度不能超过10K 240 | */ 241 | @property (nonatomic, retain) NSString *musicLowBandDataUrl; 242 | 243 | @end 244 | 245 | /*! @brief 多媒体消息中包含的视频数据对象 246 | * 247 | * 微信终端和第三方程序之间传递消息中包含的视频数据对象。 248 | * @attention videoUrl和videoLowBandUrl不能同时为空。 249 | * @see WXMediaMessage 250 | */ 251 | @interface WXVideoObject : NSObject 252 | /*! @brief 返回一个WXVideoObject对象 253 | * 254 | * @note 返回的WXVideoObject对象是自动释放的 255 | */ 256 | +(WXVideoObject *) object; 257 | 258 | /** 视频网页的url地址 259 | * @attention 长度不能超过10K 260 | */ 261 | @property (nonatomic, retain) NSString *videoUrl; 262 | /** 视频lowband网页的url地址 263 | * @attention 长度不能超过10K 264 | */ 265 | @property (nonatomic, retain) NSString *videoLowBandUrl; 266 | 267 | @end 268 | 269 | /*! @brief 多媒体消息中包含的网页数据对象 270 | * 271 | * 微信终端和第三方程序之间传递消息中包含的网页数据对象。 272 | * @see WXMediaMessage 273 | */ 274 | @interface WXWebpageObject : NSObject 275 | /*! @brief 返回一个WXWebpageObject对象 276 | * 277 | * @note 返回的WXWebpageObject对象是自动释放的 278 | */ 279 | +(WXWebpageObject *) object; 280 | 281 | /** 网页的url地址 282 | * @attention 不能为空且长度不能超过10K 283 | */ 284 | @property (nonatomic, retain) NSString *webpageUrl; 285 | 286 | @end 287 | 288 | /*! @brief 多媒体消息中包含的App扩展数据对象 289 | * 290 | * 第三方程序向微信终端发送包含WXAppExtendObject的多媒体消息, 291 | * 微信需要处理该消息时,会调用该第三方程序来处理多媒体消息内容。 292 | * @note extInfo和fileData不能同时为空 293 | * @see WXMediaMessage 294 | */ 295 | @interface WXAppExtendObject : NSObject 296 | /*! @brief 返回一个WXAppExtendObject对象 297 | * 298 | * @note 返回的WXAppExtendObject对象是自动释放的 299 | */ 300 | +(WXAppExtendObject *) object; 301 | 302 | /** App文件数据,该数据发送给微信好友,微信好友需要点击后下载数据,微信终端会回传给第三方程序处理 303 | * @attention 大小不能超过10M 304 | */ 305 | @property (nonatomic, retain) NSData *fileData; 306 | 307 | /** 第三方程序自定义简单数据,微信终端会回传给第三方程序处理 308 | * @attention 长度不能超过2K 309 | */ 310 | @property (nonatomic, retain) NSString *extInfo; 311 | 312 | /** 313 | * @attention Deprecated 314 | */ 315 | @property (nonatomic, retain) NSString *url; 316 | 317 | @end 318 | 319 | /*! @brief 多媒体消息中包含的表情数据对象 320 | * 321 | * 微信终端和第三方程序之间传递消息中包含的表情数据对象。 322 | * @see WXMediaMessage 323 | */ 324 | @interface WXEmoticonObject : NSObject 325 | 326 | /*! @brief 返回一个WXEmoticonObject对象 327 | * 328 | * @note 返回的WXEmoticonObject对象是自动释放的 329 | */ 330 | +(WXEmoticonObject *) object; 331 | 332 | /** 表情真实数据内容 333 | * @attention 大小不能超过10M 334 | */ 335 | @property (nonatomic, retain) NSData *emoticonData; 336 | 337 | @end 338 | 339 | /*! @brief 多媒体消息中包含的文件数据对象 340 | * 341 | * @see WXMediaMessage 342 | */ 343 | @interface WXFileObject : NSObject 344 | 345 | /*! @brief 返回一个WXFileObject对象 346 | * 347 | * @note 返回的WXFileObject对象是自动释放的 348 | */ 349 | +(WXFileObject *) object; 350 | 351 | /** 文件后缀名 352 | * @attention 长度不超过64字节 353 | */ 354 | @property (nonatomic, retain) NSString *fileExtension; 355 | 356 | /** 文件真实数据内容 357 | * @attention 大小不能超过10M 358 | */ 359 | @property (nonatomic, retain) NSData *fileData; 360 | 361 | @end 362 | -------------------------------------------------------------------------------- /Framework/Weixin/libWeChatSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Framework/Weixin/libWeChatSDK.a -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlyContact.h: -------------------------------------------------------------------------------- 1 | // 2 | // Contact.h 3 | // msc 4 | 5 | // description: 此接口为获取通信录中的联系人,获取联系人是为了在进行 6 | // 语音识别时(sms)能更好的识别出您说的人名,联系人上传是属于个性化的一部分 7 | 8 | // Created by ypzhao on 13-3-1. 9 | // Copyright (c) 2013年 IFLYTEK. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | /**此接口为获取通信录中的联系人 15 | 16 | 获取联系人是为了在进行 语音识别时(sms)能更好的识别出您说的人名,联系人上传是属于个性化的一部分 17 | */ 18 | @interface IFlyContact : NSObject 19 | 20 | /** 获取联系人 21 | 22 | 调用此方法需要添加 AddressBook.framework 到工程中,调用此方法后可以直接将通信录中的联系人转化为语音云识别的数据结构。您可以将获取的数据通过IFlyDataUploader类,上传到语音云,我们只获取通信录中的人名 23 | 24 | @return 返回联系人信息 25 | */ 26 | - (NSString *) contact; 27 | @end 28 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlyDataDownloader.h: -------------------------------------------------------------------------------- 1 | // 2 | // DataDownloader.h 3 | // msc 4 | // 5 | // Created by ypzhao on 13-3-3. 6 | // Copyright (c) 2013年 IFLYTEK. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechError.h" 11 | 12 | /**此接口为数据上传接口 13 | 为个性化服务提供数据 14 | */ 15 | @interface IFlyDataDownloader : NSObject 16 | 17 | /** 设置下载数据参数 18 | @param parameter 参数值 19 | @param key 参数名 20 | */ 21 | -(void) setParameter:(NSString*) parameter forKey:(NSString*) key; 22 | 23 | typedef void(^IFlyDownLoadDataCompletionHandler)(NSString* result,IFlySpeechError * error); 24 | /** 下载数据 25 | 26 | 下载过程是**异步**的 27 | @param completionHandler 下载完成回调 28 | */ 29 | - (void) downLoadDataWithCompletionHandler:(IFlyDownLoadDataCompletionHandler) completionHandler; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlyDataUploader.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlyDataUploader.h 3 | // MSC 4 | 5 | // descrption: 数据上传类 6 | 7 | // Created by ypzhao on 13-4-8. 8 | // Copyright (c) 2013年 iflytek. All rights reserved. 9 | // 10 | 11 | #import 12 | #import "IFlySpeechError.h" 13 | 14 | @class IFlyDataUploader; 15 | 16 | /** 数据上传类 */ 17 | @interface IFlyDataUploader : NSObject 18 | { 19 | int _error ; 20 | NSOperationQueue *_operationQueue; 21 | } 22 | 23 | @property(nonatomic,copy) NSString *dataName; 24 | @property(nonatomic,copy) NSString *data; 25 | 26 | typedef void(^IFlyUploadDataCompletionHandler)(NSString* result,IFlySpeechError * error); 27 | /** 上传数据 28 | 29 | 此函数用于上传数据,下载的过程是**异步**的。 30 | 31 | @param completionHandler -[in] 上传完成回调 32 | @param name -[in] 上传的内容名称,名称最好和你要上传的数据内容相关,不可以为nil 33 | @param data -[in] 上传的数据,以utf8编码,不可以为nil 34 | */ 35 | - (void) uploadDataWithCompletionHandler:(IFlyUploadDataCompletionHandler)completionHandler name:(NSString *)name data:(NSString *)data; 36 | 37 | /** 设置上传数据参数 38 | @param parameter 参数值 39 | @param key 参数名 40 | */ 41 | -(void) setParameter:(NSString*) parameter forKey:(NSString*) key; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlyRecognizerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlyRecognizerView.h 3 | // MSC 4 | // 5 | // Created by admin on 13-4-16. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlyRecognizerViewDelegate.h" 11 | 12 | /** 语音识别控件 13 | 14 | 录音时触摸控件结束录音,开始识别(相当于旧版的停止);触摸其他位置,取消录音,结束会话(取消) 15 | 出错时触摸控件,重新开启会话(相当于旧版的再说一次);触摸其他位置,取消录音,结束会话(取消) 16 | */ 17 | @interface IFlyRecognizerView : UIView 18 | 19 | /** 设置委托对象 */ 20 | @property(nonatomic,assign)id delegate; 21 | 22 | /** 初始化控件 23 | 24 | @param origin 控件左上角的坐标 25 | @param initParam 初始化的参数,详见IFlySpeechRecognizer类初始化参数。 26 | @return IFlyRecognizerView 对象 27 | */ 28 | - (id)initWithOrigin:(CGPoint)origin; 29 | 30 | /** 初始化控件 31 | 32 | @param center 控件中心的坐标 33 | @return IFlyRecognizerView 对象 34 | */ 35 | - (id) initWithCenter:(CGPoint)center; 36 | 37 | 38 | /** 设置横竖屏自适应 39 | @param autoRotate 默认值YES,横竖屏自适应 40 | */ 41 | - (void) setAutoRotate:(BOOL)autoRotate; 42 | 43 | /** 设置识别引擎的参数 44 | 45 | 识别的引擎参数(key)取值如下: 46 | 47 | | 参数 | 描述 48 | | ------------- |------------------------------------------------------------------------------ 49 | | domain |应用的领域; 取值为iat、search、video、poi、music、asr;iat:普通文本听写; search:热词搜索; video:视频音乐搜索; asr:关键词识别; 50 | | vad_bos |前端点检测;静音超时时间,即用户多长时间不说话则当做超时处理; 单位:ms; engine指定iat识别默认值为5000; 其他情况默认值为 4000,范围 0-10000。 51 | | vad_eos |后断点检测;后端点静音检测时间,即用户停止说话多长时间内即认为不再输入, 自动停止录音;单位:ms,sms 识别默认值为 1800,其他默认值为 700,范围 0-10000。 52 | | sample_rate |采样率,目前支持的采样率设置有 16000 和 8000。 53 | | asr_ptt | 默认为 1,当设置为 0 时,将返回无标点符号文本。 54 | | result_type | 返回结果的数据格式,可设置为json,xml,plain,默认为json。 55 | | grammarID | 识别的语法 id,只针对 domain 设置为”asr”的应用。 56 | | asr_audio_path| 音频文件名 设置此参数后,将会自动保存识别的录音文件。路径为Documents/(指定值)。不设置或者设置为nil,则不保存音频。 57 | | params |params:扩展参数,对于一些特殊的参数可在此设置,一般用于设置语义。 58 | @param key 识别引擎参数 59 | @param value 参数对应的取值 60 | 61 | @return 设置的参数和取值正确返回YES,失败返回NO 62 | */ 63 | -(BOOL) setParameter:(NSString *) value forKey:(NSString*)key; 64 | 65 | /** 开始识别 66 | 67 | @return 成功返回YES;失败返回NO 68 | */ 69 | - (BOOL)start; 70 | 71 | /** 取消本次识别 */ 72 | - (void)cancel; 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlyRecognizerViewDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlyRecognizerDelegate.h 3 | // MSC 4 | // 5 | // Created by admin on 13-4-16. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechError.h" 11 | 12 | @class IFlyRecognizerView; 13 | 14 | /** 识别回调委托 15 | */ 16 | @protocol IFlyRecognizerViewDelegate 17 | 18 | /** 回调返回识别结果 19 | 20 | @param resultArray 识别结果,NSArray的第一个元素为NSDictionary,NSDictionary的key为识别结果,value为置信度 21 | @param isLast -[out] 是否最后一个结果 22 | */ 23 | - (void)onResult:(NSArray *)resultArray isLast:(BOOL) isLast; 24 | 25 | /** 识别结束回调 26 | 27 | @param error 识别结束错误码 28 | */ 29 | - (void)onError: (IFlySpeechError *) error; 30 | 31 | @optional 32 | @end 33 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySetting.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySetting.h 3 | // MSC 4 | // 5 | // Created by iflytek on 13-4-12. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum _LOG_LEVEL { // 日志打印等级 12 | LVL_ALL = -1, // 全部打印 13 | LVL_DETAIL = 31, // 高,异常分析需要的级别 14 | LVL_NORMAL = 15, // 中,打印基本日志信息 15 | LVL_LOW = 7, // 低,只打印主要日志信息 16 | LVL_NONE = 0 // 不打印 17 | }LOG_LEVEL; 18 | 19 | /** 20 | 此接口为iflyMSC sdk 配置接口。 21 | 可以获取版本号,设置日志打印等级等 22 | */ 23 | @interface IFlySetting : NSObject 24 | 25 | /** 获取版本号 26 | 27 | @return 版本号 28 | */ 29 | + (NSString *) getVersion; 30 | 31 | /** 获取日志等级 32 | 33 | @return 返回日志等级 34 | */ 35 | + (LOG_LEVEL) logLvl; 36 | 37 | 38 | /** 是否打印控制台log 39 | 40 | 在软件发布时,建议关闭此log。 41 | 42 | @param showLog -[in] YES,打印log;NO,不打印 43 | */ 44 | + (void) showLogcat:(BOOL) showLog; 45 | 46 | /** 47 | 设置日志msc.log生成路径以及日志等级
48 | @param level -[in] 日志打印等级 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
*日志打印等级描述
LVL_ALL全部打印
LVL_DETAIL高,异常分析需要的级别
LVL_NORMAL中,打印基本日志信息
LVL_LOW低,只打印主要日志信息
LVL_NONE不打印
62 | */ 63 | + (void) setLogFile:(LOG_LEVEL) level; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechConstant.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechConstant.h 3 | // MSCDemo 4 | // 5 | // Created by iflytek on 5/9/14. 6 | // Copyright (c) 2014 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | 公共常量,主要定义参数的key值 13 | */ 14 | @interface IFlySpeechConstant : NSObject 15 | 16 | /**识别录音保存路径 17 | */ 18 | +(NSString*) ASR_AUDIO_PATH; 19 | 20 | /**语言区域。 21 | */ 22 | +(NSString*)ACCENT; 23 | 24 | /**语音应用ID 25 | 26 | 通过开发者网站申请 27 | */ 28 | +(NSString*)APPID; 29 | 30 | /**设置是否有标点符号 31 | */ 32 | +(NSString*)ASR_PTT; 33 | 34 | /** 35 | 语言 36 | 37 | 支持:zh_cn,zh_tw,en_us
38 | */ 39 | +(NSString*)LANGUAGE; 40 | 41 | /** 42 | 返回结果的数据格式,可设置为json,xml,plain,默认为json。 43 | */ 44 | +(NSString*) RESULT_TYPE; 45 | 46 | /**云端语法ID 47 | */ 48 | +(NSString*)CLOUD_GRAMMAR; 49 | 50 | /**应用领域。 51 | */ 52 | +(NSString*)IFLY_DOMAIN; 53 | 54 | /**个性化数据上传类型 55 | */ 56 | +(NSString*)DATA_TYPE; 57 | 58 | /** 语音输入超时时间 59 | 60 | 单位:ms,默认30000 61 | */ 62 | +(NSString*) SPEECH_TIMEOUT; 63 | 64 | /** 网络连接超时时间 65 | 66 | 单位:ms,默认20000 67 | */ 68 | +(NSString*)NET_TIMEOUT; 69 | 70 | /**开放语义协议版本号。 71 | 72 | 如需使用请在http://osp.voicecloud.cn/上进行业务配置 73 | */ 74 | +(NSString*)NLP_VERSION; 75 | 76 | /** 扩展参数。 77 | */ 78 | +(NSString*)PARAMS; 79 | 80 | /**合成及识别采样率。 81 | */ 82 | +(NSString*)SAMPLE_RATE; 83 | 84 | /** 语速(0~100) 85 | 86 | 默认值:50 87 | */ 88 | +(NSString*)SPEED; 89 | 90 | /** 91 | 音调(0~100) 92 | 93 | 默认值:50 94 | */ 95 | +(NSString*)PITCH; 96 | 97 | /** 合成录音保存路径 98 | */ 99 | +(NSString*)TTS_AUDIO_PATH; 100 | 101 | /** VAD前端点超时
102 | 103 | 可选范围:0-10000(单位ms)
104 | */ 105 | +(NSString*)VAD_BOS; 106 | 107 | /** 108 | VAD后端点超时 。
109 | 110 | 可选范围:0-10000(单位ms)
111 | */ 112 | +(NSString*)VAD_EOS; 113 | 114 | /** 发音人。 115 | 116 | 云端支持发音人:小燕(xiaoyan)、小宇(xiaoyu)、凯瑟琳(Catherine)、 117 | 亨利(henry)、玛丽(vimary)、小研(vixy)、小琪(vixq)、 118 | 小峰(vixf)、小梅(vixm)、小莉(vixl)、小蓉(四川话)、 119 | 小芸(vixyun)、小坤(vixk)、小强(vixqa)、小莹(vixying)、 小新(vixx)、楠楠(vinn)老孙(vils)
120 | 对于网络TTS的发音人角色,不同引擎类型支持的发音人不同,使用中请注意选择。 121 | */ 122 | +(NSString*)VOICE_NAME; 123 | 124 | /**音量(0~100) 默认值:50 125 | */ 126 | +(NSString*)VOLUME ; 127 | 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechError.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechError.h 3 | // MSC 4 | // description: 错误描述类 5 | // Created by iflytek on 13-3-19. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 错误描述类 */ 12 | @interface IFlySpeechError : NSObject 13 | { 14 | int _errorCode; 15 | int _errorType; 16 | } 17 | 18 | /** 19 | * @fn initWithError 20 | * @brief 初始化 21 | * 22 | * @param errorCode -[in] 错误码 23 | * @see 24 | */ 25 | + (id) initWithError:(int) errorCode; 26 | 27 | /** 28 | * @fn errorCode 29 | * @brief 获取错误码 30 | * 31 | * @return 错误码 32 | * @see 33 | */ 34 | -(int) errorCode; 35 | 36 | /** 37 | * @fn errorDesc 38 | * @brief 获取错误描述 39 | * 40 | * @return 错误描述 41 | * @see 42 | */ 43 | - (NSString *) errorDesc; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechRecognizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechRecognizer.h 3 | // MSC 4 | // 5 | // Created by iflytek on 13-3-19. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechRecognizerDelegate.h" 11 | #define IFLY_AUDIO_SOURCE_MIC @"1" 12 | #define IFLY_AUDIO_SOURCE_STREAM @"-1" 13 | /** 语音识别类 14 | 15 | 此类现在设计为单例,你在使用中只需要创建此对象,不能调用release/dealloc函数去释放此对象。所有关于语音识别的操作都在此类中。 16 | */ 17 | @interface IFlySpeechRecognizer : NSObject 18 | 19 | /** 设置委托对象 */ 20 | @property(nonatomic,assign) id delegate ; 21 | 22 | /** 返回识别对象的单例 23 | */ 24 | + (id) sharedInstance; 25 | 26 | /** 27 | 销毁识别对象。 28 | */ 29 | - (BOOL) destroy; 30 | 31 | /** 设置识别引擎的参数 32 | 33 | 识别的引擎参数(key)取值如下: 34 | 35 | 1. domain:应用的领域; 取值为iat、at、search、video、poi、music、asr;iat:普通文本听写; search:热词搜索; video:视频音乐搜索; asr:关键词识别; 36 | 2. vad_bos:前端点检测;静音超时时间,即用户多长时间不说话则当做超时处理; 单位:ms; engine指定iat识别默认值为5000; 其他情况默认值为 4000,范围 0-10000。 37 | 3. vad_eos:后断点检测;后端点静音检测时间,即用户停止说话多长时间内即认为不再输入, 自动停止录音;单位:ms,sms 识别默认值为 1800,其他默认值为 700,范围 0-10000。 38 | 4. sample_rate:采样率,目前支持的采样率设置有 16000 和 8000。 39 | 5. asr_ptt:否返回无标点符号文本; 默认为 1,当设置为 0 时,将返回无标点符号文本。 40 | 6. asr_sch:是否需要进行语义处理,默认为0,即不进行语义识别,对于需要使用语义的应用,需要将asr_sch设为1。 41 | 7. result_type:返回结果的数据格式,可设置为json,xml,plain,默认为json。 42 | 8. grammarID:识别的语法 id,只针对 domain 设置为”asr”的应用。 43 | 9. asr_audio_path:音频文件名;设置此参数后,将会自动保存识别的录音文件。路径为Documents/(指定值)。不设置或者设置为nil,则不保存音频。 44 | 10. params:扩展参数,对于一些特殊的参数可在此设置,一般用于设置语义。 45 | @param key 识别引擎参数 46 | @param value 参数对应的取值 47 | 48 | @return 设置的参数和取值正确返回YES,失败返回NO 49 | */ 50 | -(BOOL) setParameter:(NSString *) value forKey:(NSString*)key; 51 | 52 | /** 开始识别 53 | 54 | 同时只能进行一路会话,这次会话没有结束不能进行下一路会话,否则会报错。若有需要多次回话,请在onError回调返回后请求下一路回话。 55 | */ 56 | - (BOOL) startListening; 57 | 58 | /** 停止录音 59 | 60 | 调用此函数会停止录音,并开始进行语音识别 61 | */ 62 | - (void) stopListening; 63 | 64 | /** 取消本次会话 */ 65 | - (void) cancel; 66 | 67 | /** 是否正在识别 68 | */ 69 | @property (nonatomic, readonly) BOOL isListening; 70 | 71 | @end 72 | 73 | /** 音频流识别 74 | 75 | 音频流识别可以将文件分段写入 76 | */ 77 | @interface IFlySpeechRecognizer(IFlyStreamRecognizer) 78 | 79 | /** 写入音频流 80 | 81 | @param audioData 音频数据 82 | 此方法的使用示例如下: 83 |
[_iFlySpeechRecognizer setParameter:@"audio_source" value:@"-1"];
84 |  [_iFlySpeechRecognizer startListening];
85 |  [_iFlySpeechRecognizer writeAudio:audioData1];
86 |  [_iFlySpeechRecognizer writeAudio:audioData2];
87 |  ...
88 |  [_iFlySpeechRecognizer stopListening];
89 |  
90 | @return 写入成功返回YES,写入失败返回NO 91 | */ 92 | - (BOOL) writeAudio:(NSData *) audioData; 93 | 94 | @end 95 | 96 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechRecognizerDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechRecognizerDelegate.h 3 | // MSC 4 | // 5 | // Created by ypzhao on 13-3-27. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechError.h" 11 | 12 | /** 语音识别协议 13 | 14 | 在使用语音识别时,需要实现这个协议中的方法. 15 | */ 16 | @protocol IFlySpeechRecognizerDelegate 17 | 18 | @required 19 | /** 识别结果回调 20 | 21 | 在进行语音识别过程中的任何时刻都有可能回调此函数,你可以根据errorCode进行相应的处理,当errorCode没有错误时,表示此次会话正常结束;否则,表示此次会话有错误发生。特别的当调用`cancel`函数时,引擎不会自动结束,需要等到回调此函数,才表示此次会话结束。在没有回调此函数之前如果重新调用了`startListenging`函数则会报错误。 22 | 23 | @param errorCode 错误描述类, 24 | */ 25 | - (void) onError:(IFlySpeechError *) errorCode; 26 | 27 | /** 识别结果回调 28 | 29 | 在识别过程中可能会多次回调此函数,你最好不要在此回调函数中进行界面的更改等操作,只需要将回调的结果保存起来。 30 | 31 | 使用results的示例如下: 32 |

33 |  - (void) onResults:(NSArray *) results{
34 |     NSMutableString *result = [[NSMutableString alloc] init];
35 |     NSDictionary *dic = [results objectAtIndex:0];
36 |     for (NSString *key in dic)
37 |     {
38 |          //[result appendFormat:@"%@",key];//合并结果
39 |     }
40 |  }
41 |  
42 | 43 | @param results -[out] 识别结果,NSArray的第一个元素为NSDictionary,NSDictionary的key为识别结果,value为置信度。 44 | @param isLast -[out] 是否最后一个结果 45 | */ 46 | - (void) onResults:(NSArray *) results isLast:(BOOL)isLast; 47 | 48 | @optional 49 | /** 音量变化回调 50 | 51 | 在录音过程中,回调音频的音量。 52 | 53 | @param volume -[out] 音量,范围从1-100 54 | */ 55 | - (void) onVolumeChanged: (int)volume; 56 | 57 | /** 开始录音回调 58 | 59 | 当调用了`startListening`函数之后,如果没有发生错误则会回调此函数。如果发生错误则回调onError:函数 60 | */ 61 | - (void) onBeginOfSpeech; 62 | 63 | /** 停止录音回调 64 | 65 | 当调用了`stopListening`函数或者引擎内部自动检测到断点,如果没有发生错误则回调此函数。如果发生错误则回调onError:函数 66 | */ 67 | - (void) onEndOfSpeech; 68 | 69 | /** 取消识别回调 70 | 71 | 当调用了`cancel`函数之后,会回调此函数,在调用了cancel函数和回调onError之前会有一个短暂时间,您可以在此函数中实现对这段时间的界面显示。 72 | */ 73 | - (void) onCancel; 74 | @end 75 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechSynthesizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechSynthesizer.h 3 | // MSC 4 | // 5 | // Created by ypzhao on 13-3-21. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechSynthesizerDelegate.h" 11 | 12 | /** 语音合成 */ 13 | 14 | @interface IFlySpeechSynthesizer : NSObject 15 | 16 | /** 设置识别的委托对象 */ 17 | @property(nonatomic,assign) id delegate; 18 | 19 | /** 返回合成对象的单例 20 | */ 21 | + (id) sharedInstance; 22 | 23 | /** 24 | 销毁识别对象。 25 | */ 26 | + (BOOL) destroy; 27 | 28 | /** 设置合成参数 29 | 30 | 设置参数需要在调用startSpeaking:之前进行。 31 | 32 | 参数的名称和取值: 33 | 34 | 1. speed:合成语速,取值范围 0~100 35 | 2. volume:合成的音量,取值范围 0~100 36 | 3. voice_name:默认为”xiaoyan”;可以设置的参数列表可参考个性化发音人列表 37 | 4. sample_rate:目前支持的采样率有 16000 和 8000 38 | 5. tts_audio_path:音频文件名 设置此参数后,将会自动保存合成的音频文件。路径为Documents/(指定值)。不设置或者设置为nil,则不保存音频。 39 | 6. params:扩展参数 40 | 41 | @param key 合成参数 42 | @param value 参数取值 43 | @return 设置成功返回YES,失败返回NO 44 | */ 45 | -(BOOL) setParameter:(NSString *) value forKey:(NSString*)key; 46 | 47 | /** 获取合成参数 48 | 49 | @param key 参数名称 50 | */ 51 | //-(NSString*) getParameter:(NSString *)key; 52 | 53 | 54 | /** 开始合成 55 | 56 | 调用此函数进行合成,如果发生错误会回调错误`onCompleted` 57 | 58 | @param text 合成的文本,最大的字节数为1k 59 | */ 60 | - (void) startSpeaking:(NSString *)text; 61 | 62 | /** 暂停播放 63 | 64 | 暂停播放之后,合成不会暂停,仍会继续,如果发生错误则会回调错误`onCompleted` 65 | */ 66 | - (void) pauseSpeaking; 67 | 68 | /** 恢复播放 */ 69 | - (void) resumeSpeaking; 70 | 71 | 72 | /** 停止播放并停止合成 73 | */ 74 | - (void) stopSpeaking; 75 | 76 | /** 是否正在播放 77 | */ 78 | @property (nonatomic, readonly) BOOL isSpeaking; 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechSynthesizerDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechSynthesizerDelegate.h 3 | // MSC 4 | // 5 | // Created by ypzhao on 13-3-20. 6 | // Copyright (c) 2013年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechError.h" 11 | 12 | /** 语音合成回调 */ 13 | 14 | @protocol IFlySpeechSynthesizerDelegate 15 | 16 | @required 17 | /** 结束回调 18 | 19 | 当整个合成结束之后会回调此函数 20 | 21 | @param error 错误码 22 | */ 23 | - (void) onCompleted:(IFlySpeechError*) error; 24 | 25 | @optional 26 | /** 开始合成回调 */ 27 | - (void) onSpeakBegin; 28 | 29 | /** 缓冲进度回调 30 | 31 | @param progress 缓冲进度,0-100 32 | @param msg 附件信息,此版本为nil 33 | */ 34 | - (void) onBufferProgress:(int) progress message:(NSString *)msg; 35 | 36 | /** 播放进度回调 37 | 38 | @param progress 播放进度,0-100 39 | */ 40 | - (void) onSpeakProgress:(int) progress; 41 | 42 | /** 暂停播放回调 */ 43 | - (void) onSpeakPaused; 44 | 45 | /** 恢复播放回调 */ 46 | - (void) onSpeakResumed; 47 | 48 | /** 正在取消回调 49 | 50 | 当调用`cancel`之后会回调此函数 51 | */ 52 | - (void) onSpeakCancel; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechUnderstander.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechUnderstander. 3 | // MSC 4 | // 5 | // Created by iflytek on 2014-03-12. 6 | // Copyright (c) 2014年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechRecognizer.h" 11 | #import "IFlySpeechError.h" 12 | 13 | /** 14 | 语义理解接口 15 | */ 16 | @interface IFlySpeechUnderstander : NSObject 17 | /** 创建语义理解对象的单例 18 | */ 19 | +(IFlySpeechUnderstander*) sharedInstance; 20 | 21 | /** 开始识别 22 | 23 | 同时只能进行一路会话,这次会话没有结束不能进行下一路会话,否则会报错。若有需要多次回话,请在onError回调返回后请求下一路回话。 24 | */ 25 | - (BOOL) startListening; 26 | 27 | /** 停止录音 28 | 29 | 调用此函数会停止录音,并开始进行语音识别 30 | */ 31 | - (void) stopListening; 32 | 33 | /** 取消本次会话 */ 34 | - (void) cancel; 35 | 36 | /** 设置识别引擎的参数 37 | 38 | 识别的引擎参数(key)取值如下: 39 | 40 | 1. domain:应用的领域; 取值为iat、at、search、video、poi、music、asr;iat:普通文本听写; search:热词搜索; video:视频音乐搜索; asr:关键词识别; 41 | 2. vad_bos:前端点检测;静音超时时间,即用户多长时间不说话则当做超时处理; 单位:ms; engine指定iat识别默认值为5000; 其他情况默认值为 4000,范围 0-10000。 42 | 3. vad_eos:后断点检测;后端点静音检测时间,即用户停止说话多长时间内即认为不再输入, 自动停止录音;单位:ms,sms 识别默认值为 1800,其他默认值为 700,范围 0-10000。 43 | 4. sample_rate:采样率,目前支持的采样率设置有 16000 和 8000。 44 | 5. asr_ptt:是否返回无标点符号文本; 默认为 1,当设置为 0 时,将返回无标点符号文本。 45 | 6. asr_sch:是否需要进行语义处理,默认为0,即不进行语义识别,对于需要使用语义的应用,需要将asr_sch设为1。 46 | 7. result_type:返回结果的数据格式,可设置为json,xml,plain,默认为json。 47 | 8. grammarID:识别的语法 id,只针对 domain 设置为”asr”的应用。 48 | 9. asr_audio_path:音频文件名;设置此参数后,将会自动保存识别的录音文件。路径为Documents/(指定值)。不设置或者设置为nil,则不保存音频。 49 | 10. params:扩展参数,对于一些特殊的参数可在此设置,一般用于设置语义。 50 | @param key 识别引擎参数 51 | @param value 参数对应的取值 52 | 53 | @return 设置的参数和取值正确返回YES,失败返回NO 54 | */ 55 | -(BOOL) setParameter:(NSString *) value forKey:(NSString*)key; 56 | 57 | /** 写入音频流 58 | 59 | @param audioData 音频数据 60 | @return 写入成功返回YES,写入失败返回NO 61 | */ 62 | - (BOOL) writeAudio:(NSData *) audioData; 63 | 64 | /** 65 | 销毁识别对象。 66 | */ 67 | - (BOOL) destroy; 68 | 69 | @property (retain) IFlySpeechRecognizer * recognizer; 70 | 71 | /** 72 | 是否正在语义理解 73 | */ 74 | @property (readonly) BOOL isUnderstanding; 75 | 76 | /** 设置委托对象 */ 77 | @property(nonatomic,retain) id delegate ; 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlySpeechUtility.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFlySpeechUtility.h 3 | // MSCDemo 4 | // 5 | // Created by admin on 14-5-7. 6 | // Copyright (c) 2014年 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "IFlySpeechError.h" 12 | 13 | /** 用户配置 14 | */ 15 | @class IFlySpeechUtility; 16 | 17 | @interface IFlySpeechUtility : NSObject 18 | { 19 | 20 | } 21 | 22 | /** 创建用户语音配置。 23 | 24 | 注册应用请前往语音云开发者网站。
25 | 网站:http://open.voicecloud.cn/developer.php 26 | @param params 启动参数,必须保证appid参数传入,示例:appid=123456 27 | @return 语音配置 28 | */ 29 | + (IFlySpeechUtility*) createUtility:(NSString *) params; 30 | 31 | /** 销毁用户配置对象 32 | */ 33 | +(BOOL) destroy; 34 | 35 | 36 | /** 获取用户配置对象 37 | */ 38 | +(IFlySpeechUtility *) getUtility; 39 | 40 | /** 是否登陆 41 | 42 | @return 登陆返回YES,未登录返回NO 43 | */ 44 | //+ (BOOL) isLogin; 45 | 46 | //+ (IFlySpeechError *) login; 47 | 48 | //+(void) logout; 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlyTextUnderstander.h: -------------------------------------------------------------------------------- 1 | // 2 | // TextUnderstand.h 3 | // MSCDemo 4 | // 5 | // Created by iflytek on 4/24/14. 6 | // Copyright (c) 2014 iflytek. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFlySpeechError.h" 11 | 12 | /** 13 | 文本转语义类接口 14 | */ 15 | @interface IFlyTextUnderstander : NSObject 16 | /** 17 | @param result 成功返回文本转语义结果 18 | @param error 返回文本转语义错误,如果有 19 | */ 20 | typedef void(^IFlyUnderstandTextCompletionHandler)(NSString* result, IFlySpeechError * error); 21 | /** 文本转语义接口,输入文本内容,获取语义理解结果 22 | @param text 输入的文本内容 23 | @param completionHandler 文本转语义完成回调函数 24 | */ 25 | -(int) understandText:(NSString*)text withCompletionHandler:(IFlyUnderstandTextCompletionHandler) completionHandler; 26 | 27 | /** 28 | 设置文本转语义参数 29 | @param key 文本转语义参数参数 30 | @param value 参数对应的取值 31 | 32 | @return 设置的参数和取值正确返回YES,失败返回NO 33 | */ 34 | -(BOOL) setParameter:(NSString *) value forKey:(NSString*)key; 35 | 36 | /** 取消 37 | */ 38 | -(void)cancel; 39 | 40 | /** 41 | 是否正在文本转语义 42 | */ 43 | @property (readonly, atomic) __block BOOL isUnderstanding; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/Headers/IFlyUserWords.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserWords.h 3 | // MSC 4 | // 5 | // description: 用户词表类,获取用户词表是为了更好的语音识别(iat),用户词表也属于个性化的一部分 6 | 7 | // Created by ypzhao on 13-2-26. 8 | // Copyright (c) 2013年 iflytek. All rights reserved. 9 | // 10 | 11 | #import 12 | 13 | /**用户词表类 14 | 15 | 获取用户词表是为了更好的语音识别(iat),用户词表也属于个性化的一部分 16 | */ 17 | 18 | @interface IFlyUserWords : NSObject 19 | { 20 | NSMutableDictionary *_jsonDictionary; 21 | } 22 | 23 | /** 初始化对象 24 | 25 | 在进行初始化时,需要传入的格式如下: 26 | 27 |
{\"userword\":[{\"name\":\"iflytek\",\"words\":[\"科大讯飞\",\"云平台\",\"用户词条\",\"开始上传词条\"]}]}
28 | 
29 | @param json 初始化时传入的数据 30 | @return 31 | */ 32 | - (id) initWithJson:(NSString *)json; 33 | 34 | /** 将数据转化为上传的数据格式 35 | 36 | @return 没有数据或者格式不对时返回nil 37 | */ 38 | - (NSString *) toString; 39 | 40 | /** 返回key对应的数据 41 | 42 | @param key 在putword:value中设置的key 43 | @return key对应的数组 44 | */ 45 | - (NSArray *) getWords: (NSString *) key; 46 | 47 | /** 添加一条用户词数据 48 | 49 | @param key 用户词对应的key 50 | @param value 上传的用户词数据 51 | @return 成功返回YES,失败返回NO 52 | */ 53 | - (BOOL) putWord: (NSString *) key value:(NSString *)value; 54 | 55 | /** 添加一组数据 56 | 57 | @param key 用户词对应的key 58 | @param words 上传的用户词数据 59 | @return BOOL -成功返回YES,失败返回NO 60 | */ 61 | - (BOOL) putwords: (NSString *) key words:(NSArray *)words; 62 | 63 | /** 是否包含key对应的用户词数据 64 | 65 | @param key 用户词对应的key 66 | @return 成功返回YES,失败返回NO 67 | */ 68 | - (BOOL) containsKey: (NSString *) key; 69 | @end 70 | -------------------------------------------------------------------------------- /Framework/iflyMSC.framework/iflyMSC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Framework/iflyMSC.framework/iflyMSC -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '7.0' 2 | 3 | pod 'SVProgressHUD', '~> 1.0' 4 | pod 'Colours', '~> 5.3.0' 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 懒人笔记 3 | ========= 4 | 本项目已不再维护 5 | 6 | iTunes地址: https://itunes.apple.com/cn/app/lan-ren-bi-ji-zhi-chi-yu-yin/id899937013?mt=8 7 | 8 | - 懒人笔记是一款为懒人设计的笔记本,你只需要通过语音输入,即可完成笔记的书写。 9 | - 同时支持发邮件,分享到朋友圈等附加功能。 10 | - 大部分情况下你无需动笔,只需要靠说,就可以轻松记笔记、发邮件,是提高效率的好工具。 11 | 12 | 首页 13 | 笔记 14 | 语音 15 | 分享 16 | 17 | Installation 18 | ----------- 19 | 依赖于 CocoaPods,执行以下命令,下载相关依赖: 20 | 21 | /:> pod install 22 | 23 | Other useful library 24 | ------------- 25 | 个人其他开源项目: 26 | 27 | - 支持任意类型的URL router:[LJURLRouter] 28 | 29 | - 自动轮播banner:[LJAutoScrollView] 30 | 31 | - Swift实现的v2ex客户端:[V2EXClient] 32 | 33 | - Swift语法分享PPT:[SwiftSharing] 34 | 35 | - iOS \& web混合开发框架:[HybridBridge] 36 | 37 | - 五星打分组件:[StarRatingView] 38 | 39 | - 正则定义样式的UILabel:[RichStyleLabel] 40 | 41 | - 常用图片处理category:[EasyImage] 42 | 43 | - iOS AutoLayout科普及demo:[AutoLayout] 44 | 45 | 订阅文章 46 | -------- 47 | 48 | 欢迎关注[简书], 关注微信公众号(iOSers),订阅高质量原创技术文章: 49 | 50 | 公众号 51 | 52 | [LJAutoScrollView]:https://github.com/liaojinxing/LJAutoScrollView 53 | [V2EXClient]:https://github.com/liaojinxing/V2EXClient 54 | [SwiftSharing]:https://github.com/liaojinxing/SwiftSharing 55 | [StarRatingView]:https://github.com/liaojinxing/StarRatingView 56 | [HybridBridge]:https://github.com/liaojinxing/HybridBridge 57 | [RichStyleLabel]:https://github.com/liaojinxing/RichStyleLabel 58 | [EasyImage]:https://github.com/liaojinxing/EasyImage 59 | [AutoLayout]:https://github.com/liaojinxing/Autolayout 60 | [LJURLRouter]:https://github.com/liaojinxing/LJURLRouter 61 | [Voice2Note]:https://github.com/liaojinxing/Voice2Note 62 | [简书]:http://www.jianshu.com/users/25481f0294aa/latest_articles 63 | -------------------------------------------------------------------------------- /ScreenShot/alipay_qr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/ScreenShot/alipay_qr.jpg -------------------------------------------------------------------------------- /ScreenShot/home1_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/ScreenShot/home1_40.png -------------------------------------------------------------------------------- /ScreenShot/home2_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/ScreenShot/home2_40.png -------------------------------------------------------------------------------- /ScreenShot/share_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/ScreenShot/share_40.png -------------------------------------------------------------------------------- /ScreenShot/voice_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/ScreenShot/voice_40.png -------------------------------------------------------------------------------- /VNNoteManager/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.jinxing.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /VNNoteManager/VNNoteManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // VNNoteManager.h 3 | // VNNoteManager 4 | // 5 | // Created by liaojinxing on 14/11/3. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for VNNoteManager. 12 | FOUNDATION_EXPORT double VNNoteManagerVersionNumber; 13 | 14 | //! Project version string for VNNoteManager. 15 | FOUNDATION_EXPORT const unsigned char VNNoteManagerVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | #import 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /VNNoteManagerTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.jinxing.$(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 | -------------------------------------------------------------------------------- /VNNoteManagerTests/VNNoteManagerTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // VNNoteManagerTests.m 3 | // VNNoteManagerTests 4 | // 5 | // Created by liaojinxing on 14/11/3. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface VNNoteManagerTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation VNNoteManagerTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Voice2Note.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8321E68A15AE491F981EE0DC /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 90D3642E47F94B6EAB1CE461 /* libPods.a */; }; 11 | C711402C1A076A6C00E027E4 /* VNNoteManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C711402B1A076A6C00E027E4 /* VNNoteManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | C71140321A076A6C00E027E4 /* VNNoteManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C71140271A076A6C00E027E4 /* VNNoteManager.framework */; }; 13 | C711403B1A076A6C00E027E4 /* VNNoteManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C711403A1A076A6C00E027E4 /* VNNoteManagerTests.m */; }; 14 | C711403E1A076A6C00E027E4 /* VNNoteManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C71140271A076A6C00E027E4 /* VNNoteManager.framework */; }; 15 | C711403F1A076A6C00E027E4 /* VNNoteManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C71140271A076A6C00E027E4 /* VNNoteManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | C711404B1A076AB500E027E4 /* VNNote.h in Headers */ = {isa = PBXBuildFile; fileRef = C71140471A076AB500E027E4 /* VNNote.h */; }; 17 | C711404C1A076AB500E027E4 /* VNNote.m in Sources */ = {isa = PBXBuildFile; fileRef = C71140481A076AB500E027E4 /* VNNote.m */; }; 18 | C711404D1A076AB500E027E4 /* NoteManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C71140491A076AB500E027E4 /* NoteManager.h */; }; 19 | C711404E1A076AB500E027E4 /* NoteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C711404A1A076AB500E027E4 /* NoteManager.m */; }; 20 | C71140541A076EDB00E027E4 /* NSDate+Conversion.h in Headers */ = {isa = PBXBuildFile; fileRef = C71140501A076EDB00E027E4 /* NSDate+Conversion.h */; }; 21 | C71140551A076EDB00E027E4 /* NSDate+Conversion.m in Sources */ = {isa = PBXBuildFile; fileRef = C71140511A076EDB00E027E4 /* NSDate+Conversion.m */; }; 22 | C71140561A076EDB00E027E4 /* VNConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = C71140521A076EDB00E027E4 /* VNConstants.h */; }; 23 | C71140571A076EDB00E027E4 /* VNConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = C71140531A076EDB00E027E4 /* VNConstants.m */; }; 24 | C73B88501977CEFB007EE3D0 /* libMobClickLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C73B884D1977CEFB007EE3D0 /* libMobClickLibrary.a */; }; 25 | C73B88521977CF19007EE3D0 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C73B88511977CF19007EE3D0 /* libz.dylib */; }; 26 | C7470A92196164CB00FD154B /* AppContext.m in Sources */ = {isa = PBXBuildFile; fileRef = C7470A91196164CB00FD154B /* AppContext.m */; }; 27 | C7821A8719480417008B952D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821A8619480417008B952D /* Foundation.framework */; }; 28 | C7821A8919480417008B952D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821A8819480417008B952D /* CoreGraphics.framework */; }; 29 | C7821A8B19480417008B952D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821A8A19480417008B952D /* UIKit.framework */; }; 30 | C7821A9119480417008B952D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C7821A8F19480417008B952D /* InfoPlist.strings */; }; 31 | C7821A9319480417008B952D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C7821A9219480417008B952D /* main.m */; }; 32 | C7821A9919480417008B952D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C7821A9819480417008B952D /* Images.xcassets */; }; 33 | C7821AA019480417008B952D /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821A9F19480417008B952D /* XCTest.framework */; }; 34 | C7821AA119480417008B952D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821A8619480417008B952D /* Foundation.framework */; }; 35 | C7821AA219480417008B952D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821A8A19480417008B952D /* UIKit.framework */; }; 36 | C7821AAA19480417008B952D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C7821AA819480417008B952D /* InfoPlist.strings */; }; 37 | C7821AAC19480417008B952D /* Voice2NoteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C7821AAB19480417008B952D /* Voice2NoteTests.m */; }; 38 | C7821ABD194804A4008B952D /* NoteListController.m in Sources */ = {isa = PBXBuildFile; fileRef = C7821ABC194804A4008B952D /* NoteListController.m */; }; 39 | C7821AC0194804B6008B952D /* NoteDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = C7821ABF194804B6008B952D /* NoteDetailController.m */; }; 40 | C7821AC219482208008B952D /* iflyMSC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821AC119482208008B952D /* iflyMSC.framework */; }; 41 | C7821AC419482220008B952D /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821AC319482220008B952D /* AVFoundation.framework */; }; 42 | C7821AC61948222B008B952D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821AC51948222B008B952D /* SystemConfiguration.framework */; }; 43 | C7821AC819482235008B952D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821AC719482235008B952D /* AudioToolbox.framework */; }; 44 | C7821ACE19482610008B952D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C7821ACD19482610008B952D /* Localizable.strings */; }; 45 | C7821AD219483FD6008B952D /* ic_more_white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C7821AD019483FD6008B952D /* ic_more_white@2x.png */; }; 46 | C7821ADD1948489C008B952D /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821ADB1948483F008B952D /* AddressBook.framework */; }; 47 | C7821ADF19485FC0008B952D /* ic_add_tab@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C7821ADE19485FC0008B952D /* ic_add_tab@2x.png */; }; 48 | C7821AE51949910A008B952D /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C7821AE21949910A008B952D /* libWeChatSDK.a */; }; 49 | C7821AE819499F47008B952D /* NoteListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C7821AE719499F47008B952D /* NoteListCell.m */; }; 50 | C7821AEB19499FC1008B952D /* UIColor+VNHex.m in Sources */ = {isa = PBXBuildFile; fileRef = C7821AEA19499FC1008B952D /* UIColor+VNHex.m */; }; 51 | C7821AED1949AB2B008B952D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C7821AEC1949AB2B008B952D /* AppDelegate.m */; }; 52 | C7821AEF1949B405008B952D /* save@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C7821AEE1949B404008B952D /* save@2x.png */; }; 53 | C79B92851952E6A10071E995 /* micro_small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C79B92841952E6A10071E995 /* micro_small@2x.png */; }; 54 | C7B282821A6E30F30072FAD3 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = C7B282811A6E30F30072FAD3 /* LaunchScreen.xib */; }; 55 | /* End PBXBuildFile section */ 56 | 57 | /* Begin PBXContainerItemProxy section */ 58 | C71140331A076A6C00E027E4 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = C7821A7B19480417008B952D /* Project object */; 61 | proxyType = 1; 62 | remoteGlobalIDString = C71140261A076A6C00E027E4; 63 | remoteInfo = VNNoteManager; 64 | }; 65 | C71140351A076A6C00E027E4 /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = C7821A7B19480417008B952D /* Project object */; 68 | proxyType = 1; 69 | remoteGlobalIDString = C7821A8219480417008B952D; 70 | remoteInfo = Voice2Note; 71 | }; 72 | C711403C1A076A6C00E027E4 /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = C7821A7B19480417008B952D /* Project object */; 75 | proxyType = 1; 76 | remoteGlobalIDString = C71140261A076A6C00E027E4; 77 | remoteInfo = VNNoteManager; 78 | }; 79 | C7821AA319480417008B952D /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = C7821A7B19480417008B952D /* Project object */; 82 | proxyType = 1; 83 | remoteGlobalIDString = C7821A8219480417008B952D; 84 | remoteInfo = Voice2Note; 85 | }; 86 | /* End PBXContainerItemProxy section */ 87 | 88 | /* Begin PBXCopyFilesBuildPhase section */ 89 | C711401A1A075E9100E027E4 /* Embed App Extensions */ = { 90 | isa = PBXCopyFilesBuildPhase; 91 | buildActionMask = 2147483647; 92 | dstPath = ""; 93 | dstSubfolderSpec = 13; 94 | files = ( 95 | ); 96 | name = "Embed App Extensions"; 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | C71140431A076A6C00E027E4 /* Embed Frameworks */ = { 100 | isa = PBXCopyFilesBuildPhase; 101 | buildActionMask = 2147483647; 102 | dstPath = ""; 103 | dstSubfolderSpec = 10; 104 | files = ( 105 | C711403F1A076A6C00E027E4 /* VNNoteManager.framework in Embed Frameworks */, 106 | ); 107 | name = "Embed Frameworks"; 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | /* End PBXCopyFilesBuildPhase section */ 111 | 112 | /* Begin PBXFileReference section */ 113 | 90D3642E47F94B6EAB1CE461 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 114 | 9DF272645A13CF49090BEC7E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 115 | C711400A1A075E9100E027E4 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; 116 | C71140271A076A6C00E027E4 /* VNNoteManager.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VNNoteManager.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 117 | C711402A1A076A6C00E027E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 118 | C711402B1A076A6C00E027E4 /* VNNoteManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VNNoteManager.h; sourceTree = ""; }; 119 | C71140311A076A6C00E027E4 /* VNNoteManagerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VNNoteManagerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 120 | C71140391A076A6C00E027E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 121 | C711403A1A076A6C00E027E4 /* VNNoteManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VNNoteManagerTests.m; sourceTree = ""; }; 122 | C71140471A076AB500E027E4 /* VNNote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VNNote.h; path = Voice2Note/Source/Model/VNNote.h; sourceTree = SOURCE_ROOT; }; 123 | C71140481A076AB500E027E4 /* VNNote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VNNote.m; path = Voice2Note/Source/Model/VNNote.m; sourceTree = SOURCE_ROOT; }; 124 | C71140491A076AB500E027E4 /* NoteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoteManager.h; path = Voice2Note/Source/Model/NoteManager.h; sourceTree = SOURCE_ROOT; }; 125 | C711404A1A076AB500E027E4 /* NoteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NoteManager.m; path = Voice2Note/Source/Model/NoteManager.m; sourceTree = SOURCE_ROOT; }; 126 | C71140501A076EDB00E027E4 /* NSDate+Conversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDate+Conversion.h"; path = "Voice2Note/Source/Common/NSDate+Conversion.h"; sourceTree = SOURCE_ROOT; }; 127 | C71140511A076EDB00E027E4 /* NSDate+Conversion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDate+Conversion.m"; path = "Voice2Note/Source/Common/NSDate+Conversion.m"; sourceTree = SOURCE_ROOT; }; 128 | C71140521A076EDB00E027E4 /* VNConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VNConstants.h; path = Voice2Note/Source/Common/VNConstants.h; sourceTree = SOURCE_ROOT; }; 129 | C71140531A076EDB00E027E4 /* VNConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VNConstants.m; path = Voice2Note/Source/Common/VNConstants.m; sourceTree = SOURCE_ROOT; }; 130 | C73B884D1977CEFB007EE3D0 /* libMobClickLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libMobClickLibrary.a; sourceTree = ""; }; 131 | C73B884E1977CEFB007EE3D0 /* MobClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobClick.h; sourceTree = ""; }; 132 | C73B884F1977CEFB007EE3D0 /* MobClickSocialAnalytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobClickSocialAnalytics.h; sourceTree = ""; }; 133 | C73B88511977CF19007EE3D0 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 134 | C7470A90196164CB00FD154B /* AppContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppContext.h; path = Source/AppContext.h; sourceTree = ""; }; 135 | C7470A91196164CB00FD154B /* AppContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppContext.m; path = Source/AppContext.m; sourceTree = ""; }; 136 | C7821A8319480417008B952D /* Voice2Note.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Voice2Note.app; sourceTree = BUILT_PRODUCTS_DIR; }; 137 | C7821A8619480417008B952D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 138 | C7821A8819480417008B952D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 139 | C7821A8A19480417008B952D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 140 | C7821A8E19480417008B952D /* Voice2Note-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Voice2Note-Info.plist"; sourceTree = ""; }; 141 | C7821A9019480417008B952D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 142 | C7821A9219480417008B952D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 143 | C7821A9419480417008B952D /* Voice2Note-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Voice2Note-Prefix.pch"; sourceTree = ""; }; 144 | C7821A9519480417008B952D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 145 | C7821A9819480417008B952D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 146 | C7821A9E19480417008B952D /* Voice2NoteTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Voice2NoteTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 147 | C7821A9F19480417008B952D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 148 | C7821AA719480417008B952D /* Voice2NoteTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Voice2NoteTests-Info.plist"; sourceTree = ""; }; 149 | C7821AA919480417008B952D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 150 | C7821AAB19480417008B952D /* Voice2NoteTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Voice2NoteTests.m; sourceTree = ""; }; 151 | C7821ABB194804A4008B952D /* NoteListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoteListController.h; path = Source/Controller/NoteListController.h; sourceTree = ""; }; 152 | C7821ABC194804A4008B952D /* NoteListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NoteListController.m; path = Source/Controller/NoteListController.m; sourceTree = ""; }; 153 | C7821ABE194804B6008B952D /* NoteDetailController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoteDetailController.h; path = Source/Controller/NoteDetailController.h; sourceTree = ""; }; 154 | C7821ABF194804B6008B952D /* NoteDetailController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NoteDetailController.m; path = Source/Controller/NoteDetailController.m; sourceTree = ""; }; 155 | C7821AC119482208008B952D /* iflyMSC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iflyMSC.framework; path = Framework/iflyMSC.framework; sourceTree = ""; }; 156 | C7821AC319482220008B952D /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 157 | C7821AC51948222B008B952D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 158 | C7821AC719482235008B952D /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 159 | C7821ACD19482610008B952D /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = Resource/Localizable.strings; sourceTree = ""; }; 160 | C7821AD019483FD6008B952D /* ic_more_white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ic_more_white@2x.png"; path = "Resource/ic_more_white@2x.png"; sourceTree = ""; }; 161 | C7821ADB1948483F008B952D /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; 162 | C7821ADE19485FC0008B952D /* ic_add_tab@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ic_add_tab@2x.png"; path = "Resource/ic_add_tab@2x.png"; sourceTree = ""; }; 163 | C7821AE21949910A008B952D /* libWeChatSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeChatSDK.a; sourceTree = ""; }; 164 | C7821AE31949910A008B952D /* WXApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApi.h; sourceTree = ""; }; 165 | C7821AE41949910A008B952D /* WXApiObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiObject.h; sourceTree = ""; }; 166 | C7821AE619499F47008B952D /* NoteListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoteListCell.h; path = Source/Controller/NoteListCell.h; sourceTree = ""; }; 167 | C7821AE719499F47008B952D /* NoteListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NoteListCell.m; path = Source/Controller/NoteListCell.m; sourceTree = ""; }; 168 | C7821AE919499FC1008B952D /* UIColor+VNHex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIColor+VNHex.h"; path = "Source/Common/UIColor+VNHex.h"; sourceTree = ""; }; 169 | C7821AEA19499FC1008B952D /* UIColor+VNHex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIColor+VNHex.m"; path = "Source/Common/UIColor+VNHex.m"; sourceTree = ""; }; 170 | C7821AEC1949AB2B008B952D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 171 | C7821AEE1949B404008B952D /* save@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "save@2x.png"; path = "Resource/save@2x.png"; sourceTree = ""; }; 172 | C79B92841952E6A10071E995 /* micro_small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "micro_small@2x.png"; path = "Resource/micro_small@2x.png"; sourceTree = ""; }; 173 | C7B282811A6E30F30072FAD3 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = LaunchScreen.xib; path = Source/LaunchScreen.xib; sourceTree = ""; }; 174 | D981B20068169477BE575983 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 175 | /* End PBXFileReference section */ 176 | 177 | /* Begin PBXFrameworksBuildPhase section */ 178 | C71140231A076A6C00E027E4 /* Frameworks */ = { 179 | isa = PBXFrameworksBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | ); 183 | runOnlyForDeploymentPostprocessing = 0; 184 | }; 185 | C711402E1A076A6C00E027E4 /* Frameworks */ = { 186 | isa = PBXFrameworksBuildPhase; 187 | buildActionMask = 2147483647; 188 | files = ( 189 | C71140321A076A6C00E027E4 /* VNNoteManager.framework in Frameworks */, 190 | ); 191 | runOnlyForDeploymentPostprocessing = 0; 192 | }; 193 | C7821A8019480417008B952D /* Frameworks */ = { 194 | isa = PBXFrameworksBuildPhase; 195 | buildActionMask = 2147483647; 196 | files = ( 197 | C73B88521977CF19007EE3D0 /* libz.dylib in Frameworks */, 198 | C711403E1A076A6C00E027E4 /* VNNoteManager.framework in Frameworks */, 199 | C7821ADD1948489C008B952D /* AddressBook.framework in Frameworks */, 200 | C7821AC819482235008B952D /* AudioToolbox.framework in Frameworks */, 201 | C7821AC61948222B008B952D /* SystemConfiguration.framework in Frameworks */, 202 | C7821AC419482220008B952D /* AVFoundation.framework in Frameworks */, 203 | C7821AE51949910A008B952D /* libWeChatSDK.a in Frameworks */, 204 | C7821AC219482208008B952D /* iflyMSC.framework in Frameworks */, 205 | C7821A8919480417008B952D /* CoreGraphics.framework in Frameworks */, 206 | C7821A8B19480417008B952D /* UIKit.framework in Frameworks */, 207 | C7821A8719480417008B952D /* Foundation.framework in Frameworks */, 208 | C73B88501977CEFB007EE3D0 /* libMobClickLibrary.a in Frameworks */, 209 | 8321E68A15AE491F981EE0DC /* libPods.a in Frameworks */, 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | }; 213 | C7821A9B19480417008B952D /* Frameworks */ = { 214 | isa = PBXFrameworksBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | C7821AA019480417008B952D /* XCTest.framework in Frameworks */, 218 | C7821AA219480417008B952D /* UIKit.framework in Frameworks */, 219 | C7821AA119480417008B952D /* Foundation.framework in Frameworks */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | /* End PBXFrameworksBuildPhase section */ 224 | 225 | /* Begin PBXGroup section */ 226 | 622340AC1527F4BB73687B50 /* Pods */ = { 227 | isa = PBXGroup; 228 | children = ( 229 | D981B20068169477BE575983 /* Pods.debug.xcconfig */, 230 | 9DF272645A13CF49090BEC7E /* Pods.release.xcconfig */, 231 | ); 232 | name = Pods; 233 | sourceTree = ""; 234 | }; 235 | C71140281A076A6C00E027E4 /* VNNoteManager */ = { 236 | isa = PBXGroup; 237 | children = ( 238 | C71140501A076EDB00E027E4 /* NSDate+Conversion.h */, 239 | C71140511A076EDB00E027E4 /* NSDate+Conversion.m */, 240 | C71140521A076EDB00E027E4 /* VNConstants.h */, 241 | C71140531A076EDB00E027E4 /* VNConstants.m */, 242 | C71140471A076AB500E027E4 /* VNNote.h */, 243 | C71140481A076AB500E027E4 /* VNNote.m */, 244 | C71140491A076AB500E027E4 /* NoteManager.h */, 245 | C711404A1A076AB500E027E4 /* NoteManager.m */, 246 | C711402B1A076A6C00E027E4 /* VNNoteManager.h */, 247 | C71140291A076A6C00E027E4 /* Supporting Files */, 248 | ); 249 | path = VNNoteManager; 250 | sourceTree = ""; 251 | }; 252 | C71140291A076A6C00E027E4 /* Supporting Files */ = { 253 | isa = PBXGroup; 254 | children = ( 255 | C711402A1A076A6C00E027E4 /* Info.plist */, 256 | ); 257 | name = "Supporting Files"; 258 | sourceTree = ""; 259 | }; 260 | C71140371A076A6C00E027E4 /* VNNoteManagerTests */ = { 261 | isa = PBXGroup; 262 | children = ( 263 | C711403A1A076A6C00E027E4 /* VNNoteManagerTests.m */, 264 | C71140381A076A6C00E027E4 /* Supporting Files */, 265 | ); 266 | path = VNNoteManagerTests; 267 | sourceTree = ""; 268 | }; 269 | C71140381A076A6C00E027E4 /* Supporting Files */ = { 270 | isa = PBXGroup; 271 | children = ( 272 | C71140391A076A6C00E027E4 /* Info.plist */, 273 | ); 274 | name = "Supporting Files"; 275 | sourceTree = ""; 276 | }; 277 | C73B884C1977CEFB007EE3D0 /* Umeng */ = { 278 | isa = PBXGroup; 279 | children = ( 280 | C73B884D1977CEFB007EE3D0 /* libMobClickLibrary.a */, 281 | C73B884E1977CEFB007EE3D0 /* MobClick.h */, 282 | C73B884F1977CEFB007EE3D0 /* MobClickSocialAnalytics.h */, 283 | ); 284 | name = Umeng; 285 | path = Source/Library/Umeng; 286 | sourceTree = ""; 287 | }; 288 | C7470A93196164D400FD154B /* App */ = { 289 | isa = PBXGroup; 290 | children = ( 291 | C7470A90196164CB00FD154B /* AppContext.h */, 292 | C7470A91196164CB00FD154B /* AppContext.m */, 293 | C7821A9519480417008B952D /* AppDelegate.h */, 294 | C7821AEC1949AB2B008B952D /* AppDelegate.m */, 295 | C7B282811A6E30F30072FAD3 /* LaunchScreen.xib */, 296 | ); 297 | name = App; 298 | sourceTree = ""; 299 | }; 300 | C7821A7A19480417008B952D = { 301 | isa = PBXGroup; 302 | children = ( 303 | C7821A8C19480417008B952D /* Voice2Note */, 304 | C7821AA519480417008B952D /* Voice2NoteTests */, 305 | C71140281A076A6C00E027E4 /* VNNoteManager */, 306 | C71140371A076A6C00E027E4 /* VNNoteManagerTests */, 307 | C7821A8519480417008B952D /* Frameworks */, 308 | C7821A8419480417008B952D /* Products */, 309 | 622340AC1527F4BB73687B50 /* Pods */, 310 | ); 311 | sourceTree = ""; 312 | }; 313 | C7821A8419480417008B952D /* Products */ = { 314 | isa = PBXGroup; 315 | children = ( 316 | C7821A8319480417008B952D /* Voice2Note.app */, 317 | C7821A9E19480417008B952D /* Voice2NoteTests.xctest */, 318 | C71140271A076A6C00E027E4 /* VNNoteManager.framework */, 319 | C71140311A076A6C00E027E4 /* VNNoteManagerTests.xctest */, 320 | ); 321 | name = Products; 322 | sourceTree = ""; 323 | }; 324 | C7821A8519480417008B952D /* Frameworks */ = { 325 | isa = PBXGroup; 326 | children = ( 327 | C73B88511977CF19007EE3D0 /* libz.dylib */, 328 | C7821ADB1948483F008B952D /* AddressBook.framework */, 329 | C7821AC719482235008B952D /* AudioToolbox.framework */, 330 | C7821AC51948222B008B952D /* SystemConfiguration.framework */, 331 | C7821AC319482220008B952D /* AVFoundation.framework */, 332 | C7821AC119482208008B952D /* iflyMSC.framework */, 333 | C7821A8619480417008B952D /* Foundation.framework */, 334 | C7821A8819480417008B952D /* CoreGraphics.framework */, 335 | C7821A8A19480417008B952D /* UIKit.framework */, 336 | C7821A9F19480417008B952D /* XCTest.framework */, 337 | 90D3642E47F94B6EAB1CE461 /* libPods.a */, 338 | C711400A1A075E9100E027E4 /* NotificationCenter.framework */, 339 | ); 340 | name = Frameworks; 341 | sourceTree = ""; 342 | }; 343 | C7821A8C19480417008B952D /* Voice2Note */ = { 344 | isa = PBXGroup; 345 | children = ( 346 | C7821AE0194990F7008B952D /* Library */, 347 | C7821AB619480425008B952D /* Resource */, 348 | C7821AB51948041E008B952D /* Source */, 349 | C7821A9819480417008B952D /* Images.xcassets */, 350 | C7821A8D19480417008B952D /* Supporting Files */, 351 | ); 352 | path = Voice2Note; 353 | sourceTree = ""; 354 | }; 355 | C7821A8D19480417008B952D /* Supporting Files */ = { 356 | isa = PBXGroup; 357 | children = ( 358 | C7821A8E19480417008B952D /* Voice2Note-Info.plist */, 359 | C7821A8F19480417008B952D /* InfoPlist.strings */, 360 | C7821A9219480417008B952D /* main.m */, 361 | C7821A9419480417008B952D /* Voice2Note-Prefix.pch */, 362 | ); 363 | name = "Supporting Files"; 364 | sourceTree = ""; 365 | }; 366 | C7821AA519480417008B952D /* Voice2NoteTests */ = { 367 | isa = PBXGroup; 368 | children = ( 369 | C7821AAB19480417008B952D /* Voice2NoteTests.m */, 370 | C7821AA619480417008B952D /* Supporting Files */, 371 | ); 372 | path = Voice2NoteTests; 373 | sourceTree = ""; 374 | }; 375 | C7821AA619480417008B952D /* Supporting Files */ = { 376 | isa = PBXGroup; 377 | children = ( 378 | C7821AA719480417008B952D /* Voice2NoteTests-Info.plist */, 379 | C7821AA819480417008B952D /* InfoPlist.strings */, 380 | ); 381 | name = "Supporting Files"; 382 | sourceTree = ""; 383 | }; 384 | C7821AB51948041E008B952D /* Source */ = { 385 | isa = PBXGroup; 386 | children = ( 387 | C7470A93196164D400FD154B /* App */, 388 | C7821AC919482557008B952D /* Common */, 389 | C7821AB719480434008B952D /* Controller */, 390 | ); 391 | name = Source; 392 | sourceTree = ""; 393 | }; 394 | C7821AB619480425008B952D /* Resource */ = { 395 | isa = PBXGroup; 396 | children = ( 397 | C79B92841952E6A10071E995 /* micro_small@2x.png */, 398 | C7821AEE1949B404008B952D /* save@2x.png */, 399 | C7821ADE19485FC0008B952D /* ic_add_tab@2x.png */, 400 | C7821AD019483FD6008B952D /* ic_more_white@2x.png */, 401 | C7821ACD19482610008B952D /* Localizable.strings */, 402 | ); 403 | name = Resource; 404 | sourceTree = ""; 405 | }; 406 | C7821AB719480434008B952D /* Controller */ = { 407 | isa = PBXGroup; 408 | children = ( 409 | C7821ABB194804A4008B952D /* NoteListController.h */, 410 | C7821ABC194804A4008B952D /* NoteListController.m */, 411 | C7821ABE194804B6008B952D /* NoteDetailController.h */, 412 | C7821ABF194804B6008B952D /* NoteDetailController.m */, 413 | C7821AE619499F47008B952D /* NoteListCell.h */, 414 | C7821AE719499F47008B952D /* NoteListCell.m */, 415 | ); 416 | name = Controller; 417 | sourceTree = ""; 418 | }; 419 | C7821AC919482557008B952D /* Common */ = { 420 | isa = PBXGroup; 421 | children = ( 422 | C7821AE919499FC1008B952D /* UIColor+VNHex.h */, 423 | C7821AEA19499FC1008B952D /* UIColor+VNHex.m */, 424 | ); 425 | name = Common; 426 | sourceTree = ""; 427 | }; 428 | C7821AE0194990F7008B952D /* Library */ = { 429 | isa = PBXGroup; 430 | children = ( 431 | C73B884C1977CEFB007EE3D0 /* Umeng */, 432 | C7821AE11949910A008B952D /* Weixin */, 433 | ); 434 | name = Library; 435 | sourceTree = ""; 436 | }; 437 | C7821AE11949910A008B952D /* Weixin */ = { 438 | isa = PBXGroup; 439 | children = ( 440 | C7821AE21949910A008B952D /* libWeChatSDK.a */, 441 | C7821AE31949910A008B952D /* WXApi.h */, 442 | C7821AE41949910A008B952D /* WXApiObject.h */, 443 | ); 444 | name = Weixin; 445 | path = Framework/Weixin; 446 | sourceTree = SOURCE_ROOT; 447 | }; 448 | /* End PBXGroup section */ 449 | 450 | /* Begin PBXHeadersBuildPhase section */ 451 | C71140241A076A6C00E027E4 /* Headers */ = { 452 | isa = PBXHeadersBuildPhase; 453 | buildActionMask = 2147483647; 454 | files = ( 455 | C711404D1A076AB500E027E4 /* NoteManager.h in Headers */, 456 | C71140541A076EDB00E027E4 /* NSDate+Conversion.h in Headers */, 457 | C711404B1A076AB500E027E4 /* VNNote.h in Headers */, 458 | C711402C1A076A6C00E027E4 /* VNNoteManager.h in Headers */, 459 | C71140561A076EDB00E027E4 /* VNConstants.h in Headers */, 460 | ); 461 | runOnlyForDeploymentPostprocessing = 0; 462 | }; 463 | /* End PBXHeadersBuildPhase section */ 464 | 465 | /* Begin PBXNativeTarget section */ 466 | C71140261A076A6C00E027E4 /* VNNoteManager */ = { 467 | isa = PBXNativeTarget; 468 | buildConfigurationList = C71140401A076A6C00E027E4 /* Build configuration list for PBXNativeTarget "VNNoteManager" */; 469 | buildPhases = ( 470 | C71140221A076A6C00E027E4 /* Sources */, 471 | C71140231A076A6C00E027E4 /* Frameworks */, 472 | C71140241A076A6C00E027E4 /* Headers */, 473 | C71140251A076A6C00E027E4 /* Resources */, 474 | ); 475 | buildRules = ( 476 | ); 477 | dependencies = ( 478 | ); 479 | name = VNNoteManager; 480 | productName = VNNoteManager; 481 | productReference = C71140271A076A6C00E027E4 /* VNNoteManager.framework */; 482 | productType = "com.apple.product-type.framework"; 483 | }; 484 | C71140301A076A6C00E027E4 /* VNNoteManagerTests */ = { 485 | isa = PBXNativeTarget; 486 | buildConfigurationList = C71140441A076A6C00E027E4 /* Build configuration list for PBXNativeTarget "VNNoteManagerTests" */; 487 | buildPhases = ( 488 | C711402D1A076A6C00E027E4 /* Sources */, 489 | C711402E1A076A6C00E027E4 /* Frameworks */, 490 | C711402F1A076A6C00E027E4 /* Resources */, 491 | ); 492 | buildRules = ( 493 | ); 494 | dependencies = ( 495 | C71140341A076A6C00E027E4 /* PBXTargetDependency */, 496 | C71140361A076A6C00E027E4 /* PBXTargetDependency */, 497 | ); 498 | name = VNNoteManagerTests; 499 | productName = VNNoteManagerTests; 500 | productReference = C71140311A076A6C00E027E4 /* VNNoteManagerTests.xctest */; 501 | productType = "com.apple.product-type.bundle.unit-test"; 502 | }; 503 | C7821A8219480417008B952D /* Voice2Note */ = { 504 | isa = PBXNativeTarget; 505 | buildConfigurationList = C7821AAF19480417008B952D /* Build configuration list for PBXNativeTarget "Voice2Note" */; 506 | buildPhases = ( 507 | C9D65AD0DAB3492B89BD9410 /* Check Pods Manifest.lock */, 508 | C7821A7F19480417008B952D /* Sources */, 509 | C7821A8019480417008B952D /* Frameworks */, 510 | C7821A8119480417008B952D /* Resources */, 511 | B9858D9A4CF34E51A3BCF45C /* Copy Pods Resources */, 512 | C711401A1A075E9100E027E4 /* Embed App Extensions */, 513 | C71140431A076A6C00E027E4 /* Embed Frameworks */, 514 | ); 515 | buildRules = ( 516 | ); 517 | dependencies = ( 518 | C711403D1A076A6C00E027E4 /* PBXTargetDependency */, 519 | ); 520 | name = Voice2Note; 521 | productName = Voice2Note; 522 | productReference = C7821A8319480417008B952D /* Voice2Note.app */; 523 | productType = "com.apple.product-type.application"; 524 | }; 525 | C7821A9D19480417008B952D /* Voice2NoteTests */ = { 526 | isa = PBXNativeTarget; 527 | buildConfigurationList = C7821AB219480417008B952D /* Build configuration list for PBXNativeTarget "Voice2NoteTests" */; 528 | buildPhases = ( 529 | C7821A9A19480417008B952D /* Sources */, 530 | C7821A9B19480417008B952D /* Frameworks */, 531 | C7821A9C19480417008B952D /* Resources */, 532 | ); 533 | buildRules = ( 534 | ); 535 | dependencies = ( 536 | C7821AA419480417008B952D /* PBXTargetDependency */, 537 | ); 538 | name = Voice2NoteTests; 539 | productName = Voice2NoteTests; 540 | productReference = C7821A9E19480417008B952D /* Voice2NoteTests.xctest */; 541 | productType = "com.apple.product-type.bundle.unit-test"; 542 | }; 543 | /* End PBXNativeTarget section */ 544 | 545 | /* Begin PBXProject section */ 546 | C7821A7B19480417008B952D /* Project object */ = { 547 | isa = PBXProject; 548 | attributes = { 549 | LastUpgradeCheck = 0610; 550 | ORGANIZATIONNAME = jinxing; 551 | TargetAttributes = { 552 | C71140261A076A6C00E027E4 = { 553 | CreatedOnToolsVersion = 6.1; 554 | DevelopmentTeam = 8CMA73KN4U; 555 | }; 556 | C71140301A076A6C00E027E4 = { 557 | CreatedOnToolsVersion = 6.1; 558 | TestTargetID = C7821A8219480417008B952D; 559 | }; 560 | C7821A8219480417008B952D = { 561 | DevelopmentTeam = 8CMA73KN4U; 562 | }; 563 | C7821A9D19480417008B952D = { 564 | TestTargetID = C7821A8219480417008B952D; 565 | }; 566 | }; 567 | }; 568 | buildConfigurationList = C7821A7E19480417008B952D /* Build configuration list for PBXProject "Voice2Note" */; 569 | compatibilityVersion = "Xcode 3.2"; 570 | developmentRegion = English; 571 | hasScannedForEncodings = 0; 572 | knownRegions = ( 573 | en, 574 | ); 575 | mainGroup = C7821A7A19480417008B952D; 576 | productRefGroup = C7821A8419480417008B952D /* Products */; 577 | projectDirPath = ""; 578 | projectRoot = ""; 579 | targets = ( 580 | C7821A8219480417008B952D /* Voice2Note */, 581 | C7821A9D19480417008B952D /* Voice2NoteTests */, 582 | C71140261A076A6C00E027E4 /* VNNoteManager */, 583 | C71140301A076A6C00E027E4 /* VNNoteManagerTests */, 584 | ); 585 | }; 586 | /* End PBXProject section */ 587 | 588 | /* Begin PBXResourcesBuildPhase section */ 589 | C71140251A076A6C00E027E4 /* Resources */ = { 590 | isa = PBXResourcesBuildPhase; 591 | buildActionMask = 2147483647; 592 | files = ( 593 | ); 594 | runOnlyForDeploymentPostprocessing = 0; 595 | }; 596 | C711402F1A076A6C00E027E4 /* Resources */ = { 597 | isa = PBXResourcesBuildPhase; 598 | buildActionMask = 2147483647; 599 | files = ( 600 | ); 601 | runOnlyForDeploymentPostprocessing = 0; 602 | }; 603 | C7821A8119480417008B952D /* Resources */ = { 604 | isa = PBXResourcesBuildPhase; 605 | buildActionMask = 2147483647; 606 | files = ( 607 | C7821A9119480417008B952D /* InfoPlist.strings in Resources */, 608 | C79B92851952E6A10071E995 /* micro_small@2x.png in Resources */, 609 | C7821ACE19482610008B952D /* Localizable.strings in Resources */, 610 | C7821AEF1949B405008B952D /* save@2x.png in Resources */, 611 | C7B282821A6E30F30072FAD3 /* LaunchScreen.xib in Resources */, 612 | C7821AD219483FD6008B952D /* ic_more_white@2x.png in Resources */, 613 | C7821ADF19485FC0008B952D /* ic_add_tab@2x.png in Resources */, 614 | C7821A9919480417008B952D /* Images.xcassets in Resources */, 615 | ); 616 | runOnlyForDeploymentPostprocessing = 0; 617 | }; 618 | C7821A9C19480417008B952D /* Resources */ = { 619 | isa = PBXResourcesBuildPhase; 620 | buildActionMask = 2147483647; 621 | files = ( 622 | C7821AAA19480417008B952D /* InfoPlist.strings in Resources */, 623 | ); 624 | runOnlyForDeploymentPostprocessing = 0; 625 | }; 626 | /* End PBXResourcesBuildPhase section */ 627 | 628 | /* Begin PBXShellScriptBuildPhase section */ 629 | B9858D9A4CF34E51A3BCF45C /* Copy Pods Resources */ = { 630 | isa = PBXShellScriptBuildPhase; 631 | buildActionMask = 2147483647; 632 | files = ( 633 | ); 634 | inputPaths = ( 635 | ); 636 | name = "Copy Pods Resources"; 637 | outputPaths = ( 638 | ); 639 | runOnlyForDeploymentPostprocessing = 0; 640 | shellPath = /bin/sh; 641 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 642 | showEnvVarsInLog = 0; 643 | }; 644 | C9D65AD0DAB3492B89BD9410 /* Check Pods Manifest.lock */ = { 645 | isa = PBXShellScriptBuildPhase; 646 | buildActionMask = 2147483647; 647 | files = ( 648 | ); 649 | inputPaths = ( 650 | ); 651 | name = "Check Pods Manifest.lock"; 652 | outputPaths = ( 653 | ); 654 | runOnlyForDeploymentPostprocessing = 0; 655 | shellPath = /bin/sh; 656 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 657 | showEnvVarsInLog = 0; 658 | }; 659 | /* End PBXShellScriptBuildPhase section */ 660 | 661 | /* Begin PBXSourcesBuildPhase section */ 662 | C71140221A076A6C00E027E4 /* Sources */ = { 663 | isa = PBXSourcesBuildPhase; 664 | buildActionMask = 2147483647; 665 | files = ( 666 | C71140551A076EDB00E027E4 /* NSDate+Conversion.m in Sources */, 667 | C71140571A076EDB00E027E4 /* VNConstants.m in Sources */, 668 | C711404C1A076AB500E027E4 /* VNNote.m in Sources */, 669 | C711404E1A076AB500E027E4 /* NoteManager.m in Sources */, 670 | ); 671 | runOnlyForDeploymentPostprocessing = 0; 672 | }; 673 | C711402D1A076A6C00E027E4 /* Sources */ = { 674 | isa = PBXSourcesBuildPhase; 675 | buildActionMask = 2147483647; 676 | files = ( 677 | C711403B1A076A6C00E027E4 /* VNNoteManagerTests.m in Sources */, 678 | ); 679 | runOnlyForDeploymentPostprocessing = 0; 680 | }; 681 | C7821A7F19480417008B952D /* Sources */ = { 682 | isa = PBXSourcesBuildPhase; 683 | buildActionMask = 2147483647; 684 | files = ( 685 | C7821AE819499F47008B952D /* NoteListCell.m in Sources */, 686 | C7821ABD194804A4008B952D /* NoteListController.m in Sources */, 687 | C7821AED1949AB2B008B952D /* AppDelegate.m in Sources */, 688 | C7821A9319480417008B952D /* main.m in Sources */, 689 | C7821AEB19499FC1008B952D /* UIColor+VNHex.m in Sources */, 690 | C7821AC0194804B6008B952D /* NoteDetailController.m in Sources */, 691 | C7470A92196164CB00FD154B /* AppContext.m in Sources */, 692 | ); 693 | runOnlyForDeploymentPostprocessing = 0; 694 | }; 695 | C7821A9A19480417008B952D /* Sources */ = { 696 | isa = PBXSourcesBuildPhase; 697 | buildActionMask = 2147483647; 698 | files = ( 699 | C7821AAC19480417008B952D /* Voice2NoteTests.m in Sources */, 700 | ); 701 | runOnlyForDeploymentPostprocessing = 0; 702 | }; 703 | /* End PBXSourcesBuildPhase section */ 704 | 705 | /* Begin PBXTargetDependency section */ 706 | C71140341A076A6C00E027E4 /* PBXTargetDependency */ = { 707 | isa = PBXTargetDependency; 708 | target = C71140261A076A6C00E027E4 /* VNNoteManager */; 709 | targetProxy = C71140331A076A6C00E027E4 /* PBXContainerItemProxy */; 710 | }; 711 | C71140361A076A6C00E027E4 /* PBXTargetDependency */ = { 712 | isa = PBXTargetDependency; 713 | target = C7821A8219480417008B952D /* Voice2Note */; 714 | targetProxy = C71140351A076A6C00E027E4 /* PBXContainerItemProxy */; 715 | }; 716 | C711403D1A076A6C00E027E4 /* PBXTargetDependency */ = { 717 | isa = PBXTargetDependency; 718 | target = C71140261A076A6C00E027E4 /* VNNoteManager */; 719 | targetProxy = C711403C1A076A6C00E027E4 /* PBXContainerItemProxy */; 720 | }; 721 | C7821AA419480417008B952D /* PBXTargetDependency */ = { 722 | isa = PBXTargetDependency; 723 | target = C7821A8219480417008B952D /* Voice2Note */; 724 | targetProxy = C7821AA319480417008B952D /* PBXContainerItemProxy */; 725 | }; 726 | /* End PBXTargetDependency section */ 727 | 728 | /* Begin PBXVariantGroup section */ 729 | C7821A8F19480417008B952D /* InfoPlist.strings */ = { 730 | isa = PBXVariantGroup; 731 | children = ( 732 | C7821A9019480417008B952D /* en */, 733 | ); 734 | name = InfoPlist.strings; 735 | sourceTree = ""; 736 | }; 737 | C7821AA819480417008B952D /* InfoPlist.strings */ = { 738 | isa = PBXVariantGroup; 739 | children = ( 740 | C7821AA919480417008B952D /* en */, 741 | ); 742 | name = InfoPlist.strings; 743 | sourceTree = ""; 744 | }; 745 | /* End PBXVariantGroup section */ 746 | 747 | /* Begin XCBuildConfiguration section */ 748 | C71140411A076A6C00E027E4 /* Debug */ = { 749 | isa = XCBuildConfiguration; 750 | buildSettings = { 751 | APPLICATION_EXTENSION_API_ONLY = YES; 752 | CLANG_WARN_UNREACHABLE_CODE = YES; 753 | CODE_SIGN_IDENTITY = "iPhone Developer"; 754 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 755 | CURRENT_PROJECT_VERSION = 1; 756 | DEFINES_MODULE = YES; 757 | DYLIB_COMPATIBILITY_VERSION = 1; 758 | DYLIB_CURRENT_VERSION = 1; 759 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 760 | ENABLE_STRICT_OBJC_MSGSEND = YES; 761 | GCC_PREPROCESSOR_DEFINITIONS = ( 762 | "DEBUG=1", 763 | "$(inherited)", 764 | ); 765 | INFOPLIST_FILE = VNNoteManager/Info.plist; 766 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 767 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 768 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 769 | MTL_ENABLE_DEBUG_INFO = YES; 770 | ONLY_ACTIVE_ARCH = NO; 771 | PRODUCT_NAME = "$(TARGET_NAME)"; 772 | SKIP_INSTALL = YES; 773 | VERSIONING_SYSTEM = "apple-generic"; 774 | VERSION_INFO_PREFIX = ""; 775 | }; 776 | name = Debug; 777 | }; 778 | C71140421A076A6C00E027E4 /* Release */ = { 779 | isa = XCBuildConfiguration; 780 | buildSettings = { 781 | APPLICATION_EXTENSION_API_ONLY = YES; 782 | CLANG_WARN_UNREACHABLE_CODE = YES; 783 | CODE_SIGN_IDENTITY = "iPhone Distribution"; 784 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; 785 | CURRENT_PROJECT_VERSION = 1; 786 | DEFINES_MODULE = YES; 787 | DYLIB_COMPATIBILITY_VERSION = 1; 788 | DYLIB_CURRENT_VERSION = 1; 789 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 790 | ENABLE_STRICT_OBJC_MSGSEND = YES; 791 | INFOPLIST_FILE = VNNoteManager/Info.plist; 792 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 793 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 794 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 795 | MTL_ENABLE_DEBUG_INFO = NO; 796 | PRODUCT_NAME = "$(TARGET_NAME)"; 797 | SKIP_INSTALL = YES; 798 | VERSIONING_SYSTEM = "apple-generic"; 799 | VERSION_INFO_PREFIX = ""; 800 | }; 801 | name = Release; 802 | }; 803 | C71140451A076A6C00E027E4 /* Debug */ = { 804 | isa = XCBuildConfiguration; 805 | buildSettings = { 806 | CLANG_WARN_UNREACHABLE_CODE = YES; 807 | ENABLE_STRICT_OBJC_MSGSEND = YES; 808 | FRAMEWORK_SEARCH_PATHS = ( 809 | "$(SDKROOT)/Developer/Library/Frameworks", 810 | "$(inherited)", 811 | ); 812 | GCC_PREPROCESSOR_DEFINITIONS = ( 813 | "DEBUG=1", 814 | "$(inherited)", 815 | ); 816 | INFOPLIST_FILE = VNNoteManagerTests/Info.plist; 817 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 818 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 819 | MTL_ENABLE_DEBUG_INFO = YES; 820 | PRODUCT_NAME = "$(TARGET_NAME)"; 821 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Voice2Note.app/Voice2Note"; 822 | }; 823 | name = Debug; 824 | }; 825 | C71140461A076A6C00E027E4 /* Release */ = { 826 | isa = XCBuildConfiguration; 827 | buildSettings = { 828 | CLANG_WARN_UNREACHABLE_CODE = YES; 829 | ENABLE_STRICT_OBJC_MSGSEND = YES; 830 | FRAMEWORK_SEARCH_PATHS = ( 831 | "$(SDKROOT)/Developer/Library/Frameworks", 832 | "$(inherited)", 833 | ); 834 | INFOPLIST_FILE = VNNoteManagerTests/Info.plist; 835 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 836 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 837 | MTL_ENABLE_DEBUG_INFO = NO; 838 | PRODUCT_NAME = "$(TARGET_NAME)"; 839 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Voice2Note.app/Voice2Note"; 840 | }; 841 | name = Release; 842 | }; 843 | C7821AAD19480417008B952D /* Debug */ = { 844 | isa = XCBuildConfiguration; 845 | buildSettings = { 846 | ALWAYS_SEARCH_USER_PATHS = NO; 847 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 848 | CLANG_CXX_LIBRARY = "libc++"; 849 | CLANG_ENABLE_MODULES = YES; 850 | CLANG_ENABLE_OBJC_ARC = YES; 851 | CLANG_WARN_BOOL_CONVERSION = YES; 852 | CLANG_WARN_CONSTANT_CONVERSION = YES; 853 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 854 | CLANG_WARN_EMPTY_BODY = YES; 855 | CLANG_WARN_ENUM_CONVERSION = YES; 856 | CLANG_WARN_INT_CONVERSION = YES; 857 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 858 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 859 | CODE_SIGN_IDENTITY = ""; 860 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 861 | COPY_PHASE_STRIP = NO; 862 | GCC_C_LANGUAGE_STANDARD = gnu99; 863 | GCC_DYNAMIC_NO_PIC = NO; 864 | GCC_OPTIMIZATION_LEVEL = 0; 865 | GCC_PREPROCESSOR_DEFINITIONS = ( 866 | "DEBUG=1", 867 | "$(inherited)", 868 | ); 869 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 870 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 871 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 872 | GCC_WARN_UNDECLARED_SELECTOR = YES; 873 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 874 | GCC_WARN_UNUSED_FUNCTION = YES; 875 | GCC_WARN_UNUSED_VARIABLE = YES; 876 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 877 | ONLY_ACTIVE_ARCH = YES; 878 | SDKROOT = iphoneos; 879 | TARGETED_DEVICE_FAMILY = "1,2"; 880 | }; 881 | name = Debug; 882 | }; 883 | C7821AAE19480417008B952D /* Release */ = { 884 | isa = XCBuildConfiguration; 885 | buildSettings = { 886 | ALWAYS_SEARCH_USER_PATHS = NO; 887 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 888 | CLANG_CXX_LIBRARY = "libc++"; 889 | CLANG_ENABLE_MODULES = YES; 890 | CLANG_ENABLE_OBJC_ARC = YES; 891 | CLANG_WARN_BOOL_CONVERSION = YES; 892 | CLANG_WARN_CONSTANT_CONVERSION = YES; 893 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 894 | CLANG_WARN_EMPTY_BODY = YES; 895 | CLANG_WARN_ENUM_CONVERSION = YES; 896 | CLANG_WARN_INT_CONVERSION = YES; 897 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 898 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 899 | CODE_SIGN_IDENTITY = ""; 900 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; 901 | COPY_PHASE_STRIP = NO; 902 | ENABLE_NS_ASSERTIONS = NO; 903 | GCC_C_LANGUAGE_STANDARD = gnu99; 904 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 905 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 906 | GCC_WARN_UNDECLARED_SELECTOR = YES; 907 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 908 | GCC_WARN_UNUSED_FUNCTION = YES; 909 | GCC_WARN_UNUSED_VARIABLE = YES; 910 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 911 | SDKROOT = iphoneos; 912 | TARGETED_DEVICE_FAMILY = "1,2"; 913 | VALIDATE_PRODUCT = YES; 914 | }; 915 | name = Release; 916 | }; 917 | C7821AB019480417008B952D /* Debug */ = { 918 | isa = XCBuildConfiguration; 919 | baseConfigurationReference = D981B20068169477BE575983 /* Pods.debug.xcconfig */; 920 | buildSettings = { 921 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 922 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 923 | CLANG_CXX_LIBRARY = "libstdc++"; 924 | CODE_SIGN_IDENTITY = "iPhone Developer: Liao Jinxing (WFC59XXUQC)"; 925 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Liao Jinxing (WFC59XXUQC)"; 926 | FRAMEWORK_SEARCH_PATHS = ( 927 | "$(inherited)", 928 | "$(PROJECT_DIR)/Framework", 929 | ); 930 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 931 | GCC_PREFIX_HEADER = "Voice2Note/Voice2Note-Prefix.pch"; 932 | INFOPLIST_FILE = "Voice2Note/Voice2Note-Info.plist"; 933 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 934 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 935 | LIBRARY_SEARCH_PATHS = ( 936 | "$(inherited)", 937 | "$(PROJECT_DIR)/Framework/Weixin", 938 | "$(PROJECT_DIR)/Voice2Note/Source/Library/Umeng", 939 | ); 940 | PRODUCT_NAME = "$(TARGET_NAME)"; 941 | PROVISIONING_PROFILE = "2da64936-0d35-46a6-816c-3a68ac75f7a1"; 942 | TARGETED_DEVICE_FAMILY = 1; 943 | WRAPPER_EXTENSION = app; 944 | }; 945 | name = Debug; 946 | }; 947 | C7821AB119480417008B952D /* Release */ = { 948 | isa = XCBuildConfiguration; 949 | baseConfigurationReference = 9DF272645A13CF49090BEC7E /* Pods.release.xcconfig */; 950 | buildSettings = { 951 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 952 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 953 | CLANG_CXX_LIBRARY = "libstdc++"; 954 | CODE_SIGN_IDENTITY = "iPhone Distribution: Liao Jinxing (8CMA73KN4U)"; 955 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Liao Jinxing (8CMA73KN4U)"; 956 | FRAMEWORK_SEARCH_PATHS = ( 957 | "$(inherited)", 958 | "$(PROJECT_DIR)/Framework", 959 | ); 960 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 961 | GCC_PREFIX_HEADER = "Voice2Note/Voice2Note-Prefix.pch"; 962 | INFOPLIST_FILE = "Voice2Note/Voice2Note-Info.plist"; 963 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 964 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 965 | LIBRARY_SEARCH_PATHS = ( 966 | "$(inherited)", 967 | "$(PROJECT_DIR)/Framework/Weixin", 968 | "$(PROJECT_DIR)/Voice2Note/Source/Library/Umeng", 969 | ); 970 | PRODUCT_NAME = "$(TARGET_NAME)"; 971 | PROVISIONING_PROFILE = "E8FD832F-A4F3-4237-B55D-4384DCC9D012"; 972 | TARGETED_DEVICE_FAMILY = 1; 973 | WRAPPER_EXTENSION = app; 974 | }; 975 | name = Release; 976 | }; 977 | C7821AB319480417008B952D /* Debug */ = { 978 | isa = XCBuildConfiguration; 979 | buildSettings = { 980 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Voice2Note.app/Voice2Note"; 981 | FRAMEWORK_SEARCH_PATHS = ( 982 | "$(SDKROOT)/Developer/Library/Frameworks", 983 | "$(inherited)", 984 | "$(DEVELOPER_FRAMEWORKS_DIR)", 985 | ); 986 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 987 | GCC_PREFIX_HEADER = "Voice2Note/Voice2Note-Prefix.pch"; 988 | GCC_PREPROCESSOR_DEFINITIONS = ( 989 | "DEBUG=1", 990 | "$(inherited)", 991 | ); 992 | INFOPLIST_FILE = "Voice2NoteTests/Voice2NoteTests-Info.plist"; 993 | PRODUCT_NAME = "$(TARGET_NAME)"; 994 | TEST_HOST = "$(BUNDLE_LOADER)"; 995 | WRAPPER_EXTENSION = xctest; 996 | }; 997 | name = Debug; 998 | }; 999 | C7821AB419480417008B952D /* Release */ = { 1000 | isa = XCBuildConfiguration; 1001 | buildSettings = { 1002 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Voice2Note.app/Voice2Note"; 1003 | FRAMEWORK_SEARCH_PATHS = ( 1004 | "$(SDKROOT)/Developer/Library/Frameworks", 1005 | "$(inherited)", 1006 | "$(DEVELOPER_FRAMEWORKS_DIR)", 1007 | ); 1008 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 1009 | GCC_PREFIX_HEADER = "Voice2Note/Voice2Note-Prefix.pch"; 1010 | INFOPLIST_FILE = "Voice2NoteTests/Voice2NoteTests-Info.plist"; 1011 | PRODUCT_NAME = "$(TARGET_NAME)"; 1012 | TEST_HOST = "$(BUNDLE_LOADER)"; 1013 | WRAPPER_EXTENSION = xctest; 1014 | }; 1015 | name = Release; 1016 | }; 1017 | /* End XCBuildConfiguration section */ 1018 | 1019 | /* Begin XCConfigurationList section */ 1020 | C71140401A076A6C00E027E4 /* Build configuration list for PBXNativeTarget "VNNoteManager" */ = { 1021 | isa = XCConfigurationList; 1022 | buildConfigurations = ( 1023 | C71140411A076A6C00E027E4 /* Debug */, 1024 | C71140421A076A6C00E027E4 /* Release */, 1025 | ); 1026 | defaultConfigurationIsVisible = 0; 1027 | defaultConfigurationName = Release; 1028 | }; 1029 | C71140441A076A6C00E027E4 /* Build configuration list for PBXNativeTarget "VNNoteManagerTests" */ = { 1030 | isa = XCConfigurationList; 1031 | buildConfigurations = ( 1032 | C71140451A076A6C00E027E4 /* Debug */, 1033 | C71140461A076A6C00E027E4 /* Release */, 1034 | ); 1035 | defaultConfigurationIsVisible = 0; 1036 | defaultConfigurationName = Release; 1037 | }; 1038 | C7821A7E19480417008B952D /* Build configuration list for PBXProject "Voice2Note" */ = { 1039 | isa = XCConfigurationList; 1040 | buildConfigurations = ( 1041 | C7821AAD19480417008B952D /* Debug */, 1042 | C7821AAE19480417008B952D /* Release */, 1043 | ); 1044 | defaultConfigurationIsVisible = 0; 1045 | defaultConfigurationName = Release; 1046 | }; 1047 | C7821AAF19480417008B952D /* Build configuration list for PBXNativeTarget "Voice2Note" */ = { 1048 | isa = XCConfigurationList; 1049 | buildConfigurations = ( 1050 | C7821AB019480417008B952D /* Debug */, 1051 | C7821AB119480417008B952D /* Release */, 1052 | ); 1053 | defaultConfigurationIsVisible = 0; 1054 | defaultConfigurationName = Release; 1055 | }; 1056 | C7821AB219480417008B952D /* Build configuration list for PBXNativeTarget "Voice2NoteTests" */ = { 1057 | isa = XCConfigurationList; 1058 | buildConfigurations = ( 1059 | C7821AB319480417008B952D /* Debug */, 1060 | C7821AB419480417008B952D /* Release */, 1061 | ); 1062 | defaultConfigurationIsVisible = 0; 1063 | defaultConfigurationName = Release; 1064 | }; 1065 | /* End XCConfigurationList section */ 1066 | }; 1067 | rootObject = C7821A7B19480417008B952D /* Project object */; 1068 | } 1069 | -------------------------------------------------------------------------------- /Voice2Note.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Voice2Note.xcodeproj/xcuserdata/liaojinxing.xcuserdatad/xcschemes/Voice2Note.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 57 | 63 | 64 | 65 | 66 | 67 | 73 | 74 | 75 | 76 | 85 | 86 | 92 | 93 | 94 | 95 | 96 | 97 | 103 | 104 | 110 | 111 | 112 | 113 | 115 | 116 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /Voice2Note.xcodeproj/xcuserdata/liaojinxing.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | VNNoteManager.xcscheme 8 | 9 | orderHint 10 | 5 11 | 12 | Voice2Note Widget.xcscheme 13 | 14 | orderHint 15 | 4 16 | 17 | Voice2Note.xcscheme 18 | 19 | isShown 20 | 21 | orderHint 22 | 0 23 | 24 | 25 | SuppressBuildableAutocreation 26 | 27 | C71140081A075E9100E027E4 28 | 29 | primary 30 | 31 | 32 | C71140261A076A6C00E027E4 33 | 34 | primary 35 | 36 | 37 | C71140301A076A6C00E027E4 38 | 39 | primary 40 | 41 | 42 | C7821A8219480417008B952D 43 | 44 | primary 45 | 46 | 47 | C7821A9D19480417008B952D 48 | 49 | primary 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Voice2Note.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Voice2Note/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Voice2Note/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "NoteListController.h" 11 | #import "VNConstants.h" 12 | #import "WXApi.h" 13 | #import "Colours.h" 14 | #import "VNNote.h" 15 | #import "NoteManager.h" 16 | #import "UIColor+VNHex.h" 17 | #import "MobClick.h" 18 | 19 | @implementation AppDelegate 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 22 | { 23 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 24 | [self addInitFileIfNeeded]; 25 | // Override point for customization after application launch. 26 | self.window.backgroundColor = [UIColor whiteColor]; 27 | 28 | NoteListController *controller = [[NoteListController alloc] init]; 29 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:controller]; 30 | 31 | /* customize navigation style */ 32 | [[UINavigationBar appearance] setBarTintColor:[UIColor systemColor]]; 33 | [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; 34 | NSDictionary *navbarTitleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys: 35 | [UIColor whiteColor],NSForegroundColorAttributeName, 36 | nil]; 37 | [[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes]; 38 | 39 | [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; 40 | 41 | self.window.rootViewController = navigationController; 42 | 43 | [self.window makeKeyAndVisible]; 44 | 45 | [WXApi registerApp:kWeixinAppID]; 46 | 47 | [MobClick startWithAppkey:@"53c7945356240bd36002dabe" reportPolicy:BATCH channelId:nil]; 48 | 49 | return YES; 50 | } 51 | 52 | - (void)applicationWillResignActive:(UIApplication *)application 53 | { 54 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 55 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 56 | } 57 | 58 | - (void)applicationDidEnterBackground:(UIApplication *)application 59 | { 60 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 61 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 62 | } 63 | 64 | - (void)applicationWillEnterForeground:(UIApplication *)application 65 | { 66 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 67 | } 68 | 69 | - (void)applicationDidBecomeActive:(UIApplication *)application 70 | { 71 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 72 | } 73 | 74 | - (void)applicationWillTerminate:(UIApplication *)application 75 | { 76 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 77 | } 78 | 79 | 80 | - (void)addInitFileIfNeeded 81 | { 82 | NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; 83 | if (![userDefaults objectForKey:@"hasInitFile"]) { 84 | VNNote *note = [[VNNote alloc] initWithTitle:nil 85 | content:NSLocalizedString(@"AboutText", @"") 86 | createdDate:[NSDate date] 87 | updateDate:[NSDate date]]; 88 | [[NoteManager sharedManager] storeNote:note]; 89 | [userDefaults setBool:YES forKey:@"hasInitFile"]; 90 | [userDefaults synchronize]; 91 | } 92 | } 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /Voice2Note/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "logo_58.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "40x40", 11 | "idiom" : "iphone", 12 | "filename" : "logo_80.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "60x60", 17 | "idiom" : "iphone", 18 | "filename" : "logo_120.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "idiom" : "iphone", 23 | "size" : "60x60", 24 | "scale" : "3x" 25 | }, 26 | { 27 | "idiom" : "ipad", 28 | "size" : "29x29", 29 | "scale" : "1x" 30 | }, 31 | { 32 | "idiom" : "ipad", 33 | "size" : "29x29", 34 | "scale" : "2x" 35 | }, 36 | { 37 | "idiom" : "ipad", 38 | "size" : "40x40", 39 | "scale" : "1x" 40 | }, 41 | { 42 | "idiom" : "ipad", 43 | "size" : "40x40", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "idiom" : "ipad", 48 | "size" : "76x76", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "size" : "76x76", 54 | "scale" : "2x" 55 | } 56 | ], 57 | "info" : { 58 | "version" : 1, 59 | "author" : "xcode" 60 | } 61 | } -------------------------------------------------------------------------------- /Voice2Note/Images.xcassets/AppIcon.appiconset/logo_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Images.xcassets/AppIcon.appiconset/logo_120.png -------------------------------------------------------------------------------- /Voice2Note/Images.xcassets/AppIcon.appiconset/logo_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Images.xcassets/AppIcon.appiconset/logo_58.png -------------------------------------------------------------------------------- /Voice2Note/Images.xcassets/AppIcon.appiconset/logo_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Images.xcassets/AppIcon.appiconset/logo_80.png -------------------------------------------------------------------------------- /Voice2Note/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "filename" : "spalash_960.png", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "spalash.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | }, 20 | { 21 | "orientation" : "portrait", 22 | "idiom" : "ipad", 23 | "extent" : "full-screen", 24 | "minimum-system-version" : "7.0", 25 | "scale" : "1x" 26 | }, 27 | { 28 | "orientation" : "landscape", 29 | "idiom" : "ipad", 30 | "extent" : "full-screen", 31 | "minimum-system-version" : "7.0", 32 | "scale" : "1x" 33 | }, 34 | { 35 | "orientation" : "portrait", 36 | "idiom" : "ipad", 37 | "extent" : "full-screen", 38 | "minimum-system-version" : "7.0", 39 | "scale" : "2x" 40 | }, 41 | { 42 | "orientation" : "landscape", 43 | "idiom" : "ipad", 44 | "extent" : "full-screen", 45 | "minimum-system-version" : "7.0", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Voice2Note/Images.xcassets/LaunchImage.launchimage/spalash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Images.xcassets/LaunchImage.launchimage/spalash.png -------------------------------------------------------------------------------- /Voice2Note/Images.xcassets/LaunchImage.launchimage/spalash_960.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Images.xcassets/LaunchImage.launchimage/spalash_960.png -------------------------------------------------------------------------------- /Voice2Note/Resource/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | Voice2Note 4 | 5 | Created by liaojinxing on 14-6-11. 6 | Copyright (c) 2014年 jinxing. All rights reserved. 7 | */ 8 | 9 | 10 | // Home 11 | 12 | "AppName" = "懒人笔记"; 13 | 14 | "HomeButtonItemMoreAction" = "更多"; 15 | "HomeButtonItemListAction" = "过往"; 16 | 17 | "TextPlaceHolder" = ""; 18 | "SpeechNoResult" = "无识别结果"; 19 | 20 | "ActionSheetCancel" = "取消"; 21 | "ActionSheetSave" = "保存"; 22 | "ActionSheetCopy" = "复制"; 23 | "ActionSheetMail" = "发邮件"; 24 | "ActionSheetWeixin" = "分享到朋友圈"; 25 | 26 | "AddTitleForNote" = "给笔记加个标题?"; 27 | "Sure" = "确定"; 28 | 29 | "CopySuccess" = "已复制到粘贴板"; 30 | "DeleteFileSuccess" = "删除成功"; 31 | 32 | "SendEmailSuccess" = "邮件发送成功"; 33 | "SendEmailFail" = "邮件发送失败"; 34 | "CanNoteSendMail" = "无法发送邮件,请检查设备设置"; 35 | 36 | "VoiceInput" = "语音输入"; 37 | "ImageInputTitle" = "图片输入"; 38 | "ImageInputMessage" = "选择一张带有文字的图片,懒人笔记将会识别出图片中的文字。请尽量使用清晰度较高,背景单纯的图片"; 39 | "ImageInputCancel" = "知道了"; 40 | "ImageInputSure" = "识别一下"; 41 | 42 | "SaveSuccess" = "保存成功"; 43 | "SaveFail" = "保存失败"; 44 | 45 | "InputViewTitle" = "标题"; 46 | "InputViewText" = "正文"; 47 | "InputTextNoData" = "请输入文字"; 48 | "NoTitleNote" = "无标题笔记"; 49 | 50 | "Recognizing" = "识别中..."; 51 | "RecognizeFail" = "识别文字失败"; 52 | 53 | // About 54 | "AboutTitle" = "关于懒人笔记"; 55 | "AboutText" = "懒人笔记是一款为懒人设计的笔记本,你只需要通过语音输入,即可完成笔记的书写。\n同时支持发邮件,分享到朋友圈等附加功能。\n大部分情况下你无需动笔,只需要靠说,就可以记下所思所想,是提高效率的好工具。\n开发者:http://github.com/liaojinxing\n"; 56 | 57 | // Address book 58 | "GotoUploadAB" = "去上传"; 59 | "UploadABForBetter" = "上传联系人,可以使语音识别人名更加精确。请放心,上传的数据仅用于提高语音识别准确度,不作其它用途"; 60 | 61 | -------------------------------------------------------------------------------- /Voice2Note/Resource/ic_add_tab@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/ic_add_tab@2x.png -------------------------------------------------------------------------------- /Voice2Note/Resource/ic_more_white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/ic_more_white@2x.png -------------------------------------------------------------------------------- /Voice2Note/Resource/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/logo/logo.png -------------------------------------------------------------------------------- /Voice2Note/Resource/logo/logo_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/logo/logo_120.png -------------------------------------------------------------------------------- /Voice2Note/Resource/logo/logo_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/logo/logo_58.png -------------------------------------------------------------------------------- /Voice2Note/Resource/logo/logo_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/logo/logo_80.png -------------------------------------------------------------------------------- /Voice2Note/Resource/logo/spalash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/logo/spalash.png -------------------------------------------------------------------------------- /Voice2Note/Resource/logo/spalash_960.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/logo/spalash_960.png -------------------------------------------------------------------------------- /Voice2Note/Resource/micro_small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/micro_small@2x.png -------------------------------------------------------------------------------- /Voice2Note/Resource/save@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Resource/save@2x.png -------------------------------------------------------------------------------- /Voice2Note/Source/AppContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppContext.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-30. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppContext : NSObject 12 | 13 | + (instancetype)appContext; 14 | 15 | @property (nonatomic, assign) BOOL hasUploadAddressBook; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Voice2Note/Source/AppContext.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppContext.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-30. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "AppContext.h" 10 | 11 | static NSString* kHasUploadAddressBookKey = @"kHasUploadAddressBookKey"; 12 | 13 | @implementation AppContext 14 | 15 | + (instancetype)appContext 16 | { 17 | static id instance = nil; 18 | static dispatch_once_t onceToken = 0L; 19 | dispatch_once(&onceToken, ^{ 20 | instance = [[AppContext alloc] init]; 21 | }); 22 | return instance; 23 | } 24 | 25 | - (BOOL)hasUploadAddressBook 26 | { 27 | return [[[NSUserDefaults standardUserDefaults] objectForKey:kHasUploadAddressBookKey] boolValue]; 28 | } 29 | 30 | - (void)setHasUploadAddressBook:(BOOL)hasUploadAddressBook 31 | { 32 | [[NSUserDefaults standardUserDefaults] setBool:hasUploadAddressBook forKey:kHasUploadAddressBookKey]; 33 | [[NSUserDefaults standardUserDefaults] synchronize]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Voice2Note/Source/Common/NSDate+Conversion.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+Conversion.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14/11/3. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDate (Conversion) 12 | 13 | + (BOOL)isSameDay:(NSDate *)firstDate andDate:(NSDate *)secondDate; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Voice2Note/Source/Common/NSDate+Conversion.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+Conversion.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14/11/3. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "NSDate+Conversion.h" 10 | 11 | @implementation NSDate(Conversion) 12 | 13 | + (BOOL)isSameDay:(NSDate *)firstDate andDate:(NSDate *)secondDate 14 | { 15 | return [NSDate daysBetweenDate:firstDate andDate:secondDate] == 0 ? YES : NO; 16 | } 17 | 18 | + (NSInteger)daysBetweenDate:(NSDate *)firstDate andDate:(NSDate *)secondDate 19 | { 20 | if (firstDate == nil || secondDate == nil) { 21 | return NSIntegerMax; 22 | } 23 | NSCalendar *currentCalendar = [NSCalendar currentCalendar]; 24 | NSDateComponents *components = [currentCalendar components:NSCalendarUnitDay 25 | fromDate:firstDate 26 | toDate:secondDate 27 | options:0]; 28 | NSInteger days = [components day]; 29 | return days; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Voice2Note/Source/Common/UIColor+VNHex.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+VNHex.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-12. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (VNHex) 12 | 13 | + (UIColor *) colorWithHex:(NSInteger)rgbHexValue; 14 | 15 | + (UIColor *) colorWithHex:(NSInteger)rgbHexValue alpha:(CGFloat)alpha; 16 | 17 | + (UIColor *)systemColor; 18 | 19 | + (UIColor *)systemDarkColor; 20 | 21 | + (UIColor *)grayBackgroudColor; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Voice2Note/Source/Common/UIColor+VNHex.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+VNHex.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-12. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "UIColor+VNHex.h" 10 | #import "Colours.h" 11 | 12 | @implementation UIColor (VNHex) 13 | 14 | + (UIColor *) colorWithHex:(NSInteger)rgbHexValue { 15 | return [UIColor colorWithHex:rgbHexValue alpha:1.0]; 16 | } 17 | 18 | + (UIColor *)colorWithHex:(NSInteger)rgbHexValue 19 | alpha:(CGFloat)alpha { 20 | return [UIColor colorWithRed:((float)((rgbHexValue & 0xFF0000) >> 16))/255.0 21 | green:((float)((rgbHexValue & 0xFF00) >> 8))/255.0 22 | blue:((float)(rgbHexValue & 0xFF))/255.0 23 | alpha:alpha]; 24 | } 25 | 26 | + (UIColor *)systemColor 27 | { 28 | return [UIColor emeraldColor]; 29 | } 30 | 31 | + (UIColor *)systemDarkColor 32 | { 33 | return [UIColor hollyGreenColor]; 34 | } 35 | 36 | + (UIColor *)grayBackgroudColor 37 | { 38 | return [UIColor colorWithHex:0xF9FFFF]; 39 | } 40 | 41 | 42 | @end -------------------------------------------------------------------------------- /Voice2Note/Source/Common/VNConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // VNConstants.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | extern NSString *const kIFlyAppID; 13 | extern NSString *const kWeixinAppID; 14 | extern NSString *const kAppName; 15 | extern NSString *const kAppEngName; 16 | 17 | extern CGFloat const kHorizontalMargin; 18 | extern CGFloat const kVerticalMargin; 19 | 20 | extern NSString *const kNotificationCreateFile; 21 | 22 | 23 | extern NSString *const kEventAddNewNote; 24 | extern NSString *const kEventShareToWeixin; 25 | extern NSString *const kEventClickVoiceButton; -------------------------------------------------------------------------------- /Voice2Note/Source/Common/VNConstants.m: -------------------------------------------------------------------------------- 1 | // 2 | // VNConstants.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "VNConstants.h" 10 | 11 | NSString *const kIFlyAppID = @"5396d66c"; 12 | NSString *const kWeixinAppID = @"wxbe1a37e2f14d870c"; 13 | NSString *const kAppName = @"懒人笔记"; 14 | NSString *const kAppEngName = @"Voice2Note"; 15 | 16 | CGFloat const kHorizontalMargin = 10.f; 17 | CGFloat const kVerticalMargin = 10.f; 18 | 19 | NSString *const kNotificationCreateFile = @"kNotificationCreateFile"; 20 | 21 | NSString *const kEventAddNewNote = @"AddNewNote"; 22 | NSString *const kEventShareToWeixin = @"ShareToWeixin"; 23 | NSString *const kEventClickVoiceButton = @"ClickVoiceButton"; 24 | -------------------------------------------------------------------------------- /Voice2Note/Source/Controller/NoteDetailController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NoteDetailController.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VNNote.h" 11 | 12 | @interface NoteDetailController : UIViewController 13 | 14 | - (instancetype)initWithNote:(VNNote *)note; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Voice2Note/Source/Controller/NoteDetailController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NoteDetailController.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "NoteDetailController.h" 10 | #import "SVProgressHUD.h" 11 | #import "VNConstants.h" 12 | #import "iflyMSC/IFlyRecognizerView.h" 13 | #import "iflyMSC/IFlySpeechConstant.h" 14 | #import "iflyMSC/IFlySpeechUtility.h" 15 | #import "iflyMSC/IFlyRecognizerView.h" 16 | #import "iflyMSC/IFlyDataUploader.h" 17 | #import "iflyMSC/IFlyContact.h" 18 | #import "WXApi.h" 19 | #import "Colours.h" 20 | #import "UIColor+VNHex.h" 21 | #import "AppContext.h" 22 | #import "MobClick.h" 23 | @import MessageUI; 24 | 25 | static const CGFloat kViewOriginY = 70; 26 | static const CGFloat kTextFieldHeight = 30; 27 | static const CGFloat kToolbarHeight = 44; 28 | static const CGFloat kVoiceButtonWidth = 100; 29 | 30 | @interface NoteDetailController () 32 | { 33 | VNNote *_note; 34 | UITextView *_contentTextView; 35 | 36 | UIButton *_voiceButton; 37 | IFlyRecognizerView *_iflyRecognizerView; 38 | BOOL _isEditingTitle; 39 | } 40 | 41 | @end 42 | 43 | 44 | @implementation NoteDetailController 45 | 46 | - (instancetype)initWithNote:(VNNote *)note 47 | { 48 | self = [super init]; 49 | if (self) { 50 | _note = note; 51 | } 52 | return self; 53 | } 54 | 55 | - (void)viewDidLoad 56 | { 57 | [super viewDidLoad]; 58 | [self.view setBackgroundColor:[UIColor whiteColor]]; 59 | [self initComps]; 60 | [self setupNavigationBar]; 61 | [self setupSpeechRecognizer]; 62 | 63 | [[NSNotificationCenter defaultCenter] addObserver:self 64 | selector:@selector(keyboardWillShow:) 65 | name:UIKeyboardWillShowNotification 66 | object:nil]; 67 | 68 | [[NSNotificationCenter defaultCenter] addObserver:self 69 | selector:@selector(keyboardWillHide:) 70 | name:UIKeyboardWillHideNotification 71 | object:nil]; 72 | } 73 | 74 | - (void)dealloc 75 | { 76 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 77 | } 78 | 79 | - (void)setupNavigationBar 80 | { 81 | UIBarButtonItem *saveItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"ActionSheetSave", @"") 82 | style:UIBarButtonItemStylePlain 83 | target:self 84 | action:@selector(save)]; 85 | 86 | UIBarButtonItem *moreItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_more_white"] 87 | style:UIBarButtonItemStylePlain 88 | target:self 89 | action:@selector(moreActionButtonPressed)]; 90 | self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:moreItem, saveItem, nil]; 91 | } 92 | 93 | - (void)setupSpeechRecognizer 94 | { 95 | NSString *initString = [NSString stringWithFormat:@"%@=%@", [IFlySpeechConstant APPID], kIFlyAppID]; 96 | 97 | [IFlySpeechUtility createUtility:initString]; 98 | _iflyRecognizerView = [[IFlyRecognizerView alloc] initWithCenter:self.view.center]; 99 | _iflyRecognizerView.delegate = self; 100 | 101 | [_iflyRecognizerView setParameter:@"iat" forKey:[IFlySpeechConstant IFLY_DOMAIN]]; 102 | [_iflyRecognizerView setParameter:@"asr.pcm" forKey:[IFlySpeechConstant ASR_AUDIO_PATH]]; 103 | [_iflyRecognizerView setParameter:@"plain" forKey:[IFlySpeechConstant RESULT_TYPE]]; 104 | } 105 | 106 | - (void)initComps 107 | { 108 | CGRect frame = CGRectMake(kHorizontalMargin, kViewOriginY, self.view.frame.size.width - kHorizontalMargin * 2, kTextFieldHeight); 109 | 110 | UIBarButtonItem *doneBarButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:self action:@selector(hideKeyboard)]; 111 | doneBarButton.width = ceilf(self.view.frame.size.width) / 3 - 30; 112 | 113 | UIBarButtonItem *voiceBarButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"micro_small"] style:UIBarButtonItemStylePlain target:self action:@selector(useVoiceInput)]; 114 | voiceBarButton.width = ceilf(self.view.frame.size.width) / 3; 115 | 116 | UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, kToolbarHeight)]; 117 | toolbar.tintColor = [UIColor systemColor]; 118 | toolbar.items = [NSArray arrayWithObjects:doneBarButton, voiceBarButton, nil]; 119 | 120 | frame = CGRectMake(kHorizontalMargin, 121 | 0, 122 | self.view.frame.size.width - kHorizontalMargin * 2, 123 | self.view.frame.size.height - kVoiceButtonWidth - kVerticalMargin * 2); 124 | _contentTextView = [[UITextView alloc] initWithFrame:frame]; 125 | _contentTextView.textColor = [UIColor systemDarkColor]; 126 | _contentTextView.font = [UIFont systemFontOfSize:16]; 127 | _contentTextView.autocorrectionType = UITextAutocorrectionTypeNo; 128 | _contentTextView.autocapitalizationType = UITextAutocapitalizationTypeNone; 129 | [_contentTextView setScrollEnabled:YES]; 130 | if (_note) { 131 | _contentTextView.text = _note.content; 132 | } 133 | _contentTextView.inputAccessoryView = toolbar; 134 | [self.view addSubview:_contentTextView]; 135 | 136 | _voiceButton = [UIButton buttonWithType:UIButtonTypeCustom]; 137 | [_voiceButton setFrame:CGRectMake((self.view.frame.size.width - kVoiceButtonWidth) / 2, self.view.frame.size.height - kVoiceButtonWidth - kVerticalMargin, kVoiceButtonWidth, kVoiceButtonWidth)]; 138 | [_voiceButton setTitle:NSLocalizedString(@"VoiceInput", @"") forState:UIControlStateNormal]; 139 | [_voiceButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 140 | _voiceButton.layer.cornerRadius = kVoiceButtonWidth / 2; 141 | _voiceButton.layer.masksToBounds = YES; 142 | [_voiceButton setBackgroundColor:[UIColor systemColor]]; 143 | [_voiceButton addTarget:self action:@selector(useVoiceInput) forControlEvents:UIControlEventTouchUpInside]; 144 | [_voiceButton setTintColor:[UIColor whiteColor]]; 145 | [self.view addSubview:_voiceButton]; 146 | } 147 | 148 | - (void)viewWillDisappear:(BOOL)animated 149 | { 150 | [super viewWillDisappear:animated]; 151 | [self save]; 152 | } 153 | 154 | - (void)startListenning 155 | { 156 | [_iflyRecognizerView start]; 157 | NSLog(@"start listenning..."); 158 | } 159 | 160 | - (void)useVoiceInput 161 | { 162 | if (![AppContext appContext].hasUploadAddressBook) { 163 | UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil 164 | message:NSLocalizedString(@"UploadABForBetter", @"") 165 | delegate:self 166 | cancelButtonTitle:NSLocalizedString(@"ActionSheetCancel", @"") 167 | otherButtonTitles:NSLocalizedString(@"GotoUploadAB", @""), nil]; 168 | [alertView show]; 169 | [[AppContext appContext] setHasUploadAddressBook:YES]; 170 | return; 171 | } 172 | 173 | [self hideKeyboard]; 174 | [self startListenning]; 175 | [MobClick event:kEventClickVoiceButton]; 176 | } 177 | 178 | - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 179 | { 180 | if (buttonIndex == 1) { 181 | IFlyDataUploader *_uploader = [[IFlyDataUploader alloc] init]; 182 | IFlyContact *iFlyContact = [[IFlyContact alloc] init]; NSString *contactList = [iFlyContact contact]; 183 | [_uploader setParameter:@"uup" forKey:@"subject"]; 184 | [_uploader setParameter:@"contact" forKey:@"dtt"]; 185 | //启动上传 186 | [_uploader uploadDataWithCompletionHandler:^(NSString *grammerID, IFlySpeechError *error) { 187 | [SVProgressHUD showSuccessWithStatus:@"上传成功"]; 188 | } name:@"contact" data:contactList]; 189 | } 190 | } 191 | 192 | #pragma mark IFlyRecognizerViewDelegate 193 | 194 | - (void)onResult:(NSArray *)resultArray isLast:(BOOL)isLast 195 | { 196 | NSMutableString *result = [[NSMutableString alloc] init]; 197 | NSDictionary *dic = [resultArray objectAtIndex:0]; 198 | for (NSString *key in dic) { 199 | [result appendFormat:@"%@", key]; 200 | } 201 | _contentTextView.text = [NSString stringWithFormat:@"%@%@", _contentTextView.text, result]; 202 | } 203 | 204 | - (void)onError:(IFlySpeechError *)error 205 | { 206 | NSLog(@"errorCode:%@", [error errorDesc]); 207 | } 208 | 209 | #pragma mark - Keyboard 210 | 211 | - (void)keyboardWillShow:(NSNotification *)notification 212 | { 213 | NSDictionary *userInfo = notification.userInfo; 214 | [UIView animateWithDuration:[userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue] 215 | delay:0.f 216 | options:[userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue] 217 | animations:^ 218 | { 219 | CGRect keyboardFrame = [[userInfo valueForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue]; 220 | CGFloat keyboardHeight = keyboardFrame.size.height; 221 | 222 | CGRect frame = _contentTextView.frame; 223 | frame.size.height = self.view.frame.size.height - kViewOriginY - kTextFieldHeight - keyboardHeight - kVerticalMargin - kToolbarHeight, 224 | _contentTextView.frame = frame; 225 | } completion:NULL]; 226 | } 227 | 228 | - (void)keyboardWillHide:(NSNotification *)notification 229 | { 230 | NSDictionary *userInfo = notification.userInfo; 231 | [UIView animateWithDuration:[userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue] 232 | delay:0.f 233 | options:[userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue] 234 | animations:^ 235 | { 236 | CGRect frame = _contentTextView.frame; 237 | frame.size.height = self.view.frame.size.height - kViewOriginY - kTextFieldHeight - kVoiceButtonWidth - kVerticalMargin * 3; 238 | _contentTextView.frame = frame; 239 | } completion:NULL]; 240 | } 241 | 242 | - (void)hideKeyboard 243 | { 244 | if ([_contentTextView isFirstResponder]) { 245 | _isEditingTitle = NO; 246 | [_contentTextView resignFirstResponder]; 247 | } 248 | } 249 | 250 | #pragma mark - Save 251 | 252 | - (void)save 253 | { 254 | [self hideKeyboard]; 255 | if ((_contentTextView.text == nil || _contentTextView.text.length == 0)) { 256 | return; 257 | } 258 | NSDate *createDate; 259 | if (_note && _note.createdDate) { 260 | createDate = _note.createdDate; 261 | } else { 262 | createDate = [NSDate date]; 263 | } 264 | VNNote *note = [[VNNote alloc] initWithTitle:nil 265 | content:_contentTextView.text 266 | createdDate:createDate 267 | updateDate:[NSDate date]]; 268 | _note = note; 269 | BOOL success = [note Persistence]; 270 | if (success) { 271 | [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationCreateFile object:nil userInfo:nil]; 272 | } else { 273 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"SaveFail", @"")]; 274 | } 275 | [self.navigationController popViewControllerAnimated:YES]; 276 | } 277 | 278 | #pragma mark - More Action 279 | 280 | - (void)moreActionButtonPressed 281 | { 282 | [self hideKeyboard]; 283 | UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil 284 | delegate:self 285 | cancelButtonTitle:NSLocalizedString(@"ActionSheetCancel", @"") 286 | destructiveButtonTitle:nil 287 | otherButtonTitles:NSLocalizedString(@"ActionSheetCopy", @""), 288 | NSLocalizedString(@"ActionSheetMail", @""), 289 | NSLocalizedString(@"ActionSheetWeixin", @""), nil]; 290 | [actionSheet showInView:self.view]; 291 | } 292 | 293 | - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex 294 | { 295 | if (buttonIndex == 0) { 296 | UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; 297 | pasteboard.string = _contentTextView.text; 298 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"CopySuccess", @"")]; 299 | } else if (buttonIndex == 1) { 300 | if ([MFMailComposeViewController canSendMail]) { 301 | [self sendEmail]; 302 | } else { 303 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"CanNoteSendMail", @"")]; 304 | } 305 | } else if (buttonIndex == 2) { 306 | [self shareToWeixin]; 307 | } 308 | } 309 | 310 | #pragma mark - Eail 311 | 312 | - (void)sendEmail 313 | { 314 | MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; 315 | [composer setMailComposeDelegate:self]; 316 | if ([MFMailComposeViewController canSendMail]) { 317 | [composer setSubject:@"来自懒人笔记的一封信"]; 318 | [composer setMessageBody:_contentTextView.text isHTML:NO]; 319 | [composer setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; 320 | [self presentViewController:composer animated:YES completion:nil]; 321 | } else { 322 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"CanNoteSendMail", @"")]; 323 | } 324 | } 325 | 326 | - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error 327 | { 328 | if (result == MFMailComposeResultFailed) { 329 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"SendEmailFail", @"")]; 330 | } else if (result == MFMailComposeResultSent) { 331 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"SendEmailSuccess", @"")]; 332 | } 333 | [controller dismissViewControllerAnimated:YES completion:nil]; 334 | } 335 | 336 | #pragma mark - Weixin 337 | 338 | - (void)shareToWeixin 339 | { 340 | if (_contentTextView.text == nil || _contentTextView.text.length == 0) { 341 | [SVProgressHUD showErrorWithStatus:NSLocalizedString(@"InputTextNoData", @"")]; 342 | return; 343 | } 344 | 345 | SendMessageToWXReq *req = [[SendMessageToWXReq alloc] init]; 346 | req.text = _contentTextView.text; 347 | req.bText = YES; 348 | req.scene = WXSceneTimeline; 349 | [WXApi sendReq:req]; 350 | [MobClick event:kEventShareToWeixin]; 351 | } 352 | 353 | @end 354 | -------------------------------------------------------------------------------- /Voice2Note/Source/Controller/NoteListCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NoteListCell.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-12. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VNNote.h" 11 | 12 | @interface NoteListCell : UITableViewCell 13 | 14 | @property (nonatomic, assign) NSInteger index; 15 | 16 | + (CGFloat)heightWithNote:(VNNote *)note; 17 | - (void)updateWithNote:(VNNote *)note; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Voice2Note/Source/Controller/NoteListCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // NoteListCell.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-12. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "NoteListCell.h" 10 | #import "UIColor+VNHex.h" 11 | #import "VNConstants.h" 12 | #import "Colours.h" 13 | 14 | static const CGFloat kCellHorizontalMargin = 0; 15 | static const CGFloat kCellPadding = 15; 16 | static const CGFloat kVerticalPadding = 0; 17 | static const CGFloat kLabelHeight = 15; 18 | 19 | static const CGFloat kMaxTitleHeight = 180; 20 | 21 | @interface NoteListCell () 22 | { 23 | UIView *_backgroundView; 24 | UILabel *_titleLabel; 25 | UILabel *_timeLabel; 26 | } 27 | 28 | @end 29 | 30 | @implementation NoteListCell 31 | 32 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 33 | { 34 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 35 | if (self) { 36 | self.backgroundColor = [UIColor systemColor]; 37 | self.contentView.backgroundColor = [UIColor systemColor]; 38 | _backgroundView = [[UIView alloc] initWithFrame:CGRectMake(kCellHorizontalMargin, 39 | kVerticalPadding, 40 | [UIScreen mainScreen].bounds.size.width - kCellHorizontalMargin * 2, 41 | 0)]; 42 | _backgroundView.layer.cornerRadius = 0.0f; 43 | _backgroundView.layer.masksToBounds = YES; 44 | [_backgroundView setBackgroundColor:[UIColor grayBackgroudColor]]; 45 | [self.contentView addSubview:_backgroundView]; 46 | 47 | _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kCellPadding, kCellPadding, _backgroundView.frame.size.width - kCellPadding * 2, 0)]; 48 | [_titleLabel setTextColor:[UIColor charcoalColor]]; 49 | [_titleLabel setFont:[UIFont boldSystemFontOfSize:17]]; 50 | [_titleLabel setNumberOfLines:0]; 51 | [_backgroundView addSubview:_titleLabel]; 52 | 53 | _timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kCellPadding, kCellPadding, _backgroundView.frame.size.width - kCellPadding * 2, kLabelHeight)]; 54 | [_timeLabel setTextColor:[UIColor charcoalColor]]; 55 | [_timeLabel setFont:[UIFont systemFontOfSize:10]]; 56 | [_timeLabel setTextAlignment:NSTextAlignmentRight]; 57 | [_backgroundView addSubview:_timeLabel]; 58 | 59 | self.selectionStyle = UITableViewCellSelectionStyleNone; 60 | } 61 | return self; 62 | } 63 | 64 | - (void)updateWithNote:(VNNote *)note 65 | { 66 | NSString *string = note.title; 67 | [_titleLabel setText:note.title]; 68 | if (!note.title || note.title.length <= 0 || [note.title isEqualToString:NSLocalizedString(@"NoTitleNote", @"")]) { 69 | string = note.content; 70 | [_titleLabel setText:note.content]; 71 | } 72 | CGFloat titleHeight = [[self class] heightWithString:string 73 | width:_backgroundView.frame.size.width - kCellPadding * 2]; 74 | CGRect titleFrame = _titleLabel.frame; 75 | titleFrame.size.height = titleHeight; 76 | _titleLabel.frame = titleFrame; 77 | 78 | CGRect timeFrame = _timeLabel.frame; 79 | timeFrame.origin.y = kCellPadding + titleHeight; 80 | _timeLabel.frame = timeFrame; 81 | 82 | CGRect bgFrame = _backgroundView.frame; 83 | bgFrame.size.height = [[self class] heightWithNote:note] - kVerticalPadding * 2; 84 | _backgroundView.frame = bgFrame; 85 | 86 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 87 | [formatter setDateFormat:@"yyyy-MM-dd HH:mm"]; 88 | [_timeLabel setText:[formatter stringFromDate:note.createdDate]]; 89 | } 90 | 91 | + (CGFloat)heightWithNote:(VNNote *)note 92 | { 93 | CGFloat screenWidth = [[UIScreen mainScreen] bounds].size.width; 94 | NSString *string = note.title; 95 | if (!note.title || note.title.length <= 0 || [note.title isEqualToString:NSLocalizedString(@"NoTitleNote", @"")]) { 96 | string = note.content; 97 | } 98 | CGFloat titleHeight = [[self class] heightWithString:string width:screenWidth - kCellHorizontalMargin * 2 - kCellPadding * 2]; 99 | return kVerticalPadding + kCellPadding + titleHeight + kLabelHeight + kCellPadding + kVerticalPadding; 100 | } 101 | 102 | + (CGFloat)heightWithString:(NSString *)string width:(CGFloat)width 103 | { 104 | NSDictionary *attributes = @{ NSFontAttributeName: [UIFont boldSystemFontOfSize:17] }; 105 | CGSize size = [string boundingRectWithSize:CGSizeMake(width, kMaxTitleHeight) 106 | options:NSStringDrawingUsesLineFragmentOrigin 107 | attributes:attributes 108 | context:nil].size; 109 | return ceilf(size.height); 110 | } 111 | 112 | @end 113 | -------------------------------------------------------------------------------- /Voice2Note/Source/Controller/NoteListController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NoteListController.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NoteListController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Voice2Note/Source/Controller/NoteListController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NoteListController.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "NoteListController.h" 10 | #import "NoteManager.h" 11 | #import "NoteDetailController.h" 12 | #import "VNNote.h" 13 | #import "VNConstants.h" 14 | #import "NoteListCell.h" 15 | #import "MobClick.h" 16 | #import "iflyMSC/IFlyRecognizerView.h" 17 | #import "iflyMSC/IFlySpeechConstant.h" 18 | #import "iflyMSC/IFlyRecognizerView.h" 19 | #import "iflyMSC/IFlySpeechUtility.h" 20 | #import "SVProgressHUD.h" 21 | #import "UIColor+VNHex.h" 22 | 23 | @interface NoteListController () 24 | { 25 | IFlyRecognizerView *_iflyRecognizerView; 26 | NSMutableString *_resultString; 27 | } 28 | @property (nonatomic, strong) NSMutableArray *dataSource; 29 | 30 | @end 31 | 32 | @implementation NoteListController 33 | 34 | - (void)viewDidLoad 35 | { 36 | [super viewDidLoad]; 37 | [self setupNavigationBar]; 38 | [self setupVoiceRecognizerView]; 39 | self.view.backgroundColor = [UIColor whiteColor]; 40 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 41 | self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; 42 | [[NSNotificationCenter defaultCenter] addObserver:self 43 | selector:@selector(reloadData) 44 | name:kNotificationCreateFile 45 | object:nil]; 46 | } 47 | 48 | - (void)dealloc 49 | { 50 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 51 | [IFlySpeechUtility destroy]; 52 | } 53 | 54 | - (void)setupNavigationBar 55 | { 56 | UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"micro_small"] 57 | style:UIBarButtonItemStylePlain 58 | target:self 59 | action:@selector(createVoiceTask)]; 60 | self.navigationItem.leftBarButtonItem = leftItem; 61 | 62 | UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_add_tab"] 63 | style:UIBarButtonItemStylePlain 64 | target:self 65 | action:@selector(createTask)]; 66 | self.navigationItem.rightBarButtonItem = rightItem; 67 | self.navigationItem.title = kAppName; 68 | } 69 | 70 | - (void)setupVoiceRecognizerView 71 | { 72 | NSString *initString = [NSString stringWithFormat:@"%@=%@", [IFlySpeechConstant APPID], kIFlyAppID]; 73 | 74 | [IFlySpeechUtility createUtility:initString]; 75 | _iflyRecognizerView = [[IFlyRecognizerView alloc] initWithCenter:self.view.center]; 76 | _iflyRecognizerView.delegate = self; 77 | 78 | [_iflyRecognizerView setParameter:@"iat" forKey:[IFlySpeechConstant IFLY_DOMAIN]]; 79 | [_iflyRecognizerView setParameter:@"asr.pcm" forKey:[IFlySpeechConstant ASR_AUDIO_PATH]]; 80 | [_iflyRecognizerView setParameter:@"plain" forKey:[IFlySpeechConstant RESULT_TYPE]]; 81 | 82 | _resultString = [NSMutableString string]; 83 | } 84 | 85 | - (void)reloadData 86 | { 87 | _dataSource = [[NoteManager sharedManager] readAllNotes]; 88 | [self.tableView reloadData]; 89 | } 90 | 91 | - (NSMutableArray *)dataSource 92 | { 93 | if (!_dataSource) { 94 | _dataSource = [[NoteManager sharedManager] readAllNotes]; 95 | } 96 | return _dataSource; 97 | } 98 | 99 | - (void)createVoiceTask 100 | { 101 | [_iflyRecognizerView start]; 102 | } 103 | 104 | #pragma mark IFlyRecognizerViewDelegate 105 | 106 | - (void)onResult:(NSArray *)resultArray isLast:(BOOL)isLast 107 | { 108 | NSMutableString *result = [[NSMutableString alloc] init]; 109 | NSDictionary *dic = [resultArray objectAtIndex:0]; 110 | for (NSString *key in dic) { 111 | [result appendFormat:@"%@", key]; 112 | } 113 | [_resultString appendString:result]; 114 | if (isLast && _resultString.length > 0) { 115 | VNNote *note = [[VNNote alloc] initWithTitle:nil 116 | content:_resultString 117 | createdDate:[NSDate date] 118 | updateDate:[NSDate date]]; 119 | BOOL success = [note Persistence]; 120 | if (success) { 121 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"SaveSuccess", @"")]; 122 | [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationCreateFile object:nil userInfo:nil]; 123 | } else { 124 | [SVProgressHUD showSuccessWithStatus:NSLocalizedString(@"SaveFail", @"")]; 125 | } 126 | _resultString = [NSMutableString string]; 127 | } 128 | } 129 | 130 | - (void)onError:(IFlySpeechError *)error 131 | { 132 | NSLog(@"errorCode:%@", [error errorDesc]); 133 | } 134 | 135 | - (void)createTask 136 | { 137 | [MobClick event:kEventAddNewNote]; 138 | NoteDetailController *controller = [[NoteDetailController alloc] init]; 139 | [self.navigationController pushViewController:controller animated:YES]; 140 | } 141 | 142 | #pragma mark - DataSource & Delegate 143 | 144 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 145 | { 146 | return 1; 147 | } 148 | 149 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 150 | { 151 | VNNote *note = [self.dataSource objectAtIndex:indexPath.row]; 152 | return [NoteListCell heightWithNote:note]; 153 | } 154 | 155 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 156 | { 157 | return self.dataSource.count; 158 | } 159 | 160 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 161 | { 162 | NoteListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ListCell"]; 163 | if (!cell) { 164 | cell = [[NoteListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ListCell"]; 165 | } 166 | VNNote *note = [self.dataSource objectAtIndex:indexPath.row]; 167 | cell.index = indexPath.row; 168 | [cell updateWithNote:note]; 169 | return cell; 170 | } 171 | 172 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 173 | { 174 | [tableView deselectRowAtIndexPath:indexPath animated:NO]; 175 | VNNote *note = [self.dataSource objectAtIndex:indexPath.row]; 176 | NoteDetailController *controller = [[NoteDetailController alloc] initWithNote:note]; 177 | controller.hidesBottomBarWhenPushed = YES; 178 | [self.navigationController pushViewController:controller animated:YES]; 179 | } 180 | 181 | #pragma mark - EditMode 182 | 183 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath 184 | { 185 | return YES; 186 | } 187 | 188 | - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath 189 | { 190 | return UITableViewCellEditingStyleDelete; 191 | } 192 | 193 | -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 194 | { 195 | if (editingStyle == UITableViewCellEditingStyleDelete) { 196 | VNNote *note = [self.dataSource objectAtIndex:indexPath.row]; 197 | [[NoteManager sharedManager] deleteNote:note]; 198 | 199 | [self.dataSource removeObjectAtIndex:indexPath.row]; 200 | [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; 201 | } 202 | } 203 | 204 | @end 205 | -------------------------------------------------------------------------------- /Voice2Note/Source/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 23 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Voice2Note/Source/Library/Umeng/MobClick.h: -------------------------------------------------------------------------------- 1 | // 2 | // MobClick.h 3 | // MobClick 4 | // 5 | // Created by Aladdin on 2010-03-25. 6 | // Updated by Minghua on 2014-05-21. 7 | // Copyright (C) 2010-2014 Umeng.com . All rights reserved. 8 | // Version 3.1.2 , updated_at 2014-05-21. 9 | 10 | #import 11 | #import 12 | 13 | #define UMOnlineConfigDidFinishedNotification @"OnlineConfigDidFinishedNotification" 14 | #define XcodeAppVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] 15 | 16 | 17 | typedef enum { 18 | REALTIME = 0, //实时发送 19 | BATCH = 1, //启动发送 20 | SENDDAILY = 4, //每日发送 21 | SENDWIFIONLY = 5, //仅在WIFI下启动时发送 22 | SEND_INTERVAL = 6, //按最小间隔发送 23 | SEND_ON_EXIT = 7 //退出或进入后台时发送 24 | } ReportPolicy; 25 | 26 | @class CLLocation; 27 | 28 | /** MobClick是统计的核心类,本身不需要实例化,所有方法以类方法的形式提供. 29 | 目前发送策略有REALTIME,BATCH,SENDDAILY,SENDWIFIONLY,SEND_INTERVAL,SEND_ON_EXIT。 30 | 其中REALTIME,SENDWIFIONLY 只在模拟器和DEBUG模式下生效,真机release模式会自动改成BATCH。 31 | 关于发送策略的调整,请参见关于发送策略及发送策略变更的说明 32 | http://blog.umeng.com/index.php/2012/12/0601/ 33 | SEND_INTERVAL 为按最小间隔发送,默认为10秒,取值范围为10 到 86400(一天), 如果不在这个区间的话,会按10设置。 34 | SEND_ON_EXIT 为退出或进入后台时发送,这种发送策略在App运行过程中不发送,对开发者和用户的影响最小。 35 | 不过这种发送策略只在iOS > 4.0时才会生效, iOS < 4.0 会被自动调整为BATCH。 36 | 37 | */ 38 | @interface MobClick : NSObject 39 | #pragma mark basics 40 | 41 | ///--------------------------------------------------------------------------------------- 42 | /// @name 设置 43 | ///--------------------------------------------------------------------------------------- 44 | 45 | /** 设置app版本号。由于历史原因需要和xcode3工程兼容,友盟提取的是Build号(CFBundleVersion),如果需要和App Store上的版本一致,需要调用此方法。 46 | 47 | @param appVersion 版本号,例如设置成`XcodeAppVersion`. 48 | @return void. 49 | */ 50 | + (void)setAppVersion:(NSString *)appVersion; 51 | 52 | 53 | /** 开启CrashReport收集, 默认是开启状态. 54 | 55 | @param value 设置成NO,就可以关闭友盟CrashReport收集. 56 | @return void. 57 | */ 58 | + (void)setCrashReportEnabled:(BOOL)value; 59 | 60 | 61 | /** 设置是否打印sdk的log信息,默认不开启 62 | @param value 设置为YES,umeng SDK 会输出log信息,记得release产品时要设置回NO. 63 | @return . 64 | @exception . 65 | */ 66 | 67 | + (void)setLogEnabled:(BOOL)value; 68 | 69 | 70 | ///--------------------------------------------------------------------------------------- 71 | /// @name 开启统计 72 | ///--------------------------------------------------------------------------------------- 73 | 74 | 75 | /** 开启友盟统计,默认以BATCH方式发送log. 76 | 77 | @param appKey 友盟appKey. 78 | @param reportPolicy 发送策略. 79 | @param channelId 渠道名称,为nil或@""时,默认会被被当作@"App Store"渠道 80 | @return void 81 | */ 82 | + (void)startWithAppkey:(NSString *)appKey; 83 | + (void)startWithAppkey:(NSString *)appKey reportPolicy:(ReportPolicy)rp channelId:(NSString *)cid; 84 | 85 | /** 当reportPolicy == SEND_INTERVAL 时设定log发送间隔 86 | 87 | @param second 单位为秒,最小为10,最大为86400(一天). 88 | @return void. 89 | */ 90 | 91 | + (void)setLogSendInterval:(double)second; 92 | 93 | 94 | ///--------------------------------------------------------------------------------------- 95 | /// @name 页面计时 96 | ///--------------------------------------------------------------------------------------- 97 | 98 | 99 | /** 页面时长统计,记录某个view被打开多长时间,可以自己计时也可以调用beginLogPageView,endLogPageView自动计时 100 | 101 | @param pageName 需要记录时长的view名称. 102 | @param seconds 秒数,int型. 103 | @return void. 104 | */ 105 | 106 | + (void)logPageView:(NSString *)pageName seconds:(int)seconds; 107 | + (void)beginLogPageView:(NSString *)pageName; 108 | + (void)endLogPageView:(NSString *)pageName; 109 | 110 | #pragma mark event logs 111 | 112 | 113 | ///--------------------------------------------------------------------------------------- 114 | /// @name 事件统计 115 | ///--------------------------------------------------------------------------------------- 116 | 117 | 118 | /** 自定义事件,数量统计. 119 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID 120 | 121 | @param eventId 网站上注册的事件Id. 122 | @param label 分类标签。不同的标签会分别进行统计,方便同一事件的不同标签的对比,为nil或空字符串时后台会生成和eventId同名的标签. 123 | @param accumulation 累加值。为减少网络交互,可以自行对某一事件ID的某一分类标签进行累加,再传入次数作为参数。 124 | @return void. 125 | */ 126 | + (void)event:(NSString *)eventId; //等同于 event:eventId label:eventId; 127 | /** 自定义事件,数量统计. 128 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID 129 | */ 130 | + (void)event:(NSString *)eventId label:(NSString *)label; // label为nil或@""时,等同于 event:eventId label:eventId; 131 | /** 自定义事件,数量统计. 132 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID 133 | */ 134 | + (void)event:(NSString *)eventId acc:(NSInteger)accumulation; 135 | /** 自定义事件,数量统计. 136 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID 137 | */ 138 | + (void)event:(NSString *)eventId label:(NSString *)label acc:(NSInteger)accumulation; 139 | /** 自定义事件,数量统计. 140 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID 141 | */ 142 | + (void)event:(NSString *)eventId attributes:(NSDictionary *)attributes; 143 | 144 | + (void)event:(NSString *)eventId attributes:(NSDictionary *)attributes counter:(int)number; 145 | 146 | /** 自定义事件,时长统计. 147 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 148 | beginEvent,endEvent要配对使用,也可以自己计时后通过durations参数传递进来 149 | 150 | @param eventId 网站上注册的事件Id. 151 | @param label 分类标签。不同的标签会分别进行统计,方便同一事件的不同标签的对比,为nil或空字符串时后台会生成和eventId同名的标签. 152 | @param primarykey 这个参数用于和event_id一起标示一个唯一事件,并不会被统计;对于同一个事件在beginEvent和endEvent 中要传递相同的eventId 和 primarykey 153 | @param millisecond 自己计时需要的话需要传毫秒进来 154 | @return void. 155 | 156 | 157 | @warning 每个event的attributes不能超过10个 158 | eventId、attributes中key和value都不能使用空格和特殊字符,且长度不能超过255个字符(否则将截取前255个字符) 159 | id, ts, du是保留字段,不能作为eventId及key的名称 160 | 161 | */ 162 | + (void)beginEvent:(NSString *)eventId; 163 | /** 自定义事件,时长统计. 164 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 165 | */ 166 | + (void)endEvent:(NSString *)eventId; 167 | /** 自定义事件,时长统计. 168 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 169 | */ 170 | 171 | + (void)beginEvent:(NSString *)eventId label:(NSString *)label; 172 | /** 自定义事件,时长统计. 173 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 174 | */ 175 | 176 | + (void)endEvent:(NSString *)eventId label:(NSString *)label; 177 | /** 自定义事件,时长统计. 178 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 179 | */ 180 | 181 | + (void)beginEvent:(NSString *)eventId primarykey :(NSString *)keyName attributes:(NSDictionary *)attributes; 182 | /** 自定义事件,时长统计. 183 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 184 | */ 185 | 186 | + (void)endEvent:(NSString *)eventId primarykey:(NSString *)keyName; 187 | /** 自定义事件,时长统计. 188 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 189 | */ 190 | 191 | + (void)event:(NSString *)eventId durations:(int)millisecond; 192 | /** 自定义事件,时长统计. 193 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 194 | */ 195 | 196 | + (void)event:(NSString *)eventId label:(NSString *)label durations:(int)millisecond; 197 | /** 自定义事件,时长统计. 198 | 使用前,请先到友盟App管理后台的设置->编辑自定义事件 中添加相应的事件ID,然后在工程中传入相应的事件ID. 199 | */ 200 | 201 | + (void)event:(NSString *)eventId attributes:(NSDictionary *)attributes durations:(int)millisecond; 202 | 203 | 204 | ///--------------------------------------------------------------------------------------- 205 | /// @name 按渠道自动更新 206 | ///--------------------------------------------------------------------------------------- 207 | 208 | 209 | /** 按渠道自动更新检测 210 | 检查当前app是否有更新,有更新弹出UIAlertView提示用户,当用户点击升级按钮时app会跳转到您预先设置的网址。 211 | 无更新不做任何操作。 212 | 您需要先在服务器端设置app版本信息,默认渠道是App Store. 213 | 如果您想自己控制自动更新操作流程,请实现MobClickDelegate的appUpdate方法。 214 | 215 | @param title 对应UIAlertView的title. 216 | @param cancelTitle 对应UIAlertView的cancelTitle. 217 | @param otherTitle 对应UIAlertView的otherTitle. 218 | @param delegate 需要自定义checkUpdate的对象. 219 | @param callBackSelectorWithDictionary 当checkUpdate事件完成时此方法会被调用,同时标记app更新信息的字典被传回. 220 | @return void. 221 | */ 222 | 223 | + (void)checkUpdate; 224 | /** 按渠道自动更新检测 225 | */ 226 | 227 | + (void)checkUpdate:(NSString *)title cancelButtonTitle:(NSString *)cancelTitle otherButtonTitles:(NSString *)otherTitle; 228 | /** 按渠道自动更新检测 229 | */ 230 | 231 | + (void)checkUpdateWithDelegate:(id)delegate selector:(SEL)callBackSelectorWithDictionary; 232 | 233 | 234 | ///--------------------------------------------------------------------------------------- 235 | /// @name 在线参数 236 | ///--------------------------------------------------------------------------------------- 237 | 238 | 239 | /** 使用在线参数功能,可以让你动态修改应用中的参数值, 240 | 检查并更新服务器端配置的在线参数,缓存在[NSUserDefaults standardUserDefaults]里, 241 | 调用此方法您将自动拥有在线更改SDK端发送策略的功能,您需要先在服务器端设置好在线参数. 242 | 请在[MobClick startWithAppkey:]方法之后调用; 243 | 如果想知道在线参数是否完成完成,请监听UMOnlineConfigDidFinishedNotification 244 | @param 无. 245 | @return void. 246 | */ 247 | 248 | + (void)updateOnlineConfig; 249 | 250 | /** 从[NSUserDefaults standardUserDefaults]获取缓存的在线参数的数值 251 | 带参数的方法获取某个key的值,不带参数的获取所有的在线参数. 252 | 需要先调用updateOnlineConfig才能使用,如果想知道在线参数是否完成完成,请监听UMOnlineConfigDidFinishedNotification 253 | 254 | @param key 255 | @return (NSString *) . 256 | */ 257 | 258 | + (NSString *)getConfigParams:(NSString *)key; 259 | 260 | /** 从[NSUserDefaults standardUserDefaults]获取缓存的在线参数 261 | @return (NSDictionary *). 262 | */ 263 | 264 | + (NSDictionary *)getConfigParams; 265 | 266 | + (NSString *)getAdURL; 267 | 268 | 269 | ///--------------------------------------------------------------------------------------- 270 | /// @name 地理位置设置 271 | ///--------------------------------------------------------------------------------------- 272 | 273 | 274 | /** 为了更精确的统计用户地理位置,可以调用此方法传入经纬度信息 275 | 需要链接 CoreLocation.framework 并且 #import 276 | @param latitude 纬度. 277 | @param longitude 经度. 278 | @param location CLLocation *型的地理信息 279 | @return void 280 | */ 281 | 282 | + (void)setLatitude:(double)latitude longitude:(double)longitude; 283 | /** 为了更精确的统计用户地理位置,可以调用此方法传入经纬度信息 284 | */ 285 | 286 | + (void)setLocation:(CLLocation *)location; 287 | 288 | 289 | ///--------------------------------------------------------------------------------------- 290 | /// @name helper方法 291 | ///--------------------------------------------------------------------------------------- 292 | 293 | 294 | /** 判断设备是否越狱,判断方法根据 apt和Cydia.app的path来判断 295 | */ 296 | + (BOOL)isJailbroken; 297 | /** 判断你的App是否被破解 298 | */ 299 | + (BOOL)isPirated; 300 | 301 | #pragma mark DEPRECATED methods from version 1.7 302 | 303 | /** 友盟模块启动 304 | [MobClick startWithAppkey:]通常在application:didFinishLaunchingWithOptions:里被调用监听 305 | App启动和退出事件,如果你没法在application:didFinishLaunchingWithOptions:里添加友盟的[MobClick startWithAppkey:] 306 | 方法,App的启动事件可能会无法监听,此时你就可以手动调用[MobClick startSession:nil]来启动友盟的session。 307 | 通常发生在某些第三方框架生成的app里,普通app使用不到. 308 | 309 | */ 310 | 311 | + (void)startSession:(NSNotification *)notification; 312 | 313 | @end -------------------------------------------------------------------------------- /Voice2Note/Source/Library/Umeng/MobClickSocialAnalytics.h: -------------------------------------------------------------------------------- 1 | // 2 | // MobClickSocialAnalytics.h 3 | // SocialSDK 4 | // 5 | // Created by yeahugo on 13-3-4. 6 | // Copyright (c) 2013年 Umeng. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NSString * MobClickSocialTypeString; 12 | 13 | extern MobClickSocialTypeString const MobClickSocialTypeSina; //新浪微博 14 | extern MobClickSocialTypeString const MobClickSocialTypeTencent; //腾讯微博 15 | extern MobClickSocialTypeString const MobClickSocialTypeRenren; //人人网 16 | extern MobClickSocialTypeString const MobClickSocialTypeQzone; //Qzone 17 | extern MobClickSocialTypeString const MobClickSocialTypeRenren; //人人网 18 | extern MobClickSocialTypeString const MobClickSocialTypeDouban; //douban 19 | extern MobClickSocialTypeString const MobClickSocialTypeWxsesion; //微信好友分享 20 | extern MobClickSocialTypeString const MobClickSocialTypeWxtimeline; //微信朋友圈 21 | extern MobClickSocialTypeString const MobClickSocialTypeHuaban; //花瓣 22 | extern MobClickSocialTypeString const MobClickSocialTypeKaixin; //开心 23 | extern MobClickSocialTypeString const MobClickSocialTypeFacebook; //facebook 24 | extern MobClickSocialTypeString const MobClickSocialTypeTwitter; //twitter 25 | extern MobClickSocialTypeString const MobClickSocialTypeInstagram; //instagram 26 | extern MobClickSocialTypeString const MobClickSocialTypeFlickr; //flickr 27 | extern MobClickSocialTypeString const MobClickSocialTypeQQ; //qq 28 | extern MobClickSocialTypeString const MobClickSocialTypeWxfavorite; //微信收藏 29 | extern MobClickSocialTypeString const MobClickSocialTypeLwsession; //来往 30 | extern MobClickSocialTypeString const MobClickSocialTypeLwtimeline; //来往动态 31 | extern MobClickSocialTypeString const MobClickSocialTypeYxsession; //易信 32 | extern MobClickSocialTypeString const MobClickSocialTypeYxtimeline; //易信朋友圈 33 | 34 | 35 | /** 36 | 微博类,发送微博之后在回调方法初始化此对象 37 | 38 | */ 39 | @interface MobClickSocialWeibo : NSObject 40 | 41 | 42 | /** 43 | 微博平台类型,使用上面定义的几种常量字符串 44 | */ 45 | @property (nonatomic, copy) NSString *platformType; 46 | 47 | /** 48 | 微博id 49 | */ 50 | @property (nonatomic, copy) NSString *weiboId; 51 | 52 | /** 53 | 用户在微博平台的id 54 | */ 55 | @property (nonatomic, copy) NSString *userId; 56 | 57 | /** 58 | 微博平台的自定义字段,例如定义{‘gender’:0,’name’:’xxx’} 59 | */ 60 | @property (nonatomic, strong) NSDictionary *param; 61 | 62 | 63 | /** 64 | 初始化方法,在发送微博结束的回调方法使用此初始化方法 65 | 66 | @param platformType 微博平台类型 67 | @param weiboId 微博id,可以设置为nil 68 | @param userId 用户id 69 | @param param 微博平台自定义字段,可以设置为nil 70 | 71 | @return 微博对象 72 | */ 73 | -(id)initWithPlatformType:(MobClickSocialTypeString)platformType weiboId:(NSString *)weiboId usid:(NSString *)usid param:(NSDictionary *)param; 74 | 75 | @end 76 | 77 | /** 78 | 发送统计完成的block对象 79 | */ 80 | typedef void (^MobClickSocialAnalyticsCompletion)(NSDictionary * response, NSError *error); 81 | 82 | 83 | /** 84 | 负责统计微博类。 85 | 分享微博完成之后需要先构造`MobClickSocialWeibo`组成微博数组,然后再用类方法发送微博数组 86 | 87 | ``` 88 | +(void)postWeiboCounts:(NSArray *)weibos appKey:(NSString *)appKey topic:(NSString *)topic completion:(MobClickSocialAnalyticsCompletion)completion; 89 | ``` 90 | 91 | 例如 92 | 93 | 94 | MobClickSocialWeibo *tencentWeibo = [[MobClickSocialWeibo alloc] initWithPlatformType:UMSocialTypeTencent weiboId:nil userId:@"tencent123" param:@{@"gender":@"1"}]; 95 | [MobClickSocialAnalytics postWeibos:@[tencentWeibo] appKey:@"507fcab25270157b37000010" topic:@"test" completion:^(NSDictionary *result, NSError *error) { 96 | NSLog(@"result is %@", result); 97 | }]; 98 | 99 | */ 100 | 101 | @interface MobClickSocialAnalytics : NSObject 102 | /** 103 | 发送统计微博 104 | 105 | @param weibos UMSocialWeibo对象组成的数组 106 | @param appKey 友盟appkey 107 | @param topic 话题,可选,可以设置为nil 108 | @parma completion 发送完成的事件处理block 109 | 110 | */ 111 | +(void)postWeiboCounts:(NSArray *)weibos appKey:(NSString *)appKey topic:(NSString *)topic completion:(MobClickSocialAnalyticsCompletion)completion; 112 | @end 113 | -------------------------------------------------------------------------------- /Voice2Note/Source/Library/Umeng/libMobClickLibrary.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liaojinxing/Voice2Note/8d9a209d4499e92298c8deb00b8d5915adbb85f1/Voice2Note/Source/Library/Umeng/libMobClickLibrary.a -------------------------------------------------------------------------------- /Voice2Note/Source/Model/NoteManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // VNNoteManager.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | @import Foundation; 10 | 11 | @class VNNote; 12 | @interface NoteManager : NSObject 13 | 14 | @property (nonatomic, strong) NSString *docPath; 15 | 16 | - (NSMutableArray *)readAllNotes; 17 | 18 | - (VNNote *)readNoteWithID:(NSString *)noteID; 19 | - (BOOL)storeNote:(VNNote *)note; 20 | - (void)deleteNote:(VNNote *)note; 21 | 22 | - (VNNote *)todayNote; 23 | 24 | + (instancetype)sharedManager; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Voice2Note/Source/Model/NoteManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // VNNoteManager.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "NoteManager.h" 10 | #import "VNConstants.h" 11 | #import "VNNote.h" 12 | #import "NSDate+Conversion.h" 13 | 14 | @implementation NoteManager 15 | 16 | + (instancetype)sharedManager 17 | { 18 | static id instance = nil; 19 | static dispatch_once_t onceToken = 0L; 20 | dispatch_once(&onceToken, ^{ 21 | instance = [[super allocWithZone:NULL] init]; 22 | }); 23 | return instance; 24 | } 25 | 26 | - (NSString *)createDataPathIfNeeded 27 | { 28 | NSString *documentsDirectory = [self documentDirectoryPath]; 29 | self.docPath = documentsDirectory; 30 | 31 | if ([[NSFileManager defaultManager] fileExistsAtPath:documentsDirectory]) { 32 | return self.docPath; 33 | } 34 | 35 | NSError *error; 36 | BOOL success = [[NSFileManager defaultManager] createDirectoryAtPath:documentsDirectory 37 | withIntermediateDirectories:YES 38 | attributes:nil 39 | error:&error]; 40 | if (!success) { 41 | NSLog(@"Error creating data path: %@", [error localizedDescription]); 42 | } 43 | return self.docPath; 44 | } 45 | 46 | - (NSString *)documentDirectoryPath 47 | { 48 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); 49 | NSString *documentsDirectory = [paths objectAtIndex:0]; 50 | documentsDirectory = [documentsDirectory stringByAppendingPathComponent:kAppEngName]; 51 | return documentsDirectory; 52 | } 53 | 54 | - (NSMutableArray *)readAllNotes 55 | { 56 | NSMutableArray *array = [NSMutableArray array]; 57 | NSError *error; 58 | NSString *documentsDirectory = [self createDataPathIfNeeded]; 59 | NSArray *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsDirectory error:&error]; 60 | 61 | if (files == nil) { 62 | NSLog(@"Error reading contents of documents directory: %@", [error localizedDescription]); 63 | return nil; 64 | } 65 | // Create Note for each file 66 | for (NSString *file in files) { 67 | VNNote *note = [self readNoteWithID:file]; 68 | if (note) { 69 | [array addObject:note]; 70 | } 71 | } 72 | NSSortDescriptor *sortDescriptor; 73 | sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"createdDate" 74 | ascending:NO]; 75 | return [NSMutableArray arrayWithArray:[array sortedArrayUsingDescriptors:@[sortDescriptor]]]; 76 | } 77 | 78 | 79 | - (VNNote *)readNoteWithID:(NSString *)noteID; 80 | { 81 | NSString *dataPath = [_docPath stringByAppendingPathComponent:noteID]; 82 | NSData *codedData = [[NSData alloc] initWithContentsOfFile:dataPath]; 83 | if (codedData == nil) { 84 | return nil; 85 | } 86 | VNNote *note = [NSKeyedUnarchiver unarchiveObjectWithData:codedData]; 87 | return note; 88 | } 89 | 90 | - (BOOL)storeNote:(VNNote *)note 91 | { 92 | [self createDataPathIfNeeded]; 93 | NSString *dataPath = [_docPath stringByAppendingPathComponent:note.noteID]; 94 | NSData *savedData = [NSKeyedArchiver archivedDataWithRootObject:note]; 95 | return [savedData writeToFile:dataPath atomically:YES]; 96 | } 97 | 98 | - (void)deleteNote:(VNNote *)note 99 | { 100 | NSString *filePath = [_docPath stringByAppendingPathComponent:note.noteID]; 101 | [[NSFileManager defaultManager] removeItemAtPath:filePath error:nil]; 102 | } 103 | 104 | - (VNNote *)todayNote 105 | { 106 | NSMutableArray *notes = [self readAllNotes]; 107 | for (VNNote *note in notes) { 108 | if ([NSDate isSameDay:note.createdDate andDate:[NSDate date]]) { 109 | return note; 110 | } 111 | } 112 | return nil; 113 | } 114 | 115 | @end 116 | -------------------------------------------------------------------------------- /Voice2Note/Source/Model/VNNote.h: -------------------------------------------------------------------------------- 1 | // 2 | // VNNote.h 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define VNNOTE_DEFAULT_TITLE @"无标题笔记" 12 | 13 | @interface VNNote : NSObject 14 | 15 | @property (nonatomic, strong) NSString *noteID; 16 | @property (nonatomic, strong) NSString *title; 17 | @property (nonatomic, strong) NSString *content; 18 | @property (nonatomic, strong) NSDate *createdDate; 19 | @property (nonatomic, strong) NSDate *updatedDate; 20 | @property (nonatomic, assign) NSInteger index; 21 | 22 | - (id)initWithTitle:(NSString *)title 23 | content:(NSString *)content 24 | createdDate:(NSDate *)createdDate 25 | updateDate:(NSDate *)updatedDate; 26 | 27 | - (BOOL)Persistence; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Voice2Note/Source/Model/VNNote.m: -------------------------------------------------------------------------------- 1 | // 2 | // VNNote.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import "VNNote.h" 10 | #import "NoteManager.h" 11 | 12 | #define kNoteIDKey @"NoteID" 13 | #define kTitleKey @"Title" 14 | #define kContentKey @"Content" 15 | #define kCreatedDate @"CreatedDate" 16 | #define kUpdatedDate @"UpdatedDate" 17 | 18 | @implementation VNNote 19 | 20 | @synthesize noteID = _noteID; 21 | @synthesize title = _title; 22 | @synthesize content = _content; 23 | @synthesize createdDate = _createdDate; 24 | 25 | - (id)initWithTitle:(NSString *)title 26 | content:(NSString *)content 27 | createdDate:(NSDate *)createdDate 28 | updateDate:(NSDate *)updatedDate 29 | { 30 | self = [super init]; 31 | if (self) { 32 | _noteID = [NSNumber numberWithDouble:[createdDate timeIntervalSince1970]].stringValue; 33 | _title = title; 34 | _content = content; 35 | _createdDate = createdDate; 36 | _updatedDate = updatedDate; 37 | if (_title == nil || _title.length == 0) { 38 | _title = VNNOTE_DEFAULT_TITLE; 39 | } 40 | if (_content == nil || _content.length == 0) { 41 | _content = @""; 42 | } 43 | } 44 | return self; 45 | } 46 | 47 | - (void) encodeWithCoder:(NSCoder *)encoder { 48 | [encoder encodeObject:_noteID forKey:kNoteIDKey]; 49 | [encoder encodeObject:_title forKey:kTitleKey]; 50 | [encoder encodeObject:_content forKey:kContentKey]; 51 | [encoder encodeObject:_createdDate forKey:kCreatedDate]; 52 | } 53 | 54 | - (id)initWithCoder:(NSCoder *)decoder { 55 | NSString *title = [decoder decodeObjectForKey:kTitleKey]; 56 | NSString *content = [decoder decodeObjectForKey:kContentKey]; 57 | NSDate *createDate = [decoder decodeObjectForKey:kCreatedDate]; 58 | NSDate *updateDate = [decoder decodeObjectForKey:kUpdatedDate]; 59 | return [self initWithTitle:title 60 | content:content 61 | createdDate:createDate 62 | updateDate:updateDate]; 63 | } 64 | 65 | - (BOOL)Persistence 66 | { 67 | return [[NoteManager sharedManager] storeNote:self]; 68 | } 69 | 70 | - (NSInteger)index 71 | { 72 | if (!_index) { 73 | _index = (int)[self.createdDate timeIntervalSince1970]; 74 | } 75 | return _index; 76 | } 77 | 78 | @end 79 | 80 | -------------------------------------------------------------------------------- /Voice2Note/Voice2Note-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 懒人笔记 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.jinxing.voice2note 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | 懒人笔记 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 2.0.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleURLTypes 24 | 25 | 26 | CFBundleTypeRole 27 | Editor 28 | CFBundleURLName 29 | weixin 30 | CFBundleURLSchemes 31 | 32 | wxbe1a37e2f14d870c 33 | 34 | 35 | 36 | CFBundleTypeRole 37 | Editor 38 | CFBundleURLName 39 | com.jinxing.voice2note 40 | CFBundleURLSchemes 41 | 42 | voice2note 43 | 44 | 45 | 46 | CFBundleVersion 47 | 20000 48 | LSRequiresIPhoneOS 49 | 50 | UILaunchStoryboardName 51 | LaunchScreen 52 | UIRequiredDeviceCapabilities 53 | 54 | armv7 55 | 56 | UISupportedInterfaceOrientations 57 | 58 | UIInterfaceOrientationPortrait 59 | 60 | UISupportedInterfaceOrientations~ipad 61 | 62 | UIInterfaceOrientationPortrait 63 | 64 | UIViewControllerBasedStatusBarAppearance 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Voice2Note/Voice2Note-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Voice2Note/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Voice2Note/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Voice2Note 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Voice2NoteTests/Voice2NoteTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jinxing.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Voice2NoteTests/Voice2NoteTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // Voice2NoteTests.m 3 | // Voice2NoteTests 4 | // 5 | // Created by liaojinxing on 14-6-11. 6 | // Copyright (c) 2014年 jinxing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Voice2NoteTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Voice2NoteTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Voice2NoteTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------