Skip to content

Commit 23d1853

Browse files
Luka BratosTom Kemp
authored andcommitted
Remove Pusher client and remove platform checks
1 parent 7e44312 commit 23d1853

File tree

5 files changed

+0
-31
lines changed

5 files changed

+0
-31
lines changed

Sources/PusherSwift.swift

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ let CLIENT_NAME = "pusher-websocket-swift"
1515
}
1616
private let key: String
1717

18-
#if os(iOS) || os(OSX)
1918
/**
2019
Initializes the Pusher client with an app key and any appropriate options.
2120

@@ -33,26 +32,6 @@ let CLIENT_NAME = "pusher-websocket-swift"
3332
connection = PusherConnection(key: key, socket: ws, url: urlString, options: options)
3433
connection.createGlobalChannel()
3534
}
36-
#endif
37-
38-
#if os(tvOS)
39-
/**
40-
Initializes the Pusher client with an app key and any appropriate options.
41-
42-
- parameter key: The Pusher app key
43-
- parameter options: An optional collection of options
44-
45-
- returns: A new Pusher client instance
46-
*/
47-
public init(key: String, options: PusherClientOptions = PusherClientOptions()) {
48-
self.key = key
49-
let urlString = constructUrl(key: key, options: options)
50-
let ws = WebSocket(url: URL(string: urlString)!)
51-
connection = PusherConnection(key: key, socket: ws, url: urlString, options: options)
52-
connection.createGlobalChannel()
53-
}
54-
#endif
55-
5635

5736
/**
5837
Subscribes the client to a new channel

iOS Example Obj-C/iOS Example Obj-C/AppDelegate.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77
//
88

99
#import <UIKit/UIKit.h>
10-
#import "PusherSwift/PusherSwift-Swift.h"
1110

1211
@interface AppDelegate : UIResponder <UIApplicationDelegate>
1312

1413
@property (strong, nonatomic) UIWindow *window;
15-
@property (nonatomic, strong, readwrite) Pusher *pusher;
16-
1714

1815
@end

iOS Example Obj-C/iOS Example Obj-C/AppDelegate.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ @implementation AppDelegate
1616

1717

1818
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19-
self.pusher = [[Pusher alloc] initWithKey:@"YOUR_APP_KEY"];
20-
2119
return YES;
2220
}
2321

iOS Example Swift/iOS Example Swift/AppDelegate.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
//
88

99
import UIKit
10-
import PusherSwift
1110

1211
@UIApplicationMain
1312
class AppDelegate: UIResponder, UIApplicationDelegate {
1413

1514
var window: UIWindow?
16-
let pusher = Pusher(key: "YOUR_APP_KEY")
1715

1816
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
1917

macOS Example Swift/macOS Example Swift/AppDelegate.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
//
88

99
import Cocoa
10-
import PusherSwift
1110

1211
@NSApplicationMain
1312
class AppDelegate: NSObject, NSApplicationDelegate {
1413

15-
let pusher = Pusher(key: "YOUR_APP_KEY")
16-
1714
func applicationDidFinishLaunching(_ aNotification: Notification) {
1815
// Insert code here to initialize your application
1916
}

0 commit comments

Comments
 (0)