Commit 4f42dd76b965e2c880ad559ed23a5d79bf4463c6
1 parent
fc7ef641
用户系统
Showing
52 changed files
with
4813 additions
and
0 deletions
Too many changes to show.
To preserve performance only 52 of 202 files are displayed.
CNLiveUserSystemDemo.xcodeproj/project.pbxproj
0 → 100644
| 1 | +// !$*UTF8*$! | ||
| 2 | +{ | ||
| 3 | + archiveVersion = 1; | ||
| 4 | + classes = { | ||
| 5 | + }; | ||
| 6 | + objectVersion = 46; | ||
| 7 | + objects = { | ||
| 8 | + | ||
| 9 | +/* Begin PBXBuildFile section */ | ||
| 10 | + 810D9B651D8FB70600B7A776 /* TencentOpenAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B511D8FB70600B7A776 /* TencentOpenAPI.framework */; }; | ||
| 11 | + 810D9B661D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 810D9B521D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle */; }; | ||
| 12 | + 810D9B671D8FB70600B7A776 /* libWeiboSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B541D8FB70600B7A776 /* libWeiboSDK.a */; }; | ||
| 13 | + 810D9B681D8FB70600B7A776 /* WeiboSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 810D9B5D1D8FB70600B7A776 /* WeiboSDK.bundle */; }; | ||
| 14 | + 810D9B691D8FB70600B7A776 /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B611D8FB70600B7A776 /* libWeChatSDK.a */; }; | ||
| 15 | + 810D9B6A1D8FB70600B7A776 /* read_me.txt in Resources */ = {isa = PBXBuildFile; fileRef = 810D9B621D8FB70600B7A776 /* read_me.txt */; }; | ||
| 16 | + 810D9B6C1D8FB76300B7A776 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B6B1D8FB76300B7A776 /* Security.framework */; }; | ||
| 17 | + 810D9B6E1D8FB76E00B7A776 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B6D1D8FB76E00B7A776 /* libiconv.tbd */; }; | ||
| 18 | + 810D9B701D8FB77500B7A776 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B6F1D8FB77500B7A776 /* SystemConfiguration.framework */; }; | ||
| 19 | + 810D9B721D8FB77E00B7A776 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B711D8FB77E00B7A776 /* CoreGraphics.framework */; }; | ||
| 20 | + 810D9B741D8FB78A00B7A776 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B731D8FB78A00B7A776 /* libsqlite3.tbd */; }; | ||
| 21 | + 810D9B761D8FB79500B7A776 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B751D8FB79500B7A776 /* CoreTelephony.framework */; }; | ||
| 22 | + 810D9B781D8FB7A400B7A776 /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B771D8FB7A400B7A776 /* libstdc++.tbd */; }; | ||
| 23 | + 810D9B7A1D8FB7AC00B7A776 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B791D8FB7AC00B7A776 /* libz.tbd */; }; | ||
| 24 | + 810D9B7F1D8FCD1900B7A776 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */; }; | ||
| 25 | + 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B801D8FCD3200B7A776 /* libc++.tbd */; }; | ||
| 26 | + 810D9B841D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 810D9B831D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m */; }; | ||
| 27 | + 811600EE1D927E7E003CAE7D /* MKAnnotationView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600CD1D927E7E003CAE7D /* MKAnnotationView+WebCache.m */; }; | ||
| 28 | + 811600EF1D927E7E003CAE7D /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600CF1D927E7E003CAE7D /* NSData+ImageContentType.m */; }; | ||
| 29 | + 811600F01D927E7E003CAE7D /* SDImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600D11D927E7E003CAE7D /* SDImageCache.m */; }; | ||
| 30 | + 811600F11D927E7E003CAE7D /* SDWebImageCompat.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600D31D927E7E003CAE7D /* SDWebImageCompat.m */; }; | ||
| 31 | + 811600F21D927E7E003CAE7D /* SDWebImageDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600D51D927E7E003CAE7D /* SDWebImageDecoder.m */; }; | ||
| 32 | + 811600F31D927E7E003CAE7D /* SDWebImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600D71D927E7E003CAE7D /* SDWebImageDownloader.m */; }; | ||
| 33 | + 811600F41D927E7E003CAE7D /* SDWebImageDownloaderOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600D91D927E7E003CAE7D /* SDWebImageDownloaderOperation.m */; }; | ||
| 34 | + 811600F51D927E7E003CAE7D /* SDWebImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600DB1D927E7E003CAE7D /* SDWebImageManager.m */; }; | ||
| 35 | + 811600F61D927E7E003CAE7D /* SDWebImagePrefetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600DE1D927E7E003CAE7D /* SDWebImagePrefetcher.m */; }; | ||
| 36 | + 811600F71D927E7E003CAE7D /* UIButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600E01D927E7E003CAE7D /* UIButton+WebCache.m */; }; | ||
| 37 | + 811600F81D927E7E003CAE7D /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600E21D927E7E003CAE7D /* UIImage+GIF.m */; }; | ||
| 38 | + 811600F91D927E7E003CAE7D /* UIImage+MultiFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600E41D927E7E003CAE7D /* UIImage+MultiFormat.m */; }; | ||
| 39 | + 811600FA1D927E7E003CAE7D /* UIImage+WebP.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600E61D927E7E003CAE7D /* UIImage+WebP.m */; }; | ||
| 40 | + 811600FB1D927E7E003CAE7D /* UIImageView+HighlightedWebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600E81D927E7E003CAE7D /* UIImageView+HighlightedWebCache.m */; }; | ||
| 41 | + 811600FC1D927E7E003CAE7D /* UIImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600EA1D927E7E003CAE7D /* UIImageView+WebCache.m */; }; | ||
| 42 | + 811600FD1D927E7E003CAE7D /* UIView+WebCacheOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600EC1D927E7E003CAE7D /* UIView+WebCacheOperation.m */; }; | ||
| 43 | + 811600FE1D927E7E003CAE7D /* WebP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 811600ED1D927E7E003CAE7D /* WebP.framework */; }; | ||
| 44 | + 811601011D92929A003CAE7D /* NSDictionary+Safety.m in Sources */ = {isa = PBXBuildFile; fileRef = 811601001D92929A003CAE7D /* NSDictionary+Safety.m */; }; | ||
| 45 | + 8116F8E41D8916250084FE49 /* IdAndPwdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8116F8E31D8916250084FE49 /* IdAndPwdView.m */; }; | ||
| 46 | + 8116F8EA1D89165A0084FE49 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8116F8E71D89165A0084FE49 /* LoginViewController.m */; }; | ||
| 47 | + 8116F8EB1D89165A0084FE49 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8116F8E91D89165A0084FE49 /* ViewController.m */; }; | ||
| 48 | + 8116F8EE1D891AEF0084FE49 /* RegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8116F8ED1D891AEF0084FE49 /* RegisterViewController.m */; }; | ||
| 49 | + 8116F8F11D891BCD0084FE49 /* RegistBasicInformationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8116F8F01D891BCD0084FE49 /* RegistBasicInformationView.m */; }; | ||
| 50 | + 812540DD1D87916400F32D66 /* CNLiveLogin.m in Sources */ = {isa = PBXBuildFile; fileRef = 812540DC1D87916400F32D66 /* CNLiveLogin.m */; }; | ||
| 51 | + 812540E01D8792F700F32D66 /* CNLiveUserSystemTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 812540DF1D8792F700F32D66 /* CNLiveUserSystemTools.m */; }; | ||
| 52 | + 812540F41D87A70B00F32D66 /* CNLiveVerificationCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 812540F31D87A70B00F32D66 /* CNLiveVerificationCode.m */; }; | ||
| 53 | + 812540F71D87D9C000F32D66 /* CNLiveRegister.m in Sources */ = {isa = PBXBuildFile; fileRef = 812540F61D87D9C000F32D66 /* CNLiveRegister.m */; }; | ||
| 54 | + 812540FA1D87DDBE00F32D66 /* CNLiveFeedback.m in Sources */ = {isa = PBXBuildFile; fileRef = 812540F91D87DDBE00F32D66 /* CNLiveFeedback.m */; }; | ||
| 55 | + 812540FD1D87DFFB00F32D66 /* CNLiveUserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 812540FC1D87DFFB00F32D66 /* CNLiveUserInfo.m */; }; | ||
| 56 | + 812642C61D86A7A800B402CA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642C51D86A7A800B402CA /* main.m */; }; | ||
| 57 | + 812642C91D86A7A800B402CA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642C81D86A7A800B402CA /* AppDelegate.m */; }; | ||
| 58 | + 812642CF1D86A7A800B402CA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 812642CD1D86A7A800B402CA /* Main.storyboard */; }; | ||
| 59 | + 812642D11D86A7A800B402CA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 812642D01D86A7A800B402CA /* Assets.xcassets */; }; | ||
| 60 | + 812642D41D86A7A800B402CA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 812642D21D86A7A800B402CA /* LaunchScreen.storyboard */; }; | ||
| 61 | + 812642DF1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642DE1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m */; }; | ||
| 62 | + 812642EA1D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642E91D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m */; }; | ||
| 63 | + 812642FA1D86A83100B402CA /* CNLiveUserSystemCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642F91D86A83100B402CA /* CNLiveUserSystemCenter.m */; }; | ||
| 64 | + 817C6EC31D90D60E0016F211 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 817C6EC21D90D60E0016F211 /* ImageIO.framework */; }; | ||
| 65 | + 8187A8EF1D8E6394007FAFB6 /* Tools.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8EE1D8E6394007FAFB6 /* Tools.m */; }; | ||
| 66 | + 8187A8F61D8E6486007FAFB6 /* NSObject+UserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8F11D8E6486007FAFB6 /* NSObject+UserModel.m */; }; | ||
| 67 | + 8187A8F71D8E6486007FAFB6 /* UserInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8F31D8E6486007FAFB6 /* UserInfoModel.m */; }; | ||
| 68 | + 8187A8F81D8E6486007FAFB6 /* UserInfoSava.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8F51D8E6486007FAFB6 /* UserInfoSava.m */; }; | ||
| 69 | + 8187A8FB1D8E68CD007FAFB6 /* CNLiveLogout.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8FA1D8E68CD007FAFB6 /* CNLiveLogout.m */; }; | ||
| 70 | + 8187A8FE1D8E90C5007FAFB6 /* CNLiveUserManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8FD1D8E90C5007FAFB6 /* CNLiveUserManager.m */; }; | ||
| 71 | + 8187A90B1D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A9021D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.m */; }; | ||
| 72 | + 8187A90C1D8E9A7B007FAFB6 /* SVProgressAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A9041D8E9A7B007FAFB6 /* SVProgressAnimatedView.m */; }; | ||
| 73 | + 8187A90D1D8E9A7B007FAFB6 /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8187A9061D8E9A7B007FAFB6 /* SVProgressHUD.bundle */; }; | ||
| 74 | + 8187A90E1D8E9A7B007FAFB6 /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A9081D8E9A7B007FAFB6 /* SVProgressHUD.m */; }; | ||
| 75 | + 8187A90F1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A90A1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m */; }; | ||
| 76 | + 81D0773D1D911D50000A5E00 /* CNLiveNetworkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D0773A1D911D50000A5E00 /* CNLiveNetworkManager.m */; }; | ||
| 77 | + 81D0773E1D911D50000A5E00 /* CNLiveURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D0773C1D911D50000A5E00 /* CNLiveURLRequestSerialization.m */; }; | ||
| 78 | + 81D077411D912079000A5E00 /* CNLiveUploadIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D077401D912079000A5E00 /* CNLiveUploadIcon.m */; }; | ||
| 79 | + B6B54BE71D8CFEC200089C9C /* UserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B54BE61D8CFEC200089C9C /* UserInfoViewController.m */; }; | ||
| 80 | + B6B54BEA1D8D009800089C9C /* UserInfoHeaderImageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B54BE91D8D009800089C9C /* UserInfoHeaderImageTableViewCell.m */; }; | ||
| 81 | + B6B54BED1D8D011000089C9C /* UserInfoTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B54BEC1D8D011000089C9C /* UserInfoTableViewCell.m */; }; | ||
| 82 | + B6B54BF01D8D025A00089C9C /* ModifyUserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B54BEF1D8D025A00089C9C /* ModifyUserInfoViewController.m */; }; | ||
| 83 | +/* End PBXBuildFile section */ | ||
| 84 | + | ||
| 85 | +/* Begin PBXContainerItemProxy section */ | ||
| 86 | + 812642DB1D86A7A800B402CA /* PBXContainerItemProxy */ = { | ||
| 87 | + isa = PBXContainerItemProxy; | ||
| 88 | + containerPortal = 812642B91D86A7A800B402CA /* Project object */; | ||
| 89 | + proxyType = 1; | ||
| 90 | + remoteGlobalIDString = 812642C01D86A7A800B402CA; | ||
| 91 | + remoteInfo = CNLiveUserSystemDemo; | ||
| 92 | + }; | ||
| 93 | + 812642E61D86A7A800B402CA /* PBXContainerItemProxy */ = { | ||
| 94 | + isa = PBXContainerItemProxy; | ||
| 95 | + containerPortal = 812642B91D86A7A800B402CA /* Project object */; | ||
| 96 | + proxyType = 1; | ||
| 97 | + remoteGlobalIDString = 812642C01D86A7A800B402CA; | ||
| 98 | + remoteInfo = CNLiveUserSystemDemo; | ||
| 99 | + }; | ||
| 100 | +/* End PBXContainerItemProxy section */ | ||
| 101 | + | ||
| 102 | +/* Begin PBXFileReference section */ | ||
| 103 | + 810D9B511D8FB70600B7A776 /* TencentOpenAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TencentOpenAPI.framework; sourceTree = "<group>"; }; | ||
| 104 | + 810D9B521D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TencentOpenApi_IOS_Bundle.bundle; sourceTree = "<group>"; }; | ||
| 105 | + 810D9B541D8FB70600B7A776 /* libWeiboSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeiboSDK.a; sourceTree = "<group>"; }; | ||
| 106 | + 810D9B551D8FB70600B7A776 /* WBHttpRequest+WeiboGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WBHttpRequest+WeiboGame.h"; sourceTree = "<group>"; }; | ||
| 107 | + 810D9B561D8FB70600B7A776 /* WBHttpRequest+WeiboShare.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WBHttpRequest+WeiboShare.h"; sourceTree = "<group>"; }; | ||
| 108 | + 810D9B571D8FB70600B7A776 /* WBHttpRequest+WeiboToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WBHttpRequest+WeiboToken.h"; sourceTree = "<group>"; }; | ||
| 109 | + 810D9B581D8FB70600B7A776 /* WBHttpRequest+WeiboUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WBHttpRequest+WeiboUser.h"; sourceTree = "<group>"; }; | ||
| 110 | + 810D9B591D8FB70600B7A776 /* WBHttpRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WBHttpRequest.h; sourceTree = "<group>"; }; | ||
| 111 | + 810D9B5A1D8FB70600B7A776 /* WBSDKBasicButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WBSDKBasicButton.h; sourceTree = "<group>"; }; | ||
| 112 | + 810D9B5B1D8FB70600B7A776 /* WBSDKCommentButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WBSDKCommentButton.h; sourceTree = "<group>"; }; | ||
| 113 | + 810D9B5C1D8FB70600B7A776 /* WBSDKRelationshipButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WBSDKRelationshipButton.h; sourceTree = "<group>"; }; | ||
| 114 | + 810D9B5D1D8FB70600B7A776 /* WeiboSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = WeiboSDK.bundle; sourceTree = "<group>"; }; | ||
| 115 | + 810D9B5E1D8FB70600B7A776 /* WeiboSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeiboSDK.h; sourceTree = "<group>"; }; | ||
| 116 | + 810D9B5F1D8FB70600B7A776 /* WeiboUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeiboUser.h; sourceTree = "<group>"; }; | ||
| 117 | + 810D9B611D8FB70600B7A776 /* libWeChatSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeChatSDK.a; sourceTree = "<group>"; }; | ||
| 118 | + 810D9B621D8FB70600B7A776 /* read_me.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = read_me.txt; sourceTree = "<group>"; }; | ||
| 119 | + 810D9B631D8FB70600B7A776 /* WXApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApi.h; sourceTree = "<group>"; }; | ||
| 120 | + 810D9B641D8FB70600B7A776 /* WXApiObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiObject.h; sourceTree = "<group>"; }; | ||
| 121 | + 810D9B6B1D8FB76300B7A776 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; | ||
| 122 | + 810D9B6D1D8FB76E00B7A776 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; }; | ||
| 123 | + 810D9B6F1D8FB77500B7A776 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; | ||
| 124 | + 810D9B711D8FB77E00B7A776 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; | ||
| 125 | + 810D9B731D8FB78A00B7A776 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; | ||
| 126 | + 810D9B751D8FB79500B7A776 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; | ||
| 127 | + 810D9B771D8FB7A400B7A776 /* libstdc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.tbd"; path = "usr/lib/libstdc++.tbd"; sourceTree = SDKROOT; }; | ||
| 128 | + 810D9B791D8FB7AC00B7A776 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; | ||
| 129 | + 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; }; | ||
| 130 | + 810D9B801D8FCD3200B7A776 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; | ||
| 131 | + 810D9B821D8FD2DF00B7A776 /* CNLiveThirdLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveThirdLoginManager.h; sourceTree = "<group>"; }; | ||
| 132 | + 810D9B831D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveThirdLoginManager.m; sourceTree = "<group>"; }; | ||
| 133 | + 811600CC1D927E7E003CAE7D /* MKAnnotationView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MKAnnotationView+WebCache.h"; sourceTree = "<group>"; }; | ||
| 134 | + 811600CD1D927E7E003CAE7D /* MKAnnotationView+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MKAnnotationView+WebCache.m"; sourceTree = "<group>"; }; | ||
| 135 | + 811600CE1D927E7E003CAE7D /* NSData+ImageContentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+ImageContentType.h"; sourceTree = "<group>"; }; | ||
| 136 | + 811600CF1D927E7E003CAE7D /* NSData+ImageContentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+ImageContentType.m"; sourceTree = "<group>"; }; | ||
| 137 | + 811600D01D927E7E003CAE7D /* SDImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDImageCache.h; sourceTree = "<group>"; }; | ||
| 138 | + 811600D11D927E7E003CAE7D /* SDImageCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDImageCache.m; sourceTree = "<group>"; }; | ||
| 139 | + 811600D21D927E7E003CAE7D /* SDWebImageCompat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageCompat.h; sourceTree = "<group>"; }; | ||
| 140 | + 811600D31D927E7E003CAE7D /* SDWebImageCompat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageCompat.m; sourceTree = "<group>"; }; | ||
| 141 | + 811600D41D927E7E003CAE7D /* SDWebImageDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageDecoder.h; sourceTree = "<group>"; }; | ||
| 142 | + 811600D51D927E7E003CAE7D /* SDWebImageDecoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageDecoder.m; sourceTree = "<group>"; }; | ||
| 143 | + 811600D61D927E7E003CAE7D /* SDWebImageDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageDownloader.h; sourceTree = "<group>"; }; | ||
| 144 | + 811600D71D927E7E003CAE7D /* SDWebImageDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageDownloader.m; sourceTree = "<group>"; }; | ||
| 145 | + 811600D81D927E7E003CAE7D /* SDWebImageDownloaderOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageDownloaderOperation.h; sourceTree = "<group>"; }; | ||
| 146 | + 811600D91D927E7E003CAE7D /* SDWebImageDownloaderOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageDownloaderOperation.m; sourceTree = "<group>"; }; | ||
| 147 | + 811600DA1D927E7E003CAE7D /* SDWebImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageManager.h; sourceTree = "<group>"; }; | ||
| 148 | + 811600DB1D927E7E003CAE7D /* SDWebImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageManager.m; sourceTree = "<group>"; }; | ||
| 149 | + 811600DC1D927E7E003CAE7D /* SDWebImageOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageOperation.h; sourceTree = "<group>"; }; | ||
| 150 | + 811600DD1D927E7E003CAE7D /* SDWebImagePrefetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImagePrefetcher.h; sourceTree = "<group>"; }; | ||
| 151 | + 811600DE1D927E7E003CAE7D /* SDWebImagePrefetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImagePrefetcher.m; sourceTree = "<group>"; }; | ||
| 152 | + 811600DF1D927E7E003CAE7D /* UIButton+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+WebCache.h"; sourceTree = "<group>"; }; | ||
| 153 | + 811600E01D927E7E003CAE7D /* UIButton+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+WebCache.m"; sourceTree = "<group>"; }; | ||
| 154 | + 811600E11D927E7E003CAE7D /* UIImage+GIF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+GIF.h"; sourceTree = "<group>"; }; | ||
| 155 | + 811600E21D927E7E003CAE7D /* UIImage+GIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+GIF.m"; sourceTree = "<group>"; }; | ||
| 156 | + 811600E31D927E7E003CAE7D /* UIImage+MultiFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+MultiFormat.h"; sourceTree = "<group>"; }; | ||
| 157 | + 811600E41D927E7E003CAE7D /* UIImage+MultiFormat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+MultiFormat.m"; sourceTree = "<group>"; }; | ||
| 158 | + 811600E51D927E7E003CAE7D /* UIImage+WebP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+WebP.h"; sourceTree = "<group>"; }; | ||
| 159 | + 811600E61D927E7E003CAE7D /* UIImage+WebP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+WebP.m"; sourceTree = "<group>"; }; | ||
| 160 | + 811600E71D927E7E003CAE7D /* UIImageView+HighlightedWebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+HighlightedWebCache.h"; sourceTree = "<group>"; }; | ||
| 161 | + 811600E81D927E7E003CAE7D /* UIImageView+HighlightedWebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+HighlightedWebCache.m"; sourceTree = "<group>"; }; | ||
| 162 | + 811600E91D927E7E003CAE7D /* UIImageView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+WebCache.h"; sourceTree = "<group>"; }; | ||
| 163 | + 811600EA1D927E7E003CAE7D /* UIImageView+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+WebCache.m"; sourceTree = "<group>"; }; | ||
| 164 | + 811600EB1D927E7E003CAE7D /* UIView+WebCacheOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+WebCacheOperation.h"; sourceTree = "<group>"; }; | ||
| 165 | + 811600EC1D927E7E003CAE7D /* UIView+WebCacheOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+WebCacheOperation.m"; sourceTree = "<group>"; }; | ||
| 166 | + 811600ED1D927E7E003CAE7D /* WebP.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebP.framework; sourceTree = "<group>"; }; | ||
| 167 | + 811600FF1D92929A003CAE7D /* NSDictionary+Safety.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+Safety.h"; sourceTree = "<group>"; }; | ||
| 168 | + 811601001D92929A003CAE7D /* NSDictionary+Safety.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+Safety.m"; sourceTree = "<group>"; }; | ||
| 169 | + 8116F8DA1D88F3010084FE49 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; }; | ||
| 170 | + 8116F8E21D8916250084FE49 /* IdAndPwdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdAndPwdView.h; sourceTree = "<group>"; }; | ||
| 171 | + 8116F8E31D8916250084FE49 /* IdAndPwdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdAndPwdView.m; sourceTree = "<group>"; }; | ||
| 172 | + 8116F8E61D89165A0084FE49 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; }; | ||
| 173 | + 8116F8E71D89165A0084FE49 /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; }; | ||
| 174 | + 8116F8E81D89165A0084FE49 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; }; | ||
| 175 | + 8116F8E91D89165A0084FE49 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; }; | ||
| 176 | + 8116F8EC1D891AEF0084FE49 /* RegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterViewController.h; sourceTree = "<group>"; }; | ||
| 177 | + 8116F8ED1D891AEF0084FE49 /* RegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterViewController.m; sourceTree = "<group>"; }; | ||
| 178 | + 8116F8EF1D891BCD0084FE49 /* RegistBasicInformationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegistBasicInformationView.h; sourceTree = "<group>"; }; | ||
| 179 | + 8116F8F01D891BCD0084FE49 /* RegistBasicInformationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegistBasicInformationView.m; sourceTree = "<group>"; }; | ||
| 180 | + 812540DB1D87916400F32D66 /* CNLiveLogin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveLogin.h; sourceTree = "<group>"; }; | ||
| 181 | + 812540DC1D87916400F32D66 /* CNLiveLogin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveLogin.m; sourceTree = "<group>"; }; | ||
| 182 | + 812540DE1D8792F700F32D66 /* CNLiveUserSystemTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveUserSystemTools.h; sourceTree = "<group>"; }; | ||
| 183 | + 812540DF1D8792F700F32D66 /* CNLiveUserSystemTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserSystemTools.m; sourceTree = "<group>"; }; | ||
| 184 | + 812540F21D87A70B00F32D66 /* CNLiveVerificationCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveVerificationCode.h; sourceTree = "<group>"; }; | ||
| 185 | + 812540F31D87A70B00F32D66 /* CNLiveVerificationCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveVerificationCode.m; sourceTree = "<group>"; }; | ||
| 186 | + 812540F51D87D9C000F32D66 /* CNLiveRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveRegister.h; sourceTree = "<group>"; }; | ||
| 187 | + 812540F61D87D9C000F32D66 /* CNLiveRegister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveRegister.m; sourceTree = "<group>"; }; | ||
| 188 | + 812540F81D87DDBE00F32D66 /* CNLiveFeedback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveFeedback.h; sourceTree = "<group>"; }; | ||
| 189 | + 812540F91D87DDBE00F32D66 /* CNLiveFeedback.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveFeedback.m; sourceTree = "<group>"; }; | ||
| 190 | + 812540FB1D87DFFB00F32D66 /* CNLiveUserInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveUserInfo.h; sourceTree = "<group>"; }; | ||
| 191 | + 812540FC1D87DFFB00F32D66 /* CNLiveUserInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserInfo.m; sourceTree = "<group>"; }; | ||
| 192 | + 812642C11D86A7A800B402CA /* CNLiveUserSystemDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveUserSystemDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 193 | + 812642C51D86A7A800B402CA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; | ||
| 194 | + 812642C71D86A7A800B402CA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = CNLiveUserSystemDemo/AppDelegate.h; sourceTree = "<group>"; }; | ||
| 195 | + 812642C81D86A7A800B402CA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = CNLiveUserSystemDemo/AppDelegate.m; sourceTree = "<group>"; }; | ||
| 196 | + 812642CE1D86A7A800B402CA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; | ||
| 197 | + 812642D01D86A7A800B402CA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||
| 198 | + 812642D31D86A7A800B402CA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | ||
| 199 | + 812642D51D86A7A800B402CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
| 200 | + 812642DA1D86A7A800B402CA /* CNLiveUserSystemDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveUserSystemDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 201 | + 812642DE1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserSystemDemoTests.m; sourceTree = "<group>"; }; | ||
| 202 | + 812642E01D86A7A800B402CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
| 203 | + 812642E51D86A7A800B402CA /* CNLiveUserSystemDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveUserSystemDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 204 | + 812642E91D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserSystemDemoUITests.m; sourceTree = "<group>"; }; | ||
| 205 | + 812642EB1D86A7A800B402CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
| 206 | + 812642F81D86A83100B402CA /* CNLiveUserSystemCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveUserSystemCenter.h; sourceTree = "<group>"; }; | ||
| 207 | + 812642F91D86A83100B402CA /* CNLiveUserSystemCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserSystemCenter.m; sourceTree = "<group>"; }; | ||
| 208 | + 812642FB1D86AFE600B402CA /* CNLiveUserSystemTypeDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveUserSystemTypeDef.h; sourceTree = "<group>"; }; | ||
| 209 | + 817C6EC21D90D60E0016F211 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; | ||
| 210 | + 8187A8ED1D8E6394007FAFB6 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tools.h; sourceTree = "<group>"; }; | ||
| 211 | + 8187A8EE1D8E6394007FAFB6 /* Tools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tools.m; sourceTree = "<group>"; }; | ||
| 212 | + 8187A8F01D8E6486007FAFB6 /* NSObject+UserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+UserModel.h"; sourceTree = "<group>"; }; | ||
| 213 | + 8187A8F11D8E6486007FAFB6 /* NSObject+UserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+UserModel.m"; sourceTree = "<group>"; }; | ||
| 214 | + 8187A8F21D8E6486007FAFB6 /* UserInfoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoModel.h; sourceTree = "<group>"; }; | ||
| 215 | + 8187A8F31D8E6486007FAFB6 /* UserInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoModel.m; sourceTree = "<group>"; }; | ||
| 216 | + 8187A8F41D8E6486007FAFB6 /* UserInfoSava.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoSava.h; sourceTree = "<group>"; }; | ||
| 217 | + 8187A8F51D8E6486007FAFB6 /* UserInfoSava.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoSava.m; sourceTree = "<group>"; }; | ||
| 218 | + 8187A8F91D8E68CD007FAFB6 /* CNLiveLogout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveLogout.h; sourceTree = "<group>"; }; | ||
| 219 | + 8187A8FA1D8E68CD007FAFB6 /* CNLiveLogout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveLogout.m; sourceTree = "<group>"; }; | ||
| 220 | + 8187A8FC1D8E90C5007FAFB6 /* CNLiveUserManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveUserManager.h; sourceTree = "<group>"; }; | ||
| 221 | + 8187A8FD1D8E90C5007FAFB6 /* CNLiveUserManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserManager.m; sourceTree = "<group>"; }; | ||
| 222 | + 8187A9011D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVIndefiniteAnimatedView.h; sourceTree = "<group>"; }; | ||
| 223 | + 8187A9021D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVIndefiniteAnimatedView.m; sourceTree = "<group>"; }; | ||
| 224 | + 8187A9031D8E9A7B007FAFB6 /* SVProgressAnimatedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVProgressAnimatedView.h; sourceTree = "<group>"; }; | ||
| 225 | + 8187A9041D8E9A7B007FAFB6 /* SVProgressAnimatedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressAnimatedView.m; sourceTree = "<group>"; }; | ||
| 226 | + 8187A9051D8E9A7B007FAFB6 /* SVProgressHUD-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVProgressHUD-Prefix.pch"; sourceTree = "<group>"; }; | ||
| 227 | + 8187A9061D8E9A7B007FAFB6 /* SVProgressHUD.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SVProgressHUD.bundle; sourceTree = "<group>"; }; | ||
| 228 | + 8187A9071D8E9A7B007FAFB6 /* SVProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVProgressHUD.h; sourceTree = "<group>"; }; | ||
| 229 | + 8187A9081D8E9A7B007FAFB6 /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; }; | ||
| 230 | + 8187A9091D8E9A7B007FAFB6 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVRadialGradientLayer.h; sourceTree = "<group>"; }; | ||
| 231 | + 8187A90A1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; }; | ||
| 232 | + 81D077391D911D50000A5E00 /* CNLiveNetworkManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveNetworkManager.h; sourceTree = "<group>"; }; | ||
| 233 | + 81D0773A1D911D50000A5E00 /* CNLiveNetworkManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveNetworkManager.m; sourceTree = "<group>"; }; | ||
| 234 | + 81D0773B1D911D50000A5E00 /* CNLiveURLRequestSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveURLRequestSerialization.h; sourceTree = "<group>"; }; | ||
| 235 | + 81D0773C1D911D50000A5E00 /* CNLiveURLRequestSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveURLRequestSerialization.m; sourceTree = "<group>"; }; | ||
| 236 | + 81D0773F1D912079000A5E00 /* CNLiveUploadIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveUploadIcon.h; sourceTree = "<group>"; }; | ||
| 237 | + 81D077401D912079000A5E00 /* CNLiveUploadIcon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveUploadIcon.m; sourceTree = "<group>"; }; | ||
| 238 | + B6B54BE51D8CFEC200089C9C /* UserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoViewController.h; sourceTree = "<group>"; }; | ||
| 239 | + B6B54BE61D8CFEC200089C9C /* UserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoViewController.m; sourceTree = "<group>"; }; | ||
| 240 | + B6B54BE81D8D009800089C9C /* UserInfoHeaderImageTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoHeaderImageTableViewCell.h; sourceTree = "<group>"; }; | ||
| 241 | + B6B54BE91D8D009800089C9C /* UserInfoHeaderImageTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoHeaderImageTableViewCell.m; sourceTree = "<group>"; }; | ||
| 242 | + B6B54BEB1D8D011000089C9C /* UserInfoTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoTableViewCell.h; sourceTree = "<group>"; }; | ||
| 243 | + B6B54BEC1D8D011000089C9C /* UserInfoTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoTableViewCell.m; sourceTree = "<group>"; }; | ||
| 244 | + B6B54BEE1D8D025A00089C9C /* ModifyUserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifyUserInfoViewController.h; sourceTree = "<group>"; }; | ||
| 245 | + B6B54BEF1D8D025A00089C9C /* ModifyUserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModifyUserInfoViewController.m; sourceTree = "<group>"; }; | ||
| 246 | +/* End PBXFileReference section */ | ||
| 247 | + | ||
| 248 | +/* Begin PBXFrameworksBuildPhase section */ | ||
| 249 | + 812642BE1D86A7A800B402CA /* Frameworks */ = { | ||
| 250 | + isa = PBXFrameworksBuildPhase; | ||
| 251 | + buildActionMask = 2147483647; | ||
| 252 | + files = ( | ||
| 253 | + 811600FE1D927E7E003CAE7D /* WebP.framework in Frameworks */, | ||
| 254 | + 817C6EC31D90D60E0016F211 /* ImageIO.framework in Frameworks */, | ||
| 255 | + 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */, | ||
| 256 | + 810D9B7A1D8FB7AC00B7A776 /* libz.tbd in Frameworks */, | ||
| 257 | + 810D9B7F1D8FCD1900B7A776 /* libsqlite3.0.tbd in Frameworks */, | ||
| 258 | + 810D9B701D8FB77500B7A776 /* SystemConfiguration.framework in Frameworks */, | ||
| 259 | + 810D9B761D8FB79500B7A776 /* CoreTelephony.framework in Frameworks */, | ||
| 260 | + 810D9B781D8FB7A400B7A776 /* libstdc++.tbd in Frameworks */, | ||
| 261 | + 810D9B741D8FB78A00B7A776 /* libsqlite3.tbd in Frameworks */, | ||
| 262 | + 810D9B721D8FB77E00B7A776 /* CoreGraphics.framework in Frameworks */, | ||
| 263 | + 810D9B6E1D8FB76E00B7A776 /* libiconv.tbd in Frameworks */, | ||
| 264 | + 810D9B6C1D8FB76300B7A776 /* Security.framework in Frameworks */, | ||
| 265 | + 810D9B651D8FB70600B7A776 /* TencentOpenAPI.framework in Frameworks */, | ||
| 266 | + 810D9B671D8FB70600B7A776 /* libWeiboSDK.a in Frameworks */, | ||
| 267 | + 810D9B691D8FB70600B7A776 /* libWeChatSDK.a in Frameworks */, | ||
| 268 | + ); | ||
| 269 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 270 | + }; | ||
| 271 | + 812642D71D86A7A800B402CA /* Frameworks */ = { | ||
| 272 | + isa = PBXFrameworksBuildPhase; | ||
| 273 | + buildActionMask = 2147483647; | ||
| 274 | + files = ( | ||
| 275 | + ); | ||
| 276 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 277 | + }; | ||
| 278 | + 812642E21D86A7A800B402CA /* Frameworks */ = { | ||
| 279 | + isa = PBXFrameworksBuildPhase; | ||
| 280 | + buildActionMask = 2147483647; | ||
| 281 | + files = ( | ||
| 282 | + ); | ||
| 283 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 284 | + }; | ||
| 285 | +/* End PBXFrameworksBuildPhase section */ | ||
| 286 | + | ||
| 287 | +/* Begin PBXGroup section */ | ||
| 288 | + 810D9B501D8FB70600B7A776 /* QQSDK */ = { | ||
| 289 | + isa = PBXGroup; | ||
| 290 | + children = ( | ||
| 291 | + 810D9B511D8FB70600B7A776 /* TencentOpenAPI.framework */, | ||
| 292 | + 810D9B521D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle */, | ||
| 293 | + ); | ||
| 294 | + name = QQSDK; | ||
| 295 | + path = CNLiveUserSystemDemo/ThirdSDK/QQSDK; | ||
| 296 | + sourceTree = SOURCE_ROOT; | ||
| 297 | + }; | ||
| 298 | + 810D9B531D8FB70600B7A776 /* SinaSDK */ = { | ||
| 299 | + isa = PBXGroup; | ||
| 300 | + children = ( | ||
| 301 | + 810D9B541D8FB70600B7A776 /* libWeiboSDK.a */, | ||
| 302 | + 810D9B551D8FB70600B7A776 /* WBHttpRequest+WeiboGame.h */, | ||
| 303 | + 810D9B561D8FB70600B7A776 /* WBHttpRequest+WeiboShare.h */, | ||
| 304 | + 810D9B571D8FB70600B7A776 /* WBHttpRequest+WeiboToken.h */, | ||
| 305 | + 810D9B581D8FB70600B7A776 /* WBHttpRequest+WeiboUser.h */, | ||
| 306 | + 810D9B591D8FB70600B7A776 /* WBHttpRequest.h */, | ||
| 307 | + 810D9B5A1D8FB70600B7A776 /* WBSDKBasicButton.h */, | ||
| 308 | + 810D9B5B1D8FB70600B7A776 /* WBSDKCommentButton.h */, | ||
| 309 | + 810D9B5C1D8FB70600B7A776 /* WBSDKRelationshipButton.h */, | ||
| 310 | + 810D9B5D1D8FB70600B7A776 /* WeiboSDK.bundle */, | ||
| 311 | + 810D9B5E1D8FB70600B7A776 /* WeiboSDK.h */, | ||
| 312 | + 810D9B5F1D8FB70600B7A776 /* WeiboUser.h */, | ||
| 313 | + ); | ||
| 314 | + name = SinaSDK; | ||
| 315 | + path = CNLiveUserSystemDemo/ThirdSDK/SinaSDK; | ||
| 316 | + sourceTree = SOURCE_ROOT; | ||
| 317 | + }; | ||
| 318 | + 810D9B601D8FB70600B7A776 /* WeChatSDK */ = { | ||
| 319 | + isa = PBXGroup; | ||
| 320 | + children = ( | ||
| 321 | + 810D9B611D8FB70600B7A776 /* libWeChatSDK.a */, | ||
| 322 | + 810D9B621D8FB70600B7A776 /* read_me.txt */, | ||
| 323 | + 810D9B631D8FB70600B7A776 /* WXApi.h */, | ||
| 324 | + 810D9B641D8FB70600B7A776 /* WXApiObject.h */, | ||
| 325 | + ); | ||
| 326 | + name = WeChatSDK; | ||
| 327 | + path = CNLiveUserSystemDemo/ThirdSDK/WeChatSDK; | ||
| 328 | + sourceTree = SOURCE_ROOT; | ||
| 329 | + }; | ||
| 330 | + 810D9B7D1D8FCBC200B7A776 /* frameworks */ = { | ||
| 331 | + isa = PBXGroup; | ||
| 332 | + children = ( | ||
| 333 | + 810D9B801D8FCD3200B7A776 /* libc++.tbd */, | ||
| 334 | + 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */, | ||
| 335 | + 810D9B791D8FB7AC00B7A776 /* libz.tbd */, | ||
| 336 | + 810D9B771D8FB7A400B7A776 /* libstdc++.tbd */, | ||
| 337 | + 810D9B751D8FB79500B7A776 /* CoreTelephony.framework */, | ||
| 338 | + 810D9B731D8FB78A00B7A776 /* libsqlite3.tbd */, | ||
| 339 | + 810D9B711D8FB77E00B7A776 /* CoreGraphics.framework */, | ||
| 340 | + 810D9B6F1D8FB77500B7A776 /* SystemConfiguration.framework */, | ||
| 341 | + 810D9B6D1D8FB76E00B7A776 /* libiconv.tbd */, | ||
| 342 | + 810D9B6B1D8FB76300B7A776 /* Security.framework */, | ||
| 343 | + ); | ||
| 344 | + name = frameworks; | ||
| 345 | + sourceTree = "<group>"; | ||
| 346 | + }; | ||
| 347 | + 811600CB1D927E7E003CAE7D /* SDWebImage */ = { | ||
| 348 | + isa = PBXGroup; | ||
| 349 | + children = ( | ||
| 350 | + 811600CC1D927E7E003CAE7D /* MKAnnotationView+WebCache.h */, | ||
| 351 | + 811600CD1D927E7E003CAE7D /* MKAnnotationView+WebCache.m */, | ||
| 352 | + 811600CE1D927E7E003CAE7D /* NSData+ImageContentType.h */, | ||
| 353 | + 811600CF1D927E7E003CAE7D /* NSData+ImageContentType.m */, | ||
| 354 | + 811600D01D927E7E003CAE7D /* SDImageCache.h */, | ||
| 355 | + 811600D11D927E7E003CAE7D /* SDImageCache.m */, | ||
| 356 | + 811600D21D927E7E003CAE7D /* SDWebImageCompat.h */, | ||
| 357 | + 811600D31D927E7E003CAE7D /* SDWebImageCompat.m */, | ||
| 358 | + 811600D41D927E7E003CAE7D /* SDWebImageDecoder.h */, | ||
| 359 | + 811600D51D927E7E003CAE7D /* SDWebImageDecoder.m */, | ||
| 360 | + 811600D61D927E7E003CAE7D /* SDWebImageDownloader.h */, | ||
| 361 | + 811600D71D927E7E003CAE7D /* SDWebImageDownloader.m */, | ||
| 362 | + 811600D81D927E7E003CAE7D /* SDWebImageDownloaderOperation.h */, | ||
| 363 | + 811600D91D927E7E003CAE7D /* SDWebImageDownloaderOperation.m */, | ||
| 364 | + 811600DA1D927E7E003CAE7D /* SDWebImageManager.h */, | ||
| 365 | + 811600DB1D927E7E003CAE7D /* SDWebImageManager.m */, | ||
| 366 | + 811600DC1D927E7E003CAE7D /* SDWebImageOperation.h */, | ||
| 367 | + 811600DD1D927E7E003CAE7D /* SDWebImagePrefetcher.h */, | ||
| 368 | + 811600DE1D927E7E003CAE7D /* SDWebImagePrefetcher.m */, | ||
| 369 | + 811600DF1D927E7E003CAE7D /* UIButton+WebCache.h */, | ||
| 370 | + 811600E01D927E7E003CAE7D /* UIButton+WebCache.m */, | ||
| 371 | + 811600E11D927E7E003CAE7D /* UIImage+GIF.h */, | ||
| 372 | + 811600E21D927E7E003CAE7D /* UIImage+GIF.m */, | ||
| 373 | + 811600E31D927E7E003CAE7D /* UIImage+MultiFormat.h */, | ||
| 374 | + 811600E41D927E7E003CAE7D /* UIImage+MultiFormat.m */, | ||
| 375 | + 811600E51D927E7E003CAE7D /* UIImage+WebP.h */, | ||
| 376 | + 811600E61D927E7E003CAE7D /* UIImage+WebP.m */, | ||
| 377 | + 811600E71D927E7E003CAE7D /* UIImageView+HighlightedWebCache.h */, | ||
| 378 | + 811600E81D927E7E003CAE7D /* UIImageView+HighlightedWebCache.m */, | ||
| 379 | + 811600E91D927E7E003CAE7D /* UIImageView+WebCache.h */, | ||
| 380 | + 811600EA1D927E7E003CAE7D /* UIImageView+WebCache.m */, | ||
| 381 | + 811600EB1D927E7E003CAE7D /* UIView+WebCacheOperation.h */, | ||
| 382 | + 811600EC1D927E7E003CAE7D /* UIView+WebCacheOperation.m */, | ||
| 383 | + 811600ED1D927E7E003CAE7D /* WebP.framework */, | ||
| 384 | + ); | ||
| 385 | + path = SDWebImage; | ||
| 386 | + sourceTree = "<group>"; | ||
| 387 | + }; | ||
| 388 | + 8116F8E11D8916250084FE49 /* Views */ = { | ||
| 389 | + isa = PBXGroup; | ||
| 390 | + children = ( | ||
| 391 | + 8116F8E21D8916250084FE49 /* IdAndPwdView.h */, | ||
| 392 | + 8116F8E31D8916250084FE49 /* IdAndPwdView.m */, | ||
| 393 | + 8116F8EF1D891BCD0084FE49 /* RegistBasicInformationView.h */, | ||
| 394 | + 8116F8F01D891BCD0084FE49 /* RegistBasicInformationView.m */, | ||
| 395 | + B6B54BE81D8D009800089C9C /* UserInfoHeaderImageTableViewCell.h */, | ||
| 396 | + B6B54BE91D8D009800089C9C /* UserInfoHeaderImageTableViewCell.m */, | ||
| 397 | + B6B54BEB1D8D011000089C9C /* UserInfoTableViewCell.h */, | ||
| 398 | + B6B54BEC1D8D011000089C9C /* UserInfoTableViewCell.m */, | ||
| 399 | + ); | ||
| 400 | + path = Views; | ||
| 401 | + sourceTree = "<group>"; | ||
| 402 | + }; | ||
| 403 | + 8116F8E51D89165A0084FE49 /* Conreollers */ = { | ||
| 404 | + isa = PBXGroup; | ||
| 405 | + children = ( | ||
| 406 | + 8116F8E81D89165A0084FE49 /* ViewController.h */, | ||
| 407 | + 8116F8E91D89165A0084FE49 /* ViewController.m */, | ||
| 408 | + 8116F8E61D89165A0084FE49 /* LoginViewController.h */, | ||
| 409 | + 8116F8E71D89165A0084FE49 /* LoginViewController.m */, | ||
| 410 | + 8116F8EC1D891AEF0084FE49 /* RegisterViewController.h */, | ||
| 411 | + 8116F8ED1D891AEF0084FE49 /* RegisterViewController.m */, | ||
| 412 | + B6B54BE51D8CFEC200089C9C /* UserInfoViewController.h */, | ||
| 413 | + B6B54BE61D8CFEC200089C9C /* UserInfoViewController.m */, | ||
| 414 | + B6B54BEE1D8D025A00089C9C /* ModifyUserInfoViewController.h */, | ||
| 415 | + B6B54BEF1D8D025A00089C9C /* ModifyUserInfoViewController.m */, | ||
| 416 | + ); | ||
| 417 | + path = Conreollers; | ||
| 418 | + sourceTree = "<group>"; | ||
| 419 | + }; | ||
| 420 | + 812642B81D86A7A800B402CA = { | ||
| 421 | + isa = PBXGroup; | ||
| 422 | + children = ( | ||
| 423 | + 817C6EC21D90D60E0016F211 /* ImageIO.framework */, | ||
| 424 | + 812642C71D86A7A800B402CA /* AppDelegate.h */, | ||
| 425 | + 812642C81D86A7A800B402CA /* AppDelegate.m */, | ||
| 426 | + 810D9B7D1D8FCBC200B7A776 /* frameworks */, | ||
| 427 | + 812642C31D86A7A800B402CA /* CNLiveUserSystemDemo */, | ||
| 428 | + 812642DD1D86A7A800B402CA /* CNLiveUserSystemDemoTests */, | ||
| 429 | + 812642E81D86A7A800B402CA /* CNLiveUserSystemDemoUITests */, | ||
| 430 | + 812642C21D86A7A800B402CA /* Products */, | ||
| 431 | + ); | ||
| 432 | + sourceTree = "<group>"; | ||
| 433 | + }; | ||
| 434 | + 812642C21D86A7A800B402CA /* Products */ = { | ||
| 435 | + isa = PBXGroup; | ||
| 436 | + children = ( | ||
| 437 | + 812642C11D86A7A800B402CA /* CNLiveUserSystemDemo.app */, | ||
| 438 | + 812642DA1D86A7A800B402CA /* CNLiveUserSystemDemoTests.xctest */, | ||
| 439 | + 812642E51D86A7A800B402CA /* CNLiveUserSystemDemoUITests.xctest */, | ||
| 440 | + ); | ||
| 441 | + name = Products; | ||
| 442 | + sourceTree = "<group>"; | ||
| 443 | + }; | ||
| 444 | + 812642C31D86A7A800B402CA /* CNLiveUserSystemDemo */ = { | ||
| 445 | + isa = PBXGroup; | ||
| 446 | + children = ( | ||
| 447 | + 81D077381D911D50000A5E00 /* CNLiveNetworking */, | ||
| 448 | + 8187A8FF1D8E9A7B007FAFB6 /* ThirdSDK */, | ||
| 449 | + 8187A8EC1D8E6385007FAFB6 /* Tools */, | ||
| 450 | + 812642F71D86A7E500B402CA /* CNLiveUserSystemSDK */, | ||
| 451 | + 8116F8E51D89165A0084FE49 /* Conreollers */, | ||
| 452 | + 8116F8E11D8916250084FE49 /* Views */, | ||
| 453 | + 812642CD1D86A7A800B402CA /* Main.storyboard */, | ||
| 454 | + 812642D01D86A7A800B402CA /* Assets.xcassets */, | ||
| 455 | + 812642D21D86A7A800B402CA /* LaunchScreen.storyboard */, | ||
| 456 | + 812642D51D86A7A800B402CA /* Info.plist */, | ||
| 457 | + 812642C41D86A7A800B402CA /* Supporting Files */, | ||
| 458 | + ); | ||
| 459 | + path = CNLiveUserSystemDemo; | ||
| 460 | + sourceTree = "<group>"; | ||
| 461 | + }; | ||
| 462 | + 812642C41D86A7A800B402CA /* Supporting Files */ = { | ||
| 463 | + isa = PBXGroup; | ||
| 464 | + children = ( | ||
| 465 | + 812642C51D86A7A800B402CA /* main.m */, | ||
| 466 | + 8116F8DA1D88F3010084FE49 /* PrefixHeader.pch */, | ||
| 467 | + ); | ||
| 468 | + name = "Supporting Files"; | ||
| 469 | + sourceTree = "<group>"; | ||
| 470 | + }; | ||
| 471 | + 812642DD1D86A7A800B402CA /* CNLiveUserSystemDemoTests */ = { | ||
| 472 | + isa = PBXGroup; | ||
| 473 | + children = ( | ||
| 474 | + 812642DE1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m */, | ||
| 475 | + 812642E01D86A7A800B402CA /* Info.plist */, | ||
| 476 | + ); | ||
| 477 | + path = CNLiveUserSystemDemoTests; | ||
| 478 | + sourceTree = "<group>"; | ||
| 479 | + }; | ||
| 480 | + 812642E81D86A7A800B402CA /* CNLiveUserSystemDemoUITests */ = { | ||
| 481 | + isa = PBXGroup; | ||
| 482 | + children = ( | ||
| 483 | + 812642E91D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m */, | ||
| 484 | + 812642EB1D86A7A800B402CA /* Info.plist */, | ||
| 485 | + ); | ||
| 486 | + path = CNLiveUserSystemDemoUITests; | ||
| 487 | + sourceTree = "<group>"; | ||
| 488 | + }; | ||
| 489 | + 812642F71D86A7E500B402CA /* CNLiveUserSystemSDK */ = { | ||
| 490 | + isa = PBXGroup; | ||
| 491 | + children = ( | ||
| 492 | + 812642FB1D86AFE600B402CA /* CNLiveUserSystemTypeDef.h */, | ||
| 493 | + 8187A8FC1D8E90C5007FAFB6 /* CNLiveUserManager.h */, | ||
| 494 | + 8187A8FD1D8E90C5007FAFB6 /* CNLiveUserManager.m */, | ||
| 495 | + 812642F81D86A83100B402CA /* CNLiveUserSystemCenter.h */, | ||
| 496 | + 812642F91D86A83100B402CA /* CNLiveUserSystemCenter.m */, | ||
| 497 | + 812540F51D87D9C000F32D66 /* CNLiveRegister.h */, | ||
| 498 | + 812540F61D87D9C000F32D66 /* CNLiveRegister.m */, | ||
| 499 | + 812540DB1D87916400F32D66 /* CNLiveLogin.h */, | ||
| 500 | + 812540DC1D87916400F32D66 /* CNLiveLogin.m */, | ||
| 501 | + 812540FB1D87DFFB00F32D66 /* CNLiveUserInfo.h */, | ||
| 502 | + 812540FC1D87DFFB00F32D66 /* CNLiveUserInfo.m */, | ||
| 503 | + 81D0773F1D912079000A5E00 /* CNLiveUploadIcon.h */, | ||
| 504 | + 81D077401D912079000A5E00 /* CNLiveUploadIcon.m */, | ||
| 505 | + 812540F81D87DDBE00F32D66 /* CNLiveFeedback.h */, | ||
| 506 | + 812540F91D87DDBE00F32D66 /* CNLiveFeedback.m */, | ||
| 507 | + 812540F21D87A70B00F32D66 /* CNLiveVerificationCode.h */, | ||
| 508 | + 812540F31D87A70B00F32D66 /* CNLiveVerificationCode.m */, | ||
| 509 | + 812540DE1D8792F700F32D66 /* CNLiveUserSystemTools.h */, | ||
| 510 | + 812540DF1D8792F700F32D66 /* CNLiveUserSystemTools.m */, | ||
| 511 | + 811600FF1D92929A003CAE7D /* NSDictionary+Safety.h */, | ||
| 512 | + 811601001D92929A003CAE7D /* NSDictionary+Safety.m */, | ||
| 513 | + ); | ||
| 514 | + path = CNLiveUserSystemSDK; | ||
| 515 | + sourceTree = "<group>"; | ||
| 516 | + }; | ||
| 517 | + 8187A8EC1D8E6385007FAFB6 /* Tools */ = { | ||
| 518 | + isa = PBXGroup; | ||
| 519 | + children = ( | ||
| 520 | + 8187A8ED1D8E6394007FAFB6 /* Tools.h */, | ||
| 521 | + 8187A8EE1D8E6394007FAFB6 /* Tools.m */, | ||
| 522 | + 8187A8F01D8E6486007FAFB6 /* NSObject+UserModel.h */, | ||
| 523 | + 8187A8F11D8E6486007FAFB6 /* NSObject+UserModel.m */, | ||
| 524 | + 8187A8F21D8E6486007FAFB6 /* UserInfoModel.h */, | ||
| 525 | + 8187A8F31D8E6486007FAFB6 /* UserInfoModel.m */, | ||
| 526 | + 8187A8F41D8E6486007FAFB6 /* UserInfoSava.h */, | ||
| 527 | + 8187A8F51D8E6486007FAFB6 /* UserInfoSava.m */, | ||
| 528 | + 8187A8F91D8E68CD007FAFB6 /* CNLiveLogout.h */, | ||
| 529 | + 8187A8FA1D8E68CD007FAFB6 /* CNLiveLogout.m */, | ||
| 530 | + 810D9B821D8FD2DF00B7A776 /* CNLiveThirdLoginManager.h */, | ||
| 531 | + 810D9B831D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m */, | ||
| 532 | + ); | ||
| 533 | + path = Tools; | ||
| 534 | + sourceTree = "<group>"; | ||
| 535 | + }; | ||
| 536 | + 8187A8FF1D8E9A7B007FAFB6 /* ThirdSDK */ = { | ||
| 537 | + isa = PBXGroup; | ||
| 538 | + children = ( | ||
| 539 | + 811600CB1D927E7E003CAE7D /* SDWebImage */, | ||
| 540 | + 810D9B501D8FB70600B7A776 /* QQSDK */, | ||
| 541 | + 810D9B531D8FB70600B7A776 /* SinaSDK */, | ||
| 542 | + 810D9B601D8FB70600B7A776 /* WeChatSDK */, | ||
| 543 | + 8187A9001D8E9A7B007FAFB6 /* SVProgressHUD */, | ||
| 544 | + ); | ||
| 545 | + path = ThirdSDK; | ||
| 546 | + sourceTree = "<group>"; | ||
| 547 | + }; | ||
| 548 | + 8187A9001D8E9A7B007FAFB6 /* SVProgressHUD */ = { | ||
| 549 | + isa = PBXGroup; | ||
| 550 | + children = ( | ||
| 551 | + 8187A9011D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.h */, | ||
| 552 | + 8187A9021D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.m */, | ||
| 553 | + 8187A9031D8E9A7B007FAFB6 /* SVProgressAnimatedView.h */, | ||
| 554 | + 8187A9041D8E9A7B007FAFB6 /* SVProgressAnimatedView.m */, | ||
| 555 | + 8187A9051D8E9A7B007FAFB6 /* SVProgressHUD-Prefix.pch */, | ||
| 556 | + 8187A9061D8E9A7B007FAFB6 /* SVProgressHUD.bundle */, | ||
| 557 | + 8187A9071D8E9A7B007FAFB6 /* SVProgressHUD.h */, | ||
| 558 | + 8187A9081D8E9A7B007FAFB6 /* SVProgressHUD.m */, | ||
| 559 | + 8187A9091D8E9A7B007FAFB6 /* SVRadialGradientLayer.h */, | ||
| 560 | + 8187A90A1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m */, | ||
| 561 | + ); | ||
| 562 | + path = SVProgressHUD; | ||
| 563 | + sourceTree = "<group>"; | ||
| 564 | + }; | ||
| 565 | + 81D077381D911D50000A5E00 /* CNLiveNetworking */ = { | ||
| 566 | + isa = PBXGroup; | ||
| 567 | + children = ( | ||
| 568 | + 81D077391D911D50000A5E00 /* CNLiveNetworkManager.h */, | ||
| 569 | + 81D0773A1D911D50000A5E00 /* CNLiveNetworkManager.m */, | ||
| 570 | + 81D0773B1D911D50000A5E00 /* CNLiveURLRequestSerialization.h */, | ||
| 571 | + 81D0773C1D911D50000A5E00 /* CNLiveURLRequestSerialization.m */, | ||
| 572 | + ); | ||
| 573 | + path = CNLiveNetworking; | ||
| 574 | + sourceTree = "<group>"; | ||
| 575 | + }; | ||
| 576 | +/* End PBXGroup section */ | ||
| 577 | + | ||
| 578 | +/* Begin PBXNativeTarget section */ | ||
| 579 | + 812642C01D86A7A800B402CA /* CNLiveUserSystemDemo */ = { | ||
| 580 | + isa = PBXNativeTarget; | ||
| 581 | + buildConfigurationList = 812642EE1D86A7A800B402CA /* Build configuration list for PBXNativeTarget "CNLiveUserSystemDemo" */; | ||
| 582 | + buildPhases = ( | ||
| 583 | + 812642BD1D86A7A800B402CA /* Sources */, | ||
| 584 | + 812642BE1D86A7A800B402CA /* Frameworks */, | ||
| 585 | + 812642BF1D86A7A800B402CA /* Resources */, | ||
| 586 | + ); | ||
| 587 | + buildRules = ( | ||
| 588 | + ); | ||
| 589 | + dependencies = ( | ||
| 590 | + ); | ||
| 591 | + name = CNLiveUserSystemDemo; | ||
| 592 | + productName = CNLiveUserSystemDemo; | ||
| 593 | + productReference = 812642C11D86A7A800B402CA /* CNLiveUserSystemDemo.app */; | ||
| 594 | + productType = "com.apple.product-type.application"; | ||
| 595 | + }; | ||
| 596 | + 812642D91D86A7A800B402CA /* CNLiveUserSystemDemoTests */ = { | ||
| 597 | + isa = PBXNativeTarget; | ||
| 598 | + buildConfigurationList = 812642F11D86A7A800B402CA /* Build configuration list for PBXNativeTarget "CNLiveUserSystemDemoTests" */; | ||
| 599 | + buildPhases = ( | ||
| 600 | + 812642D61D86A7A800B402CA /* Sources */, | ||
| 601 | + 812642D71D86A7A800B402CA /* Frameworks */, | ||
| 602 | + 812642D81D86A7A800B402CA /* Resources */, | ||
| 603 | + ); | ||
| 604 | + buildRules = ( | ||
| 605 | + ); | ||
| 606 | + dependencies = ( | ||
| 607 | + 812642DC1D86A7A800B402CA /* PBXTargetDependency */, | ||
| 608 | + ); | ||
| 609 | + name = CNLiveUserSystemDemoTests; | ||
| 610 | + productName = CNLiveUserSystemDemoTests; | ||
| 611 | + productReference = 812642DA1D86A7A800B402CA /* CNLiveUserSystemDemoTests.xctest */; | ||
| 612 | + productType = "com.apple.product-type.bundle.unit-test"; | ||
| 613 | + }; | ||
| 614 | + 812642E41D86A7A800B402CA /* CNLiveUserSystemDemoUITests */ = { | ||
| 615 | + isa = PBXNativeTarget; | ||
| 616 | + buildConfigurationList = 812642F41D86A7A800B402CA /* Build configuration list for PBXNativeTarget "CNLiveUserSystemDemoUITests" */; | ||
| 617 | + buildPhases = ( | ||
| 618 | + 812642E11D86A7A800B402CA /* Sources */, | ||
| 619 | + 812642E21D86A7A800B402CA /* Frameworks */, | ||
| 620 | + 812642E31D86A7A800B402CA /* Resources */, | ||
| 621 | + ); | ||
| 622 | + buildRules = ( | ||
| 623 | + ); | ||
| 624 | + dependencies = ( | ||
| 625 | + 812642E71D86A7A800B402CA /* PBXTargetDependency */, | ||
| 626 | + ); | ||
| 627 | + name = CNLiveUserSystemDemoUITests; | ||
| 628 | + productName = CNLiveUserSystemDemoUITests; | ||
| 629 | + productReference = 812642E51D86A7A800B402CA /* CNLiveUserSystemDemoUITests.xctest */; | ||
| 630 | + productType = "com.apple.product-type.bundle.ui-testing"; | ||
| 631 | + }; | ||
| 632 | +/* End PBXNativeTarget section */ | ||
| 633 | + | ||
| 634 | +/* Begin PBXProject section */ | ||
| 635 | + 812642B91D86A7A800B402CA /* Project object */ = { | ||
| 636 | + isa = PBXProject; | ||
| 637 | + attributes = { | ||
| 638 | + LastUpgradeCheck = 0800; | ||
| 639 | + ORGANIZATIONNAME = zhulin; | ||
| 640 | + TargetAttributes = { | ||
| 641 | + 812642C01D86A7A800B402CA = { | ||
| 642 | + CreatedOnToolsVersion = 7.3.1; | ||
| 643 | + DevelopmentTeam = 94X49GG3ZW; | ||
| 644 | + ProvisioningStyle = Automatic; | ||
| 645 | + }; | ||
| 646 | + 812642D91D86A7A800B402CA = { | ||
| 647 | + CreatedOnToolsVersion = 7.3.1; | ||
| 648 | + DevelopmentTeam = 94X49GG3ZW; | ||
| 649 | + TestTargetID = 812642C01D86A7A800B402CA; | ||
| 650 | + }; | ||
| 651 | + 812642E41D86A7A800B402CA = { | ||
| 652 | + CreatedOnToolsVersion = 7.3.1; | ||
| 653 | + DevelopmentTeam = 94X49GG3ZW; | ||
| 654 | + TestTargetID = 812642C01D86A7A800B402CA; | ||
| 655 | + }; | ||
| 656 | + }; | ||
| 657 | + }; | ||
| 658 | + buildConfigurationList = 812642BC1D86A7A800B402CA /* Build configuration list for PBXProject "CNLiveUserSystemDemo" */; | ||
| 659 | + compatibilityVersion = "Xcode 3.2"; | ||
| 660 | + developmentRegion = English; | ||
| 661 | + hasScannedForEncodings = 0; | ||
| 662 | + knownRegions = ( | ||
| 663 | + en, | ||
| 664 | + Base, | ||
| 665 | + ); | ||
| 666 | + mainGroup = 812642B81D86A7A800B402CA; | ||
| 667 | + productRefGroup = 812642C21D86A7A800B402CA /* Products */; | ||
| 668 | + projectDirPath = ""; | ||
| 669 | + projectRoot = ""; | ||
| 670 | + targets = ( | ||
| 671 | + 812642C01D86A7A800B402CA /* CNLiveUserSystemDemo */, | ||
| 672 | + 812642D91D86A7A800B402CA /* CNLiveUserSystemDemoTests */, | ||
| 673 | + 812642E41D86A7A800B402CA /* CNLiveUserSystemDemoUITests */, | ||
| 674 | + ); | ||
| 675 | + }; | ||
| 676 | +/* End PBXProject section */ | ||
| 677 | + | ||
| 678 | +/* Begin PBXResourcesBuildPhase section */ | ||
| 679 | + 812642BF1D86A7A800B402CA /* Resources */ = { | ||
| 680 | + isa = PBXResourcesBuildPhase; | ||
| 681 | + buildActionMask = 2147483647; | ||
| 682 | + files = ( | ||
| 683 | + 812642D41D86A7A800B402CA /* LaunchScreen.storyboard in Resources */, | ||
| 684 | + 812642D11D86A7A800B402CA /* Assets.xcassets in Resources */, | ||
| 685 | + 812642CF1D86A7A800B402CA /* Main.storyboard in Resources */, | ||
| 686 | + 810D9B661D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle in Resources */, | ||
| 687 | + 8187A90D1D8E9A7B007FAFB6 /* SVProgressHUD.bundle in Resources */, | ||
| 688 | + 810D9B681D8FB70600B7A776 /* WeiboSDK.bundle in Resources */, | ||
| 689 | + 810D9B6A1D8FB70600B7A776 /* read_me.txt in Resources */, | ||
| 690 | + ); | ||
| 691 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 692 | + }; | ||
| 693 | + 812642D81D86A7A800B402CA /* Resources */ = { | ||
| 694 | + isa = PBXResourcesBuildPhase; | ||
| 695 | + buildActionMask = 2147483647; | ||
| 696 | + files = ( | ||
| 697 | + ); | ||
| 698 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 699 | + }; | ||
| 700 | + 812642E31D86A7A800B402CA /* Resources */ = { | ||
| 701 | + isa = PBXResourcesBuildPhase; | ||
| 702 | + buildActionMask = 2147483647; | ||
| 703 | + files = ( | ||
| 704 | + ); | ||
| 705 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 706 | + }; | ||
| 707 | +/* End PBXResourcesBuildPhase section */ | ||
| 708 | + | ||
| 709 | +/* Begin PBXSourcesBuildPhase section */ | ||
| 710 | + 812642BD1D86A7A800B402CA /* Sources */ = { | ||
| 711 | + isa = PBXSourcesBuildPhase; | ||
| 712 | + buildActionMask = 2147483647; | ||
| 713 | + files = ( | ||
| 714 | + 811600FB1D927E7E003CAE7D /* UIImageView+HighlightedWebCache.m in Sources */, | ||
| 715 | + 812540DD1D87916400F32D66 /* CNLiveLogin.m in Sources */, | ||
| 716 | + 812540F71D87D9C000F32D66 /* CNLiveRegister.m in Sources */, | ||
| 717 | + 812540E01D8792F700F32D66 /* CNLiveUserSystemTools.m in Sources */, | ||
| 718 | + 8187A8FE1D8E90C5007FAFB6 /* CNLiveUserManager.m in Sources */, | ||
| 719 | + 810D9B841D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m in Sources */, | ||
| 720 | + 811600FC1D927E7E003CAE7D /* UIImageView+WebCache.m in Sources */, | ||
| 721 | + B6B54BEA1D8D009800089C9C /* UserInfoHeaderImageTableViewCell.m in Sources */, | ||
| 722 | + 8187A90C1D8E9A7B007FAFB6 /* SVProgressAnimatedView.m in Sources */, | ||
| 723 | + 811600F71D927E7E003CAE7D /* UIButton+WebCache.m in Sources */, | ||
| 724 | + 8116F8E41D8916250084FE49 /* IdAndPwdView.m in Sources */, | ||
| 725 | + 8116F8EA1D89165A0084FE49 /* LoginViewController.m in Sources */, | ||
| 726 | + 812540FA1D87DDBE00F32D66 /* CNLiveFeedback.m in Sources */, | ||
| 727 | + 811600F81D927E7E003CAE7D /* UIImage+GIF.m in Sources */, | ||
| 728 | + 811600F61D927E7E003CAE7D /* SDWebImagePrefetcher.m in Sources */, | ||
| 729 | + 812642FA1D86A83100B402CA /* CNLiveUserSystemCenter.m in Sources */, | ||
| 730 | + 8116F8F11D891BCD0084FE49 /* RegistBasicInformationView.m in Sources */, | ||
| 731 | + 8187A8F61D8E6486007FAFB6 /* NSObject+UserModel.m in Sources */, | ||
| 732 | + 811600F11D927E7E003CAE7D /* SDWebImageCompat.m in Sources */, | ||
| 733 | + 811600F31D927E7E003CAE7D /* SDWebImageDownloader.m in Sources */, | ||
| 734 | + 811600F41D927E7E003CAE7D /* SDWebImageDownloaderOperation.m in Sources */, | ||
| 735 | + 811600F21D927E7E003CAE7D /* SDWebImageDecoder.m in Sources */, | ||
| 736 | + 811600F51D927E7E003CAE7D /* SDWebImageManager.m in Sources */, | ||
| 737 | + 8187A8FB1D8E68CD007FAFB6 /* CNLiveLogout.m in Sources */, | ||
| 738 | + 81D0773E1D911D50000A5E00 /* CNLiveURLRequestSerialization.m in Sources */, | ||
| 739 | + 8116F8EB1D89165A0084FE49 /* ViewController.m in Sources */, | ||
| 740 | + 8187A90E1D8E9A7B007FAFB6 /* SVProgressHUD.m in Sources */, | ||
| 741 | + 8116F8EE1D891AEF0084FE49 /* RegisterViewController.m in Sources */, | ||
| 742 | + 811600FD1D927E7E003CAE7D /* UIView+WebCacheOperation.m in Sources */, | ||
| 743 | + 8187A8EF1D8E6394007FAFB6 /* Tools.m in Sources */, | ||
| 744 | + 812642C91D86A7A800B402CA /* AppDelegate.m in Sources */, | ||
| 745 | + 81D0773D1D911D50000A5E00 /* CNLiveNetworkManager.m in Sources */, | ||
| 746 | + 8187A90B1D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.m in Sources */, | ||
| 747 | + 812540F41D87A70B00F32D66 /* CNLiveVerificationCode.m in Sources */, | ||
| 748 | + 811600EE1D927E7E003CAE7D /* MKAnnotationView+WebCache.m in Sources */, | ||
| 749 | + 811600F91D927E7E003CAE7D /* UIImage+MultiFormat.m in Sources */, | ||
| 750 | + B6B54BED1D8D011000089C9C /* UserInfoTableViewCell.m in Sources */, | ||
| 751 | + 8187A8F81D8E6486007FAFB6 /* UserInfoSava.m in Sources */, | ||
| 752 | + 811600EF1D927E7E003CAE7D /* NSData+ImageContentType.m in Sources */, | ||
| 753 | + 812642C61D86A7A800B402CA /* main.m in Sources */, | ||
| 754 | + 811601011D92929A003CAE7D /* NSDictionary+Safety.m in Sources */, | ||
| 755 | + 811600FA1D927E7E003CAE7D /* UIImage+WebP.m in Sources */, | ||
| 756 | + 812540FD1D87DFFB00F32D66 /* CNLiveUserInfo.m in Sources */, | ||
| 757 | + B6B54BF01D8D025A00089C9C /* ModifyUserInfoViewController.m in Sources */, | ||
| 758 | + 81D077411D912079000A5E00 /* CNLiveUploadIcon.m in Sources */, | ||
| 759 | + 8187A90F1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m in Sources */, | ||
| 760 | + B6B54BE71D8CFEC200089C9C /* UserInfoViewController.m in Sources */, | ||
| 761 | + 8187A8F71D8E6486007FAFB6 /* UserInfoModel.m in Sources */, | ||
| 762 | + 811600F01D927E7E003CAE7D /* SDImageCache.m in Sources */, | ||
| 763 | + ); | ||
| 764 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 765 | + }; | ||
| 766 | + 812642D61D86A7A800B402CA /* Sources */ = { | ||
| 767 | + isa = PBXSourcesBuildPhase; | ||
| 768 | + buildActionMask = 2147483647; | ||
| 769 | + files = ( | ||
| 770 | + 812642DF1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m in Sources */, | ||
| 771 | + ); | ||
| 772 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 773 | + }; | ||
| 774 | + 812642E11D86A7A800B402CA /* Sources */ = { | ||
| 775 | + isa = PBXSourcesBuildPhase; | ||
| 776 | + buildActionMask = 2147483647; | ||
| 777 | + files = ( | ||
| 778 | + 812642EA1D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m in Sources */, | ||
| 779 | + ); | ||
| 780 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 781 | + }; | ||
| 782 | +/* End PBXSourcesBuildPhase section */ | ||
| 783 | + | ||
| 784 | +/* Begin PBXTargetDependency section */ | ||
| 785 | + 812642DC1D86A7A800B402CA /* PBXTargetDependency */ = { | ||
| 786 | + isa = PBXTargetDependency; | ||
| 787 | + target = 812642C01D86A7A800B402CA /* CNLiveUserSystemDemo */; | ||
| 788 | + targetProxy = 812642DB1D86A7A800B402CA /* PBXContainerItemProxy */; | ||
| 789 | + }; | ||
| 790 | + 812642E71D86A7A800B402CA /* PBXTargetDependency */ = { | ||
| 791 | + isa = PBXTargetDependency; | ||
| 792 | + target = 812642C01D86A7A800B402CA /* CNLiveUserSystemDemo */; | ||
| 793 | + targetProxy = 812642E61D86A7A800B402CA /* PBXContainerItemProxy */; | ||
| 794 | + }; | ||
| 795 | +/* End PBXTargetDependency section */ | ||
| 796 | + | ||
| 797 | +/* Begin PBXVariantGroup section */ | ||
| 798 | + 812642CD1D86A7A800B402CA /* Main.storyboard */ = { | ||
| 799 | + isa = PBXVariantGroup; | ||
| 800 | + children = ( | ||
| 801 | + 812642CE1D86A7A800B402CA /* Base */, | ||
| 802 | + ); | ||
| 803 | + name = Main.storyboard; | ||
| 804 | + sourceTree = "<group>"; | ||
| 805 | + }; | ||
| 806 | + 812642D21D86A7A800B402CA /* LaunchScreen.storyboard */ = { | ||
| 807 | + isa = PBXVariantGroup; | ||
| 808 | + children = ( | ||
| 809 | + 812642D31D86A7A800B402CA /* Base */, | ||
| 810 | + ); | ||
| 811 | + name = LaunchScreen.storyboard; | ||
| 812 | + sourceTree = "<group>"; | ||
| 813 | + }; | ||
| 814 | +/* End PBXVariantGroup section */ | ||
| 815 | + | ||
| 816 | +/* Begin XCBuildConfiguration section */ | ||
| 817 | + 812642EC1D86A7A800B402CA /* Debug */ = { | ||
| 818 | + isa = XCBuildConfiguration; | ||
| 819 | + buildSettings = { | ||
| 820 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 821 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 822 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 823 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 824 | + CLANG_ENABLE_MODULES = YES; | ||
| 825 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 826 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 827 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 828 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 829 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 830 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 831 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 832 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 833 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 834 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 835 | + CLANG_WARN_UNREACHABLE_CODE = YES; | ||
| 836 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 837 | + CODE_SIGN_IDENTITY = "iPhone Developer: 林 朱 (EJQZE9LNV2)"; | ||
| 838 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 林 朱 (EJQZE9LNV2)"; | ||
| 839 | + COPY_PHASE_STRIP = NO; | ||
| 840 | + DEBUG_INFORMATION_FORMAT = dwarf; | ||
| 841 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 842 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 843 | + ENABLE_TESTABILITY = YES; | ||
| 844 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 845 | + GCC_DYNAMIC_NO_PIC = NO; | ||
| 846 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 847 | + GCC_OPTIMIZATION_LEVEL = 0; | ||
| 848 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
| 849 | + "DEBUG=1", | ||
| 850 | + "$(inherited)", | ||
| 851 | + ); | ||
| 852 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 853 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 854 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 855 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 856 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 857 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 858 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | ||
| 859 | + MTL_ENABLE_DEBUG_INFO = YES; | ||
| 860 | + ONLY_ACTIVE_ARCH = YES; | ||
| 861 | + PROVISIONING_PROFILE = "642f06c5-9a0a-4872-8f91-400090b7ebb0"; | ||
| 862 | + SDKROOT = iphoneos; | ||
| 863 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
| 864 | + }; | ||
| 865 | + name = Debug; | ||
| 866 | + }; | ||
| 867 | + 812642ED1D86A7A800B402CA /* Release */ = { | ||
| 868 | + isa = XCBuildConfiguration; | ||
| 869 | + buildSettings = { | ||
| 870 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 871 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 872 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 873 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 874 | + CLANG_ENABLE_MODULES = YES; | ||
| 875 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 876 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 877 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 878 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 879 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 880 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 881 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 882 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 883 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 884 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 885 | + CLANG_WARN_UNREACHABLE_CODE = YES; | ||
| 886 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 887 | + CODE_SIGN_IDENTITY = "iPhone Developer: 林 朱 (EJQZE9LNV2)"; | ||
| 888 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 林 朱 (EJQZE9LNV2)"; | ||
| 889 | + COPY_PHASE_STRIP = NO; | ||
| 890 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 891 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 892 | + ENABLE_NS_ASSERTIONS = NO; | ||
| 893 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 894 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 895 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 896 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 897 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 898 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 899 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 900 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 901 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 902 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | ||
| 903 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
| 904 | + PROVISIONING_PROFILE = "642f06c5-9a0a-4872-8f91-400090b7ebb0"; | ||
| 905 | + SDKROOT = iphoneos; | ||
| 906 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
| 907 | + VALIDATE_PRODUCT = YES; | ||
| 908 | + }; | ||
| 909 | + name = Release; | ||
| 910 | + }; | ||
| 911 | + 812642EF1D86A7A800B402CA /* Debug */ = { | ||
| 912 | + isa = XCBuildConfiguration; | ||
| 913 | + buildSettings = { | ||
| 914 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 915 | + CODE_SIGN_IDENTITY = "iPhone Developer: 林 朱 (EJQZE9LNV2)"; | ||
| 916 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
| 917 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 918 | + ENABLE_BITCODE = NO; | ||
| 919 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 920 | + "$(inherited)", | ||
| 921 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/QQSDK", | ||
| 922 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SDWebImage", | ||
| 923 | + ); | ||
| 924 | + GCC_PREFIX_HEADER = /Users/android/Desktop/CNLiveUserSystemDemo/CNLiveUserSystemDemo/PrefixHeader.pch; | ||
| 925 | + INFOPLIST_FILE = CNLiveUserSystemDemo/Info.plist; | ||
| 926 | + IPHONEOS_DEPLOYMENT_TARGET = 10.0; | ||
| 927 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||
| 928 | + LIBRARY_SEARCH_PATHS = ( | ||
| 929 | + "$(inherited)", | ||
| 930 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SinaSDK", | ||
| 931 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/WeChatSDK", | ||
| 932 | + ); | ||
| 933 | + OTHER_LDFLAGS = ( | ||
| 934 | + "-fobjc-arc", | ||
| 935 | + "-ObjC", | ||
| 936 | + ); | ||
| 937 | + PRODUCT_BUNDLE_IDENTIFIER = "shixunzhongguo-cnlive"; | ||
| 938 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 939 | + PROVISIONING_PROFILE = ""; | ||
| 940 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 941 | + }; | ||
| 942 | + name = Debug; | ||
| 943 | + }; | ||
| 944 | + 812642F01D86A7A800B402CA /* Release */ = { | ||
| 945 | + isa = XCBuildConfiguration; | ||
| 946 | + buildSettings = { | ||
| 947 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 948 | + CODE_SIGN_IDENTITY = "iPhone Developer: 林 朱 (EJQZE9LNV2)"; | ||
| 949 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
| 950 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 951 | + ENABLE_BITCODE = NO; | ||
| 952 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 953 | + "$(inherited)", | ||
| 954 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/QQSDK", | ||
| 955 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SDWebImage", | ||
| 956 | + ); | ||
| 957 | + GCC_PREFIX_HEADER = /Users/android/Desktop/CNLiveUserSystemDemo/CNLiveUserSystemDemo/PrefixHeader.pch; | ||
| 958 | + INFOPLIST_FILE = CNLiveUserSystemDemo/Info.plist; | ||
| 959 | + IPHONEOS_DEPLOYMENT_TARGET = 10.0; | ||
| 960 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||
| 961 | + LIBRARY_SEARCH_PATHS = ( | ||
| 962 | + "$(inherited)", | ||
| 963 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SinaSDK", | ||
| 964 | + "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/WeChatSDK", | ||
| 965 | + ); | ||
| 966 | + OTHER_LDFLAGS = ( | ||
| 967 | + "-fobjc-arc", | ||
| 968 | + "-ObjC", | ||
| 969 | + ); | ||
| 970 | + PRODUCT_BUNDLE_IDENTIFIER = "shixunzhongguo-cnlive"; | ||
| 971 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 972 | + PROVISIONING_PROFILE = ""; | ||
| 973 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 974 | + }; | ||
| 975 | + name = Release; | ||
| 976 | + }; | ||
| 977 | + 812642F21D86A7A800B402CA /* Debug */ = { | ||
| 978 | + isa = XCBuildConfiguration; | ||
| 979 | + buildSettings = { | ||
| 980 | + BUNDLE_LOADER = "$(TEST_HOST)"; | ||
| 981 | + INFOPLIST_FILE = CNLiveUserSystemDemoTests/Info.plist; | ||
| 982 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; | ||
| 983 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.CNLiveUserSystemDemoTests; | ||
| 984 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 985 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveUserSystemDemo.app/CNLiveUserSystemDemo"; | ||
| 986 | + }; | ||
| 987 | + name = Debug; | ||
| 988 | + }; | ||
| 989 | + 812642F31D86A7A800B402CA /* Release */ = { | ||
| 990 | + isa = XCBuildConfiguration; | ||
| 991 | + buildSettings = { | ||
| 992 | + BUNDLE_LOADER = "$(TEST_HOST)"; | ||
| 993 | + INFOPLIST_FILE = CNLiveUserSystemDemoTests/Info.plist; | ||
| 994 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; | ||
| 995 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.CNLiveUserSystemDemoTests; | ||
| 996 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 997 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveUserSystemDemo.app/CNLiveUserSystemDemo"; | ||
| 998 | + }; | ||
| 999 | + name = Release; | ||
| 1000 | + }; | ||
| 1001 | + 812642F51D86A7A800B402CA /* Debug */ = { | ||
| 1002 | + isa = XCBuildConfiguration; | ||
| 1003 | + buildSettings = { | ||
| 1004 | + INFOPLIST_FILE = CNLiveUserSystemDemoUITests/Info.plist; | ||
| 1005 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; | ||
| 1006 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.CNLiveUserSystemDemoUITests; | ||
| 1007 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 1008 | + TEST_TARGET_NAME = CNLiveUserSystemDemo; | ||
| 1009 | + }; | ||
| 1010 | + name = Debug; | ||
| 1011 | + }; | ||
| 1012 | + 812642F61D86A7A800B402CA /* Release */ = { | ||
| 1013 | + isa = XCBuildConfiguration; | ||
| 1014 | + buildSettings = { | ||
| 1015 | + INFOPLIST_FILE = CNLiveUserSystemDemoUITests/Info.plist; | ||
| 1016 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; | ||
| 1017 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.CNLiveUserSystemDemoUITests; | ||
| 1018 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 1019 | + TEST_TARGET_NAME = CNLiveUserSystemDemo; | ||
| 1020 | + }; | ||
| 1021 | + name = Release; | ||
| 1022 | + }; | ||
| 1023 | +/* End XCBuildConfiguration section */ | ||
| 1024 | + | ||
| 1025 | +/* Begin XCConfigurationList section */ | ||
| 1026 | + 812642BC1D86A7A800B402CA /* Build configuration list for PBXProject "CNLiveUserSystemDemo" */ = { | ||
| 1027 | + isa = XCConfigurationList; | ||
| 1028 | + buildConfigurations = ( | ||
| 1029 | + 812642EC1D86A7A800B402CA /* Debug */, | ||
| 1030 | + 812642ED1D86A7A800B402CA /* Release */, | ||
| 1031 | + ); | ||
| 1032 | + defaultConfigurationIsVisible = 0; | ||
| 1033 | + defaultConfigurationName = Release; | ||
| 1034 | + }; | ||
| 1035 | + 812642EE1D86A7A800B402CA /* Build configuration list for PBXNativeTarget "CNLiveUserSystemDemo" */ = { | ||
| 1036 | + isa = XCConfigurationList; | ||
| 1037 | + buildConfigurations = ( | ||
| 1038 | + 812642EF1D86A7A800B402CA /* Debug */, | ||
| 1039 | + 812642F01D86A7A800B402CA /* Release */, | ||
| 1040 | + ); | ||
| 1041 | + defaultConfigurationIsVisible = 0; | ||
| 1042 | + defaultConfigurationName = Release; | ||
| 1043 | + }; | ||
| 1044 | + 812642F11D86A7A800B402CA /* Build configuration list for PBXNativeTarget "CNLiveUserSystemDemoTests" */ = { | ||
| 1045 | + isa = XCConfigurationList; | ||
| 1046 | + buildConfigurations = ( | ||
| 1047 | + 812642F21D86A7A800B402CA /* Debug */, | ||
| 1048 | + 812642F31D86A7A800B402CA /* Release */, | ||
| 1049 | + ); | ||
| 1050 | + defaultConfigurationIsVisible = 0; | ||
| 1051 | + defaultConfigurationName = Release; | ||
| 1052 | + }; | ||
| 1053 | + 812642F41D86A7A800B402CA /* Build configuration list for PBXNativeTarget "CNLiveUserSystemDemoUITests" */ = { | ||
| 1054 | + isa = XCConfigurationList; | ||
| 1055 | + buildConfigurations = ( | ||
| 1056 | + 812642F51D86A7A800B402CA /* Debug */, | ||
| 1057 | + 812642F61D86A7A800B402CA /* Release */, | ||
| 1058 | + ); | ||
| 1059 | + defaultConfigurationIsVisible = 0; | ||
| 1060 | + defaultConfigurationName = Release; | ||
| 1061 | + }; | ||
| 1062 | +/* End XCConfigurationList section */ | ||
| 1063 | + }; | ||
| 1064 | + rootObject = 812642B91D86A7A800B402CA /* Project object */; | ||
| 1065 | +} |
CNLiveUserSystemDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
0 → 100644
CNLiveUserSystemDemo.xcodeproj/project.xcworkspace/xcuserdata/iOS.xcuserdatad/UserInterfaceState.xcuserstate
0 → 100644
No preview for this file type
CNLiveUserSystemDemo.xcodeproj/project.xcworkspace/xcuserdata/zhulin.xcuserdatad/UserInterfaceState.xcuserstate
0 → 100644
No preview for this file type
CNLiveUserSystemDemo.xcodeproj/xcuserdata/iOS.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Bucket | ||
| 3 | + type = "1" | ||
| 4 | + version = "2.0"> | ||
| 5 | + <Breakpoints> | ||
| 6 | + <BreakpointProxy | ||
| 7 | + BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | ||
| 8 | + <BreakpointContent | ||
| 9 | + shouldBeEnabled = "Yes" | ||
| 10 | + ignoreCount = "0" | ||
| 11 | + continueAfterRunningActions = "No" | ||
| 12 | + scope = "0" | ||
| 13 | + stopOnStyle = "0"> | ||
| 14 | + </BreakpointContent> | ||
| 15 | + </BreakpointProxy> | ||
| 16 | + </Breakpoints> | ||
| 17 | +</Bucket> |
CNLiveUserSystemDemo.xcodeproj/xcuserdata/iOS.xcuserdatad/xcschemes/CNLiveUserSystemDemo.xcscheme
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Scheme | ||
| 3 | + LastUpgradeVersion = "0800" | ||
| 4 | + version = "1.3"> | ||
| 5 | + <BuildAction | ||
| 6 | + parallelizeBuildables = "YES" | ||
| 7 | + buildImplicitDependencies = "YES"> | ||
| 8 | + <BuildActionEntries> | ||
| 9 | + <BuildActionEntry | ||
| 10 | + buildForTesting = "YES" | ||
| 11 | + buildForRunning = "YES" | ||
| 12 | + buildForProfiling = "YES" | ||
| 13 | + buildForArchiving = "YES" | ||
| 14 | + buildForAnalyzing = "YES"> | ||
| 15 | + <BuildableReference | ||
| 16 | + BuildableIdentifier = "primary" | ||
| 17 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 18 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 19 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 20 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 21 | + </BuildableReference> | ||
| 22 | + </BuildActionEntry> | ||
| 23 | + </BuildActionEntries> | ||
| 24 | + </BuildAction> | ||
| 25 | + <TestAction | ||
| 26 | + buildConfiguration = "Debug" | ||
| 27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 30 | + <Testables> | ||
| 31 | + <TestableReference | ||
| 32 | + skipped = "NO"> | ||
| 33 | + <BuildableReference | ||
| 34 | + BuildableIdentifier = "primary" | ||
| 35 | + BlueprintIdentifier = "812642D91D86A7A800B402CA" | ||
| 36 | + BuildableName = "CNLiveUserSystemDemoTests.xctest" | ||
| 37 | + BlueprintName = "CNLiveUserSystemDemoTests" | ||
| 38 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 39 | + </BuildableReference> | ||
| 40 | + </TestableReference> | ||
| 41 | + <TestableReference | ||
| 42 | + skipped = "NO"> | ||
| 43 | + <BuildableReference | ||
| 44 | + BuildableIdentifier = "primary" | ||
| 45 | + BlueprintIdentifier = "812642E41D86A7A800B402CA" | ||
| 46 | + BuildableName = "CNLiveUserSystemDemoUITests.xctest" | ||
| 47 | + BlueprintName = "CNLiveUserSystemDemoUITests" | ||
| 48 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 49 | + </BuildableReference> | ||
| 50 | + </TestableReference> | ||
| 51 | + </Testables> | ||
| 52 | + <MacroExpansion> | ||
| 53 | + <BuildableReference | ||
| 54 | + BuildableIdentifier = "primary" | ||
| 55 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 56 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 57 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 58 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 59 | + </BuildableReference> | ||
| 60 | + </MacroExpansion> | ||
| 61 | + <AdditionalOptions> | ||
| 62 | + </AdditionalOptions> | ||
| 63 | + </TestAction> | ||
| 64 | + <LaunchAction | ||
| 65 | + buildConfiguration = "Debug" | ||
| 66 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 67 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 68 | + launchStyle = "0" | ||
| 69 | + useCustomWorkingDirectory = "NO" | ||
| 70 | + ignoresPersistentStateOnLaunch = "NO" | ||
| 71 | + debugDocumentVersioning = "YES" | ||
| 72 | + debugServiceExtension = "internal" | ||
| 73 | + allowLocationSimulation = "YES"> | ||
| 74 | + <BuildableProductRunnable | ||
| 75 | + runnableDebuggingMode = "0"> | ||
| 76 | + <BuildableReference | ||
| 77 | + BuildableIdentifier = "primary" | ||
| 78 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 79 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 80 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 81 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 82 | + </BuildableReference> | ||
| 83 | + </BuildableProductRunnable> | ||
| 84 | + <AdditionalOptions> | ||
| 85 | + </AdditionalOptions> | ||
| 86 | + </LaunchAction> | ||
| 87 | + <ProfileAction | ||
| 88 | + buildConfiguration = "Release" | ||
| 89 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 90 | + savedToolIdentifier = "" | ||
| 91 | + useCustomWorkingDirectory = "NO" | ||
| 92 | + debugDocumentVersioning = "YES"> | ||
| 93 | + <BuildableProductRunnable | ||
| 94 | + runnableDebuggingMode = "0"> | ||
| 95 | + <BuildableReference | ||
| 96 | + BuildableIdentifier = "primary" | ||
| 97 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 98 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 99 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 100 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 101 | + </BuildableReference> | ||
| 102 | + </BuildableProductRunnable> | ||
| 103 | + </ProfileAction> | ||
| 104 | + <AnalyzeAction | ||
| 105 | + buildConfiguration = "Debug"> | ||
| 106 | + </AnalyzeAction> | ||
| 107 | + <ArchiveAction | ||
| 108 | + buildConfiguration = "Release" | ||
| 109 | + revealArchiveInOrganizer = "YES"> | ||
| 110 | + </ArchiveAction> | ||
| 111 | +</Scheme> |
CNLiveUserSystemDemo.xcodeproj/xcuserdata/iOS.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>SchemeUserState</key> | ||
| 6 | + <dict> | ||
| 7 | + <key>CNLiveUserSystemDemo.xcscheme</key> | ||
| 8 | + <dict> | ||
| 9 | + <key>orderHint</key> | ||
| 10 | + <integer>0</integer> | ||
| 11 | + </dict> | ||
| 12 | + </dict> | ||
| 13 | + <key>SuppressBuildableAutocreation</key> | ||
| 14 | + <dict> | ||
| 15 | + <key>812642C01D86A7A800B402CA</key> | ||
| 16 | + <dict> | ||
| 17 | + <key>primary</key> | ||
| 18 | + <true/> | ||
| 19 | + </dict> | ||
| 20 | + <key>812642D91D86A7A800B402CA</key> | ||
| 21 | + <dict> | ||
| 22 | + <key>primary</key> | ||
| 23 | + <true/> | ||
| 24 | + </dict> | ||
| 25 | + <key>812642E41D86A7A800B402CA</key> | ||
| 26 | + <dict> | ||
| 27 | + <key>primary</key> | ||
| 28 | + <true/> | ||
| 29 | + </dict> | ||
| 30 | + </dict> | ||
| 31 | +</dict> | ||
| 32 | +</plist> |
CNLiveUserSystemDemo.xcodeproj/xcuserdata/zhulin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Bucket | ||
| 3 | + type = "1" | ||
| 4 | + version = "2.0"> | ||
| 5 | + <Breakpoints> | ||
| 6 | + <BreakpointProxy | ||
| 7 | + BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | ||
| 8 | + <BreakpointContent | ||
| 9 | + shouldBeEnabled = "Yes" | ||
| 10 | + ignoreCount = "0" | ||
| 11 | + continueAfterRunningActions = "No" | ||
| 12 | + scope = "0" | ||
| 13 | + stopOnStyle = "0"> | ||
| 14 | + </BreakpointContent> | ||
| 15 | + </BreakpointProxy> | ||
| 16 | + </Breakpoints> | ||
| 17 | +</Bucket> |
CNLiveUserSystemDemo.xcodeproj/xcuserdata/zhulin.xcuserdatad/xcschemes/CNLiveUserSystemDemo.xcscheme
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Scheme | ||
| 3 | + LastUpgradeVersion = "0730" | ||
| 4 | + version = "1.3"> | ||
| 5 | + <BuildAction | ||
| 6 | + parallelizeBuildables = "YES" | ||
| 7 | + buildImplicitDependencies = "YES"> | ||
| 8 | + <BuildActionEntries> | ||
| 9 | + <BuildActionEntry | ||
| 10 | + buildForTesting = "YES" | ||
| 11 | + buildForRunning = "YES" | ||
| 12 | + buildForProfiling = "YES" | ||
| 13 | + buildForArchiving = "YES" | ||
| 14 | + buildForAnalyzing = "YES"> | ||
| 15 | + <BuildableReference | ||
| 16 | + BuildableIdentifier = "primary" | ||
| 17 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 18 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 19 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 20 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 21 | + </BuildableReference> | ||
| 22 | + </BuildActionEntry> | ||
| 23 | + </BuildActionEntries> | ||
| 24 | + </BuildAction> | ||
| 25 | + <TestAction | ||
| 26 | + buildConfiguration = "Debug" | ||
| 27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 30 | + <Testables> | ||
| 31 | + <TestableReference | ||
| 32 | + skipped = "NO"> | ||
| 33 | + <BuildableReference | ||
| 34 | + BuildableIdentifier = "primary" | ||
| 35 | + BlueprintIdentifier = "812642D91D86A7A800B402CA" | ||
| 36 | + BuildableName = "CNLiveUserSystemDemoTests.xctest" | ||
| 37 | + BlueprintName = "CNLiveUserSystemDemoTests" | ||
| 38 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 39 | + </BuildableReference> | ||
| 40 | + </TestableReference> | ||
| 41 | + <TestableReference | ||
| 42 | + skipped = "NO"> | ||
| 43 | + <BuildableReference | ||
| 44 | + BuildableIdentifier = "primary" | ||
| 45 | + BlueprintIdentifier = "812642E41D86A7A800B402CA" | ||
| 46 | + BuildableName = "CNLiveUserSystemDemoUITests.xctest" | ||
| 47 | + BlueprintName = "CNLiveUserSystemDemoUITests" | ||
| 48 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 49 | + </BuildableReference> | ||
| 50 | + </TestableReference> | ||
| 51 | + </Testables> | ||
| 52 | + <MacroExpansion> | ||
| 53 | + <BuildableReference | ||
| 54 | + BuildableIdentifier = "primary" | ||
| 55 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 56 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 57 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 58 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 59 | + </BuildableReference> | ||
| 60 | + </MacroExpansion> | ||
| 61 | + <AdditionalOptions> | ||
| 62 | + </AdditionalOptions> | ||
| 63 | + </TestAction> | ||
| 64 | + <LaunchAction | ||
| 65 | + buildConfiguration = "Debug" | ||
| 66 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 67 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 68 | + launchStyle = "0" | ||
| 69 | + useCustomWorkingDirectory = "NO" | ||
| 70 | + ignoresPersistentStateOnLaunch = "NO" | ||
| 71 | + debugDocumentVersioning = "YES" | ||
| 72 | + debugServiceExtension = "internal" | ||
| 73 | + allowLocationSimulation = "YES"> | ||
| 74 | + <BuildableProductRunnable | ||
| 75 | + runnableDebuggingMode = "0"> | ||
| 76 | + <BuildableReference | ||
| 77 | + BuildableIdentifier = "primary" | ||
| 78 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 79 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 80 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 81 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 82 | + </BuildableReference> | ||
| 83 | + </BuildableProductRunnable> | ||
| 84 | + <AdditionalOptions> | ||
| 85 | + </AdditionalOptions> | ||
| 86 | + </LaunchAction> | ||
| 87 | + <ProfileAction | ||
| 88 | + buildConfiguration = "Release" | ||
| 89 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 90 | + savedToolIdentifier = "" | ||
| 91 | + useCustomWorkingDirectory = "NO" | ||
| 92 | + debugDocumentVersioning = "YES"> | ||
| 93 | + <BuildableProductRunnable | ||
| 94 | + runnableDebuggingMode = "0"> | ||
| 95 | + <BuildableReference | ||
| 96 | + BuildableIdentifier = "primary" | ||
| 97 | + BlueprintIdentifier = "812642C01D86A7A800B402CA" | ||
| 98 | + BuildableName = "CNLiveUserSystemDemo.app" | ||
| 99 | + BlueprintName = "CNLiveUserSystemDemo" | ||
| 100 | + ReferencedContainer = "container:CNLiveUserSystemDemo.xcodeproj"> | ||
| 101 | + </BuildableReference> | ||
| 102 | + </BuildableProductRunnable> | ||
| 103 | + </ProfileAction> | ||
| 104 | + <AnalyzeAction | ||
| 105 | + buildConfiguration = "Debug"> | ||
| 106 | + </AnalyzeAction> | ||
| 107 | + <ArchiveAction | ||
| 108 | + buildConfiguration = "Release" | ||
| 109 | + revealArchiveInOrganizer = "YES"> | ||
| 110 | + </ArchiveAction> | ||
| 111 | +</Scheme> |
CNLiveUserSystemDemo.xcodeproj/xcuserdata/zhulin.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>SchemeUserState</key> | ||
| 6 | + <dict> | ||
| 7 | + <key>CNLiveUserSystemDemo.xcscheme</key> | ||
| 8 | + <dict> | ||
| 9 | + <key>orderHint</key> | ||
| 10 | + <integer>0</integer> | ||
| 11 | + </dict> | ||
| 12 | + </dict> | ||
| 13 | + <key>SuppressBuildableAutocreation</key> | ||
| 14 | + <dict> | ||
| 15 | + <key>812642C01D86A7A800B402CA</key> | ||
| 16 | + <dict> | ||
| 17 | + <key>primary</key> | ||
| 18 | + <true/> | ||
| 19 | + </dict> | ||
| 20 | + <key>812642D91D86A7A800B402CA</key> | ||
| 21 | + <dict> | ||
| 22 | + <key>primary</key> | ||
| 23 | + <true/> | ||
| 24 | + </dict> | ||
| 25 | + <key>812642E41D86A7A800B402CA</key> | ||
| 26 | + <dict> | ||
| 27 | + <key>primary</key> | ||
| 28 | + <true/> | ||
| 29 | + </dict> | ||
| 30 | + </dict> | ||
| 31 | +</dict> | ||
| 32 | +</plist> |
CNLiveUserSystemDemo/AppDelegate.h
0 → 100644
| 1 | +// | ||
| 2 | +// AppDelegate.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/12. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +@interface AppDelegate : UIResponder <UIApplicationDelegate> | ||
| 12 | + | ||
| 13 | +@property (strong, nonatomic) UIWindow *window; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +@end | ||
| 17 | + |
CNLiveUserSystemDemo/AppDelegate.m
0 → 100644
| 1 | +// | ||
| 2 | +// AppDelegate.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/12. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "AppDelegate.h" | ||
| 10 | +#import "ViewController.h" | ||
| 11 | +#import "CNLiveThirdLoginManager.h" | ||
| 12 | + | ||
| 13 | +@interface AppDelegate ()<WXApiDelegate> | ||
| 14 | + | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +@implementation AppDelegate | ||
| 18 | + | ||
| 19 | + | ||
| 20 | +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | ||
| 21 | + | ||
| 22 | + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | ||
| 23 | + ViewController *vc = [[ViewController alloc] init]; | ||
| 24 | + UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc]; | ||
| 25 | + self.window.rootViewController = nvc; | ||
| 26 | + [self.window makeKeyAndVisible]; | ||
| 27 | + | ||
| 28 | + [CNLiveUserSystemCenter setAppId:AppId appKey:AppKey appSecret:AppSceret]; | ||
| 29 | + | ||
| 30 | + [WXApi registerApp:WeChatAppKey]; | ||
| 31 | + [WeiboSDK enableDebugMode:YES]; | ||
| 32 | + [WeiboSDK registerApp:SinaAppKey]; | ||
| 33 | + | ||
| 34 | + return YES; | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{ | ||
| 38 | + | ||
| 39 | + return [[CNLiveThirdLoginManager manager] handleOpenURL:url]; | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{ | ||
| 43 | + | ||
| 44 | + return [[CNLiveThirdLoginManager manager] handleOpenURL:url]; | ||
| 45 | + | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +- (void)applicationWillResignActive:(UIApplication *)application { | ||
| 49 | + // 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. | ||
| 50 | + // 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. | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +- (void)applicationDidEnterBackground:(UIApplication *)application { | ||
| 54 | + // 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. | ||
| 55 | + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | +- (void)applicationWillEnterForeground:(UIApplication *)application { | ||
| 59 | + // 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. | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +- (void)applicationDidBecomeActive:(UIApplication *)application { | ||
| 63 | + // 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. | ||
| 64 | +} | ||
| 65 | + | ||
| 66 | +- (void)applicationWillTerminate:(UIApplication *)application { | ||
| 67 | + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +@end |
CNLiveUserSystemDemo/Assets.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "iphone", | ||
| 5 | + "size" : "29x29", | ||
| 6 | + "scale" : "2x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "iphone", | ||
| 10 | + "size" : "29x29", | ||
| 11 | + "scale" : "3x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "idiom" : "iphone", | ||
| 15 | + "size" : "40x40", | ||
| 16 | + "scale" : "2x" | ||
| 17 | + }, | ||
| 18 | + { | ||
| 19 | + "idiom" : "iphone", | ||
| 20 | + "size" : "40x40", | ||
| 21 | + "scale" : "3x" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "idiom" : "iphone", | ||
| 25 | + "size" : "60x60", | ||
| 26 | + "scale" : "2x" | ||
| 27 | + }, | ||
| 28 | + { | ||
| 29 | + "idiom" : "iphone", | ||
| 30 | + "size" : "60x60", | ||
| 31 | + "scale" : "3x" | ||
| 32 | + }, | ||
| 33 | + { | ||
| 34 | + "idiom" : "ipad", | ||
| 35 | + "size" : "29x29", | ||
| 36 | + "scale" : "1x" | ||
| 37 | + }, | ||
| 38 | + { | ||
| 39 | + "idiom" : "ipad", | ||
| 40 | + "size" : "29x29", | ||
| 41 | + "scale" : "2x" | ||
| 42 | + }, | ||
| 43 | + { | ||
| 44 | + "idiom" : "ipad", | ||
| 45 | + "size" : "40x40", | ||
| 46 | + "scale" : "1x" | ||
| 47 | + }, | ||
| 48 | + { | ||
| 49 | + "idiom" : "ipad", | ||
| 50 | + "size" : "40x40", | ||
| 51 | + "scale" : "2x" | ||
| 52 | + }, | ||
| 53 | + { | ||
| 54 | + "idiom" : "ipad", | ||
| 55 | + "size" : "76x76", | ||
| 56 | + "scale" : "1x" | ||
| 57 | + }, | ||
| 58 | + { | ||
| 59 | + "idiom" : "ipad", | ||
| 60 | + "size" : "76x76", | ||
| 61 | + "scale" : "2x" | ||
| 62 | + }, | ||
| 63 | + { | ||
| 64 | + "idiom" : "ipad", | ||
| 65 | + "size" : "83.5x83.5", | ||
| 66 | + "scale" : "2x" | ||
| 67 | + } | ||
| 68 | + ], | ||
| 69 | + "info" : { | ||
| 70 | + "version" : 1, | ||
| 71 | + "author" : "xcode" | ||
| 72 | + } | ||
| 73 | +} | ||
| 0 | \ No newline at end of file | 74 | \ No newline at end of file |
CNLiveUserSystemDemo/Base.lproj/LaunchScreen.storyboard
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> | ||
| 3 | + <dependencies> | ||
| 4 | + <deployment identifier="iOS"/> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> | ||
| 6 | + </dependencies> | ||
| 7 | + <scenes> | ||
| 8 | + <!--View Controller--> | ||
| 9 | + <scene sceneID="EHf-IW-A2E"> | ||
| 10 | + <objects> | ||
| 11 | + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> | ||
| 12 | + <layoutGuides> | ||
| 13 | + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> | ||
| 14 | + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> | ||
| 15 | + </layoutGuides> | ||
| 16 | + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | ||
| 17 | + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | ||
| 18 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 19 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
| 20 | + </view> | ||
| 21 | + </viewController> | ||
| 22 | + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
| 23 | + </objects> | ||
| 24 | + <point key="canvasLocation" x="53" y="375"/> | ||
| 25 | + </scene> | ||
| 26 | + </scenes> | ||
| 27 | +</document> |
CNLiveUserSystemDemo/Base.lproj/Main.storyboard
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | ||
| 3 | + <dependencies> | ||
| 4 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> | ||
| 5 | + </dependencies> | ||
| 6 | + <scenes> | ||
| 7 | + <!--View Controller--> | ||
| 8 | + <scene sceneID="tne-QT-ifu"> | ||
| 9 | + <objects> | ||
| 10 | + <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController"> | ||
| 11 | + <layoutGuides> | ||
| 12 | + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | ||
| 13 | + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | ||
| 14 | + </layoutGuides> | ||
| 15 | + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
| 16 | + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | ||
| 17 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 18 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
| 19 | + </view> | ||
| 20 | + </viewController> | ||
| 21 | + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
| 22 | + </objects> | ||
| 23 | + </scene> | ||
| 24 | + </scenes> | ||
| 25 | +</document> |
CNLiveUserSystemDemo/CNLiveNetworking/CNLiveNetworkManager.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveNetworkManager.h | ||
| 3 | +// CNLiveHttpRequestDemo | ||
| 4 | +// | ||
| 5 | +// Created by Android on 16/7/26. | ||
| 6 | +// Copyright © 2016年 Android. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import <UIKit/UIKit.h> | ||
| 11 | + | ||
| 12 | +@interface CNLiveNetworkManager : NSObject | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 设置超时时间 | ||
| 16 | + */ | ||
| 17 | +@property (nonatomic, assign) NSTimeInterval timeoutInterval; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * 缓存策略 | ||
| 21 | + */ | ||
| 22 | +@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy; | ||
| 23 | + | ||
| 24 | ++ (nonnull CNLiveNetworkManager *)manager; | ||
| 25 | + | ||
| 26 | +/** | ||
| 27 | + * GET 请求 | ||
| 28 | + * @param URL | ||
| 29 | + * @param parameters 上传参数 | ||
| 30 | + * @param success 请求成功回调 | ||
| 31 | + * @param failure 请求失败回调 | ||
| 32 | + */ | ||
| 33 | +- (void)requestGetURL:(nullable NSString *)URL | ||
| 34 | + parameters:(nullable NSDictionary *)parameters | ||
| 35 | + success:(nullable void (^)(NSURLResponse *_Nullable response, id _Nullable responseObject))success | ||
| 36 | + failure :(nullable void (^)(NSURLResponse *_Nullable response, NSError *_Nullable error))failure; | ||
| 37 | + | ||
| 38 | +/** | ||
| 39 | + * POST 请求 | ||
| 40 | + * @param URL | ||
| 41 | + * @param parameters 上传参数 | ||
| 42 | + * @param success 请求成功回调 | ||
| 43 | + * @param failure 请求失败回调 | ||
| 44 | + */ | ||
| 45 | +- (void)requestPostURL:(nullable NSString *)URL | ||
| 46 | + parameters:(nullable NSDictionary *)parameters | ||
| 47 | + success:(nullable void (^)(NSURLResponse *_Nullable response, id _Nullable responseObject))success | ||
| 48 | + failure :(nullable void (^)(NSURLResponse *_Nullable response, NSError *_Nullable error))failure; | ||
| 49 | + | ||
| 50 | + | ||
| 51 | +- (void)uploadImageWithURL:(nullable NSString *)URL | ||
| 52 | + parameters:(nullable NSDictionary *)parameters | ||
| 53 | + imageData:(nullable NSData *)data | ||
| 54 | + success:(nullable void (^)(NSURLResponse *_Nullable response, id _Nullable responseObject))success | ||
| 55 | + failure :(nullable void (^)(NSURLResponse *_Nullable response, NSError *_Nullable error))failure; | ||
| 56 | + | ||
| 57 | +@end |
CNLiveUserSystemDemo/CNLiveNetworking/CNLiveNetworkManager.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveNetworkManager.m | ||
| 3 | +// CNLiveHttpRequestDemo | ||
| 4 | +// | ||
| 5 | +// Created by Android on 16/7/26. | ||
| 6 | +// Copyright © 2016年 Android. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveNetworkManager.h" | ||
| 10 | +#import "CNLiveURLRequestSerialization.h" | ||
| 11 | + | ||
| 12 | +#define boundary @"cnlive" | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 网络超时时间 默认 60 | ||
| 16 | + */ | ||
| 17 | +static NSTimeInterval TimeoutInterval = 30.0 ; | ||
| 18 | +/** | ||
| 19 | + * 缓存策略 | ||
| 20 | + * NSURLRequestUseProtocolCachePolicy // 默认的缓存策略(取决于协议) | ||
| 21 | + * NSURLRequestReloadIgnoringLocalCacheData // 忽略缓存,重新请求 | ||
| 22 | + * NSURLRequestReloadIgnoringLocalAndRemoteCacheData // 未实现 | ||
| 23 | + * NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData // 忽略缓存,重新请求 | ||
| 24 | + * NSURLRequestReturnCacheDataElseLoad// 有缓存就用缓存,忽略过期时间!没有缓存就重新请求 | ||
| 25 | + * NSURLRequestReturnCacheDataDontLoad// 有缓存就用缓存,没有缓存就不发请求,当做请求出错处理(用于离线模式) | ||
| 26 | + * NSURLRequestReloadRevalidatingCacheData // 未实现 | ||
| 27 | + */ | ||
| 28 | +static NSURLRequestCachePolicy CachePolicy = NSURLRequestUseProtocolCachePolicy; | ||
| 29 | + | ||
| 30 | +@implementation CNLiveNetworkManager | ||
| 31 | + | ||
| 32 | ++ (CNLiveNetworkManager *)manager | ||
| 33 | +{ | ||
| 34 | + static CNLiveNetworkManager *manager = nil; | ||
| 35 | + | ||
| 36 | + static dispatch_once_t predicate; | ||
| 37 | + | ||
| 38 | + dispatch_once(&predicate, ^{ | ||
| 39 | + | ||
| 40 | + manager = [[CNLiveNetworkManager alloc] init]; | ||
| 41 | + | ||
| 42 | + }); | ||
| 43 | + | ||
| 44 | + manager.cachePolicy = CachePolicy; | ||
| 45 | + | ||
| 46 | + manager.timeoutInterval = TimeoutInterval; | ||
| 47 | + | ||
| 48 | + return manager; | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | +-(void)requestGetURL:(NSString *)URL | ||
| 52 | + parameters:(NSDictionary *)parameters | ||
| 53 | + success:(void (^)(NSURLResponse * _Nullable, id _Nullable))success | ||
| 54 | + failure:(void (^)(NSURLResponse * _Nullable, NSError * _Nullable))failure | ||
| 55 | +{ | ||
| 56 | + NSURLSessionDataTask *task = [self dataTaskWithRequestMethod:@"GET" URLString:URL parameters:parameters imageData:nil success:success failure:failure]; | ||
| 57 | + [task resume]; | ||
| 58 | +} | ||
| 59 | + | ||
| 60 | +- (void)requestPostURL:(NSString *)URL | ||
| 61 | + parameters:(NSDictionary *)parameters | ||
| 62 | + success:(void (^)(NSURLResponse * _Nullable, id _Nullable))success | ||
| 63 | + failure:(void (^)(NSURLResponse * _Nullable, NSError * _Nullable))failure | ||
| 64 | +{ | ||
| 65 | + NSURLSessionDataTask *task = [self dataTaskWithRequestMethod:@"POST" URLString:URL parameters:parameters imageData:nil success:success failure:failure]; | ||
| 66 | + [task resume]; | ||
| 67 | +} | ||
| 68 | + | ||
| 69 | +- (void)uploadImageWithURL:(NSString *)URL parameters:(NSDictionary *)parameters imageData:(NSData *)data success:(void (^)(NSURLResponse * _Nullable, id _Nullable))success failure:(void (^)(NSURLResponse * _Nullable, NSError * _Nullable))failure | ||
| 70 | +{ | ||
| 71 | + NSURLSessionDataTask *task = [self dataTaskWithRequestMethod:@"POST" URLString:URL parameters:parameters imageData:data success:success failure:failure]; | ||
| 72 | + [task resume]; | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +- (NSURLSessionDataTask *)dataTaskWithRequestMethod:(NSString *)method | ||
| 76 | + URLString:(NSString *)URLString | ||
| 77 | + parameters:(NSDictionary *)parameters | ||
| 78 | + imageData:(NSData *)data | ||
| 79 | + success:(void (^)(NSURLResponse * _Nullable, id _Nullable))success | ||
| 80 | + failure:(void (^)(NSURLResponse * _Nullable, NSError * _Nullable))failure | ||
| 81 | +{ | ||
| 82 | + | ||
| 83 | + if (![URLString isKindOfClass:[NSString class]]) { | ||
| 84 | + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"please enter a valid url"}]; | ||
| 85 | + failure(nil, error); | ||
| 86 | + return nil; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + NSString *newURLString; | ||
| 90 | + if ([method isEqualToString:@"GET"]) { | ||
| 91 | + if (parameters) { | ||
| 92 | + newURLString = [[URLString stringByAppendingString:@"?"] stringByAppendingString:[CNLiveURLRequestSerialization CNQueryStringFromParameters:parameters]]; | ||
| 93 | + }else{ | ||
| 94 | + newURLString = URLString; | ||
| 95 | + } | ||
| 96 | + }else{ | ||
| 97 | + newURLString = URLString; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:newURLString] cachePolicy:self.cachePolicy timeoutInterval:self.timeoutInterval]; | ||
| 101 | + | ||
| 102 | + request.HTTPMethod = method; | ||
| 103 | + | ||
| 104 | + if([method isEqual:@"POST"]){ | ||
| 105 | + if (!data) { | ||
| 106 | + [request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; | ||
| 107 | + request.HTTPBody =[[CNLiveURLRequestSerialization CNQueryStringFromParameters:parameters] dataUsingEncoding:NSUTF8StringEncoding]; | ||
| 108 | + } else { | ||
| 109 | + //设置HTTPHeader中Content-Type的值 | ||
| 110 | + NSString *content=[[NSString alloc]initWithFormat:@"multipart/form-data; boundary=%@",boundary]; | ||
| 111 | + //设置HTTPHeader | ||
| 112 | + [request setValue:content forHTTPHeaderField:@"Content-Type"]; | ||
| 113 | + | ||
| 114 | + //设置Content-Length | ||
| 115 | + NSData *requestData = [self setBodyData:data parameters:parameters]; | ||
| 116 | + [request setValue:[NSString stringWithFormat:@"%lu", (unsigned long)[requestData length]] forHTTPHeaderField:@"Content-Length"]; | ||
| 117 | + | ||
| 118 | + //设置http body | ||
| 119 | + [request setHTTPBody:requestData]; | ||
| 120 | + [request setHTTPMethod:@"POST"]; | ||
| 121 | + | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + NSURLSessionDataTask *task = [self dataTaskWithRequest:request success:success failure:failure]; | ||
| 126 | + | ||
| 127 | + return task; | ||
| 128 | +} | ||
| 129 | + | ||
| 130 | +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request | ||
| 131 | + success:(void (^)(NSURLResponse * _Nullable, id _Nullable))success | ||
| 132 | + failure:(void (^)(NSURLResponse * _Nullable, NSError * _Nullable))failure | ||
| 133 | +{ | ||
| 134 | + NSURLSession *session = [NSURLSession sharedSession]; | ||
| 135 | + NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 136 | + | ||
| 137 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 138 | + if (error) { | ||
| 139 | + failure(response,error); | ||
| 140 | + }else{ | ||
| 141 | + if ([response isKindOfClass:[NSHTTPURLResponse class]]) { | ||
| 142 | + NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; | ||
| 143 | + if (httpResponse.statusCode < 400) { | ||
| 144 | + id jsonObj = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil]; | ||
| 145 | + success(httpResponse,jsonObj); | ||
| 146 | + } else { | ||
| 147 | + NSError *failureError = [NSError errorWithDomain:NSURLErrorDomain code:httpResponse.statusCode userInfo:httpResponse.allHeaderFields]; | ||
| 148 | + failure(httpResponse,failureError); | ||
| 149 | + } | ||
| 150 | + } else { | ||
| 151 | + failure(response,error); | ||
| 152 | + } | ||
| 153 | + } | ||
| 154 | + }); | ||
| 155 | + }]; | ||
| 156 | + | ||
| 157 | + return task; | ||
| 158 | +} | ||
| 159 | + | ||
| 160 | +- (NSData *)setBodyData:(NSData *)data parameters:(NSDictionary *)parameters | ||
| 161 | +{ | ||
| 162 | + //分界线 | ||
| 163 | + NSString *MPBoundary = [[NSString alloc] initWithFormat:@"--%@",boundary]; | ||
| 164 | + //结束符 | ||
| 165 | + NSString *endMPBoundary = [[NSString alloc] initWithFormat:@"%@--",MPBoundary]; | ||
| 166 | + | ||
| 167 | + NSMutableString *body = [[NSMutableString alloc] init]; | ||
| 168 | + | ||
| 169 | + if (parameters) { | ||
| 170 | + | ||
| 171 | + NSArray *keys = [parameters allKeys]; | ||
| 172 | + | ||
| 173 | + for (int i = 0; i < [keys count]; i ++) { | ||
| 174 | + NSString *key = [keys objectAtIndex:i]; | ||
| 175 | + | ||
| 176 | + //添加分界线,换行 | ||
| 177 | + [body appendFormat:@"%@\r\n",MPBoundary]; | ||
| 178 | + | ||
| 179 | + //添加字段名称,换2行 | ||
| 180 | + [body appendFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n",key]; | ||
| 181 | + //添加字段的值 | ||
| 182 | + [body appendFormat:@"%@\r\n",[parameters objectForKey:key]]; | ||
| 183 | + | ||
| 184 | + } | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + [body appendFormat:@"%@\r\n",MPBoundary]; | ||
| 188 | + | ||
| 189 | + //声明pic字段,文件名为boris.png | ||
| 190 | + [body appendFormat:@"Content-Disposition: form-data; name=\"face\"; filename=\"image\"\r\n"]; | ||
| 191 | + //声明上传文件的格式 | ||
| 192 | + [body appendFormat:@"Content-Type: image/jpge,image/gif, image/jpeg, image/pjpeg, image/pjpeg\r\n\r\n"]; | ||
| 193 | + | ||
| 194 | + //声明结束符:--AaB03x-- | ||
| 195 | + NSString *end=[[NSString alloc]initWithFormat:@"\r\n%@",endMPBoundary]; | ||
| 196 | + //声明myRequestData,用来放入http body | ||
| 197 | + NSMutableData *myRequestData=[NSMutableData data]; | ||
| 198 | + | ||
| 199 | + //将body字符串转化为UTF8格式的二进制 | ||
| 200 | + [myRequestData appendData:[body dataUsingEncoding:NSUTF8StringEncoding]]; | ||
| 201 | + [myRequestData appendData:data]; | ||
| 202 | + //加入结束符--AaB03x-- | ||
| 203 | + [myRequestData appendData:[end dataUsingEncoding:NSUTF8StringEncoding]]; | ||
| 204 | + return myRequestData; | ||
| 205 | +} | ||
| 206 | + | ||
| 207 | +- (NSURL *)formatURLString:(NSString *)url | ||
| 208 | +{ | ||
| 209 | + NSURL *urlString = [NSURL URLWithString:[url stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]]; | ||
| 210 | + return urlString; | ||
| 211 | +} | ||
| 212 | + | ||
| 213 | +@end |
CNLiveUserSystemDemo/CNLiveNetworking/CNLiveURLRequestSerialization.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveURLRequestSerialization.h | ||
| 3 | +// CNLiveHttpRequestDemo | ||
| 4 | +// | ||
| 5 | +// Created by Android on 16/7/26. | ||
| 6 | +// Copyright © 2016年 Android. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface CNLiveURLRequestSerialization : NSObject | ||
| 12 | + | ||
| 13 | ++ (nullable NSString *)CNQueryStringFromParameters:(nullable NSDictionary *)parameters; | ||
| 14 | + | ||
| 15 | +@end |
CNLiveUserSystemDemo/CNLiveNetworking/CNLiveURLRequestSerialization.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveURLRequestSerialization.m | ||
| 3 | +// CNLiveHttpRequestDemo | ||
| 4 | +// | ||
| 5 | +// Created by Android on 16/7/26. | ||
| 6 | +// Copyright © 2016年 Android. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveURLRequestSerialization.h" | ||
| 10 | + | ||
| 11 | +@interface CNLiveURLRequestSerialization () | ||
| 12 | + | ||
| 13 | +@property (readwrite, nonatomic, strong) id value; | ||
| 14 | + | ||
| 15 | +@property (readwrite, nonatomic, strong) id field; | ||
| 16 | + | ||
| 17 | +@end | ||
| 18 | + | ||
| 19 | +@implementation CNLiveURLRequestSerialization | ||
| 20 | + | ||
| 21 | +- (id)initWithField:(id)field value:(id)value | ||
| 22 | +{ | ||
| 23 | + self = [super init]; | ||
| 24 | + | ||
| 25 | + if (self) { | ||
| 26 | + | ||
| 27 | + self.field = field; | ||
| 28 | + | ||
| 29 | + self.value = value; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + return self; | ||
| 33 | + | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | +#pragma mark - | ||
| 37 | + | ||
| 38 | +FOUNDATION_EXPORT NSArray * CNQueryStringPairsFromDictionary(NSDictionary *dictionary); | ||
| 39 | +FOUNDATION_EXPORT NSArray * CNQueryStringPairsFromKeyAndValue(NSString *key, id value); | ||
| 40 | + | ||
| 41 | ++ (NSString *)CNQueryStringFromParameters:(NSDictionary *)parameters | ||
| 42 | +{ | ||
| 43 | + NSMutableArray *mutablePairs = [NSMutableArray array]; | ||
| 44 | + for (CNLiveURLRequestSerialization *pair in CNQueryStringPairsFromDictionary(parameters)) { | ||
| 45 | + [mutablePairs addObject:[pair URLEncodedStringValue]]; | ||
| 46 | + } | ||
| 47 | + return [mutablePairs componentsJoinedByString:@"&"]; | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +NSArray * CNQueryStringPairsFromDictionary(NSDictionary *dictionary) | ||
| 51 | +{ | ||
| 52 | + return CNQueryStringPairsFromKeyAndValue(nil, dictionary); | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +/** | ||
| 56 | + * 处理上传参数 | ||
| 57 | + */ | ||
| 58 | +NSArray * CNQueryStringPairsFromKeyAndValue(NSString *key, id value) | ||
| 59 | +{ | ||
| 60 | + NSMutableArray *mutableQueryStringComponents = [NSMutableArray array]; | ||
| 61 | + | ||
| 62 | + //排序方式 | ||
| 63 | + NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)]; | ||
| 64 | + | ||
| 65 | + if ([value isKindOfClass:[NSDictionary class]]) { //字典 | ||
| 66 | + NSDictionary *dictionary = value; | ||
| 67 | + for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[sortDescriptor]]) { | ||
| 68 | + id nestedValue = dictionary[nestedKey]; | ||
| 69 | + if (nestedKey) { | ||
| 70 | + [mutableQueryStringComponents addObjectsFromArray:CNQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + else if ([value isKindOfClass:[NSArray class]]){ //数组 | ||
| 76 | + NSArray *array = value; | ||
| 77 | + for (id nestedValue in array) { | ||
| 78 | + [mutableQueryStringComponents addObjectsFromArray:CNQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)]; | ||
| 79 | + } | ||
| 80 | + }else if ([value isKindOfClass:[NSSet class]]){ //集合 | ||
| 81 | + NSSet *set = value; | ||
| 82 | + for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { | ||
| 83 | + [mutableQueryStringComponents addObjectsFromArray:CNQueryStringPairsFromKeyAndValue(key, obj)]; | ||
| 84 | + } | ||
| 85 | + }else{ //其他类型 | ||
| 86 | + [mutableQueryStringComponents addObject:[[CNLiveURLRequestSerialization alloc] initWithField:key value:value]]; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + return mutableQueryStringComponents; | ||
| 90 | +} | ||
| 91 | + | ||
| 92 | +static NSString * CNPercentEscapedStringFromString(NSString *string) { | ||
| 93 | + static NSString * const kCNCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4 | ||
| 94 | + static NSString * const kCNCharactersSubDelimitersToEncode = @"!$&'()*+,;="; | ||
| 95 | + | ||
| 96 | + NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; | ||
| 97 | + [allowedCharacterSet removeCharactersInString:[kCNCharactersGeneralDelimitersToEncode stringByAppendingString:kCNCharactersSubDelimitersToEncode]]; | ||
| 98 | + | ||
| 99 | + | ||
| 100 | + static NSUInteger const batchSize = 50; | ||
| 101 | + | ||
| 102 | + NSUInteger index = 0; | ||
| 103 | + NSMutableString *escaped = @"".mutableCopy; | ||
| 104 | + | ||
| 105 | + while (index < string.length) { | ||
| 106 | +#pragma GCC diagnostic push | ||
| 107 | +#pragma GCC diagnostic ignored "-Wgnu" | ||
| 108 | + NSUInteger length = MIN(string.length - index, batchSize); | ||
| 109 | +#pragma GCC diagnostic pop | ||
| 110 | + NSRange range = NSMakeRange(index, length); | ||
| 111 | + | ||
| 112 | + range = [string rangeOfComposedCharacterSequencesForRange:range]; | ||
| 113 | + | ||
| 114 | + NSString *substring = [string substringWithRange:range]; | ||
| 115 | + NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; | ||
| 116 | + [escaped appendString:encoded]; | ||
| 117 | + | ||
| 118 | + index += range.length; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + return escaped; | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +- (NSString *)URLEncodedStringValue { | ||
| 125 | + if (!self.value || [self.value isEqual:[NSNull null]]) { | ||
| 126 | + return CNPercentEscapedStringFromString([self.field description]); | ||
| 127 | + } else { | ||
| 128 | + return [NSString stringWithFormat:@"%@=%@", CNPercentEscapedStringFromString([self.field description]), CNPercentEscapedStringFromString([self.value description])]; | ||
| 129 | + } | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | + | ||
| 133 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveFeedback.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveFeedback.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface CNLiveFeedback : NSObject | ||
| 12 | + | ||
| 13 | +- (void)feedbackWithAppId:(NSString *)appId appKey:(NSString *)appKey contentId:(NSString *)contentId message:(NSString *)message success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveFeedback.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveFeedback.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveFeedback.h" | ||
| 10 | +#import "CNLiveNetworkManager.h" | ||
| 11 | +#import "CNLiveUserSystemTools.h" | ||
| 12 | +#import "NSDictionary+Safety.h" | ||
| 13 | + | ||
| 14 | +//反馈 | ||
| 15 | +static NSString *feedbackURL = @"http://api.cnlive.com/open/api2/user/userReport"; | ||
| 16 | + | ||
| 17 | +@implementation CNLiveFeedback | ||
| 18 | + | ||
| 19 | +- (void)feedbackWithAppId:(NSString *)appId appKey:(NSString *)appKey contentId:(NSString *)contentId message:(NSString *)message success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 20 | +{ | ||
| 21 | + | ||
| 22 | + NSDate *date = [NSDate date]; | ||
| 23 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 24 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 25 | + | ||
| 26 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 27 | + @"id":[CNLiveUserSystemTools verify:contentId], | ||
| 28 | + @"msg":[CNLiveUserSystemTools verify:message], | ||
| 29 | + @"clientPlat":@"i", | ||
| 30 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 31 | + @"timestamp": timeString}; | ||
| 32 | + | ||
| 33 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 34 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 35 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 36 | + | ||
| 37 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 38 | + [self requestWithParameter:parameter success:success failure:failure]; | ||
| 39 | + | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +#pragma mark - request | ||
| 43 | + | ||
| 44 | +- (void)requestWithParameter:(NSDictionary *)param success:(void(^)(id result))success failure :(void (^)(NSError * error))failure | ||
| 45 | +{ | ||
| 46 | + [[CNLiveNetworkManager manager] requestPostURL:feedbackURL parameters:param success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) { | ||
| 47 | + | ||
| 48 | + responseObject = [responseObject validatedDictionary]; | ||
| 49 | + success(responseObject); | ||
| 50 | + | ||
| 51 | + } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 52 | + | ||
| 53 | + failure(error); | ||
| 54 | + | ||
| 55 | + }]; | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveLogin.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveLogin.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface CNLiveLogin : NSObject | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * 第三方登录 | ||
| 15 | + */ | ||
| 16 | +- (void)thirdPartyLoginWithAppId:(NSString *)appId appKey:(NSString *)appKey thirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId nickName:(NSString *)nickName gender:(NSString *)gender location:(NSString *)location faceUrl:(NSString *)faceUrl frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * 快捷登录 | ||
| 20 | + */ | ||
| 21 | +- (void)shortcutLoginWithAppId:(NSString *)appId appKey:(NSString *)appKey userName:(NSString *)userName verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * 登录 | ||
| 25 | + */ | ||
| 26 | +- (void)loginWithAppId:(NSString *)appId appKey:(NSString *)appKey userName:(NSString *)userName password:(NSString *)password frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 27 | + | ||
| 28 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveLogin.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveLogin.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveLogin.h" | ||
| 10 | +#import "CNLiveNetworkManager.h" | ||
| 11 | +#import "CNLiveUserSystemTools.h" | ||
| 12 | +#import "NSDictionary+Safety.h" | ||
| 13 | + | ||
| 14 | +//快捷登录 | ||
| 15 | +static NSString *shortcutLoginURL = @"http://api.cnlive.com/open/api2/user/loginInQuickly"; | ||
| 16 | + | ||
| 17 | +//登录 | ||
| 18 | +static NSString *loginURL = @"http://api.cnlive.com/open/api2/user/loginIn"; | ||
| 19 | + | ||
| 20 | +//第三方登录 | ||
| 21 | +static NSString *thirdLoginURL = @"http://api.cnlive.com/open/api2/user/loginIn3rd"; | ||
| 22 | + | ||
| 23 | +@implementation CNLiveLogin | ||
| 24 | + | ||
| 25 | +- (void)thirdPartyLoginWithAppId:(NSString *)appId appKey:(NSString *)appKey thirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId nickName:(NSString *)nickName gender:(NSString *)gender location:(NSString *)location faceUrl:(NSString *)faceUrl frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 26 | +{ | ||
| 27 | + NSDate *date = [NSDate date]; | ||
| 28 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 29 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 30 | + | ||
| 31 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 32 | + @"thirdPartyPlat":[CNLiveUserSystemTools verify:plat], | ||
| 33 | + @"thirdPartyId":[CNLiveUserSystemTools verify:thirdPartyId], | ||
| 34 | + @"nickName":[CNLiveUserSystemTools verify:nickName], | ||
| 35 | + @"gender":[CNLiveUserSystemTools verify:gender], | ||
| 36 | + @"location":[CNLiveUserSystemTools verify:location], | ||
| 37 | + @"faceUrl":[CNLiveUserSystemTools verify:faceUrl], | ||
| 38 | + @"uuid":[CNLiveUserSystemTools uidForStat:[NSDate date]], | ||
| 39 | + @"frmId":[CNLiveUserSystemTools verify:frmId], | ||
| 40 | + @"clientPlat":@"i", | ||
| 41 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 42 | + @"timestamp": timeString}; | ||
| 43 | + | ||
| 44 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 45 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 46 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 47 | + | ||
| 48 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 49 | + [self requestWithURL:thirdLoginURL parameter:parameter success:success failure:failure]; | ||
| 50 | + | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +/** | ||
| 54 | + * 快捷登录 | ||
| 55 | + */ | ||
| 56 | +- (void)shortcutLoginWithAppId:(NSString *)appId appKey:(NSString *)appKey userName:(NSString *)userName verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 57 | +{ | ||
| 58 | + NSDate *date = [NSDate date]; | ||
| 59 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 60 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 61 | + | ||
| 62 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 63 | + @"userName":[CNLiveUserSystemTools verify:userName], | ||
| 64 | + @"verificationCode":[CNLiveUserSystemTools verify:verificationCode], | ||
| 65 | + @"uuid":[CNLiveUserSystemTools uidForStat:[NSDate date]], | ||
| 66 | + @"frmId":[CNLiveUserSystemTools verify:frmId], | ||
| 67 | + @"clientPlat":@"i", | ||
| 68 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 69 | + @"timestamp": timeString}; | ||
| 70 | + | ||
| 71 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 72 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 73 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 74 | + | ||
| 75 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 76 | + [self requestWithURL:shortcutLoginURL parameter:parameter success:success failure:failure]; | ||
| 77 | + | ||
| 78 | +} | ||
| 79 | + | ||
| 80 | +/** | ||
| 81 | + * 登录 | ||
| 82 | + */ | ||
| 83 | +- (void)loginWithAppId:(NSString *)appId appKey:(NSString *)appKey userName:(NSString *)userName password:(NSString *)password frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 84 | +{ | ||
| 85 | + NSDate *date = [NSDate date]; | ||
| 86 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 87 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 88 | + | ||
| 89 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 90 | + @"userName":[CNLiveUserSystemTools verify:userName], | ||
| 91 | + @"pwd":[CNLiveUserSystemTools verify:password], | ||
| 92 | + @"uuid":[CNLiveUserSystemTools uidForStat:[NSDate date]], | ||
| 93 | + @"frmId":[CNLiveUserSystemTools verify:frmId], | ||
| 94 | + @"clientPlat":@"i", | ||
| 95 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 96 | + @"timestamp": timeString}; | ||
| 97 | + | ||
| 98 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 99 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 100 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 101 | + | ||
| 102 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 103 | + [self requestWithURL:loginURL parameter:parameter success:success failure:failure]; | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +#pragma mark - request | ||
| 107 | + | ||
| 108 | +- (void)requestWithURL:(NSString *)URL parameter:(NSDictionary *)param success:(void(^)(id result))success failure :(void (^)(NSError * error))failure | ||
| 109 | +{ | ||
| 110 | + [[CNLiveNetworkManager manager] requestPostURL:URL parameters:param success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) { | ||
| 111 | + | ||
| 112 | + responseObject = [responseObject validatedDictionary]; | ||
| 113 | + success(responseObject); | ||
| 114 | + | ||
| 115 | + } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 116 | + | ||
| 117 | + failure(error); | ||
| 118 | + | ||
| 119 | + }]; | ||
| 120 | +} | ||
| 121 | + | ||
| 122 | + | ||
| 123 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveRegister.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveRegister.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface CNLiveRegister : NSObject | ||
| 12 | + | ||
| 13 | +- (void)registerWithAppId:(NSString *)appId appKey:(NSString *)appKey userName:(NSString *)userName password:(NSString *)password verificationCode:(NSString *)verificationCode invitationCode:(NSString *)invitationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveRegister.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveRegister.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveRegister.h" | ||
| 10 | +#import "CNLiveNetworkManager.h" | ||
| 11 | +#import "CNLiveUserSystemTools.h" | ||
| 12 | +#import "NSDictionary+Safety.h" | ||
| 13 | + | ||
| 14 | +//注册 | ||
| 15 | +static NSString *registerURL = @"http://api.cnlive.com/open/api2/user/register"; | ||
| 16 | + | ||
| 17 | +@implementation CNLiveRegister | ||
| 18 | + | ||
| 19 | +- (void)registerWithAppId:(NSString *)appId appKey:(NSString *)appKey userName:(NSString *)userName password:(NSString *)password verificationCode:(NSString *)verificationCode invitationCode:(NSString *)invitationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 20 | +{ | ||
| 21 | + | ||
| 22 | + NSDate *date = [NSDate date]; | ||
| 23 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 24 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 25 | + | ||
| 26 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 27 | + @"userName":[CNLiveUserSystemTools verify:userName], | ||
| 28 | + @"pwd":[CNLiveUserSystemTools verify:password], | ||
| 29 | + @"verificationCode":[CNLiveUserSystemTools verify:verificationCode], | ||
| 30 | + @"invitationCode":[CNLiveUserSystemTools verify:invitationCode], | ||
| 31 | + @"uuid":[CNLiveUserSystemTools uidForStat:[NSDate date]], | ||
| 32 | + @"frmId":[CNLiveUserSystemTools verify:frmId], | ||
| 33 | + @"clientPlat":@"i", | ||
| 34 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 35 | + @"timestamp": timeString}; | ||
| 36 | + | ||
| 37 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 38 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 39 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 40 | + | ||
| 41 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 42 | + [self requestWithParameter:parameter success:success failure:failure]; | ||
| 43 | +} | ||
| 44 | + | ||
| 45 | +#pragma mark - request | ||
| 46 | + | ||
| 47 | +- (void)requestWithParameter:(NSDictionary *)param success:(void(^)(id result))success failure :(void (^)(NSError * error))failure | ||
| 48 | +{ | ||
| 49 | + | ||
| 50 | + [[CNLiveNetworkManager manager] requestPostURL:registerURL parameters:param success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) { | ||
| 51 | + | ||
| 52 | + responseObject = [responseObject validatedDictionary]; | ||
| 53 | + success(responseObject); | ||
| 54 | + | ||
| 55 | + } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 56 | + | ||
| 57 | + failure(error); | ||
| 58 | + | ||
| 59 | + }]; | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUploadIcon.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUploadIcon.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/20. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface CNLiveUploadIcon : NSObject | ||
| 12 | + | ||
| 13 | +- (void)uploadIconWithAppId:(NSString *)appId uid:(NSString *)uid icon:(UIImage *)image token:(NSString *)token secret:(NSString *)secret success:(void (^)(id))success failure:(void (^)(NSError *))failure; | ||
| 14 | + | ||
| 15 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUploadIcon.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUploadIcon.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/20. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveUploadIcon.h" | ||
| 10 | +#import "CNLiveUserSystemTools.h" | ||
| 11 | +#import "CNLiveNetworkManager.h" | ||
| 12 | +#import "NSDictionary+Safety.h" | ||
| 13 | + | ||
| 14 | +//获取access_token | ||
| 15 | +static NSString *accessTokenURL = @"http://api.cnlive.com/open/api2/token"; | ||
| 16 | + | ||
| 17 | +//上传头像 | ||
| 18 | +static NSString *uploadIconURL = @"http://api.cnlive.com/open/api2/user/updateUserFaceById"; | ||
| 19 | + | ||
| 20 | +@implementation CNLiveUploadIcon | ||
| 21 | + | ||
| 22 | +- (void)uploadIconWithAppId:(NSString *)appId uid:(NSString *)uid icon:(UIImage *)image token:(NSString *)token secret:(NSString *)secret success:(void (^)(id))success failure:(void (^)(NSError *))failure | ||
| 23 | +{ | ||
| 24 | + [self getAccessTokenRequestWithAppId:appId uid:uid icon:image token:token secret:secret success:success failure:failure]; | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +#pragma mark - request | ||
| 28 | + | ||
| 29 | +- (void)getAccessTokenRequestWithAppId:(NSString *)appId uid:(NSString *)uid icon:(UIImage *)image token:(NSString *)token secret:(NSString *)secret success:(void (^)(id))success failure:(void (^)(NSError *))failure | ||
| 30 | +{ | ||
| 31 | + NSDictionary *paramters = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 32 | + @"secret":[CNLiveUserSystemTools verify:secret]}; | ||
| 33 | + | ||
| 34 | + [[CNLiveNetworkManager manager] requestPostURL:accessTokenURL parameters:paramters success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) { | ||
| 35 | + | ||
| 36 | + responseObject = [responseObject validatedDictionary]; | ||
| 37 | + | ||
| 38 | + if ([[responseObject allKeys] containsObject:@"errorCode"]) { | ||
| 39 | + if ([[responseObject objectForKey:@"errorCode"] isEqualToString:@"0"]) { | ||
| 40 | + | ||
| 41 | + NSDictionary *dic = responseObject[@"data"]; | ||
| 42 | + [self uploadIconRequestWithUid:uid icon:image token:token access_token:dic[@"access_token"] success:success failure:failure]; | ||
| 43 | + } else { | ||
| 44 | + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey :responseObject[@"errorMessage"]}]; | ||
| 45 | + failure(error); | ||
| 46 | + } | ||
| 47 | + } else { | ||
| 48 | + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey :@"获取access_token失败"}]; | ||
| 49 | + failure(error); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 53 | + failure(error); | ||
| 54 | + }]; | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +- (void)uploadIconRequestWithUid:(NSString *)uid icon:(UIImage *)image token:(NSString *)token access_token:(NSString *)accessToken success:(void (^)(id))success failure:(void (^)(NSError *))failure | ||
| 58 | +{ | ||
| 59 | + NSData *data = UIImageJPEGRepresentation(image, 0.5); | ||
| 60 | + | ||
| 61 | + NSDictionary *paramters = @{@"uid":[CNLiveUserSystemTools verify:uid], | ||
| 62 | + @"clientPlat":@"i", | ||
| 63 | + @"token":[CNLiveUserSystemTools verify:token], | ||
| 64 | + @"access_token":[CNLiveUserSystemTools verify:accessToken]}; | ||
| 65 | + | ||
| 66 | + [[CNLiveNetworkManager manager] uploadImageWithURL:uploadIconURL parameters:paramters imageData:data success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) { | ||
| 67 | + | ||
| 68 | + responseObject = [responseObject validatedDictionary]; | ||
| 69 | + success(responseObject); | ||
| 70 | + | ||
| 71 | + } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 72 | + failure(error); | ||
| 73 | + }]; | ||
| 74 | +} | ||
| 75 | + | ||
| 76 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserInfo.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserInfo.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import "CNLiveUserSystemTypeDef.h" | ||
| 11 | + | ||
| 12 | +@interface CNLiveUserInfo : NSObject | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 更新手机号 | ||
| 16 | + */ | ||
| 17 | +- (void)updateMobileWithAppId:(NSString *)appId appKey:(NSString *)appKey uid:(NSString *)uid mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * 查询用户信息 | ||
| 21 | + */ | ||
| 22 | +- (void)queryUserInfoWithAppId:(NSString *)appId appKey:(NSString *)appKey uid:(NSString *)uid srcUid:(NSString *)srcUid token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 23 | + | ||
| 24 | +/** | ||
| 25 | + * 修改用户单项信息 | ||
| 26 | + */ | ||
| 27 | +- (void)modifyUserInfoWithAppId:(NSString *)appId appKey:(NSString *)appKey type:(UserInfoType)type uid:(NSString *)uid modifyInfo:(NSString *)info token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 28 | + | ||
| 29 | +- (void)updateOtherInfoWithAppId:(NSString *)appId appKey:(NSString *)appKey uid:(NSString *)uid extInfo:(NSString *)extInfo token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 30 | +/** | ||
| 31 | + * 通过手机修改密码 | ||
| 32 | + */ | ||
| 33 | +- (void)changePasswordWithAppId:(NSString *)appId appKey:(NSString *)appKey mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode newPassword:(NSString *)newPassword success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 34 | + | ||
| 35 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserInfo.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserInfo.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveUserInfo.h" | ||
| 10 | +#import "CNLiveNetworkManager.h" | ||
| 11 | +#import "CNLiveUserSystemTools.h" | ||
| 12 | +#import "NSDictionary+Safety.h" | ||
| 13 | + | ||
| 14 | +//更新手机号 | ||
| 15 | +static NSString *updateMobileURL = @"http://api.cnlive.com/open/api2/user/updateMobileById"; | ||
| 16 | + | ||
| 17 | +//查询用户信息 | ||
| 18 | +static NSString *queryUserInfoURL = @"http://api.cnlive.com/open/api2/user/readUserById"; | ||
| 19 | + | ||
| 20 | +//修改用户单项信息 | ||
| 21 | +static NSString *updateUserByIdURL = @"http://api.cnlive.com/open/api2/user/updateUserById"; | ||
| 22 | + | ||
| 23 | +//更新用户附加信息 | ||
| 24 | +static NSString *updateOtherInfoURL = @"http://api.cnlive.com/open/api2/user/updateUserExtInfo"; | ||
| 25 | + | ||
| 26 | +//修改密码 | ||
| 27 | +static NSString *updatePwdURL = @"http://api.cnlive.com/open/api2/user/updatePwdByMobile"; | ||
| 28 | + | ||
| 29 | +@implementation CNLiveUserInfo | ||
| 30 | + | ||
| 31 | +/** | ||
| 32 | + * 更新手机号 | ||
| 33 | + */ | ||
| 34 | +- (void)updateMobileWithAppId:(NSString *)appId appKey:(NSString *)appKey uid:(NSString *)uid mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode token:(NSString *)token success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 35 | +{ | ||
| 36 | + NSDate *date = [NSDate date]; | ||
| 37 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 38 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 39 | + | ||
| 40 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 41 | + @"uid":[CNLiveUserSystemTools verify:uid], | ||
| 42 | + @"mobile":[CNLiveUserSystemTools verify:mobile], | ||
| 43 | + @"verificationCode":[CNLiveUserSystemTools verify:verificationCode], | ||
| 44 | + @"clientPlat":@"i", | ||
| 45 | + @"token":[CNLiveUserSystemTools verify:token], | ||
| 46 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 47 | + @"timestamp": timeString}; | ||
| 48 | + | ||
| 49 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 50 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 51 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 52 | + | ||
| 53 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 54 | + [self requestWithURL:updateMobileURL parameter:parameter success:success failure:failure]; | ||
| 55 | + | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | +/** | ||
| 59 | + * 查询用户信息 | ||
| 60 | + */ | ||
| 61 | +- (void)queryUserInfoWithAppId:(NSString *)appId appKey:(NSString *)appKey uid:(NSString *)uid srcUid:(NSString *)srcUid token:(NSString *)token success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 62 | +{ | ||
| 63 | + NSDate *date = [NSDate date]; | ||
| 64 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 65 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 66 | + | ||
| 67 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 68 | + @"uid":[CNLiveUserSystemTools verify:uid], | ||
| 69 | + @"srcUid":[CNLiveUserSystemTools verify:srcUid], | ||
| 70 | + @"clientPlat":@"i", | ||
| 71 | + @"token":[CNLiveUserSystemTools verify:token], | ||
| 72 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 73 | + @"timestamp": timeString}; | ||
| 74 | + | ||
| 75 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 76 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 77 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 78 | + | ||
| 79 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 80 | + [self requestWithURL:queryUserInfoURL parameter:parameter success:success failure:failure]; | ||
| 81 | + | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +/** | ||
| 85 | + * 修改用户单项信息 | ||
| 86 | + */ | ||
| 87 | +- (void)modifyUserInfoWithAppId:(NSString *)appId appKey:(NSString *)appKey type:(UserInfoType)type uid:(NSString *)uid modifyInfo:(NSString *)info token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 88 | +{ | ||
| 89 | + | ||
| 90 | + NSDate *date = [NSDate date]; | ||
| 91 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 92 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 93 | + | ||
| 94 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 95 | + @"uid":[CNLiveUserSystemTools verify:uid], | ||
| 96 | + @"type":[self updateType:type], | ||
| 97 | + @"value":[CNLiveUserSystemTools verify:info], | ||
| 98 | + @"clientPlat":@"i", | ||
| 99 | + @"token":[CNLiveUserSystemTools verify:token], | ||
| 100 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 101 | + @"timestamp": timeString}; | ||
| 102 | + | ||
| 103 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 104 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 105 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 106 | + | ||
| 107 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 108 | + [self requestWithURL:updateUserByIdURL parameter:parameter success:success failure:failure]; | ||
| 109 | + | ||
| 110 | +} | ||
| 111 | + | ||
| 112 | +/** | ||
| 113 | + * 更新用户附加信息 | ||
| 114 | + */ | ||
| 115 | +- (void)updateOtherInfoWithAppId:(NSString *)appId appKey:(NSString *)appKey uid:(NSString *)uid extInfo:(NSString *)extInfo token:(NSString *)token success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 116 | +{ | ||
| 117 | + NSDate *date = [NSDate date]; | ||
| 118 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 119 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 120 | + | ||
| 121 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 122 | + @"token":[CNLiveUserSystemTools verify:token], | ||
| 123 | + @"uid":[CNLiveUserSystemTools verify:uid], | ||
| 124 | + @"extInfo":[CNLiveUserSystemTools verify:extInfo], | ||
| 125 | + @"clientPlat":@"i", | ||
| 126 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 127 | + @"timestamp": timeString}; | ||
| 128 | + | ||
| 129 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 130 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 131 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 132 | + | ||
| 133 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 134 | + [self requestWithURL:updateOtherInfoURL parameter:parameter success:success failure:failure]; | ||
| 135 | +} | ||
| 136 | + | ||
| 137 | +/** | ||
| 138 | + * 修改密码 | ||
| 139 | + */ | ||
| 140 | +- (void)changePasswordWithAppId:(NSString *)appId appKey:(NSString *)appKey mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode newPassword:(NSString *)newPassword success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 141 | +{ | ||
| 142 | + NSDate *date = [NSDate date]; | ||
| 143 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 144 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 145 | + | ||
| 146 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 147 | + @"mobile":[CNLiveUserSystemTools verify:mobile], | ||
| 148 | + @"verificationCode":[CNLiveUserSystemTools verify:verificationCode], | ||
| 149 | + @"newPwd":[CNLiveUserSystemTools verify:newPassword], | ||
| 150 | + @"clientPlat":@"i", | ||
| 151 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 152 | + @"timestamp": timeString}; | ||
| 153 | + | ||
| 154 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 155 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 156 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 157 | + | ||
| 158 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 159 | + [self requestWithURL:updatePwdURL parameter:parameter success:success failure:failure]; | ||
| 160 | + | ||
| 161 | +} | ||
| 162 | + | ||
| 163 | +#pragma mark - request | ||
| 164 | + | ||
| 165 | +- (void)requestWithURL:(NSString *)URL parameter:(NSDictionary *)param success:(void(^)(id result))success failure :(void (^)(NSError * error))failure | ||
| 166 | +{ | ||
| 167 | + [[CNLiveNetworkManager manager] requestPostURL:URL parameters:param success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) { | ||
| 168 | + | ||
| 169 | + responseObject = [responseObject validatedDictionary]; | ||
| 170 | + success(responseObject); | ||
| 171 | + | ||
| 172 | + } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 173 | + | ||
| 174 | + failure(error); | ||
| 175 | + | ||
| 176 | + }]; | ||
| 177 | +} | ||
| 178 | + | ||
| 179 | +#pragma mark - type | ||
| 180 | + | ||
| 181 | +- (NSString *)updateType:(UserInfoType)updateType | ||
| 182 | +{ | ||
| 183 | + NSString *type; | ||
| 184 | + switch (updateType) { | ||
| 185 | + case UserInfoTypeNickName: | ||
| 186 | + type = @"nickName"; | ||
| 187 | + break; | ||
| 188 | + case UserInfoTypeGender: | ||
| 189 | + type = @"gender"; | ||
| 190 | + break; | ||
| 191 | + case UserInfoTypeEmail: | ||
| 192 | + type = @"email"; | ||
| 193 | + break; | ||
| 194 | + case UserInfoTypeLocation: | ||
| 195 | + type = @"location"; | ||
| 196 | + break; | ||
| 197 | + default: | ||
| 198 | + break; | ||
| 199 | + } | ||
| 200 | + return type; | ||
| 201 | +} | ||
| 202 | + | ||
| 203 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserManager.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserManager.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/18. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface CNLiveUserManager : NSObject | ||
| 12 | + | ||
| 13 | +@property (nonatomic, strong) NSString *appId; | ||
| 14 | +@property (nonatomic, strong) NSString *appKey; | ||
| 15 | +@property (nonatomic, strong) NSString *appSecret; | ||
| 16 | + | ||
| 17 | ++ (CNLiveUserManager *)manager; | ||
| 18 | + | ||
| 19 | +- (void)addObserver; | ||
| 20 | + | ||
| 21 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserManager.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserManager.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/18. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveUserManager.h" | ||
| 10 | +#import "CNLiveUserSystemTools.h" | ||
| 11 | + | ||
| 12 | +#define kSVer @"4.0" | ||
| 13 | +#define StatAppVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] | ||
| 14 | +//#define StatBundleVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] | ||
| 15 | +#define StatBundleVersion @"1.0" | ||
| 16 | + | ||
| 17 | +@interface CNLiveUserManager () | ||
| 18 | +{ | ||
| 19 | + NSDate *_startDate; | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +@end | ||
| 23 | + | ||
| 24 | +@implementation CNLiveUserManager | ||
| 25 | + | ||
| 26 | ++ (CNLiveUserManager *)manager | ||
| 27 | +{ | ||
| 28 | + static id instance = nil; | ||
| 29 | + static dispatch_once_t onceToken; | ||
| 30 | + dispatch_once(&onceToken, ^{ | ||
| 31 | + instance = [[self alloc] init]; | ||
| 32 | + }); | ||
| 33 | + | ||
| 34 | + return instance; | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +- (void)addObserver | ||
| 38 | +{ | ||
| 39 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil]; | ||
| 40 | + | ||
| 41 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationEnterBackground) name:UIApplicationWillResignActiveNotification object:nil]; | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +- (void)startUserStat | ||
| 45 | +{ | ||
| 46 | + NSDate *date = [NSDate date]; | ||
| 47 | + _startDate = date; | ||
| 48 | + | ||
| 49 | + NSString *stamp = [NSString stringWithFormat:@"%.3f", [date timeIntervalSince1970]]; | ||
| 50 | + stamp = [stamp stringByReplacingOccurrencesOfString:@"." withString:@""]; | ||
| 51 | + | ||
| 52 | + NSString *vvUrl = [NSString stringWithFormat:@"http://app.sta.cnlive.com/app.js?sver=%@&uid=%@&tm=%@&from=SDK&spid=&appid=%@&version=%@/1005_%@&eventid=1300&uri=&sid=&plat=i&objid=",kSVer,[CNLiveUserSystemTools uidForStat:date],stamp,self.appId,StatAppVersion,StatBundleVersion]; | ||
| 53 | + | ||
| 54 | + [NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:vvUrl]] delegate:nil]; | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +- (void)endUserStat | ||
| 58 | +{ | ||
| 59 | + NSDate *date = [NSDate date]; | ||
| 60 | + NSString *stamp = [NSString stringWithFormat:@"%.3f", [date timeIntervalSince1970]]; | ||
| 61 | + stamp = [stamp stringByReplacingOccurrencesOfString:@"." withString:@""]; | ||
| 62 | + | ||
| 63 | + NSString *endDate = [NSString stringWithFormat:@"%.3f",[date timeIntervalSinceDate:_startDate]]; | ||
| 64 | + endDate = [endDate stringByReplacingOccurrencesOfString:@"." withString:@""]; | ||
| 65 | + | ||
| 66 | + NSString *vvUrl = [NSString stringWithFormat:@"http://app.sta.cnlive.com/app.js?sver=%@&uid=%@&tm=%@&from=SDK&spid=&appid=%@&version=%@/1005_%@&eventid=1311&uri=%@&sid=&plat=i&objid=",kSVer,[CNLiveUserSystemTools uidForStat:date],stamp,self.appId,StatAppVersion,StatBundleVersion,endDate]; | ||
| 67 | + | ||
| 68 | + [NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:vvUrl]] delegate:nil]; | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | +- (void)applicationBecomeActive | ||
| 72 | +{ | ||
| 73 | + [self startUserStat]; | ||
| 74 | + NSLog(@"………………………………………………进入前台"); | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +- (void)applicationEnterBackground | ||
| 78 | +{ | ||
| 79 | + [self endUserStat]; | ||
| 80 | + NSLog(@"………………………………………………进入后台"); | ||
| 81 | +} | ||
| 82 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemCenter.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserSystemCenter.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/12. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import "CNLiveUserSystemTypeDef.h" | ||
| 11 | +#import <UIKit/UIKit.h> | ||
| 12 | + | ||
| 13 | +@interface CNLiveUserSystemCenter : NSObject | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + @abstract 配置appId,appKey | ||
| 17 | + @param appId 应用ID | ||
| 18 | + @param appKey 注册后的应用key | ||
| 19 | + @warning 必传参数,AppDelegate中调用 | ||
| 20 | + */ | ||
| 21 | ++ (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret; | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + @abstract 注册 | ||
| 25 | + @param userName 邮箱或手机 | ||
| 26 | + @param password 密码 | ||
| 27 | + @param verificationCode 手机验证码(手机号注册时必填) | ||
| 28 | + @param invitationCode 邀请码(非必填) | ||
| 29 | + @param frmId 渠道ID(非必填) | ||
| 30 | + @param success 注册成功回调 | ||
| 31 | + @param failure 注册失败回调 | ||
| 32 | + */ | ||
| 33 | ++ (void)registerWithUserName:(NSString *)userName password:(NSString *)password verificationCode:(NSString *)verificationCode invitationCode:(NSString *)invitationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 34 | + | ||
| 35 | +/** | ||
| 36 | + @abstract 第三方登录 | ||
| 37 | + @param plat 第三方平台编号(如platform: 1:sina weibo 2:qq weibo 3:weixin 4:renren 注:如qq登录,plat=@"2") | ||
| 38 | + @param thirdPartyId 第三方用户ID | ||
| 39 | + @param nickName 用户昵称 | ||
| 40 | + @param gender 性别,m:男、f:女、n:未知(非必填) | ||
| 41 | + @param location 用户所在地(非必填) | ||
| 42 | + @param faceUrl 头像,约100*100(非必填) | ||
| 43 | + @param frmId 渠道ID(非必填) | ||
| 44 | + @param success 第三方登录成功回调 | ||
| 45 | + @param failure 第三方登录失败回调 | ||
| 46 | + */ | ||
| 47 | ++ (void)thirdPartyLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId nickName:(NSString *)nickName gender:(NSString *)gender location:(NSString *)location faceUrl:(NSString *)faceUrl frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 48 | + | ||
| 49 | +/** | ||
| 50 | + @abstract 快捷登录 | ||
| 51 | + @param userName 手机号 | ||
| 52 | + @param verificationCode 验证码 | ||
| 53 | + @param frmId 渠道ID(非必填) | ||
| 54 | + @param success 快捷登录成功回调 | ||
| 55 | + @param failure 快捷登录失败回调 | ||
| 56 | + */ | ||
| 57 | ++ (void)shortcutLoginWithUserName:(NSString *)userName verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 58 | + | ||
| 59 | +/** | ||
| 60 | + @abstract 登录 | ||
| 61 | + @param userName 手机号或邮箱 | ||
| 62 | + @param password 密码 | ||
| 63 | + @param frmId 渠道ID(非必填) | ||
| 64 | + @param success 登录成功回调 | ||
| 65 | + @param failure 登录失败回调 | ||
| 66 | + */ | ||
| 67 | ++ (void)loginWithUserName:(NSString *)userName password:(NSString *)password frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 68 | + | ||
| 69 | +/** | ||
| 70 | + @abstract 发送验证码 | ||
| 71 | + @param mobile 手机号 | ||
| 72 | + @param type 发送验证码类型(详见VerificationCodeType) | ||
| 73 | + @param success 发送验证码成功回调 | ||
| 74 | + @param failure 发送验证码失败回调 | ||
| 75 | + | ||
| 76 | + */ | ||
| 77 | ++ (void)verificationCodeType:(VerificationCodeType)type mobile:(NSString *)mobile success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 78 | + | ||
| 79 | +/** | ||
| 80 | + @abstract 更新用户附加信息 | ||
| 81 | + @param uid 用户ID | ||
| 82 | + @param extInfo 扩展信息(格式由对方自己组织,平台只负责存储和原样读取,NSString类型) | ||
| 83 | + @param token 平台token(登录成功返回token) | ||
| 84 | + @param success 更新用户附加信息成功回调 | ||
| 85 | + @param failure 更新用户附加信息失败回调 | ||
| 86 | + */ | ||
| 87 | ++ (void)updateOtherInfoWithUid:(NSString *)uid extInfo:(NSString *)extInfo token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 88 | + | ||
| 89 | +/** | ||
| 90 | + @abstract 修改用户单项信息 | ||
| 91 | + @param type 修改类型(nickName-昵称,gender-性别,email-邮箱, location-联系方式) | ||
| 92 | + @param uid 用户ID | ||
| 93 | + @param info 对应的信息(注gender对应f/m) | ||
| 94 | + @param token 平台token(登录成功返回token) | ||
| 95 | + @param success 修改用户单项信息成功回调 | ||
| 96 | + @param failure 修改用户单项信息失败回调 | ||
| 97 | + | ||
| 98 | + */ | ||
| 99 | ++ (void)modifyUserInfoType:(UserInfoType)type uid:(NSString *)uid modifyInfo:(NSString *)info token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 100 | + | ||
| 101 | +/** | ||
| 102 | + @abstract 更新手机号 | ||
| 103 | + @param uid 用户ID | ||
| 104 | + @param mobile 手机号 | ||
| 105 | + @param verificationCode 验证码 | ||
| 106 | + @param token 平台token(登录成功返回token) | ||
| 107 | + @param success 更新手机号成功回调 | ||
| 108 | + @param failure 更新手机号失败回调 | ||
| 109 | + | ||
| 110 | + */ | ||
| 111 | ++ (void)updateMobileWithUid:(NSString *)uid mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 112 | + | ||
| 113 | +/** | ||
| 114 | + @abstract 修改密码(通过手机号修改) | ||
| 115 | + @param mobile 手机号 | ||
| 116 | + @param verificationCode 验证码 | ||
| 117 | + @param newPassword 用户昵称 | ||
| 118 | + @param success 修改密码成功回调 | ||
| 119 | + @param failure 修改密码失败回调 | ||
| 120 | + | ||
| 121 | + */ | ||
| 122 | ++ (void)changePasswordWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode newPassword:(NSString *)newPassword success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 123 | + | ||
| 124 | + | ||
| 125 | +/** | ||
| 126 | + * 上传头像 | ||
| 127 | + */ | ||
| 128 | ++ (void)uploadIconWithUid:(NSString *)uid token:(NSString *)token icon:(UIImage *)icon success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 129 | + | ||
| 130 | +/** | ||
| 131 | + @abstract 查询用户信息 | ||
| 132 | + @param uid 用户ID | ||
| 133 | + @param srcUid 被查询用户ID | ||
| 134 | + @param token 平台token(登录成功返回token) | ||
| 135 | + @param success 查询用户信息成功回调 | ||
| 136 | + @param failure 查询用户信息失败回调 | ||
| 137 | + */ | ||
| 138 | ++ (void)queryUserInfoWithUid:(NSString *)uid srcUid:(NSString *)srcUid token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 139 | + | ||
| 140 | +/** | ||
| 141 | + @abstract 用户反馈 | ||
| 142 | + @param contentId 举报内容ID | ||
| 143 | + @param message 举报内容(app自己组织-不能带特殊字符&号等) | ||
| 144 | + @param success 用户反馈成功回调 | ||
| 145 | + @param failure 用户反馈失败回调 | ||
| 146 | + | ||
| 147 | + */ | ||
| 148 | ++ (void)feedbackWithContentId:(NSString *)contentId message:(NSString *)message success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 149 | + | ||
| 150 | + | ||
| 151 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemCenter.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserSystemCenter.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/12. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveUserSystemCenter.h" | ||
| 10 | +#import "CNLiveLogin.h" | ||
| 11 | +#import "CNLiveRegister.h" | ||
| 12 | +#import "CNLiveVerificationCode.h" | ||
| 13 | +#import "CNLiveFeedback.h" | ||
| 14 | +#import "CNLiveUserInfo.h" | ||
| 15 | +#import "CNLiveUserSystemTools.h" | ||
| 16 | +#import "CNLiveUserManager.h" | ||
| 17 | +#import "CNLiveUploadIcon.h" | ||
| 18 | + | ||
| 19 | +@implementation CNLiveUserSystemCenter | ||
| 20 | + | ||
| 21 | ++ (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret | ||
| 22 | +{ | ||
| 23 | + [CNLiveUserManager manager].appId = appId; | ||
| 24 | + [CNLiveUserManager manager].appKey = appKey; | ||
| 25 | + [CNLiveUserManager manager].appSecret = appSecret; | ||
| 26 | + | ||
| 27 | + [[CNLiveUserManager manager] addObserver]; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +/** | ||
| 31 | + * 注册 | ||
| 32 | + */ | ||
| 33 | ++ (void)registerWithUserName:(NSString *)userName password:(NSString *)password verificationCode:(NSString *)verificationCode invitationCode:(NSString *)invitationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 34 | +{ | ||
| 35 | + CNLiveRegister *userRegister = [[CNLiveRegister alloc] init]; | ||
| 36 | + | ||
| 37 | + [userRegister registerWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey userName:userName password:password verificationCode:verificationCode invitationCode:invitationCode frmId:frmId success:success failure:failure]; | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +/** | ||
| 41 | + * 第三方登录 | ||
| 42 | + */ | ||
| 43 | ++ (void)thirdPartyLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId nickName:(NSString *)nickName gender:(NSString *)gender location:(NSString *)location faceUrl:(NSString *)faceUrl frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 44 | +{ | ||
| 45 | + CNLiveLogin *thirdLogin = [[CNLiveLogin alloc] init]; | ||
| 46 | + | ||
| 47 | + [thirdLogin thirdPartyLoginWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey thirdPartyPlatType:plat thirdPartyId:thirdPartyId nickName:nickName gender:gender location:location faceUrl:faceUrl frmId:frmId success:success failure:failure]; | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +/** | ||
| 51 | + * 快捷登录 | ||
| 52 | + */ | ||
| 53 | + | ||
| 54 | ++ (void)shortcutLoginWithUserName:(NSString *)userName verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 55 | +{ | ||
| 56 | + CNLiveLogin *shortcutLogin = [[CNLiveLogin alloc] init]; | ||
| 57 | + | ||
| 58 | + [shortcutLogin shortcutLoginWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey userName:userName verificationCode:verificationCode frmId:frmId success:success failure:failure]; | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +/** | ||
| 62 | + * 登录 | ||
| 63 | + */ | ||
| 64 | ++ (void)loginWithUserName:(NSString *)userName password:(NSString *)password frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 65 | +{ | ||
| 66 | + CNLiveLogin *login = [[CNLiveLogin alloc] init]; | ||
| 67 | + | ||
| 68 | + [login loginWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey userName:userName password:password frmId:frmId success:success failure:failure]; | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | +/** | ||
| 72 | + * 发送验证码 | ||
| 73 | + */ | ||
| 74 | ++ (void)verificationCodeType:(VerificationCodeType)type mobile:(NSString *)mobile success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 75 | +{ | ||
| 76 | + CNLiveVerificationCode *verification = [[CNLiveVerificationCode alloc] init]; | ||
| 77 | + | ||
| 78 | + [verification getVerificationCodeWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey type:type mobile:mobile success:success failure:failure]; | ||
| 79 | +} | ||
| 80 | + | ||
| 81 | +/** | ||
| 82 | + * 更新用户附加信息 | ||
| 83 | + */ | ||
| 84 | ++ (void)updateOtherInfoWithUid:(NSString *)uid extInfo:(NSString *)extInfo token:(NSString *)token success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 85 | +{ | ||
| 86 | + CNLiveUserInfo *updateOtherInfo = [[CNLiveUserInfo alloc] init]; | ||
| 87 | + | ||
| 88 | + [updateOtherInfo updateOtherInfoWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey uid:uid extInfo:extInfo token:token success:success failure:failure]; | ||
| 89 | +} | ||
| 90 | + | ||
| 91 | +/** | ||
| 92 | + * 修改用户单项信息 | ||
| 93 | + */ | ||
| 94 | ++ (void)modifyUserInfoType:(UserInfoType)type uid:(NSString *)uid modifyInfo:(NSString *)info token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 95 | +{ | ||
| 96 | + CNLiveUserInfo *updateUserInfo = [[CNLiveUserInfo alloc] init]; | ||
| 97 | + | ||
| 98 | + [updateUserInfo modifyUserInfoWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey type:type uid:uid modifyInfo:info token:token success:success failure:failure]; | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | +/** | ||
| 102 | + * 更新手机号 | ||
| 103 | + */ | ||
| 104 | ++ (void)updateMobileWithUid:(NSString *)uid mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 105 | +{ | ||
| 106 | + CNLiveUserInfo *updateMobile = [[CNLiveUserInfo alloc] init]; | ||
| 107 | + | ||
| 108 | + [updateMobile updateMobileWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey uid:uid mobile:mobile verificationCode:verificationCode token:token success:success failure:failure]; | ||
| 109 | +} | ||
| 110 | + | ||
| 111 | +/** | ||
| 112 | + * 修改密码 | ||
| 113 | + */ | ||
| 114 | ++ (void)changePasswordWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode newPassword:(NSString *)newPassword success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 115 | +{ | ||
| 116 | + CNLiveUserInfo *password = [[CNLiveUserInfo alloc] init]; | ||
| 117 | + | ||
| 118 | + [password changePasswordWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey mobile:mobile verificationCode:verificationCode newPassword:newPassword success:success failure:failure]; | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | + | ||
| 122 | +/** | ||
| 123 | + * 上传头像 | ||
| 124 | + */ | ||
| 125 | ++ (void)uploadIconWithUid:(NSString *)uid token:(NSString *)token icon:(UIImage *)icon success:(void (^)(id))success failure:(void (^)(NSError *))failure | ||
| 126 | +{ | ||
| 127 | + CNLiveUploadIcon *uplodIcon = [[CNLiveUploadIcon alloc] init]; | ||
| 128 | + [uplodIcon uploadIconWithAppId:[CNLiveUserManager manager].appId uid:uid icon:icon token:token secret:[CNLiveUserManager manager].appSecret success:success failure:failure]; | ||
| 129 | +} | ||
| 130 | + | ||
| 131 | +/** | ||
| 132 | + * 查询用户信息 | ||
| 133 | + */ | ||
| 134 | ++ (void)queryUserInfoWithUid:(NSString *)uid srcUid:(NSString *)srcUid token:(NSString *)token success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 135 | +{ | ||
| 136 | + CNLiveUserInfo *userInfo = [[CNLiveUserInfo alloc] init]; | ||
| 137 | + | ||
| 138 | + [userInfo queryUserInfoWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey uid:uid srcUid:srcUid token:token success:success failure:failure]; | ||
| 139 | +} | ||
| 140 | + | ||
| 141 | +/** | ||
| 142 | + * 用户反馈 | ||
| 143 | + */ | ||
| 144 | ++ (void)feedbackWithContentId:(NSString *)contentId message:(NSString *)message success:(void (^)(id result))success failure :(void (^)(NSError *error))failure | ||
| 145 | +{ | ||
| 146 | + CNLiveFeedback *feedback = [[CNLiveFeedback alloc] init]; | ||
| 147 | + | ||
| 148 | + [feedback feedbackWithAppId:[CNLiveUserManager manager].appId appKey:[CNLiveUserManager manager].appKey contentId:contentId message:message success:success failure:failure]; | ||
| 149 | +} | ||
| 150 | + | ||
| 151 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemTools.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserSystemTools.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface CNLiveUserSystemTools : NSObject | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * uuid | ||
| 15 | + */ | ||
| 16 | ++ (NSString *)uidForStat:(NSDate *)date; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * 加密 | ||
| 20 | + */ | ||
| 21 | ++ (NSString*)sha1:(NSString *)string; | ||
| 22 | ++ (NSString *)signvalue:(NSDictionary*)parameter; | ||
| 23 | + | ||
| 24 | +/** | ||
| 25 | + * 检验空字符串 | ||
| 26 | + */ | ||
| 27 | ++ (NSString *)verify:(NSString *)string; | ||
| 28 | + | ||
| 29 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemTools.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserSystemTools.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveUserSystemTools.h" | ||
| 10 | +#import <UIKit/UIKit.h> | ||
| 11 | +#import "CommonCrypto/CommonDigest.h" | ||
| 12 | + | ||
| 13 | +@implementation CNLiveUserSystemTools | ||
| 14 | + | ||
| 15 | +#pragma mark - uuid | ||
| 16 | + | ||
| 17 | ++ (NSString *)uidForStat:(NSDate *)date | ||
| 18 | +{ | ||
| 19 | + | ||
| 20 | + NSString *uid = @""; | ||
| 21 | + | ||
| 22 | + NSUserDefaults *defauts = [NSUserDefaults standardUserDefaults]; | ||
| 23 | + | ||
| 24 | + if ([defauts objectForKey:@"kCNLiveUserDefaultsUIDKey"]) { | ||
| 25 | + uid = [[defauts objectForKey:@"kCNLiveUserDefaultsUIDKey"] copy]; | ||
| 26 | + return uid; | ||
| 27 | + } else { | ||
| 28 | + | ||
| 29 | + NSString *stamp = [NSString stringWithFormat:@"%.3f", [date timeIntervalSince1970]]; | ||
| 30 | + stamp = [stamp stringByReplacingOccurrencesOfString:@"." withString:@""]; | ||
| 31 | + | ||
| 32 | + NSString *idfv = [[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""]; | ||
| 33 | + uid = [NSString stringWithFormat:@"%@_%@", idfv, stamp]; | ||
| 34 | + | ||
| 35 | + [defauts setObject:uid forKey:@"kCNLiveUserDefaultsUIDKey"]; | ||
| 36 | + [defauts synchronize]; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + return uid; | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +#pragma mark - 加密 | ||
| 43 | + | ||
| 44 | ++ (NSString *)sha1:(NSString *)string | ||
| 45 | +{ | ||
| 46 | + NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding]; | ||
| 47 | + | ||
| 48 | + uint8_t digest[CC_SHA1_DIGEST_LENGTH]; | ||
| 49 | + | ||
| 50 | + CC_SHA1(data.bytes, data.length, digest); | ||
| 51 | + | ||
| 52 | + NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2]; | ||
| 53 | + | ||
| 54 | + for(int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) | ||
| 55 | + [output appendFormat:@"%02x", digest[i]]; | ||
| 56 | + | ||
| 57 | + while ([[output substringToIndex:1] isEqualToString:@"0"]) { | ||
| 58 | + output = [[NSMutableString alloc] initWithString:[output substringFromIndex:1]]; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + return output; | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | ++ (NSString *)signvalue:(NSDictionary*)parameter | ||
| 65 | +{ | ||
| 66 | + //对所有传入参数按照字段名的 ASCII 码从小到大排序 | ||
| 67 | + NSArray *keyArr=[parameter allKeys]; | ||
| 68 | + NSArray *arr = [keyArr sortedArrayUsingSelector:@selector(compare:)]; | ||
| 69 | + | ||
| 70 | + NSMutableString *string1 = [[NSMutableString alloc]init]; | ||
| 71 | + for (int i=0; i<arr.count; i++) { | ||
| 72 | + | ||
| 73 | + NSString *parameterString = [NSString stringWithFormat:@"%@",parameter[[arr objectAtIndex:i]]]; | ||
| 74 | + if (parameterString.length > 0) { | ||
| 75 | + [string1 appendString:[NSString stringWithFormat:@"%@=%@&",[arr objectAtIndex:i],parameter[[arr objectAtIndex:i]]]]; | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + if (string1.length > 0) { | ||
| 80 | + [string1 deleteCharactersInRange:NSMakeRange(string1.length-1, 1)]; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + return string1; | ||
| 84 | +} | ||
| 85 | + | ||
| 86 | + | ||
| 87 | ++ (NSString *)verify:(NSString *)string | ||
| 88 | +{ | ||
| 89 | + NSString *newString; | ||
| 90 | + | ||
| 91 | + if ([string isKindOfClass:[NSNumber class]]) { | ||
| 92 | + newString = [NSString stringWithFormat:@"%@",string]; | ||
| 93 | + } else { | ||
| 94 | + newString = string; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + if ([newString isKindOfClass:[NSString class]] || newString.length > 0) { | ||
| 98 | + return string; | ||
| 99 | + } else { | ||
| 100 | + return @""; | ||
| 101 | + } | ||
| 102 | +} | ||
| 103 | + | ||
| 104 | + | ||
| 105 | + | ||
| 106 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemTypeDef.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveUserSystemTypeDef.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/12. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#ifndef CNLiveUserSystemTypeDef_h | ||
| 10 | +#define CNLiveUserSystemTypeDef_h | ||
| 11 | + | ||
| 12 | +//获取验证码 | ||
| 13 | +typedef NS_ENUM(NSUInteger, VerificationCodeType) { | ||
| 14 | + VerificationCodeTypeShortcutLogin = 0, //快捷登录 | ||
| 15 | + VerificationCodeTypeRegister, //注册或修改手机号 | ||
| 16 | + VerificationCodeTypeRetrievePassword //找回或修改密码 | ||
| 17 | +}; | ||
| 18 | + | ||
| 19 | +//修改单项用户信息类型 | ||
| 20 | +typedef NS_ENUM(NSUInteger, UserInfoType) { | ||
| 21 | + UserInfoTypeNickName = 0, //昵称 | ||
| 22 | + UserInfoTypeGender, //性别 | ||
| 23 | + UserInfoTypeEmail, //邮箱 | ||
| 24 | + UserInfoTypeLocation, //联系方式 | ||
| 25 | +}; | ||
| 26 | + | ||
| 27 | +#endif /* CNLiveUserSystemTypeDef_h */ |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveVerificationCode.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveVerificationCode.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import "CNLiveUserSystemTypeDef.h" | ||
| 11 | + | ||
| 12 | +@interface CNLiveVerificationCode : NSObject | ||
| 13 | + | ||
| 14 | +- (void)getVerificationCodeWithAppId:(NSString *)appId appKey:(NSString *)appKey type:(VerificationCodeType)type mobile:(NSString *)mobile success:(void (^)(id result))success failure :(void (^)(NSError *error))failure; | ||
| 15 | + | ||
| 16 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveVerificationCode.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveVerificationCode.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/13. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNLiveVerificationCode.h" | ||
| 10 | +#import "CNLiveUserSystemTools.h" | ||
| 11 | +#import "CNLiveNetworkManager.h" | ||
| 12 | +#import "NSDictionary+Safety.h" | ||
| 13 | + | ||
| 14 | +//快捷登录前发手机验证码 | ||
| 15 | +static NSString *shortcutLoginURL = @"http://api.cnlive.com/open/api2/user/sendVerifyCode"; | ||
| 16 | + | ||
| 17 | +//注册或修改手机号前发手机验证码 | ||
| 18 | +static NSString *registerOrModifyURL = @"http://api.cnlive.com/open/api2/user/sendVerifyCodeForUnRegistered"; | ||
| 19 | + | ||
| 20 | +//找回或修改密码前发手机验证码 | ||
| 21 | +static NSString *passwordURL = @"http://api.cnlive.com/open/api2/user/sendVerifyCodeForRegistered"; | ||
| 22 | + | ||
| 23 | +@implementation CNLiveVerificationCode | ||
| 24 | + | ||
| 25 | +- (void)getVerificationCodeWithAppId:(NSString *)appId appKey:(NSString *)appKey type:(VerificationCodeType)type mobile:(NSString *)mobile success:(void (^)(id result))success failure:(void (^)(NSError *))failure | ||
| 26 | +{ | ||
| 27 | + NSDate *date = [NSDate date]; | ||
| 28 | + NSInteger time = [date timeIntervalSince1970]; | ||
| 29 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | ||
| 30 | + | ||
| 31 | + NSDictionary *params = @{@"appId":[CNLiveUserSystemTools verify:appId], | ||
| 32 | + @"mobile":[CNLiveUserSystemTools verify:mobile], | ||
| 33 | + @"clientPlat":@"i", | ||
| 34 | + @"platform_id":[NSBundle mainBundle].bundleIdentifier, | ||
| 35 | + @"timestamp": timeString}; | ||
| 36 | + | ||
| 37 | + NSMutableDictionary *parameter = [NSMutableDictionary dictionaryWithDictionary:params]; | ||
| 38 | + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [CNLiveUserSystemTools signvalue:parameter], [CNLiveUserSystemTools verify:appKey]]; | ||
| 39 | + NSString *signString = [[CNLiveUserSystemTools sha1:string] uppercaseString]; | ||
| 40 | + | ||
| 41 | + [parameter setObject:signString forKey:@"sign"]; | ||
| 42 | + | ||
| 43 | + [self requestWithURL:[self getURL:type] parameter:parameter success:success failure:failure]; | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +#pragma mark - request | ||
| 47 | + | ||
| 48 | +- (void)requestWithURL:(NSString *)URL parameter:(NSDictionary *)param success:(void(^)(id result))success failure :(void (^)(NSError * error))failure | ||
| 49 | +{ | ||
| 50 | + [[CNLiveNetworkManager manager] requestPostURL:URL parameters:param success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) { | ||
| 51 | + | ||
| 52 | + responseObject = [responseObject validatedDictionary]; | ||
| 53 | + success(responseObject); | ||
| 54 | + | ||
| 55 | + } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
| 56 | + | ||
| 57 | + failure(error); | ||
| 58 | + | ||
| 59 | + }]; | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +- (NSString *)getURL:(VerificationCodeType)type | ||
| 63 | +{ | ||
| 64 | + NSString *url; | ||
| 65 | + switch (type) { | ||
| 66 | + case VerificationCodeTypeShortcutLogin: | ||
| 67 | + url = shortcutLoginURL; | ||
| 68 | + break; | ||
| 69 | + case VerificationCodeTypeRegister: | ||
| 70 | + url = registerOrModifyURL; | ||
| 71 | + break; | ||
| 72 | + case VerificationCodeTypeRetrievePassword: | ||
| 73 | + url = passwordURL; | ||
| 74 | + break; | ||
| 75 | + | ||
| 76 | + default: | ||
| 77 | + break; | ||
| 78 | + } | ||
| 79 | + return url; | ||
| 80 | +} | ||
| 81 | + | ||
| 82 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/NSDictionary+Safety.h
0 → 100644
| 1 | +// | ||
| 2 | +// NSDictionary+Safety.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/21. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | + | ||
| 11 | +@interface NSDictionary (Safety) | ||
| 12 | + | ||
| 13 | +- (NSDictionary *)validatedDictionary; | ||
| 14 | + | ||
| 15 | +@end |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/NSDictionary+Safety.m
0 → 100644
| 1 | +// | ||
| 2 | +// NSDictionary+Safety.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/21. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "NSDictionary+Safety.h" | ||
| 10 | + | ||
| 11 | +@implementation NSDictionary (Safety) | ||
| 12 | + | ||
| 13 | +- (NSDictionary *)validatedDictionary { | ||
| 14 | + | ||
| 15 | + if (!self || ![self isKindOfClass:[NSDictionary class]]) { | ||
| 16 | + return nil; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + NSDictionary *temp = (NSDictionary *)self; | ||
| 20 | + NSMutableDictionary *dic = [NSMutableDictionary dictionary]; | ||
| 21 | + | ||
| 22 | + if (temp) { | ||
| 23 | + id keys = [temp allKeys]; | ||
| 24 | + | ||
| 25 | + for (id key in keys) { | ||
| 26 | + if (temp[key] || ![[temp objectForKey:key] isKindOfClass:[NSNull class]]) { | ||
| 27 | + | ||
| 28 | + if ([temp[key] isKindOfClass:[NSNumber class]]) { | ||
| 29 | + NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init]; | ||
| 30 | + | ||
| 31 | + NSString *str = [numberFormatter stringFromNumber:temp[key]]; | ||
| 32 | + [dic setObject:str forKey:key]; | ||
| 33 | + } | ||
| 34 | + else { | ||
| 35 | + [dic setObject:temp[key] forKey:key]; | ||
| 36 | + } | ||
| 37 | + } else { | ||
| 38 | + [dic setObject:@"" forKey:key]; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + return dic; | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +@end |
CNLiveUserSystemDemo/Conreollers/LoginViewController.h
0 → 100644
CNLiveUserSystemDemo/Conreollers/LoginViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// LoginViewController.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/14. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "LoginViewController.h" | ||
| 10 | +#import "IdAndPwdView.h" | ||
| 11 | +#import "RegisterViewController.h" | ||
| 12 | +#import "CNLiveThirdLoginManager.h" | ||
| 13 | + | ||
| 14 | +#define SpaceWidth (KScreenWidth-80*3)/4 | ||
| 15 | + | ||
| 16 | +@interface LoginViewController ()<UITextFieldDelegate> | ||
| 17 | + | ||
| 18 | +@property (nonatomic, strong) IdAndPwdView *idAndPwdView; | ||
| 19 | +@property (nonatomic, strong) UIButton *loginBtn; | ||
| 20 | +@property (nonatomic, strong) UIButton *messageLoginBtn; | ||
| 21 | +@property (nonatomic, strong) UIButton *registBtn; | ||
| 22 | +@property (nonatomic, strong) UIButton *weChatBtn; | ||
| 23 | +@property (nonatomic, strong) UIButton *sinaBtn; | ||
| 24 | +@property (nonatomic, strong) UIButton *qqBtn; | ||
| 25 | +@property (nonatomic, strong) UILabel *thirdpartyLoginLbl; | ||
| 26 | + | ||
| 27 | +@end | ||
| 28 | + | ||
| 29 | +@implementation LoginViewController | ||
| 30 | + | ||
| 31 | +- (void)viewDidLoad { | ||
| 32 | + [super viewDidLoad]; | ||
| 33 | + self.title = @"登录"; | ||
| 34 | + self.view.backgroundColor = [UIColor whiteColor]; | ||
| 35 | + [self.view addSubview:self.idAndPwdView]; | ||
| 36 | + [self.view addSubview:self.loginBtn]; | ||
| 37 | + [self.view addSubview:self.messageLoginBtn]; | ||
| 38 | + [self.view addSubview:self.weChatBtn]; | ||
| 39 | + [self.view addSubview:self.sinaBtn]; | ||
| 40 | + [self.view addSubview:self.qqBtn]; | ||
| 41 | + [self.view addSubview:self.thirdpartyLoginLbl]; | ||
| 42 | + | ||
| 43 | + UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.registBtn]; | ||
| 44 | + self.navigationItem.rightBarButtonItem = rightBarButtonItem; | ||
| 45 | + | ||
| 46 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginSuccess) name:ThirdLoginSuccess object:nil]; | ||
| 47 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginFailure) name:ThirdLoginFailure object:nil]; | ||
| 48 | + | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | +#pragma mark - action | ||
| 52 | +- (void)loginBtnAction | ||
| 53 | +{ | ||
| 54 | + [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear]; | ||
| 55 | + [SVProgressHUD show]; | ||
| 56 | + | ||
| 57 | + [CNLiveUserSystemCenter loginWithUserName:_idAndPwdView.idTF.text password:_idAndPwdView.pwdTF.text frmId:nil success:^(id result) { | ||
| 58 | + | ||
| 59 | + NSLog(@"登录 success------------%@",result); | ||
| 60 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 61 | + [Tools setUserLogin:YES]; | ||
| 62 | + [SVProgressHUD showSuccessWithStatus:@"登录成功"]; | ||
| 63 | + [UserInfoSava saveUserinfoDic:result[@"data"]]; | ||
| 64 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 65 | + | ||
| 66 | + } else { | ||
| 67 | + [Tools toast:result[@"errorMessage"]]; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + } failure:^(NSError *error) { | ||
| 71 | + | ||
| 72 | + [Tools toast:error.localizedDescription]; | ||
| 73 | + | ||
| 74 | + }]; | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +- (void)messageLoginBtnAction | ||
| 78 | +{ | ||
| 79 | + RegisterViewController *regVC = [[RegisterViewController alloc] init]; | ||
| 80 | + regVC.type = @"quicklyLogin"; | ||
| 81 | + [self.navigationController pushViewController:regVC animated:YES]; | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +- (void)registBtnAction | ||
| 85 | +{ | ||
| 86 | + RegisterViewController *regVC = [[RegisterViewController alloc] init]; | ||
| 87 | + regVC.type = @"register"; | ||
| 88 | + [self.navigationController pushViewController:regVC animated:YES]; | ||
| 89 | +} | ||
| 90 | + | ||
| 91 | +- (void)weChatBtnAction | ||
| 92 | +{ | ||
| 93 | + [[CNLiveThirdLoginManager manager] weChatLogin]; | ||
| 94 | +} | ||
| 95 | + | ||
| 96 | +- (void)sinaBtnAction | ||
| 97 | +{ | ||
| 98 | + [[CNLiveThirdLoginManager manager] sinaLogin]; | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | +- (void)qqBtnAction | ||
| 102 | +{ | ||
| 103 | + [[CNLiveThirdLoginManager manager] qqLogin]; | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +- (void)loginSuccess | ||
| 107 | +{ | ||
| 108 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 109 | +} | ||
| 110 | + | ||
| 111 | +- (void)loginFailure | ||
| 112 | +{ | ||
| 113 | + [SVProgressHUD showErrorWithStatus:@"登录失败"]; | ||
| 114 | +} | ||
| 115 | + | ||
| 116 | +#pragma mark - touchesBegan | ||
| 117 | +- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event | ||
| 118 | +{ | ||
| 119 | + if ([self.idAndPwdView.idTF isFirstResponder]) { | ||
| 120 | + [self.idAndPwdView.idTF resignFirstResponder]; | ||
| 121 | + } | ||
| 122 | + if ([self.idAndPwdView.pwdTF isFirstResponder]) { | ||
| 123 | + [self.idAndPwdView.pwdTF resignFirstResponder]; | ||
| 124 | + } | ||
| 125 | +} | ||
| 126 | +#pragma mark - getter | ||
| 127 | + | ||
| 128 | +- (IdAndPwdView *)idAndPwdView | ||
| 129 | +{ | ||
| 130 | + if (!_idAndPwdView) { | ||
| 131 | + _idAndPwdView = [[IdAndPwdView alloc] initWithFrame:CGRectMake(0, 70, KScreenWidth, 114)]; | ||
| 132 | + _idAndPwdView.idTF.delegate = self; | ||
| 133 | + _idAndPwdView.pwdTF.delegate = self; | ||
| 134 | + } | ||
| 135 | + return _idAndPwdView; | ||
| 136 | +} | ||
| 137 | + | ||
| 138 | +- (UIButton *)loginBtn | ||
| 139 | +{ | ||
| 140 | + if (!_loginBtn) { | ||
| 141 | + _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 142 | + _loginBtn.backgroundColor = [UIColor orangeColor]; | ||
| 143 | + [_loginBtn setFrame:CGRectMake(10, 250, KScreenWidth - 20, 40)]; | ||
| 144 | + _loginBtn.layer.cornerRadius = 20; | ||
| 145 | + _loginBtn.layer.masksToBounds = YES; | ||
| 146 | + [_loginBtn setTitle:@"登 录" forState:UIControlStateNormal]; | ||
| 147 | + [_loginBtn addTarget:self action:@selector(loginBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 148 | + } | ||
| 149 | + return _loginBtn; | ||
| 150 | +} | ||
| 151 | + | ||
| 152 | +- (UIButton *)messageLoginBtn | ||
| 153 | +{ | ||
| 154 | + if (!_messageLoginBtn) { | ||
| 155 | + _messageLoginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 156 | + [_messageLoginBtn setFrame:CGRectMake(KScreenWidth - 100, 210, 90, 15)]; | ||
| 157 | + [_messageLoginBtn setTitle:@"快捷登录" forState:UIControlStateNormal]; | ||
| 158 | + _messageLoginBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 159 | + [_messageLoginBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; | ||
| 160 | + [_messageLoginBtn addTarget:self action:@selector(messageLoginBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 161 | + } | ||
| 162 | + return _messageLoginBtn; | ||
| 163 | +} | ||
| 164 | + | ||
| 165 | +- (UIButton *)registBtn | ||
| 166 | +{ | ||
| 167 | + if (!_registBtn) { | ||
| 168 | + _registBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 169 | + [_registBtn setFrame:CGRectMake(0, 0, 40, 15)]; | ||
| 170 | + [_registBtn setTitle:@"注册" forState:UIControlStateNormal]; | ||
| 171 | + _registBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 172 | + [_registBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; | ||
| 173 | + [_registBtn addTarget:self action:@selector(registBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 174 | + } | ||
| 175 | + return _registBtn; | ||
| 176 | +} | ||
| 177 | + | ||
| 178 | +- (UILabel *)thirdpartyLoginLbl | ||
| 179 | +{ | ||
| 180 | + if (!_thirdpartyLoginLbl) { | ||
| 181 | + _thirdpartyLoginLbl = [[UILabel alloc] initWithFrame:CGRectMake(0, KScreenHeight - 200, KScreenWidth, 15)]; | ||
| 182 | + _thirdpartyLoginLbl.textAlignment = NSTextAlignmentCenter; | ||
| 183 | + _thirdpartyLoginLbl.textColor = [UIColor orangeColor]; | ||
| 184 | + _thirdpartyLoginLbl.text = @"第三方账号登录"; | ||
| 185 | + _thirdpartyLoginLbl.font = [UIFont systemFontOfSize:15]; | ||
| 186 | + } | ||
| 187 | + return _thirdpartyLoginLbl; | ||
| 188 | +} | ||
| 189 | + | ||
| 190 | +- (UIButton *)weChatBtn | ||
| 191 | +{ | ||
| 192 | + if (!_weChatBtn) { | ||
| 193 | + _weChatBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 194 | + _weChatBtn.backgroundColor = [UIColor orangeColor]; | ||
| 195 | + [_weChatBtn setFrame:CGRectMake(SpaceWidth, KScreenHeight-150, 80, 40)]; | ||
| 196 | + _weChatBtn.layer.cornerRadius = 20; | ||
| 197 | + _weChatBtn.layer.masksToBounds = YES; | ||
| 198 | + [_weChatBtn setTitle:@"微信" forState:UIControlStateNormal]; | ||
| 199 | + [_weChatBtn addTarget:self action:@selector(weChatBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 200 | + } | ||
| 201 | + return _weChatBtn; | ||
| 202 | +} | ||
| 203 | + | ||
| 204 | +- (UIButton *)sinaBtn | ||
| 205 | +{ | ||
| 206 | + if (!_sinaBtn) { | ||
| 207 | + _sinaBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 208 | + _sinaBtn.backgroundColor = [UIColor orangeColor]; | ||
| 209 | + [_sinaBtn setFrame:CGRectMake(SpaceWidth*2+80, KScreenHeight-150, 80, 40)]; | ||
| 210 | + _sinaBtn.layer.cornerRadius = 20; | ||
| 211 | + _sinaBtn.layer.masksToBounds = YES; | ||
| 212 | + [_sinaBtn setTitle:@"微博" forState:UIControlStateNormal]; | ||
| 213 | + [_sinaBtn addTarget:self action:@selector(sinaBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 214 | + } | ||
| 215 | + return _sinaBtn; | ||
| 216 | +} | ||
| 217 | + | ||
| 218 | +- (UIButton *)qqBtn | ||
| 219 | +{ | ||
| 220 | + if (!_qqBtn) { | ||
| 221 | + _qqBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 222 | + _qqBtn.backgroundColor = [UIColor orangeColor]; | ||
| 223 | + [_qqBtn setFrame:CGRectMake(SpaceWidth*3+80*2, KScreenHeight-150, 80, 40)]; | ||
| 224 | + _qqBtn.layer.cornerRadius = 20; | ||
| 225 | + _qqBtn.layer.masksToBounds = YES; | ||
| 226 | + [_qqBtn setTitle:@"QQ" forState:UIControlStateNormal]; | ||
| 227 | + [_qqBtn addTarget:self action:@selector(qqBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 228 | + } | ||
| 229 | + return _qqBtn; | ||
| 230 | +} | ||
| 231 | + | ||
| 232 | +- (void)didReceiveMemoryWarning { | ||
| 233 | + [super didReceiveMemoryWarning]; | ||
| 234 | + // Dispose of any resources that can be recreated. | ||
| 235 | +} | ||
| 236 | + | ||
| 237 | +/* | ||
| 238 | +#pragma mark - Navigation | ||
| 239 | + | ||
| 240 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 241 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 242 | + // Get the new view controller using [segue destinationViewController]. | ||
| 243 | + // Pass the selected object to the new view controller. | ||
| 244 | +} | ||
| 245 | +*/ | ||
| 246 | + | ||
| 247 | +@end |
CNLiveUserSystemDemo/Conreollers/ModifyUserInfoViewController.h
0 → 100644
| 1 | +// | ||
| 2 | +// ModifyUserInfoViewController.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by 朱林 on 16/9/17. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +@interface ModifyUserInfoViewController : UIViewController | ||
| 12 | + | ||
| 13 | +@property (nonatomic, assign) UserInfoType modifyType; | ||
| 14 | + | ||
| 15 | +@end |
CNLiveUserSystemDemo/Conreollers/ModifyUserInfoViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// ModifyUserInfoViewController.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by 朱林 on 16/9/17. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "ModifyUserInfoViewController.h" | ||
| 10 | +#import "RegistBasicInformationView.h" | ||
| 11 | + | ||
| 12 | +@interface ModifyUserInfoViewController () | ||
| 13 | + | ||
| 14 | +@property (nonatomic, strong)UITextField *textField1; | ||
| 15 | +@property (nonatomic, strong)UIButton *saveBtn; | ||
| 16 | +@property (nonatomic, strong)RegistBasicInformationView *registBasicInformationView; | ||
| 17 | +@property (nonatomic, strong)UIButton *verificationBtn; | ||
| 18 | + | ||
| 19 | +@end | ||
| 20 | + | ||
| 21 | +@implementation ModifyUserInfoViewController | ||
| 22 | + | ||
| 23 | +- (void)viewDidLoad { | ||
| 24 | + [super viewDidLoad]; | ||
| 25 | + self.view.backgroundColor = [UIColor whiteColor]; | ||
| 26 | + | ||
| 27 | + if ([self.title isEqualToString:@"更新手机号"]) { | ||
| 28 | + [self.view addSubview:self.registBasicInformationView]; | ||
| 29 | + [self.view addSubview:self.verificationBtn]; | ||
| 30 | + } else { | ||
| 31 | + [self.view addSubview:self.textField1]; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + [self.view addSubview:self.saveBtn]; | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +#pragma mark - action | ||
| 38 | + | ||
| 39 | +- (void)saveBtnAction | ||
| 40 | +{ | ||
| 41 | + [SVProgressHUD show]; | ||
| 42 | + | ||
| 43 | + UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; | ||
| 44 | + | ||
| 45 | + if ([self.title isEqualToString:@"更新手机号"]) { | ||
| 46 | + [CNLiveUserSystemCenter updateMobileWithUid:model.uid mobile:_registBasicInformationView.phoneTF.text verificationCode:_registBasicInformationView.verificationTF.text token:model.token success:^(id result) { | ||
| 47 | + | ||
| 48 | + NSLog(@"-----------%@",result); | ||
| 49 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 50 | + [SVProgressHUD showSuccessWithStatus:@"手机号修改成功"]; | ||
| 51 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 52 | + | ||
| 53 | + } else { | ||
| 54 | + [Tools toast:result[@"errorMessage"]]; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + } failure:^(NSError *error) { | ||
| 58 | + [Tools toast:error.localizedDescription]; | ||
| 59 | + }]; | ||
| 60 | + } else { | ||
| 61 | + [CNLiveUserSystemCenter modifyUserInfoType:_modifyType uid:model.uid modifyInfo:_textField1.text token:model.token success:^(id result) { | ||
| 62 | + | ||
| 63 | + NSLog(@"-----------%@",result); | ||
| 64 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 65 | + [SVProgressHUD showSuccessWithStatus:@"修改成功"]; | ||
| 66 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 67 | + | ||
| 68 | + } else { | ||
| 69 | + [Tools toast:result[@"errorMessage"]]; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + } failure:^(NSError *error) { | ||
| 73 | + [Tools toast:error.localizedDescription]; | ||
| 74 | + }]; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | +} | ||
| 78 | + | ||
| 79 | +- (void)verificationBtnAction | ||
| 80 | +{ | ||
| 81 | + [self startTimer]; | ||
| 82 | + | ||
| 83 | + [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeRegister mobile:_registBasicInformationView.phoneTF.text success:^(id result) { | ||
| 84 | + | ||
| 85 | + [Tools toast:result[@"errorMessage"]]; | ||
| 86 | + | ||
| 87 | + | ||
| 88 | + } failure:^(NSError *error) { | ||
| 89 | + [Tools toast:error.localizedDescription]; | ||
| 90 | + }]; | ||
| 91 | +} | ||
| 92 | + | ||
| 93 | +- (void)startTimer | ||
| 94 | +{ | ||
| 95 | + __block int timeout = 60; //倒计时时间 | ||
| 96 | + | ||
| 97 | + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | ||
| 98 | + | ||
| 99 | + dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue); | ||
| 100 | + | ||
| 101 | + dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 | ||
| 102 | + | ||
| 103 | + dispatch_source_set_event_handler(_timer, ^{ | ||
| 104 | + | ||
| 105 | + if(timeout<=0){ //倒计时结束,关闭 | ||
| 106 | + | ||
| 107 | + dispatch_source_cancel(_timer); | ||
| 108 | + | ||
| 109 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 110 | + | ||
| 111 | + //设置界面的按钮显示 根据自己需求设置 | ||
| 112 | + | ||
| 113 | + [self.verificationBtn setTitle:@"发送验证码" forState:UIControlStateNormal]; | ||
| 114 | + | ||
| 115 | + self.verificationBtn.userInteractionEnabled = YES; | ||
| 116 | + | ||
| 117 | + }); | ||
| 118 | + | ||
| 119 | + }else{ | ||
| 120 | + | ||
| 121 | + // int minutes = timeout / 60; | ||
| 122 | + | ||
| 123 | + int seconds = timeout % 60; | ||
| 124 | + | ||
| 125 | + NSString *strTime = [NSString stringWithFormat:@"%.2d", seconds]; | ||
| 126 | + | ||
| 127 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 128 | + | ||
| 129 | + //设置界面的按钮显示 根据自己需求设置 | ||
| 130 | + | ||
| 131 | + [self.verificationBtn setTitle:[NSString stringWithFormat:@"%@秒",strTime] forState:UIControlStateNormal]; | ||
| 132 | + self.verificationBtn.userInteractionEnabled = NO; | ||
| 133 | + | ||
| 134 | + }); | ||
| 135 | + | ||
| 136 | + timeout--; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + }); | ||
| 140 | + | ||
| 141 | + dispatch_resume(_timer); | ||
| 142 | +} | ||
| 143 | + | ||
| 144 | + | ||
| 145 | +#pragma mark - getter | ||
| 146 | + | ||
| 147 | +- (UITextField *)textField1 | ||
| 148 | +{ | ||
| 149 | + if (!_textField1) { | ||
| 150 | + _textField1 = [[UITextField alloc] initWithFrame:CGRectMake(20, 70, KScreenWidth-40, 50)]; | ||
| 151 | + _textField1.autocorrectionType = UITextAutocorrectionTypeNo; | ||
| 152 | + _textField1.autocapitalizationType = UITextAutocapitalizationTypeNone; | ||
| 153 | + _textField1.placeholder = @"请输入更改信息"; | ||
| 154 | + _textField1.textColor = [UIColor blackColor]; | ||
| 155 | + _textField1.font = [UIFont systemFontOfSize:17]; | ||
| 156 | + _textField1.clearButtonMode = UITextFieldViewModeAlways; | ||
| 157 | + } | ||
| 158 | + return _textField1; | ||
| 159 | +} | ||
| 160 | + | ||
| 161 | +- (UIButton *)saveBtn | ||
| 162 | +{ | ||
| 163 | + if (!_saveBtn) { | ||
| 164 | + _saveBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 165 | + _saveBtn.backgroundColor = [UIColor orangeColor]; | ||
| 166 | + [_saveBtn setFrame:CGRectMake(10, 250, KScreenWidth - 20, 40)]; | ||
| 167 | + _saveBtn.layer.cornerRadius = 20; | ||
| 168 | + _saveBtn.layer.masksToBounds = YES; | ||
| 169 | + [_saveBtn setTitle:@"保 存" forState:UIControlStateNormal]; | ||
| 170 | + [_saveBtn addTarget:self action:@selector(saveBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 171 | + } | ||
| 172 | + return _saveBtn; | ||
| 173 | +} | ||
| 174 | + | ||
| 175 | +- (RegistBasicInformationView *)registBasicInformationView | ||
| 176 | +{ | ||
| 177 | + if (!_registBasicInformationView) { | ||
| 178 | + _registBasicInformationView = [[RegistBasicInformationView alloc] initWithFrame:CGRectMake(0, 70, KScreenWidth, 171) hasPwd:NO isPhone:YES]; | ||
| 179 | + } | ||
| 180 | + return _registBasicInformationView; | ||
| 181 | +} | ||
| 182 | + | ||
| 183 | +- (UIButton *)verificationBtn | ||
| 184 | +{ | ||
| 185 | + if (!_verificationBtn) { | ||
| 186 | + _verificationBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 187 | + [_verificationBtn setFrame:CGRectMake(KScreenWidth - 105, 80, 95, 37)]; | ||
| 188 | + _verificationBtn.backgroundColor = [UIColor orangeColor]; | ||
| 189 | + _verificationBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 190 | + [_verificationBtn setTitle:@"获取验证码" forState:UIControlStateNormal]; | ||
| 191 | + [_verificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | ||
| 192 | + [_verificationBtn addTarget:self action:@selector(verificationBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 193 | + } | ||
| 194 | + return _verificationBtn; | ||
| 195 | +} | ||
| 196 | + | ||
| 197 | +- (void)didReceiveMemoryWarning { | ||
| 198 | + [super didReceiveMemoryWarning]; | ||
| 199 | + // Dispose of any resources that can be recreated. | ||
| 200 | +} | ||
| 201 | + | ||
| 202 | +/* | ||
| 203 | +#pragma mark - Navigation | ||
| 204 | + | ||
| 205 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 206 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 207 | + // Get the new view controller using [segue destinationViewController]. | ||
| 208 | + // Pass the selected object to the new view controller. | ||
| 209 | +} | ||
| 210 | +*/ | ||
| 211 | + | ||
| 212 | +@end |
CNLiveUserSystemDemo/Conreollers/RegisterViewController.h
0 → 100644
| 1 | +// | ||
| 2 | +// ResgisterViewController.h | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/14. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | + | ||
| 11 | +@interface RegisterViewController : UIViewController | ||
| 12 | + | ||
| 13 | +@property (nonatomic, strong) NSString *type; | ||
| 14 | + | ||
| 15 | +@end |
CNLiveUserSystemDemo/Conreollers/RegisterViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// ResgisterViewController.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/14. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "RegisterViewController.h" | ||
| 10 | +#import "RegistBasicInformationView.h" | ||
| 11 | + | ||
| 12 | +@interface RegisterViewController () | ||
| 13 | + | ||
| 14 | +@property (nonatomic, strong)RegistBasicInformationView *registBasicInformationView; | ||
| 15 | +@property (nonatomic, strong)UIButton *verificationBtn; | ||
| 16 | +@property (nonatomic, strong)UIButton *loginBtn; | ||
| 17 | + | ||
| 18 | + | ||
| 19 | +@end | ||
| 20 | + | ||
| 21 | +@implementation RegisterViewController | ||
| 22 | + | ||
| 23 | +- (void)viewDidLoad { | ||
| 24 | + [super viewDidLoad]; | ||
| 25 | + | ||
| 26 | + if ([_type isEqualToString:@"register"]) { | ||
| 27 | + self.title = @"注册"; | ||
| 28 | + } else if ([_type isEqualToString:@"quicklyLogin"]) { | ||
| 29 | + self.title = @"快捷登录"; | ||
| 30 | + } else { | ||
| 31 | + self.title = @"修改密码"; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + self.view.backgroundColor = [UIColor whiteColor]; | ||
| 35 | + [self.view addSubview:self.registBasicInformationView]; | ||
| 36 | + [self.view addSubview:self.verificationBtn]; | ||
| 37 | + [self.view addSubview:self.loginBtn]; | ||
| 38 | + | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +#pragma mark - action | ||
| 42 | + | ||
| 43 | +- (void)verificationBtnAction | ||
| 44 | +{ | ||
| 45 | + [self startTimer]; | ||
| 46 | + | ||
| 47 | + if ([_type isEqualToString:@"register"]) { | ||
| 48 | + [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeRegister mobile:_registBasicInformationView.phoneTF.text success:^(id result) { | ||
| 49 | + | ||
| 50 | + [Tools toast:result[@"errorMessage"]]; | ||
| 51 | + | ||
| 52 | + } failure:^(NSError *error) { | ||
| 53 | + [Tools toast:error.localizedDescription]; | ||
| 54 | + }]; | ||
| 55 | + | ||
| 56 | + } else if ([_type isEqualToString:@"quicklyLogin"]) { | ||
| 57 | + | ||
| 58 | + [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeShortcutLogin mobile:_registBasicInformationView.phoneTF.text success:^(id result) { | ||
| 59 | + | ||
| 60 | + [Tools toast:result[@"errorMessage"]]; | ||
| 61 | + | ||
| 62 | + } failure:^(NSError *error) { | ||
| 63 | + | ||
| 64 | + [Tools toast:error.localizedDescription]; | ||
| 65 | + }]; | ||
| 66 | + | ||
| 67 | + } else { | ||
| 68 | + | ||
| 69 | + [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeRetrievePassword mobile:_registBasicInformationView.phoneTF.text success:^(id result) { | ||
| 70 | + | ||
| 71 | + [Tools toast:result[@"errorMessage"]]; | ||
| 72 | + | ||
| 73 | + } failure:^(NSError *error) { | ||
| 74 | + | ||
| 75 | + [Tools toast:error.localizedDescription]; | ||
| 76 | + }]; | ||
| 77 | + } | ||
| 78 | +} | ||
| 79 | + | ||
| 80 | +- (void)loginBtnAction | ||
| 81 | +{ | ||
| 82 | + | ||
| 83 | + [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear]; | ||
| 84 | + [SVProgressHUD show]; | ||
| 85 | + | ||
| 86 | + if ([_type isEqualToString:@"register"]) { | ||
| 87 | + | ||
| 88 | + [CNLiveUserSystemCenter registerWithUserName:_registBasicInformationView.phoneTF.text password:_registBasicInformationView.setPwdTF.text verificationCode:_registBasicInformationView.verificationTF.text invitationCode:nil frmId:nil success:^(id result) { | ||
| 89 | + | ||
| 90 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 91 | + [Tools setUserLogin:YES]; | ||
| 92 | + [SVProgressHUD showSuccessWithStatus:@"成功"]; | ||
| 93 | + [UserInfoSava saveUserinfoDic:result[@"data"]]; | ||
| 94 | + [self.navigationController popToRootViewControllerAnimated:YES]; | ||
| 95 | + | ||
| 96 | + } else { | ||
| 97 | + [Tools toast:result[@"errorMessage"]]; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + } failure:^(NSError *error) { | ||
| 101 | + | ||
| 102 | + [Tools toast:error.localizedDescription]; | ||
| 103 | + | ||
| 104 | + }]; | ||
| 105 | + | ||
| 106 | + } else if ([_type isEqualToString:@"quicklyLogin"]) { | ||
| 107 | + | ||
| 108 | + [CNLiveUserSystemCenter shortcutLoginWithUserName:_registBasicInformationView.phoneTF.text verificationCode:_registBasicInformationView.verificationTF.text frmId:nil success:^(id result) { | ||
| 109 | + | ||
| 110 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 111 | + [Tools setUserLogin:YES]; | ||
| 112 | + [SVProgressHUD showSuccessWithStatus:@"成功"]; | ||
| 113 | + [UserInfoSava saveUserinfoDic:result[@"data"]]; | ||
| 114 | + [self.navigationController popToRootViewControllerAnimated:YES]; | ||
| 115 | + | ||
| 116 | + } else { | ||
| 117 | + [Tools toast:result[@"errorMessage"]]; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + } failure:^(NSError *error) { | ||
| 121 | + | ||
| 122 | + [Tools toast:error.localizedDescription]; | ||
| 123 | + | ||
| 124 | + }]; | ||
| 125 | + | ||
| 126 | + } else { | ||
| 127 | + [CNLiveUserSystemCenter changePasswordWithMobile:_registBasicInformationView.phoneTF.text verificationCode:_registBasicInformationView.verificationTF.text newPassword:_registBasicInformationView.setPwdTF.text success:^(id result) { | ||
| 128 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 129 | + [SVProgressHUD showSuccessWithStatus:@"密码修改成功"]; | ||
| 130 | + [self.navigationController popToRootViewControllerAnimated:YES]; | ||
| 131 | + | ||
| 132 | + } else { | ||
| 133 | + [Tools toast:result[@"errorMessage"]]; | ||
| 134 | + } | ||
| 135 | + } failure:^(NSError *error) { | ||
| 136 | + [Tools toast:error.localizedDescription]; | ||
| 137 | + | ||
| 138 | + }]; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | +} | ||
| 142 | + | ||
| 143 | +- (void)startTimer | ||
| 144 | +{ | ||
| 145 | + __block int timeout = 60; //倒计时时间 | ||
| 146 | + | ||
| 147 | + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | ||
| 148 | + | ||
| 149 | + dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue); | ||
| 150 | + | ||
| 151 | + dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 | ||
| 152 | + | ||
| 153 | + dispatch_source_set_event_handler(_timer, ^{ | ||
| 154 | + | ||
| 155 | + if(timeout<=0){ //倒计时结束,关闭 | ||
| 156 | + | ||
| 157 | + dispatch_source_cancel(_timer); | ||
| 158 | + | ||
| 159 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 160 | + | ||
| 161 | + //设置界面的按钮显示 根据自己需求设置 | ||
| 162 | + | ||
| 163 | + [self.verificationBtn setTitle:@"发送验证码" forState:UIControlStateNormal]; | ||
| 164 | + | ||
| 165 | + self.verificationBtn.userInteractionEnabled = YES; | ||
| 166 | + | ||
| 167 | + }); | ||
| 168 | + | ||
| 169 | + }else{ | ||
| 170 | + | ||
| 171 | + // int minutes = timeout / 60; | ||
| 172 | + | ||
| 173 | + int seconds = timeout % 60; | ||
| 174 | + | ||
| 175 | + NSString *strTime = [NSString stringWithFormat:@"%.2d", seconds]; | ||
| 176 | + | ||
| 177 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 178 | + | ||
| 179 | + //设置界面的按钮显示 根据自己需求设置 | ||
| 180 | + | ||
| 181 | + | ||
| 182 | + [self.verificationBtn setTitle:[NSString stringWithFormat:@"%@秒",strTime] forState:UIControlStateNormal]; | ||
| 183 | + | ||
| 184 | + self.verificationBtn.userInteractionEnabled = NO; | ||
| 185 | + | ||
| 186 | + | ||
| 187 | + }); | ||
| 188 | + | ||
| 189 | + timeout--; | ||
| 190 | + | ||
| 191 | + } | ||
| 192 | + | ||
| 193 | + }); | ||
| 194 | + | ||
| 195 | + dispatch_resume(_timer); | ||
| 196 | + | ||
| 197 | +} | ||
| 198 | + | ||
| 199 | +#pragma mark - getter | ||
| 200 | + | ||
| 201 | +- (RegistBasicInformationView *)registBasicInformationView | ||
| 202 | +{ | ||
| 203 | + if (!_registBasicInformationView) { | ||
| 204 | + if ([_type isEqualToString:@"quicklyLogin"]) { | ||
| 205 | + _registBasicInformationView = [[RegistBasicInformationView alloc] initWithFrame:CGRectMake(0, 70, KScreenWidth, 171) hasPwd:NO isPhone:YES]; | ||
| 206 | + } else if ([_type isEqualToString:@"register"]) { | ||
| 207 | + _registBasicInformationView = [[RegistBasicInformationView alloc] initWithFrame:CGRectMake(0, 70, KScreenWidth, 171) hasPwd:YES isPhone:NO]; | ||
| 208 | + } else { | ||
| 209 | + _registBasicInformationView = [[RegistBasicInformationView alloc] initWithFrame:CGRectMake(0, 70, KScreenWidth, 171) hasPwd:YES isPhone:YES]; | ||
| 210 | + } | ||
| 211 | + } | ||
| 212 | + return _registBasicInformationView; | ||
| 213 | +} | ||
| 214 | + | ||
| 215 | +- (UIButton *)verificationBtn | ||
| 216 | +{ | ||
| 217 | + if (!_verificationBtn) { | ||
| 218 | + _verificationBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 219 | + [_verificationBtn setFrame:CGRectMake(KScreenWidth - 105, 80, 95, 37)]; | ||
| 220 | + _verificationBtn.backgroundColor = [UIColor orangeColor]; | ||
| 221 | + _verificationBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 222 | + [_verificationBtn setTitle:@"获取验证码" forState:UIControlStateNormal]; | ||
| 223 | + [_verificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | ||
| 224 | + [_verificationBtn addTarget:self action:@selector(verificationBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 225 | + } | ||
| 226 | + return _verificationBtn; | ||
| 227 | +} | ||
| 228 | + | ||
| 229 | +- (UIButton *)loginBtn | ||
| 230 | +{ | ||
| 231 | + if (!_loginBtn) { | ||
| 232 | + _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 233 | + _loginBtn.backgroundColor = [UIColor orangeColor]; | ||
| 234 | + [_loginBtn setFrame:CGRectMake(10, 280, KScreenWidth - 20, 40)]; | ||
| 235 | + _loginBtn.layer.cornerRadius = 20; | ||
| 236 | + _loginBtn.layer.masksToBounds = YES; | ||
| 237 | + if ([_type isEqualToString:@"register"]) { | ||
| 238 | + [_loginBtn setTitle:@"注 册" forState:UIControlStateNormal]; | ||
| 239 | + } else if ([_type isEqualToString:@"quicklyLogin"]) { | ||
| 240 | + [_loginBtn setTitle:@"快捷登录" forState:UIControlStateNormal]; | ||
| 241 | + } else { | ||
| 242 | + [_loginBtn setTitle:@"确 认" forState:UIControlStateNormal]; | ||
| 243 | + } | ||
| 244 | + [_loginBtn addTarget:self action:@selector(loginBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 245 | + } | ||
| 246 | + return _loginBtn; | ||
| 247 | +} | ||
| 248 | + | ||
| 249 | +- (void)didReceiveMemoryWarning { | ||
| 250 | + [super didReceiveMemoryWarning]; | ||
| 251 | + // Dispose of any resources that can be recreated. | ||
| 252 | +} | ||
| 253 | + | ||
| 254 | +/* | ||
| 255 | +#pragma mark - Navigation | ||
| 256 | + | ||
| 257 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 258 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 259 | + // Get the new view controller using [segue destinationViewController]. | ||
| 260 | + // Pass the selected object to the new view controller. | ||
| 261 | +} | ||
| 262 | +*/ | ||
| 263 | + | ||
| 264 | +@end |
CNLiveUserSystemDemo/Conreollers/UserInfoViewController.h
0 → 100644
CNLiveUserSystemDemo/Conreollers/UserInfoViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// UserInfoViewController.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by 朱林 on 16/9/17. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "UserInfoViewController.h" | ||
| 10 | +#import "UserInfoHeaderImageTableViewCell.h" | ||
| 11 | +#import "UserInfoTableViewCell.h" | ||
| 12 | +#import "ModifyUserInfoViewController.h" | ||
| 13 | +#import <AVFoundation/AVFoundation.h> | ||
| 14 | + | ||
| 15 | +@interface UserInfoViewController ()<UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIAlertViewDelegate,UIActionSheetDelegate> | ||
| 16 | +{ | ||
| 17 | + UITableView *_tableView; | ||
| 18 | + NSData *_imageData; | ||
| 19 | + NSArray *_titlesArray; | ||
| 20 | + NSArray *_detailsArray; | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +@end | ||
| 24 | + | ||
| 25 | +@implementation UserInfoViewController | ||
| 26 | + | ||
| 27 | +- (void)viewDidLoad { | ||
| 28 | + [super viewDidLoad]; | ||
| 29 | + self.view.backgroundColor = [UIColor whiteColor]; | ||
| 30 | + self.title = @"个人资料"; | ||
| 31 | + | ||
| 32 | + _titlesArray = @[@"头像", @"更新手机号", @"昵称修改", @"性别修改", @"邮箱修改",@"地址修改"]; | ||
| 33 | + | ||
| 34 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight-64) style:UITableViewStylePlain]; | ||
| 35 | + [self.view addSubview:_tableView]; | ||
| 36 | + _tableView.showsHorizontalScrollIndicator = NO; | ||
| 37 | + _tableView.showsVerticalScrollIndicator = NO; | ||
| 38 | + _tableView.dataSource = self; | ||
| 39 | + _tableView.delegate = self; | ||
| 40 | + _tableView.backgroundColor = [UIColor clearColor]; | ||
| 41 | + _tableView.sectionHeaderHeight = 6; | ||
| 42 | + _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; | ||
| 43 | + | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +#pragma mark - UITableViewDelegate | ||
| 47 | +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | ||
| 48 | +{ | ||
| 49 | + return 1; | ||
| 50 | +} | ||
| 51 | + | ||
| 52 | +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | ||
| 53 | +{ | ||
| 54 | + return _titlesArray.count; | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath | ||
| 58 | +{ | ||
| 59 | + if (indexPath.section == 0 && indexPath.row == 0) { | ||
| 60 | + return 63; | ||
| 61 | + } | ||
| 62 | + return 53; | ||
| 63 | +} | ||
| 64 | + | ||
| 65 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | ||
| 66 | +{ | ||
| 67 | + if (indexPath.section == 0 && indexPath.row == 0) { | ||
| 68 | + UserInfoHeaderImageTableViewCell *cell = [[UserInfoHeaderImageTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; | ||
| 69 | + | ||
| 70 | + return cell; | ||
| 71 | + } else { | ||
| 72 | + UserInfoTableViewCell *cell = [[UserInfoTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; | ||
| 73 | + | ||
| 74 | + [cell setTitle:[_titlesArray objectAtIndex:indexPath.row] detail:(int)(indexPath.row+indexPath.section*5)]; | ||
| 75 | + return cell; | ||
| 76 | + } | ||
| 77 | +} | ||
| 78 | + | ||
| 79 | +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section | ||
| 80 | +{ | ||
| 81 | + UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 6)]; | ||
| 82 | + tableView.contentSize = CGSizeMake(KScreenWidth, 53*5+63+12+80+60); | ||
| 83 | + return view; | ||
| 84 | +} | ||
| 85 | + | ||
| 86 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | ||
| 87 | +{ | ||
| 88 | + [tableView deselectRowAtIndexPath:indexPath animated:YES]; | ||
| 89 | + | ||
| 90 | + switch (indexPath.row) { | ||
| 91 | + case 0: | ||
| 92 | + { | ||
| 93 | + UIActionSheet *action = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"拍照" otherButtonTitles:@"从相册选择", nil]; | ||
| 94 | + action.tag = 100; | ||
| 95 | + [action showInView:self.view]; | ||
| 96 | + } | ||
| 97 | + break; | ||
| 98 | + case 1: | ||
| 99 | + { | ||
| 100 | + ModifyUserInfoViewController *modify = [[ModifyUserInfoViewController alloc] init]; | ||
| 101 | + modify.title = @"更新手机号"; | ||
| 102 | + [self.navigationController pushViewController:modify animated:YES]; | ||
| 103 | + } | ||
| 104 | + break; | ||
| 105 | + case 2: | ||
| 106 | + { | ||
| 107 | + ModifyUserInfoViewController *modify = [[ModifyUserInfoViewController alloc] init]; | ||
| 108 | + modify.modifyType = UserInfoTypeNickName; | ||
| 109 | + modify.title = @"昵称修改"; | ||
| 110 | + [self.navigationController pushViewController:modify animated:YES]; | ||
| 111 | + } | ||
| 112 | + break; | ||
| 113 | + case 3: | ||
| 114 | + { | ||
| 115 | + UIActionSheet *action = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"男" otherButtonTitles:@"女", nil]; | ||
| 116 | + action.tag = 102; | ||
| 117 | + [action showInView:self.view]; | ||
| 118 | + | ||
| 119 | + } | ||
| 120 | + break; | ||
| 121 | + case 4: | ||
| 122 | + { | ||
| 123 | + ModifyUserInfoViewController *modify = [[ModifyUserInfoViewController alloc] init]; | ||
| 124 | + modify.title = @"邮箱修改"; | ||
| 125 | + modify.modifyType = UserInfoTypeEmail; | ||
| 126 | + [self.navigationController pushViewController:modify animated:YES]; | ||
| 127 | + } | ||
| 128 | + break; | ||
| 129 | + case 5: | ||
| 130 | + { | ||
| 131 | + ModifyUserInfoViewController *modify = [[ModifyUserInfoViewController alloc] init]; | ||
| 132 | + modify.title = @"联系方式修改"; | ||
| 133 | + modify.modifyType = UserInfoTypeLocation; | ||
| 134 | + [self.navigationController pushViewController:modify animated:YES]; | ||
| 135 | + } | ||
| 136 | + break; | ||
| 137 | + } | ||
| 138 | +} | ||
| 139 | + | ||
| 140 | +#pragma mark - UIActionSheetDelegate | ||
| 141 | +- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex | ||
| 142 | +{ | ||
| 143 | + if (actionSheet.tag == 102) { | ||
| 144 | + if (buttonIndex == 0) { | ||
| 145 | + | ||
| 146 | + [self modifyGender:@"m"]; | ||
| 147 | + } else if (buttonIndex == 1) { | ||
| 148 | + | ||
| 149 | + [self modifyGender:@"f"]; | ||
| 150 | + } | ||
| 151 | + }else if (actionSheet.tag == 100) { | ||
| 152 | + | ||
| 153 | + UIImagePickerController *imagePicker = [[UIImagePickerController alloc]init]; | ||
| 154 | + imagePicker.delegate = self; | ||
| 155 | + imagePicker.allowsEditing = YES; | ||
| 156 | + | ||
| 157 | + switch (buttonIndex) | ||
| 158 | + { | ||
| 159 | + case 0: | ||
| 160 | + { | ||
| 161 | + if ([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] == AVAuthorizationStatusDenied || [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] == AVAuthorizationStatusRestricted) { | ||
| 162 | + | ||
| 163 | + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"您未允许‘互动电视’访问您的相机,请在‘设置-隐私-相机’中更改设置" delegate:self cancelButtonTitle:nil otherButtonTitles:@"取消",@"去设置", nil]; | ||
| 164 | + alert.tag = 1001; | ||
| 165 | + [alert show]; | ||
| 166 | + | ||
| 167 | + return; | ||
| 168 | + } | ||
| 169 | + if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { | ||
| 170 | + imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; | ||
| 171 | + [self presentViewController:imagePicker animated:YES completion:NULL]; | ||
| 172 | + } else { | ||
| 173 | + [Tools toast:@"您的设备没有相机功能!"]; | ||
| 174 | + } | ||
| 175 | + } | ||
| 176 | + break; | ||
| 177 | + case 1: | ||
| 178 | + imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; | ||
| 179 | + [self presentViewController:imagePicker animated:YES completion:NULL]; | ||
| 180 | + break; | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | +} | ||
| 184 | + | ||
| 185 | +- (void)modifyGender:(NSString *)string | ||
| 186 | +{ | ||
| 187 | + [SVProgressHUD show]; | ||
| 188 | + | ||
| 189 | + UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; | ||
| 190 | + | ||
| 191 | + [CNLiveUserSystemCenter modifyUserInfoType:UserInfoTypeGender uid:model.uid modifyInfo:string token:model.token success:^(id result) { | ||
| 192 | + | ||
| 193 | + NSLog(@"%@",result); | ||
| 194 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 195 | + [SVProgressHUD showSuccessWithStatus:@"修改成功"]; | ||
| 196 | + | ||
| 197 | + } else { | ||
| 198 | + [Tools toast:result[@"errorMessage"]]; | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + } failure:^(NSError *error) { | ||
| 202 | + [Tools toast:error.localizedDescription]; | ||
| 203 | + | ||
| 204 | + }]; | ||
| 205 | +} | ||
| 206 | + | ||
| 207 | +#pragma mark - UIImagePickerControllerDelegate | ||
| 208 | + | ||
| 209 | +- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info | ||
| 210 | +{ | ||
| 211 | + [picker dismissViewControllerAnimated:YES completion:NULL]; | ||
| 212 | + UIImage* image = [info objectForKey:UIImagePickerControllerEditedImage]; | ||
| 213 | + if ([image isKindOfClass:[UIImage class]]) { | ||
| 214 | + [self postPhoto:image]; | ||
| 215 | + } else { | ||
| 216 | + [Tools toast:@"获取图片失败"]; | ||
| 217 | + } | ||
| 218 | +} | ||
| 219 | + | ||
| 220 | +- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker | ||
| 221 | +{ | ||
| 222 | + [picker dismissViewControllerAnimated:YES completion:NULL]; | ||
| 223 | +} | ||
| 224 | + | ||
| 225 | +-(void)postPhoto:(UIImage *)image | ||
| 226 | +{ | ||
| 227 | + if (image) { | ||
| 228 | + | ||
| 229 | + UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; | ||
| 230 | + | ||
| 231 | + [CNLiveUserSystemCenter uploadIconWithUid:model.uid token:model.token icon:image success:^(id result) { | ||
| 232 | + | ||
| 233 | + NSLog(@"%@",result); | ||
| 234 | + | ||
| 235 | + } failure:^(NSError *error) { | ||
| 236 | + [Tools toast:error.localizedDescription]; | ||
| 237 | + }]; | ||
| 238 | + | ||
| 239 | + } else { | ||
| 240 | + [Tools toast:@"获取图片失败"]; | ||
| 241 | + } | ||
| 242 | +} | ||
| 243 | + | ||
| 244 | +- (void)didReceiveMemoryWarning { | ||
| 245 | + [super didReceiveMemoryWarning]; | ||
| 246 | + // Dispose of any resources that can be recreated. | ||
| 247 | +} | ||
| 248 | + | ||
| 249 | +/* | ||
| 250 | +#pragma mark - Navigation | ||
| 251 | + | ||
| 252 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
| 253 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
| 254 | + // Get the new view controller using [segue destinationViewController]. | ||
| 255 | + // Pass the selected object to the new view controller. | ||
| 256 | +} | ||
| 257 | +*/ | ||
| 258 | + | ||
| 259 | +@end |
CNLiveUserSystemDemo/Conreollers/ViewController.h
0 → 100644
CNLiveUserSystemDemo/Conreollers/ViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// ViewController.m | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/12. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "ViewController.h" | ||
| 10 | +#import "LoginViewController.h" | ||
| 11 | +#import "RegisterViewController.h" | ||
| 12 | +#import "UserInfoViewController.h" | ||
| 13 | +#import "CNLiveLogout.h" | ||
| 14 | +#import "UserInfoSava.h" | ||
| 15 | + | ||
| 16 | +@interface ViewController ()<UITableViewDelegate,UITableViewDataSource> | ||
| 17 | +{ | ||
| 18 | + NSArray *_dataArr; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +@property (nonatomic, strong) UITableView *tableView; | ||
| 22 | +@property (nonatomic, strong) UIButton *loginBtn; | ||
| 23 | +@end | ||
| 24 | + | ||
| 25 | +@implementation ViewController | ||
| 26 | + | ||
| 27 | +- (void)viewDidLoad { | ||
| 28 | + [super viewDidLoad]; | ||
| 29 | + self.title = @"用户云"; | ||
| 30 | + self.view.backgroundColor = [UIColor whiteColor]; | ||
| 31 | + | ||
| 32 | + [self.view addSubview:self.tableView]; | ||
| 33 | + [self.tableView addSubview:self.loginBtn]; | ||
| 34 | + | ||
| 35 | + _dataArr = @[@"通过手机号修改密码",@"更新附加信息",@"修改用户信息",@"查询用户信息"]; | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +- (void)viewWillAppear:(BOOL)animated | ||
| 39 | +{ | ||
| 40 | + [super viewWillAppear:animated]; | ||
| 41 | + if ([Tools isLogin]) { | ||
| 42 | + [_loginBtn setTitle:@"注销" forState:UIControlStateNormal]; | ||
| 43 | + } else { | ||
| 44 | + [_loginBtn setTitle:@"登录" forState:UIControlStateNormal]; | ||
| 45 | + } | ||
| 46 | + [_tableView reloadData]; | ||
| 47 | +} | ||
| 48 | + | ||
| 49 | +#pragma mark - action | ||
| 50 | +- (void)logoutBtnAction | ||
| 51 | +{ | ||
| 52 | + if ([Tools isLogin]) { | ||
| 53 | + [CNLiveLogout clearLocalUserInfo]; | ||
| 54 | + [Tools setUserLogin:NO]; | ||
| 55 | + [_loginBtn setTitle:@"登录" forState:UIControlStateNormal]; | ||
| 56 | + [_tableView reloadData]; | ||
| 57 | + } else { | ||
| 58 | + LoginViewController *loginVC = [[LoginViewController alloc] init]; | ||
| 59 | + [self.navigationController pushViewController:loginVC animated:YES]; | ||
| 60 | + } | ||
| 61 | +} | ||
| 62 | + | ||
| 63 | +#pragma mark - UITableView | ||
| 64 | + | ||
| 65 | +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | ||
| 66 | +{ | ||
| 67 | + if ([Tools isLogin]) { | ||
| 68 | + return _dataArr.count+1; | ||
| 69 | + } else { | ||
| 70 | + return 1; | ||
| 71 | + } | ||
| 72 | + return _dataArr.count+1; | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | ||
| 76 | +{ | ||
| 77 | + if (indexPath.row == 0) { | ||
| 78 | + | ||
| 79 | + UITableViewCell *loginCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellID"]; | ||
| 80 | + | ||
| 81 | + UIImageView *iconImg = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 80, 80)]; | ||
| 82 | + iconImg.backgroundColor = [UIColor orangeColor]; | ||
| 83 | + [loginCell.contentView addSubview:iconImg]; | ||
| 84 | + UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; | ||
| 85 | + | ||
| 86 | + [iconImg sd_setImageWithURL:[NSURL URLWithString:model.faceUrl] placeholderImage:[UIImage imageNamed:@""]]; | ||
| 87 | + | ||
| 88 | + UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(120, 0, KScreenWidth- 160, 120)]; | ||
| 89 | + if ([Tools isLogin]) { | ||
| 90 | + name.text = @"已登录"; | ||
| 91 | + } else { | ||
| 92 | + name.text = @"登录"; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + [loginCell.contentView addSubview:name]; | ||
| 96 | + | ||
| 97 | + return loginCell; | ||
| 98 | + | ||
| 99 | + } else { | ||
| 100 | + static NSString *cellIndentify = @"cellIndentify"; | ||
| 101 | + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIndentify]; | ||
| 102 | + if (!cell) { | ||
| 103 | + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndentify]; | ||
| 104 | + } | ||
| 105 | + cell.textLabel.text = [NSString stringWithFormat:@"%@",_dataArr[indexPath.row-1]]; | ||
| 106 | + return cell; | ||
| 107 | + | ||
| 108 | + } | ||
| 109 | + return nil; | ||
| 110 | +} | ||
| 111 | + | ||
| 112 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | ||
| 113 | +{ | ||
| 114 | + [tableView deselectRowAtIndexPath:indexPath animated:YES]; | ||
| 115 | + | ||
| 116 | + if (indexPath.row == 1) { | ||
| 117 | + RegisterViewController *regVC = [[RegisterViewController alloc] init]; | ||
| 118 | + regVC.type = @"forgetPwd"; | ||
| 119 | + [self.navigationController pushViewController:regVC animated:YES]; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + if (indexPath.row == 2) { | ||
| 123 | + | ||
| 124 | + [SVProgressHUD show]; | ||
| 125 | + | ||
| 126 | + UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; | ||
| 127 | + | ||
| 128 | + [CNLiveUserSystemCenter updateOtherInfoWithUid:model.uid extInfo:@"将要更新的附加信息,NSString类型" token:model.token success:^(id result) { | ||
| 129 | + | ||
| 130 | + NSLog(@"--------%@",result); | ||
| 131 | + | ||
| 132 | + if ([[result allKeys] containsObject:@"errorCode"] && [result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 133 | + [SVProgressHUD showSuccessWithStatus:@"更新附加信息成功"]; | ||
| 134 | + [self.navigationController popViewControllerAnimated:YES]; | ||
| 135 | + | ||
| 136 | + } else { | ||
| 137 | + [Tools toast:result[@"errorMessage"]]; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + } failure:^(NSError *error) { | ||
| 141 | + [Tools toast:error.localizedDescription]; | ||
| 142 | + }]; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + if (indexPath.row == 3) { | ||
| 146 | + UserInfoViewController *userInfo = [[UserInfoViewController alloc] init]; | ||
| 147 | + [self.navigationController pushViewController:userInfo animated:YES]; | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + if (indexPath.row == 4) { | ||
| 151 | + UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; | ||
| 152 | + | ||
| 153 | + [CNLiveUserSystemCenter queryUserInfoWithUid:model.uid srcUid:model.uid token:model.token success:^(id result) { | ||
| 154 | + NSLog(@"%@",result); | ||
| 155 | + if ([result[@"errorCode"] isEqualToString:@"0"]) { | ||
| 156 | + NSDictionary *dic = result[@"data"]; | ||
| 157 | + NSString *message = [NSString stringWithFormat:@" uid:%@\n nickName:%@\n gender:%@\n location:%@\n extInfo:%@\n mobile:%@\n email:%@",dic[@"uid"],dic[@"nickName"],dic[@"gender"],dic[@"location"],dic[@"extInfo"],dic[@"mobile"],dic[@"email"]]; | ||
| 158 | + NSString *icon = dic[@"faceUrl"]; | ||
| 159 | + | ||
| 160 | + [UserInfoSava setLocalUserInfo:icon withKey:@"faceUrl"]; | ||
| 161 | + [_tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationFade]; | ||
| 162 | + [Tools toast:message]; | ||
| 163 | + }else { | ||
| 164 | + [Tools toast:result[@"errorMessage"]]; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + } failure:^(NSError *error) { | ||
| 168 | + [Tools toast:error.localizedDescription]; | ||
| 169 | + }]; | ||
| 170 | + } | ||
| 171 | +} | ||
| 172 | + | ||
| 173 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath | ||
| 174 | +{ | ||
| 175 | + if (indexPath.row == 0) { | ||
| 176 | + return 120; | ||
| 177 | + } else { | ||
| 178 | + return 50; | ||
| 179 | + } | ||
| 180 | +} | ||
| 181 | + | ||
| 182 | +#pragma mark - getter | ||
| 183 | +- (UITableView *)tableView | ||
| 184 | +{ | ||
| 185 | + if (!_tableView) { | ||
| 186 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) style:UITableViewStylePlain]; | ||
| 187 | + _tableView.backgroundColor = [UIColor whiteColor]; | ||
| 188 | + _tableView.tableFooterView = [[UIView alloc] init]; | ||
| 189 | + _tableView.delegate = self; | ||
| 190 | + _tableView.dataSource = self; | ||
| 191 | + } | ||
| 192 | + return _tableView; | ||
| 193 | +} | ||
| 194 | + | ||
| 195 | +- (UIButton *)loginBtn | ||
| 196 | +{ | ||
| 197 | + if (!_loginBtn) { | ||
| 198 | + _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 199 | + _loginBtn.frame = CGRectMake(20, 53*5+63+12+80, KScreenWidth-40, 40); | ||
| 200 | + [_loginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | ||
| 201 | + [_loginBtn setBackgroundColor:[UIColor orangeColor]]; | ||
| 202 | + _loginBtn.titleLabel.font = [UIFont systemFontOfSize:17]; | ||
| 203 | + [_loginBtn addTarget:self action:@selector(logoutBtnAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 204 | + _loginBtn.layer.cornerRadius = 20; | ||
| 205 | + _loginBtn.layer.masksToBounds = YES; | ||
| 206 | + } | ||
| 207 | + return _loginBtn; | ||
| 208 | +} | ||
| 209 | + | ||
| 210 | +- (void)didReceiveMemoryWarning { | ||
| 211 | + [super didReceiveMemoryWarning]; | ||
| 212 | + // Dispose of any resources that can be recreated. | ||
| 213 | +} | ||
| 214 | + | ||
| 215 | +@end |
CNLiveUserSystemDemo/Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>en</string> | ||
| 7 | + <key>CFBundleExecutable</key> | ||
| 8 | + <string>$(EXECUTABLE_NAME)</string> | ||
| 9 | + <key>CFBundleIdentifier</key> | ||
| 10 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 12 | + <string>6.0</string> | ||
| 13 | + <key>CFBundleName</key> | ||
| 14 | + <string>$(PRODUCT_NAME)</string> | ||
| 15 | + <key>CFBundlePackageType</key> | ||
| 16 | + <string>APPL</string> | ||
| 17 | + <key>CFBundleShortVersionString</key> | ||
| 18 | + <string>1.0</string> | ||
| 19 | + <key>CFBundleSignature</key> | ||
| 20 | + <string>????</string> | ||
| 21 | + <key>CFBundleURLTypes</key> | ||
| 22 | + <array> | ||
| 23 | + <dict> | ||
| 24 | + <key>CFBundleTypeRole</key> | ||
| 25 | + <string>Editor</string> | ||
| 26 | + <key>CFBundleURLName</key> | ||
| 27 | + <string>tencent</string> | ||
| 28 | + <key>CFBundleURLSchemes</key> | ||
| 29 | + <array> | ||
| 30 | + <string>tencent100757437</string> | ||
| 31 | + </array> | ||
| 32 | + </dict> | ||
| 33 | + <dict> | ||
| 34 | + <key>CFBundleTypeRole</key> | ||
| 35 | + <string>Editor</string> | ||
| 36 | + <key>CFBundleURLName</key> | ||
| 37 | + <string>weixin</string> | ||
| 38 | + <key>CFBundleURLSchemes</key> | ||
| 39 | + <array> | ||
| 40 | + <string>wxbcb43c2700c2e6b3</string> | ||
| 41 | + </array> | ||
| 42 | + </dict> | ||
| 43 | + <dict> | ||
| 44 | + <key>CFBundleTypeRole</key> | ||
| 45 | + <string>Editor</string> | ||
| 46 | + <key>CFBundleURLName</key> | ||
| 47 | + <string>com.weibo</string> | ||
| 48 | + <key>CFBundleURLSchemes</key> | ||
| 49 | + <array> | ||
| 50 | + <string>wb1561408240</string> | ||
| 51 | + </array> | ||
| 52 | + </dict> | ||
| 53 | + </array> | ||
| 54 | + <key>CFBundleVersion</key> | ||
| 55 | + <string>1</string> | ||
| 56 | + <key>LSApplicationQueriesSchemes</key> | ||
| 57 | + <array> | ||
| 58 | + <string>wechat</string> | ||
| 59 | + <string>weixin</string> | ||
| 60 | + <string>sinaweibohd</string> | ||
| 61 | + <string>sinaweibo</string> | ||
| 62 | + <string>sinaweibosso</string> | ||
| 63 | + <string>weibosdk</string> | ||
| 64 | + <string>weibosdk2.5</string> | ||
| 65 | + <string>mqqapi</string> | ||
| 66 | + <string>mqq</string> | ||
| 67 | + <string>mqqOpensdkSSoLogin</string> | ||
| 68 | + <string>mqqconnect</string> | ||
| 69 | + <string>mqqopensdkdataline</string> | ||
| 70 | + <string>mqqopensdkgrouptribeshare</string> | ||
| 71 | + <string>mqqopensdkfriend</string> | ||
| 72 | + <string>mqqopensdkapi</string> | ||
| 73 | + <string>mqqopensdkapiV2</string> | ||
| 74 | + <string>mqqopensdkapiV3</string> | ||
| 75 | + <string>mqzoneopensdk</string> | ||
| 76 | + <string>wtloginmqq</string> | ||
| 77 | + <string>wtloginmqq2</string> | ||
| 78 | + <string>mqqwpa</string> | ||
| 79 | + <string>mqzone</string> | ||
| 80 | + <string>mqzonev2</string> | ||
| 81 | + <string>mqzoneshare</string> | ||
| 82 | + <string>wtloginqzone</string> | ||
| 83 | + <string>mqzonewx</string> | ||
| 84 | + <string>mqzoneopensdkapiV2</string> | ||
| 85 | + <string>mqzoneopensdkapi19</string> | ||
| 86 | + <string>mqzoneopensdkapi</string> | ||
| 87 | + <string>mqzoneopensdk</string> | ||
| 88 | + </array> | ||
| 89 | + <key>LSRequiresIPhoneOS</key> | ||
| 90 | + <true/> | ||
| 91 | + <key>NSAppTransportSecurity</key> | ||
| 92 | + <dict> | ||
| 93 | + <key>NSAllowsArbitraryLoads</key> | ||
| 94 | + <true/> | ||
| 95 | + </dict> | ||
| 96 | + <key>NSCameraUsageDescription</key> | ||
| 97 | + <string>App需要您的同意,才能访问相机</string> | ||
| 98 | + <key>NSPhotoLibraryUsageDescription</key> | ||
| 99 | + <string>此 App 需要您的同意才能读取媒体资料库</string> | ||
| 100 | + <key>UILaunchStoryboardName</key> | ||
| 101 | + <string>LaunchScreen</string> | ||
| 102 | + <key>UIRequiredDeviceCapabilities</key> | ||
| 103 | + <array> | ||
| 104 | + <string>armv7</string> | ||
| 105 | + </array> | ||
| 106 | + <key>UISupportedInterfaceOrientations</key> | ||
| 107 | + <array> | ||
| 108 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 109 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 110 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 111 | + </array> | ||
| 112 | + <key>UISupportedInterfaceOrientations~ipad</key> | ||
| 113 | + <array> | ||
| 114 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 115 | + <string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
| 116 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 117 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 118 | + </array> | ||
| 119 | +</dict> | ||
| 120 | +</plist> |
CNLiveUserSystemDemo/PrefixHeader.pch
0 → 100644
| 1 | +// | ||
| 2 | +// PrefixHeader.pch | ||
| 3 | +// CNLiveUserSystemDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 16/9/14. | ||
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#ifndef PrefixHeader_pch | ||
| 10 | +#define PrefixHeader_pch | ||
| 11 | + | ||
| 12 | +#define KScreenWidth ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.height : [UIScreen mainScreen].bounds.size.width) | ||
| 13 | +#define KScreenHeight ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.width : [UIScreen mainScreen].bounds.size.height) | ||
| 14 | + | ||
| 15 | +#define AppId @"60_itax25eq82" | ||
| 16 | +#define AppKey @"55a25a7f7e1124937fba06c82999d9a7c18379e2d24784" | ||
| 17 | +#define AppSceret @"29798eea30388f71d4a33b75d308c3cbb47077d56ce680" | ||
| 18 | + | ||
| 19 | +#define UserInfoAllKeys @"AllKeys" | ||
| 20 | +#define UserInfoKey @"UserInfoKey" | ||
| 21 | + | ||
| 22 | +#define ThirdLoginSuccess @"ThirdLoginSuccess" | ||
| 23 | +#define ThirdLoginFailure @"ThirdLoginFailure" | ||
| 24 | + | ||
| 25 | +#define WeChatAppKey @"wxbcb43c2700c2e6b3" | ||
| 26 | +#define WeChatAppSecret @"4ca1018cf9002517b376456bd049718e" | ||
| 27 | + | ||
| 28 | +#define QQAppKey @"100757437" | ||
| 29 | +#define QQAppSecret @"4d8f9a54a50269ba97d5ba92b95a54d4" | ||
| 30 | + | ||
| 31 | +#define SinaAppKey @"1561408240" | ||
| 32 | +#define SinaAppSecret @"267d6a505ae7131ad76dd8364f9b4d22" | ||
| 33 | +#define kSinaRedirectURI @"http://www.cnlive.com" | ||
| 34 | + | ||
| 35 | +#import "CNLiveUserSystemCenter.h" | ||
| 36 | +#import "UserInfoModel.h" | ||
| 37 | +#import "NSObject+UserModel.h" | ||
| 38 | +#import "SVProgressHUD.h" | ||
| 39 | +#import "Tools.h" | ||
| 40 | +#import "UserInfoSava.h" | ||
| 41 | +#import "WXApi.h" | ||
| 42 | +#import "WeiboSDK.h" | ||
| 43 | +#import "UIImageView+WebCache.h" | ||
| 44 | + | ||
| 45 | +#endif /* PrefixHeader_pch */ |