Compare commits

...

7 Commits

Author SHA1 Message Date
Peter Zignego 98dbad9ac7 5.1.1 (#170) 2019-10-14 21:59:53 -04:00
Peter Zignego 436014cfec Update for Swift 5.1 and Xcode 11 (#168)
* Rebuild dependencies with 5.1

* Import FoundationNetworking if found
2019-10-09 21:55:56 -04:00
Peter Zignego d50d74b78a Merge pull request #166 from RomanPodymov/master
Codable vol.2 - CustomProfileField, DoNotDisturbStatus, TeamIcon and Topic
2019-08-14 21:36:10 -04:00
Roman Podymov 80ce1c4731 missing tests 2019-07-31 23:46:05 +02:00
Roman Podymov 5ddf6d9f1a json for tests 2019-07-31 23:21:49 +02:00
Roman Podymov 580a857f11 CustomProfileField, DoNotDisturbStatus, TeamIcon, Topic conform to Codable 2019-07-25 22:33:14 +02:00
Roman Podymov 45b4e3f191 Merge pull request #1 from pvzig/master
Update master
2019-07-21 16:34:21 +02:00
99 changed files with 1912 additions and 112 deletions
+1 -1
View File
@@ -1 +1 @@
5.0
5.1
@@ -1,6 +1,10 @@
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -112,6 +116,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -153,6 +166,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -164,6 +180,461 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
@class NSStream;
SWIFT_CLASS("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__i386__) && __i386__
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
@class NSStream;
SWIFT_CLASS("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#else
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -209,7 +680,7 @@ SWIFT_CLASS("_TtC10Starscream9WebSocket")
#pragma clang diagnostic pop
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -321,6 +792,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -362,6 +842,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -373,6 +856,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -418,3 +904,5 @@ SWIFT_CLASS("_TtC10Starscream9WebSocket")
#pragma clang diagnostic pop
#endif
#endif
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,10 @@
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -112,6 +116,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -153,6 +166,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -164,6 +180,435 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__i386__) && __i386__
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#else
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -196,7 +641,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#pragma clang diagnostic pop
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -308,6 +753,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -349,6 +803,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -360,6 +817,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -392,3 +852,5 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#pragma clang diagnostic pop
#endif
#endif
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +110,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +160,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +174,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18E226</string>
<string>18G103</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -29,17 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<string>19A547</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1020</string>
<string>1100</string>
<key>DTXcodeBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
@@ -1,4 +1,4 @@
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +110,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +160,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +174,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18E226</string>
<string>18G103</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -29,17 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<string>19A547</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1020</string>
<string>1100</string>
<key>DTXcodeBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Damian Kołakowski. All rights reserved.</string>
<key>UIDeviceFamily</key>
@@ -1,4 +1,8 @@
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +114,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +164,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +178,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -205,3 +224,229 @@ SWIFT_CLASS("_TtC10Starscream9WebSocket")
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#else
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
@class NSStream;
SWIFT_CLASS("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,8 @@
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +114,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +164,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +178,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -192,3 +211,216 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#else
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
Binary file not shown.
Binary file not shown.
+30 -30
View File
@@ -45,15 +45,15 @@ public struct Action {
public let dataSource: DataSource?
public init(action: [String: Any]?) {
name = action?[CodingKeys.name.rawValue] as? String
text = action?[CodingKeys.text.rawValue] as? String
type = action?[CodingKeys.type.rawValue] as? String
value = action?[CodingKeys.value.rawValue] as? String
url = action?[CodingKeys.url.rawValue] as? String
style = ActionStyle(rawValue: action?[CodingKeys.style.rawValue] as? String ?? "")
confirm = Confirm(confirm:action?[CodingKeys.confirm.rawValue] as? [String: Any])
options = (action?[CodingKeys.options.rawValue] as? [[String: Any]])?.map { Option(option: $0) }
dataSource = DataSource(rawValue: action?[CodingKeys.dataSource.rawValue] as? String ?? "")
name = action?[CodingKeys.name] as? String
text = action?[CodingKeys.text] as? String
type = action?[CodingKeys.type] as? String
value = action?[CodingKeys.value] as? String
url = action?[CodingKeys.url] as? String
style = ActionStyle(rawValue: action?[CodingKeys.style] as? String ?? "")
confirm = Confirm(confirm:action?[CodingKeys.confirm] as? [String: Any])
options = (action?[CodingKeys.options] as? [[String: Any]])?.map { Option(option: $0) }
dataSource = DataSource(rawValue: action?[CodingKeys.dataSource] as? String ?? "")
}
public init(name: String, text: String, type: String = "button", style: ActionStyle = .defaultStyle, value: String? = nil,
@@ -71,15 +71,15 @@ public struct Action {
public var dictionary: [String: Any] {
var dict = [String: Any]()
dict[CodingKeys.name.rawValue] = name
dict[CodingKeys.text.rawValue] = text
dict[CodingKeys.type.rawValue] = type
dict[CodingKeys.value.rawValue] = value
dict[CodingKeys.url.rawValue] = url
dict[CodingKeys.style.rawValue] = style?.rawValue
dict[CodingKeys.confirm.rawValue] = confirm?.dictionary
dict[CodingKeys.options.rawValue] = options?.map { $0.dictionary }
dict[CodingKeys.dataSource.rawValue] = dataSource?.rawValue
dict[CodingKeys.name] = name
dict[CodingKeys.text] = text
dict[CodingKeys.type] = type
dict[CodingKeys.value] = value
dict[CodingKeys.url] = url
dict[CodingKeys.style] = style?.rawValue
dict[CodingKeys.confirm] = confirm?.dictionary
dict[CodingKeys.options] = options?.map { $0.dictionary }
dict[CodingKeys.dataSource] = dataSource?.rawValue
return dict
}
@@ -97,10 +97,10 @@ public struct Action {
public let dismissText: String?
public init(confirm: [String: Any]?) {
title = confirm?[CodingKeys.title.rawValue] as? String
text = confirm?[CodingKeys.text.rawValue] as? String
okText = confirm?[CodingKeys.okText.rawValue] as? String
dismissText = confirm?[CodingKeys.dismissText.rawValue] as? String
title = confirm?[CodingKeys.title] as? String
text = confirm?[CodingKeys.text] as? String
okText = confirm?[CodingKeys.okText] as? String
dismissText = confirm?[CodingKeys.dismissText] as? String
}
public init(text: String, title: String? = nil, okText: String? = nil, dismissText: String? = nil) {
@@ -112,10 +112,10 @@ public struct Action {
public var dictionary: [String: Any] {
var dict = [String: Any]()
dict[CodingKeys.title.rawValue] = title
dict[CodingKeys.text.rawValue] = text
dict[CodingKeys.okText.rawValue] = okText
dict[CodingKeys.dismissText.rawValue] = dismissText
dict[CodingKeys.title] = title
dict[CodingKeys.text] = text
dict[CodingKeys.okText] = okText
dict[CodingKeys.dismissText] = dismissText
return dict
}
}
@@ -130,8 +130,8 @@ public struct Action {
public let value: String?
public init(option: [String: Any]?) {
text = option?[CodingKeys.text.rawValue] as? String
value = option?[CodingKeys.value.rawValue] as? String
text = option?[CodingKeys.text] as? String
value = option?[CodingKeys.value] as? String
}
public init(text: String, value: String) {
@@ -141,8 +141,8 @@ public struct Action {
public var dictionary: [String: Any] {
var dict = [String: Any]()
dict[CodingKeys.text.rawValue] = text
dict[CodingKeys.value.rawValue] = value
dict[CodingKeys.text] = text
dict[CodingKeys.value] = value
return dict
}
}
+6 -6
View File
@@ -33,9 +33,9 @@ public struct AttachmentField {
public let short: Bool?
public init(field: [String: Any]?) {
title = field?[CodingKeys.title.rawValue] as? String
value = field?[CodingKeys.value.rawValue] as? String
short = field?[CodingKeys.short.rawValue] as? Bool
title = field?[CodingKeys.title] as? String
value = field?[CodingKeys.value] as? String
short = field?[CodingKeys.short] as? Bool
}
public init(title: String?, value: String?, short: Bool? = nil) {
@@ -46,9 +46,9 @@ public struct AttachmentField {
public var dictionary: [String: Any] {
var field = [String: Any]()
field[CodingKeys.title.rawValue] = title
field[CodingKeys.value.rawValue] = value
field[CodingKeys.short.rawValue] = short
field[CodingKeys.title] = title
field[CodingKeys.value] = value
field[CodingKeys.short] = short
return field
}
}
+55 -10
View File
@@ -22,6 +22,19 @@
// THE SOFTWARE.
public struct CustomProfileField {
fileprivate enum CodingKeys: String {
case id
case alt
case value
case hidden = "is_hidden"
case hint
case label
case options
case ordering
case possibleValues = "possible_values"
case type
}
public var id: String?
public var alt: String?
public var value: String?
@@ -34,16 +47,16 @@ public struct CustomProfileField {
public var type: String?
public init(field: [String: Any]?) {
id = field?["id"] as? String
alt = field?["alt"] as? String
value = field?["value"] as? String
hidden = field?["is_hidden"] as? Bool
hint = field?["hint"] as? String
label = field?["label"] as? String
options = field?["options"] as? String
ordering = field?["ordering"] as? Int
possibleValues = field?["possible_values"] as? [String]
type = field?["type"] as? String
id = field?[CodingKeys.id] as? String
alt = field?[CodingKeys.alt] as? String
value = field?[CodingKeys.value] as? String
hidden = field?[CodingKeys.hidden] as? Bool
hint = field?[CodingKeys.hint] as? String
label = field?[CodingKeys.label] as? String
options = field?[CodingKeys.options] as? String
ordering = field?[CodingKeys.ordering] as? Int
possibleValues = field?[CodingKeys.possibleValues] as? [String]
type = field?[CodingKeys.type] as? String
}
public init(id: String?) {
@@ -63,3 +76,35 @@ public struct CustomProfileField {
type = profile?.type != nil ? profile?.type : type
}
}
extension CustomProfileField: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
id = try values.decodeIfPresent(String.self, forKey: .id)
alt = try values.decodeIfPresent(String.self, forKey: .alt)
value = try values.decodeIfPresent(String.self, forKey: .value)
hidden = try values.decodeIfPresent(Bool.self, forKey: .hidden)
hint = try values.decodeIfPresent(String.self, forKey: .hint)
label = try values.decodeIfPresent(String.self, forKey: .label)
options = try values.decodeIfPresent(String.self, forKey: .options)
ordering = try values.decodeIfPresent(Int.self, forKey: .ordering)
possibleValues = try values.decodeIfPresent([String].self, forKey: .possibleValues)
type = try values.decodeIfPresent(String.self, forKey: .type)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(id, forKey: .id)
try container.encode(alt, forKey: .alt)
try container.encode(value, forKey: .value)
try container.encode(hidden, forKey: .hidden)
try container.encode(hint, forKey: .hint)
try container.encode(label, forKey: .label)
try container.encode(options, forKey: .options)
try container.encode(ordering, forKey: .ordering)
try container.encode(possibleValues, forKey: .possibleValues)
try container.encode(type, forKey: .type)
}
}
extension CustomProfileField.CodingKeys: CodingKey { }
+35 -5
View File
@@ -22,6 +22,14 @@
// THE SOFTWARE.
public struct DoNotDisturbStatus {
fileprivate enum CodingKeys: String {
case enabled = "dnd_enabled"
case nextDoNotDisturbStart = "next_dnd_start_ts"
case nextDoNotDisturbEnd = "next_dnd_end_ts"
case snoozeEnabled = "snooze_enabled"
case snoozeEndtime = "snooze_endtime"
}
public var enabled: Bool?
public var nextDoNotDisturbStart: Int?
public var nextDoNotDisturbEnd: Int?
@@ -29,10 +37,32 @@ public struct DoNotDisturbStatus {
public var snoozeEndtime: Int?
public init(status: [String: Any]?) {
enabled = status?["dnd_enabled"] as? Bool
nextDoNotDisturbStart = status?["next_dnd_start_ts"] as? Int
nextDoNotDisturbEnd = status?["next_dnd_end_ts"] as? Int
snoozeEnabled = status?["snooze_enabled"] as? Bool
snoozeEndtime = status?["snooze_endtime"] as? Int
enabled = status?[CodingKeys.enabled] as? Bool
nextDoNotDisturbStart = status?[CodingKeys.nextDoNotDisturbStart] as? Int
nextDoNotDisturbEnd = status?[CodingKeys.nextDoNotDisturbEnd] as? Int
snoozeEnabled = status?[CodingKeys.snoozeEnabled] as? Bool
snoozeEndtime = status?[CodingKeys.snoozeEndtime] as? Int
}
}
extension DoNotDisturbStatus: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
enabled = try values.decodeIfPresent(Bool.self, forKey: .enabled)
nextDoNotDisturbStart = try values.decodeIfPresent(Int.self, forKey: .nextDoNotDisturbStart)
nextDoNotDisturbEnd = try values.decodeIfPresent(Int.self, forKey: .nextDoNotDisturbEnd)
snoozeEnabled = try values.decodeIfPresent(Bool.self, forKey: .snoozeEnabled)
snoozeEndtime = try values.decodeIfPresent(Int.self, forKey: .snoozeEndtime)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(enabled, forKey: .enabled)
try container.encode(nextDoNotDisturbStart, forKey: .nextDoNotDisturbStart)
try container.encode(nextDoNotDisturbEnd, forKey: .nextDoNotDisturbEnd)
try container.encode(snoozeEnabled, forKey: .snoozeEnabled)
try container.encode(snoozeEndtime, forKey: .snoozeEndtime)
}
}
extension DoNotDisturbStatus.CodingKeys: CodingKey { }
+2 -2
View File
@@ -31,8 +31,8 @@ public struct Edited {
public let ts: String?
public init(edited: [String: Any]?) {
user = edited?[CodingKeys.user.rawValue] as? String
ts = edited?[CodingKeys.ts.rawValue] as? String
user = edited?[CodingKeys.user] as? String
ts = edited?[CodingKeys.ts] as? String
}
}
+12
View File
@@ -39,6 +39,18 @@ public extension UInt64 {
}
}
public extension Dictionary where Key == String, Value == Any {
subscript(codingKey: CodingKey) -> Any? {
get {
return self[codingKey.stringValue]
}
set {
self[codingKey.stringValue] = newValue
}
}
}
public func filterNilParameters(_ parameters: [String: Any?]) -> [String: Any] {
var finalParameters = [String: Any]()
for (key, value) in parameters {
+2 -2
View File
@@ -31,8 +31,8 @@ public struct Reply {
public let ts: String?
public init(reply: [String: Any]?) {
user = reply?[CodingKeys.user.rawValue] as? String
ts = reply?[CodingKeys.ts.rawValue] as? String
user = reply?[CodingKeys.user] as? String
ts = reply?[CodingKeys.ts] as? String
}
}
+47 -8
View File
@@ -22,6 +22,17 @@
// THE SOFTWARE.
public struct TeamIcon {
fileprivate enum CodingKeys: String {
case image34 = "image_34"
case image44 = "image_44"
case image68 = "image_68"
case image88 = "image_88"
case image102 = "image_102"
case image132 = "image_132"
case imageOriginal = "image_original"
case imageDefault = "image_default"
}
public var image34: String?
public var image44: String?
public var image68: String?
@@ -32,13 +43,41 @@ public struct TeamIcon {
public var imageDefault: Bool?
public init(icon: [String: Any]?) {
image34 = icon?["image_34"] as? String
image44 = icon?["image_44"] as? String
image68 = icon?["image_68"] as? String
image88 = icon?["image_88"] as? String
image102 = icon?["image_102"] as? String
image132 = icon?["image_132"] as? String
imageOriginal = icon?["image_original"] as? String
imageDefault = icon?["image_default"] as? Bool
image34 = icon?[CodingKeys.image34] as? String
image44 = icon?[CodingKeys.image44] as? String
image68 = icon?[CodingKeys.image68] as? String
image88 = icon?[CodingKeys.image88] as? String
image102 = icon?[CodingKeys.image102] as? String
image132 = icon?[CodingKeys.image132] as? String
imageOriginal = icon?[CodingKeys.imageOriginal] as? String
imageDefault = icon?[CodingKeys.imageDefault] as? Bool
}
}
extension TeamIcon: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
image34 = try values.decodeIfPresent(String.self, forKey: .image34)
image44 = try values.decodeIfPresent(String.self, forKey: .image44)
image68 = try values.decodeIfPresent(String.self, forKey: .image68)
image88 = try values.decodeIfPresent(String.self, forKey: .image88)
image102 = try values.decodeIfPresent(String.self, forKey: .image102)
image132 = try values.decodeIfPresent(String.self, forKey: .image132)
imageOriginal = try values.decodeIfPresent(String.self, forKey: .imageOriginal)
imageDefault = try values.decodeIfPresent(Bool.self, forKey: .imageDefault)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(image34, forKey: .image34)
try container.encode(image44, forKey: .image44)
try container.encode(image68, forKey: .image68)
try container.encode(image88, forKey: .image88)
try container.encode(image102, forKey: .image102)
try container.encode(image132, forKey: .image132)
try container.encode(imageOriginal, forKey: .imageOriginal)
try container.encode(imageDefault, forKey: .imageDefault)
}
}
extension TeamIcon.CodingKeys: CodingKey { }
+27 -3
View File
@@ -22,13 +22,37 @@
// THE SOFTWARE.
public struct Topic {
fileprivate enum CodingKeys: String {
case value
case creator
case lastSet = "last_set"
}
public let value: String?
public let creator: String?
public let lastSet: Int?
public init(topic: [String: Any]?) {
value = topic?["value"] as? String
creator = topic?["creator"] as? String
lastSet = topic?["last_set"] as? Int
value = topic?[CodingKeys.value] as? String
creator = topic?[CodingKeys.creator] as? String
lastSet = topic?[CodingKeys.lastSet] as? Int
}
}
extension Topic: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
value = try values.decodeIfPresent(String.self, forKey: .value)
creator = try values.decodeIfPresent(String.self, forKey: .creator)
lastSet = try values.decodeIfPresent(Int.self, forKey: .lastSet)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(value, forKey: .value)
try container.encode(creator, forKey: .creator)
try container.encode(lastSet, forKey: .lastSet)
}
}
extension Topic.CodingKeys: CodingKey { }
+10 -1
View File
@@ -22,17 +22,26 @@
// THE SOFTWARE.
#if os(Linux)
import Dispatch
import Dispatch
#endif
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
import Foundation
#if !COCOAPODS
import SKCore
#endif
public struct NetworkInterface {
private let apiUrl = "https://slack.com/api/"
#if canImport(FoundationNetworking)
private let session = FoundationNetworking.URLSession(configuration: .default)
#else
private let session = URLSession(configuration: .default)
#endif
internal init() {}
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SlackKit"
s.version = "4.3.0"
s.version = "4.5.0"
s.summary = "Write Slack apps in Swift"
s.homepage = "https://github.com/pvzig/SlackKit"
s.license = "MIT"
@@ -8,7 +8,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/pvzig/SlackKit.git", :tag => s.version.to_s }
s.social_media_url = "https://twitter.com/pvzig"
s.platforms = { :ios => '10.0', :osx => '10.11', :tvos => '10.0' }
s.swift_version = '5.0'
s.swift_version = '5.1'
s.cocoapods_version = '>= 1.4.0'
s.default_subspec = "SlackKit"
+24 -6
View File
@@ -119,13 +119,17 @@
26D4E6082212120900A67B67 /* SKRTMAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E5FE221211B900A67B67 /* SKRTMAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
26D4E6092212120F00A67B67 /* SKServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E600221211B900A67B67 /* SKServer.h */; settings = {ATTRIBUTES = (Public, ); }; };
26D4E60A2212121400A67B67 /* SKWebAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E601221211B900A67B67 /* SKWebAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
A20D15EA22DE158000044CFC /* BlockComposition.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E722DE158000044CFC /* BlockComposition.swift */; };
A20D15EB22DE158000044CFC /* BlockElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E822DE158000044CFC /* BlockElement.swift */; };
A20D15EC22DE158000044CFC /* BlockLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E922DE158000044CFC /* BlockLayout.swift */; };
9E452ACF22F2376B005E731B /* donotdisturbstatus.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E452ACE22F2376B005E731B /* donotdisturbstatus.json */; };
9E452AD122F237FD005E731B /* customprofilefield.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E452AD022F237FD005E731B /* customprofilefield.json */; };
9E873EFE22EA4A36005ABC26 /* topic.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E873EFD22EA4A36005ABC26 /* topic.json */; };
9E873F0222EA5413005ABC26 /* teamicon.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E873F0122EA5413005ABC26 /* teamicon.json */; };
9EA45FB922C01290006A6D36 /* action.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EA45FB822C01290006A6D36 /* action.json */; };
9EE6A7C322C2CDD6002BD111 /* edited.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EE6A7C222C2CDD6002BD111 /* edited.json */; };
9EEC459622BE63F800206AC3 /* reply.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EEC459522BE63F800206AC3 /* reply.json */; };
9EEC459822BE789600206AC3 /* attachmentfield.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EEC459722BE789600206AC3 /* attachmentfield.json */; };
A20D15EA22DE158000044CFC /* BlockComposition.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E722DE158000044CFC /* BlockComposition.swift */; };
A20D15EB22DE158000044CFC /* BlockElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E822DE158000044CFC /* BlockElement.swift */; };
A20D15EC22DE158000044CFC /* BlockLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E922DE158000044CFC /* BlockLayout.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -318,13 +322,17 @@
26D4E6292220731800A67B67 /* rtm.connect.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = rtm.connect.json; sourceTree = "<group>"; };
26D4E62A2220731800A67B67 /* file.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = file.json; sourceTree = "<group>"; };
26D4E6362220733F00A67B67 /* SKCoreTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SKCoreTests.swift; sourceTree = "<group>"; };
A20D15E722DE158000044CFC /* BlockComposition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockComposition.swift; sourceTree = "<group>"; };
A20D15E822DE158000044CFC /* BlockElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockElement.swift; sourceTree = "<group>"; };
A20D15E922DE158000044CFC /* BlockLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockLayout.swift; sourceTree = "<group>"; };
9E452ACE22F2376B005E731B /* donotdisturbstatus.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = donotdisturbstatus.json; sourceTree = "<group>"; };
9E452AD022F237FD005E731B /* customprofilefield.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = customprofilefield.json; sourceTree = "<group>"; };
9E873EFD22EA4A36005ABC26 /* topic.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = topic.json; sourceTree = "<group>"; };
9E873F0122EA5413005ABC26 /* teamicon.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = teamicon.json; sourceTree = "<group>"; };
9EA45FB822C01290006A6D36 /* action.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = action.json; sourceTree = "<group>"; };
9EE6A7C222C2CDD6002BD111 /* edited.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = edited.json; sourceTree = "<group>"; };
9EEC459522BE63F800206AC3 /* reply.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = reply.json; sourceTree = "<group>"; };
9EEC459722BE789600206AC3 /* attachmentfield.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = attachmentfield.json; sourceTree = "<group>"; };
A20D15E722DE158000044CFC /* BlockComposition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockComposition.swift; sourceTree = "<group>"; };
A20D15E822DE158000044CFC /* BlockElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockElement.swift; sourceTree = "<group>"; };
A20D15E922DE158000044CFC /* BlockLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockLayout.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -839,6 +847,8 @@
9EEC459722BE789600206AC3 /* attachmentfield.json */,
26D4E6282220731800A67B67 /* channel.json */,
26D4E6222220731700A67B67 /* conversation.json */,
9E452AD022F237FD005E731B /* customprofilefield.json */,
9E452ACE22F2376B005E731B /* donotdisturbstatus.json */,
9EE6A7C222C2CDD6002BD111 /* edited.json */,
26D4E6262220731800A67B67 /* events.json */,
26D4E62A2220731800A67B67 /* file.json */,
@@ -848,6 +858,8 @@
9EEC459522BE63F800206AC3 /* reply.json */,
26D4E6292220731800A67B67 /* rtm.connect.json */,
26D4E6202220731700A67B67 /* rtm.start.json */,
9E873F0122EA5413005ABC26 /* teamicon.json */,
9E873EFD22EA4A36005ABC26 /* topic.json */,
26D4E6242220731800A67B67 /* user.json */,
26D4E6252220731800A67B67 /* usergroup.json */,
2601B70D222F766D00F197AB /* member_joined_channel.json */,
@@ -1209,11 +1221,15 @@
9EA45FB922C01290006A6D36 /* action.json in Resources */,
2601B710222F766D00F197AB /* member_left_channel.json in Resources */,
2601B6CE2223038A00F197AB /* conversation.json in Resources */,
9E873F0222EA5413005ABC26 /* teamicon.json in Resources */,
2601B70F222F766D00F197AB /* member_joined_channel.json in Resources */,
2601B6CF2223038A00F197AB /* events.json in Resources */,
9E452AD122F237FD005E731B /* customprofilefield.json in Resources */,
2601B6D02223038A00F197AB /* file.json in Resources */,
9E452ACF22F2376B005E731B /* donotdisturbstatus.json in Resources */,
2601B6D12223038A00F197AB /* group.json in Resources */,
2601B6D22223038A00F197AB /* im.json in Resources */,
9E873EFE22EA4A36005ABC26 /* topic.json in Resources */,
2601B6D32223038A00F197AB /* mpim.json in Resources */,
2601B6D42223038A00F197AB /* rtm.connect.json in Resources */,
2601B6D52223038A00F197AB /* rtm.start.json in Resources */,
@@ -1901,6 +1917,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.SlackKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1933,6 +1950,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.SlackKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -0,0 +1,12 @@
{
"id": "any id",
"alt": "any alt",
"value": "any value",
"is_hidden": true,
"hint": "any hint",
"label": "any label",
"options": "any options",
"ordering": 1,
"possible_values": ["first value", "second value"],
"type": "any type"
}
@@ -0,0 +1,7 @@
{
"dnd_enabled": false,
"next_dnd_start_ts": 1000,
"next_dnd_end_ts": 2000,
"snooze_enabled": true,
"snooze_endtime": 3000
}
+10
View File
@@ -0,0 +1,10 @@
{
"image_34": "image 34",
"image_44": "image 44",
"image_68": "image 68",
"image_88": "image 88",
"image_102": "image 102",
"image_132": "image 132",
"image_original": "image original",
"image_default": true
}
+5
View File
@@ -0,0 +1,5 @@
{
"value": "any value",
"creator": "any creator",
"last_set": 1000
}
+114 -1
View File
@@ -46,8 +46,12 @@ final class SKCoreTests: XCTestCase {
static let events = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/events.json"))
static let action = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/action.json"))
static let attachmentfield = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/attachmentfield.json"))
static let customprofilefield = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/customprofilefield.json"))
static let donotdisturbstatus = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/donotdisturbstatus.json"))
static let edited = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/edited.json"))
static let reply = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/reply.json"))
static let teamicon = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/teamicon.json"))
static let topic = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/topic.json"))
}
static var allTests = [
@@ -62,7 +66,12 @@ final class SKCoreTests: XCTestCase {
("testEvents", testEvents),
("testActionCodable", testActionCodable),
("testAttachmentFieldCodable", testAttachmentFieldCodable),
("testReplyCodable", testReplyCodable)
("testCustomProfileFieldCodable", testCustomProfileFieldCodable),
("testDoNotDisturbStatusCodable", testDoNotDisturbStatusCodable),
("testEditedCodable", testEditedCodable),
("testReplyCodable", testReplyCodable),
("testTeamIconCodable", testTeamIconCodable),
("testTopicCodable", testTopicCodable)
]
func testEvents() {
@@ -203,6 +212,62 @@ final class SKCoreTests: XCTestCase {
XCTAssertEqual(attachmentFieldBySerialization.short, attachmentFieldByDecoder!.short)
}
func testCustomProfileFieldCodable() {
let data = JSONData.customprofilefield
let decoder = JSONDecoder()
let customProfileFieldByDecoder = try? decoder.decode(CustomProfileField.self, from: data)
XCTAssertNotNil(customProfileFieldByDecoder)
XCTAssertNotNil(customProfileFieldByDecoder!.id)
XCTAssertNotNil(customProfileFieldByDecoder!.alt)
XCTAssertNotNil(customProfileFieldByDecoder!.value)
XCTAssertNotNil(customProfileFieldByDecoder!.hidden)
XCTAssertNotNil(customProfileFieldByDecoder!.hint)
XCTAssertNotNil(customProfileFieldByDecoder!.label)
XCTAssertNotNil(customProfileFieldByDecoder!.options)
XCTAssertNotNil(customProfileFieldByDecoder!.ordering)
XCTAssertNotNil(customProfileFieldByDecoder!.possibleValues)
XCTAssertNotNil(customProfileFieldByDecoder!.type)
let encoder = JSONEncoder()
let jsonData = try? encoder.encode(customProfileFieldByDecoder!)
XCTAssertNotNil(jsonData)
let field = try? JSONSerialization.jsonObject(with: jsonData!, options: []) as? [String: Any]
XCTAssertNotNil(field)
let customProfileFieldBySerialization = CustomProfileField(field: field)
XCTAssertEqual(customProfileFieldBySerialization.id, customProfileFieldByDecoder!.id)
XCTAssertEqual(customProfileFieldBySerialization.alt, customProfileFieldByDecoder!.alt)
XCTAssertEqual(customProfileFieldBySerialization.value, customProfileFieldByDecoder!.value)
XCTAssertEqual(customProfileFieldBySerialization.hidden, customProfileFieldByDecoder!.hidden)
XCTAssertEqual(customProfileFieldBySerialization.hint, customProfileFieldByDecoder!.hint)
XCTAssertEqual(customProfileFieldBySerialization.label, customProfileFieldByDecoder!.label)
XCTAssertEqual(customProfileFieldBySerialization.options, customProfileFieldByDecoder!.options)
XCTAssertEqual(customProfileFieldBySerialization.ordering, customProfileFieldByDecoder!.ordering)
XCTAssertEqual(customProfileFieldBySerialization.possibleValues, customProfileFieldByDecoder!.possibleValues)
XCTAssertEqual(customProfileFieldBySerialization.type, customProfileFieldByDecoder!.type)
}
func testDoNotDisturbStatusCodable() {
let data = JSONData.donotdisturbstatus
let decoder = JSONDecoder()
let doNotDisturbStatusByDecoder = try? decoder.decode(DoNotDisturbStatus.self, from: data)
XCTAssertNotNil(doNotDisturbStatusByDecoder)
XCTAssertNotNil(doNotDisturbStatusByDecoder!.enabled)
XCTAssertNotNil(doNotDisturbStatusByDecoder!.nextDoNotDisturbStart)
XCTAssertNotNil(doNotDisturbStatusByDecoder!.nextDoNotDisturbEnd)
XCTAssertNotNil(doNotDisturbStatusByDecoder!.snoozeEnabled)
XCTAssertNotNil(doNotDisturbStatusByDecoder!.snoozeEndtime)
let encoder = JSONEncoder()
let jsonData = try? encoder.encode(doNotDisturbStatusByDecoder!)
XCTAssertNotNil(jsonData)
let status = try? JSONSerialization.jsonObject(with: jsonData!, options: []) as? [String: Any]
XCTAssertNotNil(status)
let doNotDisturbStatusBySerialization = DoNotDisturbStatus(status: status)
XCTAssertEqual(doNotDisturbStatusBySerialization.enabled, doNotDisturbStatusByDecoder!.enabled)
XCTAssertEqual(doNotDisturbStatusBySerialization.nextDoNotDisturbStart, doNotDisturbStatusByDecoder!.nextDoNotDisturbStart)
XCTAssertEqual(doNotDisturbStatusBySerialization.nextDoNotDisturbEnd, doNotDisturbStatusByDecoder!.nextDoNotDisturbEnd)
XCTAssertEqual(doNotDisturbStatusBySerialization.snoozeEnabled, doNotDisturbStatusByDecoder!.snoozeEnabled)
XCTAssertEqual(doNotDisturbStatusBySerialization.snoozeEndtime, doNotDisturbStatusByDecoder!.snoozeEndtime)
}
func testEditedCodable() {
let data = JSONData.edited
let decoder = JSONDecoder()
@@ -236,4 +301,52 @@ final class SKCoreTests: XCTestCase {
XCTAssertEqual(replyBySerialization.user, replyByDecoder!.user)
XCTAssertEqual(replyBySerialization.ts, replyByDecoder!.ts)
}
func testTeamIconCodable() {
let data = JSONData.teamicon
let decoder = JSONDecoder()
let teamIconByDecoder = try? decoder.decode(TeamIcon.self, from: data)
XCTAssertNotNil(teamIconByDecoder)
XCTAssertNotNil(teamIconByDecoder!.image34)
XCTAssertNotNil(teamIconByDecoder!.image44)
XCTAssertNotNil(teamIconByDecoder!.image68)
XCTAssertNotNil(teamIconByDecoder!.image88)
XCTAssertNotNil(teamIconByDecoder!.image102)
XCTAssertNotNil(teamIconByDecoder!.image132)
XCTAssertNotNil(teamIconByDecoder!.imageOriginal)
XCTAssertNotNil(teamIconByDecoder!.imageDefault)
let encoder = JSONEncoder()
let jsonData = try? encoder.encode(teamIconByDecoder!)
XCTAssertNotNil(jsonData)
let icon = try? JSONSerialization.jsonObject(with: jsonData!, options: []) as? [String: Any]
XCTAssertNotNil(icon)
let teamIconBySerialization = TeamIcon(icon: icon)
XCTAssertEqual(teamIconBySerialization.image34, teamIconByDecoder!.image34)
XCTAssertEqual(teamIconBySerialization.image44, teamIconByDecoder!.image44)
XCTAssertEqual(teamIconBySerialization.image68, teamIconByDecoder!.image68)
XCTAssertEqual(teamIconBySerialization.image88, teamIconByDecoder!.image88)
XCTAssertEqual(teamIconBySerialization.image102, teamIconByDecoder!.image102)
XCTAssertEqual(teamIconBySerialization.image132, teamIconByDecoder!.image132)
XCTAssertEqual(teamIconBySerialization.imageOriginal, teamIconByDecoder!.imageOriginal)
XCTAssertEqual(teamIconBySerialization.imageDefault, teamIconByDecoder!.imageDefault)
}
func testTopicCodable() {
let data = JSONData.topic
let decoder = JSONDecoder()
let topicByDecoder = try? decoder.decode(Topic.self, from: data)
XCTAssertNotNil(topicByDecoder)
XCTAssertNotNil(topicByDecoder!.value)
XCTAssertNotNil(topicByDecoder!.creator)
XCTAssertNotNil(topicByDecoder!.lastSet)
let encoder = JSONEncoder()
let jsonData = try? encoder.encode(topicByDecoder!)
XCTAssertNotNil(jsonData)
let topic = try? JSONSerialization.jsonObject(with: jsonData!, options: []) as? [String: Any]
XCTAssertNotNil(topic)
let topicBySerialization = Topic(topic: topic)
XCTAssertEqual(topicBySerialization.value, topicByDecoder!.value)
XCTAssertEqual(topicBySerialization.creator, topicByDecoder!.creator)
XCTAssertEqual(topicBySerialization.lastSet, topicByDecoder!.lastSet)
}
}
+4
View File
@@ -20,8 +20,12 @@ extension SKCoreTests {
("testUserGroup", testUserGroup),
("testActionCodable", testActionCodable),
("testAttachmentFieldCodable", testAttachmentFieldCodable),
("testCustomProfileFieldCodable", testCustomProfileFieldCodable),
("testDoNotDisturbStatusCodable", testDoNotDisturbStatusCodable),
("testEditedCodable", testEditedCodable),
("testReplyCodable", testReplyCodable),
("testTeamIconCodable", testTeamIconCodable),
("testTopicCodable", testTopicCodable),
]
}
+2 -2
View File
@@ -7,13 +7,13 @@
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>4.2.0</string>
<string>4.5.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.3.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
+22 -11
View File
@@ -19,7 +19,7 @@ jobs:
sdk: 'macosx'
configuration: 'Release'
xcWorkspacePath: 'SlackKit.xcodeproj/project.xcworkspace'
xcodeVersion: 'default'
xcodeVersion: '11'
- task: Xcode@5
inputs:
actions: 'test'
@@ -27,7 +27,7 @@ jobs:
sdk: 'macosx'
configuration: 'Debug'
xcWorkspacePath: 'SlackKit.xcodeproj/project.xcworkspace'
xcodeVersion: 'default'
xcodeVersion: '11'
- job: iOS
pool:
vmImage: 'macOS-10.14'
@@ -39,7 +39,7 @@ jobs:
sdk: 'iphoneos'
configuration: 'Release'
xcWorkspacePath: 'SlackKit.xcodeproj/project.xcworkspace'
xcodeVersion: 'default'
xcodeVersion: '11'
- task: Xcode@5
inputs:
actions: 'test'
@@ -47,7 +47,12 @@ jobs:
sdk: 'iphonesimulator'
configuration: 'Debug'
xcWorkspacePath: 'SlackKit.xcodeproj/project.xcworkspace'
xcodeVersion: 'default'
xcodeVersion: '11'
destinationPlatformOption: 'custom'
destinationPlatform: 'iOS'
destinationTypeOption: 'simulators'
destinationSimulators: 'iPhone 11 Pro,OS=13.0'
- job: tvOS
pool:
vmImage: 'macOS-10.14'
@@ -59,7 +64,7 @@ jobs:
sdk: 'appletvos'
configuration: 'Release'
xcWorkspacePath: 'SlackKit.xcodeproj/project.xcworkspace'
xcodeVersion: 'default'
xcodeVersion: '11'
- task: Xcode@5
inputs:
actions: 'test'
@@ -67,7 +72,11 @@ jobs:
sdk: 'appletvsimulator'
configuration: 'Debug'
xcWorkspacePath: 'SlackKit.xcodeproj/project.xcworkspace'
xcodeVersion: 'default'
xcodeVersion: '11'
destinationPlatformOption: 'custom'
destinationPlatform: 'tvOS'
destinationTypeOption: 'simulators'
destinationSimulators: 'Apple TV 4K,OS=13.0'
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
@@ -75,10 +84,12 @@ jobs:
- script: |
# Install Swift dependencies
sudo apt-get install clang libicu-dev
# Install Swift 4.2.1
curl https://swift.org/builds/swift-5.0-release/ubuntu1604/swift-5.0-RELEASE/swift-5.0-RELEASE-ubuntu16.04.tar.gz > $(Build.SourcesDirectory)/swift-5.0-RELEASE-ubuntu16.04.tar.gz
tar xzf swift-5.0-RELEASE-ubuntu16.04.tar.gz -C $(Build.SourcesDirectory)
# Install Swift 5.1.1
curl https://swift.org/builds/swift-5.1.1-release/ubuntu1604/swift-5.1.1-RELEASE/swift-5.1.1-RELEASE-ubuntu16.04.tar.gz > $(Build.SourcesDirectory)/swift-5.1.1-RELEASE-ubuntu16.04.tar.gz
tar xzf swift-5.1.1-RELEASE-ubuntu16.04.tar.gz -C $(Build.SourcesDirectory)
# Swift build
$(Build.SourcesDirectory)/swift-5.0-RELEASE-ubuntu16.04/usr/bin/swift build
$(Build.SourcesDirectory)/swift-5.1.1-RELEASE-ubuntu16.04/usr/bin/swift build
# Swift test
$(Build.SourcesDirectory)/swift-5.0-RELEASE-ubuntu16.04/usr/bin/swift test
$(Build.SourcesDirectory)/swift-5.1.1-RELEASE-ubuntu16.04/usr/bin/swift test