Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
isKindOfClass doesn't always work with tests due to difference in tar…
Browse files Browse the repository at this point in the history
…gets
  • Loading branch information
Bruno Farache committed Jun 19, 2015
1 parent d5a6726 commit c9073fe
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Liferay-iOS-SDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Liferay-iOS-SDK"
s.module_name = "LRMobileSDK"
s.version = "6.2.0.17"
s.version = "6.2.0.18"
s.summary = "Build iOS apps for Liferay."
s.homepage = "https://www.liferay.com/community/liferay-projects/liferay-mobile-sdk"
s.license = {
Expand All @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.source = {
:git => "https://github.com/liferay/liferay-mobile-sdk.git",
:tag => "ios-6.2.0.17"
:tag => "ios-6.2.0.18"
}
s.source_files = "ios/Source/**/*.{h,m}"
s.resource_bundles = {
Expand Down
7 changes: 5 additions & 2 deletions ios/Source/Core/LRSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,18 @@ - (NSOperation *)upload:(NSDictionary *)command error:(NSError **)error {
#pragma mark - Private methods

- (BOOL)_hasUploadData:(NSDictionary *)command {
if (![command count]) {
if ([command count] == 0) {
return NO;
}

NSString *first = [[command allKeys] objectAtIndex:0];
NSDictionary *params = [command objectForKey:first];

for (NSString *key in [params allKeys]) {
if ([params[key] isKindOfClass:[LRUploadData class]]) {
NSString *paramClazz = NSStringFromClass([params[key] class]);
NSString *uploadDataClazz = NSStringFromClass([LRUploadData class]);

if ([paramClazz isEqualToString:uploadDataClazz]) {
return YES;
}
}
Expand Down
17 changes: 10 additions & 7 deletions ios/Source/Http/LRUploadUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,18 @@ + (NSOperation *)upload:(LRSession *)session command:(NSDictionary *)command
return operation;
}

+ (LRUploadData *)_extractUploadData:(NSMutableDictionary *)parameters {
for (NSString *key in parameters) {
id parameter = [parameters objectForKey:key];
+ (LRUploadData *)_extractUploadData:(NSMutableDictionary *)params {
for (NSString *key in params) {
id param = [params objectForKey:key];

if ([parameter isKindOfClass:[LRUploadData class]]) {
[parameters removeObjectForKey:key];
[parameter setParameterName:key];
NSString *paramClazz = NSStringFromClass([params[key] class]);
NSString *uploadDataClazz = NSStringFromClass([LRUploadData class]);

return parameter;
if ([paramClazz isEqualToString:uploadDataClazz]) {
[params removeObjectForKey:key];
[param setParameterName:key];

return param;
}
}

Expand Down
2 changes: 1 addition & 1 deletion ios/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
## Build
##

version=6.2.0.17
version=6.2.0.18

0 comments on commit c9073fe

Please sign in to comment.