Skip to content

Commit

Permalink
Merge pull request #27 from berg/master
Browse files Browse the repository at this point in the history
Fix CocoaPods build
  • Loading branch information
joeldev committed May 24, 2013
2 parents 100ed0c + a3c746d commit 7bbf4e8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 21 deletions.
19 changes: 1 addition & 18 deletions ADNKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,8 @@ Pod::Spec.new do |s|
s.osx.frameworks = 'CoreLocation', 'SystemConfiguration'
s.osx.source_files = FileList['ADNKit/*.{h,m}'].exclude(/ANKOAuthViewController/, /ANKTextFieldCell/, /ANKUsernamePasswordAuthViewController/)

s.prefix_header_contents = <<-EOS
#ifdef __OBJC__
#import <Foundation/Foundation.h>
s.prefix_header_file = 'ADNKit/ADNKit-Prefix.pch'

#if __IPHONE_OS_VERSION_MIN_REQUIRED
#import <MobileCoreServices/MobileCoreServices.h>
#endif
#import <SystemConfiguration/SystemConfiguration.h>
#import "AFNetworking.h"
#import "ANKResource.h"
#import "ANKAnnotationReplacement.h"
#import "ANKClient.h"
#import "ANKClient+ANKHandlerBlocks.h"
#import "NSArray+ANKAdditions.h"
#import "NSDictionary+ANKAdditions.h"
#endif
EOS
s.public_header_files = 'ADNKit/*.h', '*.h'

s.requires_arc = true
Expand Down
4 changes: 2 additions & 2 deletions ADNKit/ANKClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ - (void)dealloc {


- (id)copyWithZone:(NSZone *)zone {
ANKClient *copy = [[ANKClient alloc] init];
ANKClient *copy = [[[self class] alloc] init];

copy.accessToken = [self.accessToken copyWithZone:zone];
copy.authenticatedUser = [self.authenticatedUser copyWithZone:zone];
Expand Down Expand Up @@ -106,7 +106,7 @@ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method path:(NSString *)p
if (self.pagination) {
[mutableParameters addEntriesFromDictionary:[self.pagination JSONDictionary]];
}
return [super requestWithMethod:method path:path parameters:mutableParameters];
return [super requestWithMethod:method path:path parameters:mutableParameters.count ? mutableParameters : nil];
}


Expand Down
2 changes: 1 addition & 1 deletion ADNKit/ANKEntities.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (BOOL)containsMentionForUsername:(NSString *)username {
- (NSRange)rangeForEntity:(ANKEntity *)entity {
__block NSRange range = NSMakeRange(entity.position, entity.length);

[self.text enumerateSubstringsInRange:NSMakeRange(0, entity.length) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
[self.text enumerateSubstringsInRange:NSMakeRange(0, self.text.length) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
if (substringRange.location >= range.location + range.length) {
*stop = YES;
} else if ([substring isSurrogatePair]) {
Expand Down
12 changes: 12 additions & 0 deletions ADNKit/ANKGeneralParameters.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,23 @@ + (NSDictionary *)JSONToLocalKeyMapping {
@"include_annotations": @"includeAnnotations",
@"include_post_annotations": @"includePostAnnotations",
@"include_user_annotations": @"includeUserAnnotations",
@"include_message_annotations": @"includeMessageAnnotations",
@"include_html": @"includeHTML",
@"include_marker": @"includeMarker",
@"include_read": @"includeRead",
@"include_recent_message": @"includeRecentMessage",
@"channel_types": @"channelTypes"}];
}

- (id)init {
if ((self = [super init])) {
self.includeDeleted = YES;
self.includeDirectedPosts = YES;
self.includeHTML = YES;
self.includeRead = YES;
}

return self;
}

@end

0 comments on commit 7bbf4e8

Please sign in to comment.