Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carthage support #639

Merged
merged 12 commits into from
Oct 31, 2017
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "facebook/SocketRocket" "master"
github "whitesmith/msgpack-objective-C" "disable-modules"
github "rvi/msgpack-objective-C" "master"
github "ably-forks/KSCrash" "1.15.8-ably-1"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "ably-forks/KSCrash" "1.15.8-ably-1"
github "facebook/SocketRocket" "28035e1a98a427853e4038ff1b70479fa8374cfa"
github "whitesmith/msgpack-objective-C" "82982c70f42462fb95fe4e93427b8fbd3cd290c4"
github "rvi/msgpack-objective-C" "ad0a627becfd27ca45dfa6684b3fc79f058f5ce9"
5 changes: 5 additions & 0 deletions Source/ARTRest.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
#import "ARTRealtime+Private.h"
#import "ARTSentry.h"

#if COCOAPODS
#import <KSCrashAblyFork/KSCrash.h>
#else
// Carthage
#import <KSCrash/KSCrash.h>
#endif

@interface ARTRest () {
__block NSUInteger _tokenErrorRetries;
Expand Down
11 changes: 10 additions & 1 deletion Source/ARTSentry.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@
#import "ARTNSDate+ARTUtil.h"
#import "ARTDefault.h"
#import "ARTCrypto+Private.h"
#import "ARTNSArray+ARTFunctional.h"

#if COCOAPODS
#import <KSCrashAblyFork/KSCrash.h>
#import <KSCrashAblyFork/KSCrashInstallation+Private.h>
#import <KSCrashAblyFork/KSCrashMonitorType.h>
#import <KSCrashAblyFork/NSData+GZip.h>
#else
// Carthage
#import <KSCrash/KSCrash.h>
#import <KSCrash/KSCrashInstallation+Private.h>
#import <KSCrash/KSCrashMonitorType.h>
#import <KSCrash/NSData+GZip.h>
#import "ARTNSArray+ARTFunctional.h"
#endif

NSString* ART_hexMemoryAddress(id addr) {
if (addr && [addr isKindOfClass:[NSString class]]) {
Expand Down
5 changes: 5 additions & 0 deletions Source/ARTWebSocketTransport.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ - (void)send:(NSData *)data withSource:(id)decodedObject {
if ([decodedObject isKindOfClass:[ARTProtocolMessage class]]) {
[_protocolMessagesLogger info:@"send %@", [decodedObject description]];
}
#if COCOAPODS
[self.websocket send:data];
#else
// https://github.com/facebook/SocketRocket/issues/542
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow :(

[self.websocket sendData:data error:nil];
#endif
}
}

Expand Down