Skip to content

Commit f7e183a

Browse files
authored
Merge pull request #145 from pusher/swift-3.2
Swift 3.2
2 parents bc50239 + f892079 commit f7e183a

File tree

7 files changed

+64
-15
lines changed

7 files changed

+64
-15
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode8
2+
osx_image: xcode9
33
sudo: false
44
env:
55
- iOS= DST='platform=iOS Simulator,name=iPhone 6S' ACTION=test DEVICE='iPhone 6s (10.0)'

PusherSwift/PusherSwift.xcodeproj/project.pbxproj

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
isa = PBXProject;
264264
attributes = {
265265
LastSwiftUpdateCheck = 0700;
266-
LastUpgradeCheck = 0820;
266+
LastUpgradeCheck = 0900;
267267
TargetAttributes = {
268268
33831C881A9CF61600B124F1 = {
269269
CreatedOnToolsVersion = 6.3;
@@ -384,12 +384,18 @@
384384
33831C4E1A9CEDF800B124F1 /* Debug */ = {
385385
isa = XCBuildConfiguration;
386386
buildSettings = {
387+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
387388
CLANG_WARN_BOOL_CONVERSION = YES;
389+
CLANG_WARN_COMMA = YES;
388390
CLANG_WARN_CONSTANT_CONVERSION = YES;
389391
CLANG_WARN_EMPTY_BODY = YES;
390392
CLANG_WARN_ENUM_CONVERSION = YES;
391393
CLANG_WARN_INFINITE_RECURSION = YES;
392394
CLANG_WARN_INT_CONVERSION = YES;
395+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
396+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
397+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
398+
CLANG_WARN_STRICT_PROTOTYPES = YES;
393399
CLANG_WARN_SUSPICIOUS_MOVE = YES;
394400
CLANG_WARN_UNREACHABLE_CODE = YES;
395401
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -412,12 +418,18 @@
412418
33831C4F1A9CEDF800B124F1 /* Release */ = {
413419
isa = XCBuildConfiguration;
414420
buildSettings = {
421+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
415422
CLANG_WARN_BOOL_CONVERSION = YES;
423+
CLANG_WARN_COMMA = YES;
416424
CLANG_WARN_CONSTANT_CONVERSION = YES;
417425
CLANG_WARN_EMPTY_BODY = YES;
418426
CLANG_WARN_ENUM_CONVERSION = YES;
419427
CLANG_WARN_INFINITE_RECURSION = YES;
420428
CLANG_WARN_INT_CONVERSION = YES;
429+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
430+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
431+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
432+
CLANG_WARN_STRICT_PROTOTYPES = YES;
421433
CLANG_WARN_SUSPICIOUS_MOVE = YES;
422434
CLANG_WARN_UNREACHABLE_CODE = YES;
423435
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

PusherSwift/PusherSwift.xcodeproj/xcshareddata/xcschemes/PusherSwift.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Source/CryptoSwiftHMACModule.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ struct BytesSequence: Sequence {
150150
// Copyright © 2015 Marcin Krzyzanowski. All rights reserved.
151151
//
152152

153-
internal protocol CSArrayType: Collection, RangeReplaceableCollection {
153+
internal protocol CSArrayType: RangeReplaceableCollection {
154154
func cs_arrayValue() -> [Iterator.Element]
155155
}
156156

@@ -328,7 +328,7 @@ extension UInt32: Initiable {}
328328
extension UInt64: Initiable {}
329329

330330
/** build bit pattern from array of bits */
331-
@_specialize(UInt8)
331+
@_specialize(where T == UInt8)
332332
func integerFrom<T: UnsignedInteger>(_ bits: Array<Bit>) -> T {
333333
var bitPattern: T = 0
334334
for idx in bits.indices {
@@ -935,12 +935,12 @@ extension String {
935935
/** array of bytes */
936936
extension UInt16 {
937937

938-
@_specialize(ArraySlice<UInt8>)
938+
@_specialize(where T == ArraySlice<UInt8>)
939939
init<T: Collection>(bytes: T) where T.Iterator.Element == UInt8, T.Index == Int {
940940
self = UInt16(bytes: bytes, fromIndex: bytes.startIndex)
941941
}
942942

943-
@_specialize(ArraySlice<UInt8>)
943+
@_specialize(where T == ArraySlice<UInt8>)
944944
init<T: Collection>(bytes: T, fromIndex index: T.Index) where T.Iterator.Element == UInt8, T.Index == Int {
945945
let val0 = UInt16(bytes[index.advanced(by: 0)]) << 8
946946
let val1 = UInt16(bytes[index.advanced(by: 1)])
@@ -972,12 +972,12 @@ extension UInt32: _UInt32Type {}
972972
/** array of bytes */
973973
extension UInt32 {
974974

975-
@_specialize(ArraySlice<UInt8>)
975+
@_specialize(where T == ArraySlice<UInt8>)
976976
init<T: Collection>(bytes: T) where T.Iterator.Element == UInt8, T.Index == Int {
977977
self = UInt32(bytes: bytes, fromIndex: bytes.startIndex)
978978
}
979979

980-
@_specialize(ArraySlice<UInt8>)
980+
@_specialize(where T == ArraySlice<UInt8>)
981981
init<T: Collection>(bytes: T, fromIndex index: T.Index) where T.Iterator.Element == UInt8, T.Index == Int {
982982
let val0 = UInt32(bytes[index.advanced(by: 0)]) << 24
983983
let val1 = UInt32(bytes[index.advanced(by: 1)]) << 16
@@ -1002,12 +1002,12 @@ extension UInt32 {
10021002
/** array of bytes */
10031003
extension UInt64 {
10041004

1005-
@_specialize(ArraySlice<UInt8>)
1005+
@_specialize(where T == ArraySlice<UInt8>)
10061006
init<T: Collection>(bytes: T) where T.Iterator.Element == UInt8, T.Index == Int {
10071007
self = UInt64(bytes: bytes, fromIndex: bytes.startIndex)
10081008
}
10091009

1010-
@_specialize(ArraySlice<UInt8>)
1010+
@_specialize(where T == ArraySlice<UInt8>)
10111011
init<T: Collection>(bytes: T, fromIndex index: T.Index) where T.Iterator.Element == UInt8, T.Index == Int {
10121012
let val0 = UInt64(bytes[index.advanced(by: 0)]) << 56
10131013
let val1 = UInt64(bytes[index.advanced(by: 1)]) << 48

iOS Example Obj-C/iOS Example Obj-C.xcodeproj/project.pbxproj

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
331F37201D82CAB900AE2852 /* Project object */ = {
136136
isa = PBXProject;
137137
attributes = {
138-
LastUpgradeCheck = 0820;
138+
LastUpgradeCheck = 0900;
139139
ORGANIZATIONNAME = Pusher;
140140
TargetAttributes = {
141141
331F37271D82CAB900AE2852 = {
@@ -223,15 +223,21 @@
223223
CLANG_CXX_LIBRARY = "libc++";
224224
CLANG_ENABLE_MODULES = YES;
225225
CLANG_ENABLE_OBJC_ARC = YES;
226+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
226227
CLANG_WARN_BOOL_CONVERSION = YES;
228+
CLANG_WARN_COMMA = YES;
227229
CLANG_WARN_CONSTANT_CONVERSION = YES;
228230
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
229231
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
230232
CLANG_WARN_EMPTY_BODY = YES;
231233
CLANG_WARN_ENUM_CONVERSION = YES;
232234
CLANG_WARN_INFINITE_RECURSION = YES;
233235
CLANG_WARN_INT_CONVERSION = YES;
236+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
237+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
234238
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
239+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
240+
CLANG_WARN_STRICT_PROTOTYPES = YES;
235241
CLANG_WARN_SUSPICIOUS_MOVE = YES;
236242
CLANG_WARN_SUSPICIOUS_MOVES = YES;
237243
CLANG_WARN_UNREACHABLE_CODE = YES;
@@ -271,15 +277,21 @@
271277
CLANG_CXX_LIBRARY = "libc++";
272278
CLANG_ENABLE_MODULES = YES;
273279
CLANG_ENABLE_OBJC_ARC = YES;
280+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
274281
CLANG_WARN_BOOL_CONVERSION = YES;
282+
CLANG_WARN_COMMA = YES;
275283
CLANG_WARN_CONSTANT_CONVERSION = YES;
276284
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
277285
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
278286
CLANG_WARN_EMPTY_BODY = YES;
279287
CLANG_WARN_ENUM_CONVERSION = YES;
280288
CLANG_WARN_INFINITE_RECURSION = YES;
281289
CLANG_WARN_INT_CONVERSION = YES;
290+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
291+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
282292
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
293+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
294+
CLANG_WARN_STRICT_PROTOTYPES = YES;
283295
CLANG_WARN_SUSPICIOUS_MOVE = YES;
284296
CLANG_WARN_SUSPICIOUS_MOVES = YES;
285297
CLANG_WARN_UNREACHABLE_CODE = YES;

iOS Example Swift/iOS Example Swift.xcodeproj/project.pbxproj

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
33831C611A9CEEE900B124F1 /* Supporting Files */,
124124
);
125125
name = "iOS Example Swift";
126-
path = "/Users/Hami/Pusher/PusherSwiftWS/iOS Example";
126+
path = "/Users/hami/pusher/pusher-websocket-swift/iOS Example Swift/iOS Example Swift";
127127
sourceTree = "<absolute>";
128128
};
129129
33831C611A9CEEE900B124F1 /* Supporting Files */ = {
@@ -190,7 +190,7 @@
190190
isa = PBXProject;
191191
attributes = {
192192
LastSwiftUpdateCheck = 0800;
193-
LastUpgradeCheck = 0800;
193+
LastUpgradeCheck = 0900;
194194
ORGANIZATIONNAME = Pusher;
195195
TargetAttributes = {
196196
3330F8861D86EF1800D8DC88 = {
@@ -328,14 +328,20 @@
328328
CLANG_CXX_LIBRARY = "libc++";
329329
CLANG_ENABLE_MODULES = YES;
330330
CLANG_ENABLE_OBJC_ARC = YES;
331+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
331332
CLANG_WARN_BOOL_CONVERSION = YES;
333+
CLANG_WARN_COMMA = YES;
332334
CLANG_WARN_CONSTANT_CONVERSION = YES;
333335
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
334336
CLANG_WARN_EMPTY_BODY = YES;
335337
CLANG_WARN_ENUM_CONVERSION = YES;
336338
CLANG_WARN_INFINITE_RECURSION = YES;
337339
CLANG_WARN_INT_CONVERSION = YES;
340+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
341+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
338342
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
343+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
344+
CLANG_WARN_STRICT_PROTOTYPES = YES;
339345
CLANG_WARN_SUSPICIOUS_MOVE = YES;
340346
CLANG_WARN_UNREACHABLE_CODE = YES;
341347
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -376,14 +382,20 @@
376382
CLANG_CXX_LIBRARY = "libc++";
377383
CLANG_ENABLE_MODULES = YES;
378384
CLANG_ENABLE_OBJC_ARC = YES;
385+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
379386
CLANG_WARN_BOOL_CONVERSION = YES;
387+
CLANG_WARN_COMMA = YES;
380388
CLANG_WARN_CONSTANT_CONVERSION = YES;
381389
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
382390
CLANG_WARN_EMPTY_BODY = YES;
383391
CLANG_WARN_ENUM_CONVERSION = YES;
384392
CLANG_WARN_INFINITE_RECURSION = YES;
385393
CLANG_WARN_INT_CONVERSION = YES;
394+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
395+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
386396
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
397+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
398+
CLANG_WARN_STRICT_PROTOTYPES = YES;
387399
CLANG_WARN_SUSPICIOUS_MOVE = YES;
388400
CLANG_WARN_UNREACHABLE_CODE = YES;
389401
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -463,6 +475,7 @@
463475
3330F8911D86EF1900D8DC88 /* Release */,
464476
);
465477
defaultConfigurationIsVisible = 0;
478+
defaultConfigurationName = Release;
466479
};
467480
33831C591A9CEEE900B124F1 /* Build configuration list for PBXProject "iOS Example Swift" */ = {
468481
isa = XCConfigurationList;

macOS Example Swift/macOS Example Swift.xcodeproj/project.pbxproj

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
isa = PBXProject;
127127
attributes = {
128128
LastSwiftUpdateCheck = 0810;
129-
LastUpgradeCheck = 0820;
129+
LastUpgradeCheck = 0900;
130130
ORGANIZATIONNAME = Pusher;
131131
TargetAttributes = {
132132
3371B2D21DD384AC00016F90 = {
@@ -204,15 +204,21 @@
204204
CLANG_CXX_LIBRARY = "libc++";
205205
CLANG_ENABLE_MODULES = YES;
206206
CLANG_ENABLE_OBJC_ARC = YES;
207+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
207208
CLANG_WARN_BOOL_CONVERSION = YES;
209+
CLANG_WARN_COMMA = YES;
208210
CLANG_WARN_CONSTANT_CONVERSION = YES;
209211
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
210212
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
211213
CLANG_WARN_EMPTY_BODY = YES;
212214
CLANG_WARN_ENUM_CONVERSION = YES;
213215
CLANG_WARN_INFINITE_RECURSION = YES;
214216
CLANG_WARN_INT_CONVERSION = YES;
217+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
218+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
215219
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
220+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
221+
CLANG_WARN_STRICT_PROTOTYPES = YES;
216222
CLANG_WARN_SUSPICIOUS_MOVE = YES;
217223
CLANG_WARN_SUSPICIOUS_MOVES = YES;
218224
CLANG_WARN_UNREACHABLE_CODE = YES;
@@ -254,15 +260,21 @@
254260
CLANG_CXX_LIBRARY = "libc++";
255261
CLANG_ENABLE_MODULES = YES;
256262
CLANG_ENABLE_OBJC_ARC = YES;
263+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
257264
CLANG_WARN_BOOL_CONVERSION = YES;
265+
CLANG_WARN_COMMA = YES;
258266
CLANG_WARN_CONSTANT_CONVERSION = YES;
259267
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
260268
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
261269
CLANG_WARN_EMPTY_BODY = YES;
262270
CLANG_WARN_ENUM_CONVERSION = YES;
263271
CLANG_WARN_INFINITE_RECURSION = YES;
264272
CLANG_WARN_INT_CONVERSION = YES;
273+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
274+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
265275
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
276+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
277+
CLANG_WARN_STRICT_PROTOTYPES = YES;
266278
CLANG_WARN_SUSPICIOUS_MOVE = YES;
267279
CLANG_WARN_SUSPICIOUS_MOVES = YES;
268280
CLANG_WARN_UNREACHABLE_CODE = YES;

0 commit comments

Comments
 (0)