diff --git a/LeanCloudFeedback.podspec b/LeanCloudFeedback.podspec index c591e69..997219a 100644 --- a/LeanCloudFeedback.podspec +++ b/LeanCloudFeedback.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "LeanCloudFeedback" s.version = "0.1.0" - s.platform = :ios, "6.0" + s.platform = :ios, "8.0" s.summary = "LeanCloud iOS SDK for mobile backend." s.homepage = "https://leancloud.cn" s.documentation_url = "https://leancloud.cn/docs/feedback.html" diff --git a/LeanCloudFeedback.xcodeproj/project.pbxproj b/LeanCloudFeedback.xcodeproj/project.pbxproj index 1a0bf59..6fadf07 100644 --- a/LeanCloudFeedback.xcodeproj/project.pbxproj +++ b/LeanCloudFeedback.xcodeproj/project.pbxproj @@ -232,7 +232,7 @@ 5CCAE0F21B09B0FE009276B9 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0910; + LastUpgradeCheck = 1120; ORGANIZATIONNAME = LeanCloud; TargetAttributes = { 5CC504C71B0EFCBA004D0CB1 = { @@ -248,6 +248,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, "zh-Hans", ); @@ -378,12 +379,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -412,7 +415,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -435,12 +438,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -462,7 +467,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -477,7 +482,7 @@ baseConfigurationReference = D94FDB034BF527C80C647B30 /* Pods-LeanCloudFeedback.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -503,7 +508,7 @@ baseConfigurationReference = 59AC16570E133BA472B3DABB /* Pods-LeanCloudFeedback.release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; diff --git a/LeanCloudFeedback/LCHttpClient.m b/LeanCloudFeedback/LCHttpClient.m index 9e36741..d414fd4 100644 --- a/LeanCloudFeedback/LCHttpClient.m +++ b/LeanCloudFeedback/LCHttpClient.m @@ -48,7 +48,10 @@ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method path:(NSString *)p NSURL *url = [NSURL URLWithString:path]; if (!url.scheme.length) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" NSString *URLString = [[LCRouter sharedInstance] URLStringForPath:path]; +#pragma clang diagnostic pop url = [NSURL URLWithString:URLString]; } @@ -65,7 +68,6 @@ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method path:(NSString *)p [request setValue:[AVUser currentUser].sessionToken forHTTPHeaderField:@"X-LC-Session"]; } - [request setTimeoutInterval:kAVDefaultNetworkTimeoutInterval]; [request setHTTPMethod:method]; if ([method isEqualToString:@"GET"] || [method isEqualToString:@"DELETE"]) { url = [NSURL URLWithString:[[url absoluteString] stringByAppendingFormat:@"?%@", [self queryStringFromParameters:parameters]]]; diff --git a/LeanCloudFeedback/LCUserFeedbackViewController.m b/LeanCloudFeedback/LCUserFeedbackViewController.m index d7e7395..ddaf036 100644 --- a/LeanCloudFeedback/LCUserFeedbackViewController.m +++ b/LeanCloudFeedback/LCUserFeedbackViewController.m @@ -211,11 +211,11 @@ - (void)fetchRepliesWithBlock:(AVArrayResultBlock)block { block(nil, error); } else { if (feedback) { - _userFeedback = feedback; + self->_userFeedback = feedback; if (self.contact == nil) { self.contact = feedback.contact; } - [_userFeedback fetchFeedbackRepliesInBackgroundWithBlock:block]; + [self->_userFeedback fetchFeedbackRepliesInBackgroundWithBlock:block]; } else { block([NSArray array], nil); } @@ -228,13 +228,13 @@ - (void)loadFeedbackThreads { [_refreshControl beginRefreshing]; } [self fetchRepliesWithBlock:^(NSArray *objects, NSError *error) { - [_refreshControl endRefreshing]; + [self->_refreshControl endRefreshing]; if ([self filterError:error]) { if (objects.count > 0) { - [_feedbackReplies removeAllObjects]; - [_feedbackReplies addObjectsFromArray:objects]; + [self->_feedbackReplies removeAllObjects]; + [self->_feedbackReplies addObjectsFromArray:objects]; - [_tableView reloadData]; + [self->_tableView reloadData]; [self scrollToBottom]; } } @@ -313,7 +313,7 @@ - (void)imagePickerController:(UIImagePickerController *)picker didFinishPicking if ([self filterError:error]) { LCUserFeedbackReply *feedbackReply = [LCUserFeedbackReply feedbackReplyWithAttachment:attachment.url type:LCReplyTypeUser]; feedbackReply.attachmentImage = originImage; - [self saveFeedbackReply:feedbackReply AtFeedback:_userFeedback]; + [self saveFeedbackReply:feedbackReply AtFeedback:self->_userFeedback]; } }]; } @@ -340,7 +340,7 @@ - (void)prepareFeedbackWithBlock:(AVBooleanResultBlock)block { if (error) { block(NO, error); } else { - _userFeedback = object; + self->_userFeedback = object; block(YES, nil); } }]; @@ -354,7 +354,7 @@ - (void)sendButtonClicked:(id)sender { [self prepareFeedbackWithBlock:^(BOOL succeeded, NSError *error) { if ([self filterError:error]) { LCUserFeedbackReply *feedbackReply = [LCUserFeedbackReply feedbackReplyWithContent:content type:LCReplyTypeUser]; - [self saveFeedbackReply:feedbackReply AtFeedback:_userFeedback]; + [self saveFeedbackReply:feedbackReply AtFeedback:self->_userFeedback]; } else { self.sendButton.enabled = YES; } @@ -365,12 +365,12 @@ - (void)sendButtonClicked:(id)sender { - (void)saveFeedbackReply:(LCUserFeedbackReply *)feedbackReply AtFeedback:(LCUserFeedbackThread *)feedback { [_userFeedback saveFeedbackReplyInBackground:feedbackReply withBlock:^(id object, NSError *error) { if ([self filterError:error]) { - [_feedbackReplies addObject:feedbackReply]; + [self->_feedbackReplies addObject:feedbackReply]; [self.tableView reloadData]; [self scrollToBottom]; - if ([_inputTextField.text length] > 0) { - _inputTextField.text = @""; + if ([self->_inputTextField.text length] > 0) { + self->_inputTextField.text = @""; } } self.sendButton.enabled = YES; diff --git a/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo.xcodeproj/project.pbxproj b/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo.xcodeproj/project.pbxproj index 41dfa04..9db1ada 100644 --- a/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo.xcodeproj/project.pbxproj +++ b/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo.xcodeproj/project.pbxproj @@ -150,7 +150,7 @@ 5CC504D91B0F01D3004D0CB1 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0910; + LastUpgradeCheck = 1120; ORGANIZATIONNAME = LeanCloud; TargetAttributes = { 5CC504E01B0F01D3004D0CB1 = { @@ -164,6 +164,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -281,6 +282,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -289,12 +291,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -333,6 +337,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -341,12 +346,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/AppDelegate.m b/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/AppDelegate.m index 0eeec79..0552038 100644 --- a/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/AppDelegate.m +++ b/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/AppDelegate.m @@ -21,7 +21,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( #warning 用公共账号登录 https://leancloud.cn ,账号/密码:leancloud@163.com/Public123 即可查看用户反馈 NSString *appId = @"sl9sxfb9d9x0sc5g8c5wsv00f4nvztrgo5qcx4i4sjk1myn3"; NSString *appKey = @"ysz2l1zttl802m3qq8lvvqnmw8tnp4wiiuwe5xtydcjxrwtg"; - [AVOSCloud setApplicationId:appId clientKey:appKey]; + [AVOSCloud setApplicationId:appId clientKey:appKey serverURLString:@"https://sl9sxfb9.lc-cn-n1-shared.com"]; [AVOSCloud setAllLogsEnabled:YES]; diff --git a/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/Images.xcassets/AppIcon.appiconset/Contents.json b/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/Images.xcassets/AppIcon.appiconset/Contents.json index 41e9190..f609e11 100644 --- a/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/LeanCloudFeedbackDemo/LeanCloudFeedbackDemo/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "size" : "29x29", "idiom" : "iphone", @@ -35,6 +45,11 @@ "idiom" : "iphone", "filename" : "icon_60@3x.png", "scale" : "3x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/Podfile b/Podfile index f0a1194..c0ebf4d 100644 --- a/Podfile +++ b/Podfile @@ -8,14 +8,12 @@ platform :ios, '8.0' workspace 'LeanCloudFeedback.xcworkspace' target 'LeanCloudFeedback' do - inhibit_all_warnings! project 'LeanCloudFeedback.xcodeproj' - pod 'AVOSCloud', '11.4.9' + pod 'AVOSCloud' end target 'LeanCloudFeedbackDemo' do - inhibit_all_warnings! project 'LeanCloudFeedbackDemo/LeanCloudFeedbackDemo.xcodeproj' - pod 'AVOSCloud', '11.4.9' + pod 'AVOSCloud' pod 'LeanCloudFeedback', :path => '.' end diff --git a/Podfile.lock b/Podfile.lock index a46d3c5..74a8fac 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,14 +1,14 @@ PODS: - - AVOSCloud (11.4.9) + - AVOSCloud (12.0.4) - LeanCloudFeedback (0.1.0): - AVOSCloud DEPENDENCIES: - - AVOSCloud (= 11.4.9) + - AVOSCloud - LeanCloudFeedback (from `.`) SPEC REPOS: - https://github.com/cocoapods/specs.git: + trunk: - AVOSCloud EXTERNAL SOURCES: @@ -16,9 +16,9 @@ EXTERNAL SOURCES: :path: "." SPEC CHECKSUMS: - AVOSCloud: 1ad969db6e24c41ae1788d68698255d853883069 - LeanCloudFeedback: 011993aef4d90ad52279339f607a0850787493dc + AVOSCloud: 6a3dd184e94a61caf3c8504e90172340a04798dd + LeanCloudFeedback: 475a2cf99385a23cc7818116b81fb7c781b79ce0 -PODFILE CHECKSUM: f5177a5d9caf9a505bdec765c494d12d0656351f +PODFILE CHECKSUM: b0677fc747183471f9d653b377e73db854e607f5 -COCOAPODS: 1.6.0.beta.2 +COCOAPODS: 1.8.4