diff --git a/.gitignore b/.gitignore index 9ba158c..b2e72f3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ xcuserdata/ *.moved-aside *.xccheckout *.xcscmblueprint +.DS_Store \ No newline at end of file diff --git a/Xendit.framework/Headers/IDFAHelper.h b/Xendit.framework/Headers/IDFAHelper.h new file mode 100644 index 0000000..6ef3ef3 --- /dev/null +++ b/Xendit.framework/Headers/IDFAHelper.h @@ -0,0 +1,14 @@ +// +// IDFAHelper.h +// Xendit +// +// Created by Vladimir Lyukov on 22/11/2018. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +NSString * _Nullable XENweakGetIDFA(void); + +NS_ASSUME_NONNULL_END diff --git a/Xendit.framework/Headers/ISHLogDNAService.h b/Xendit.framework/Headers/ISHLogDNAService.h new file mode 100644 index 0000000..f6b6602 --- /dev/null +++ b/Xendit.framework/Headers/ISHLogDNAService.h @@ -0,0 +1,158 @@ +// +// ISHLogDNAService.h +// ISHLogDNA +// +// Created by Felix Lamouroux on 13.06.17. +// Copyright © 2017 iosphere. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Default Meta Keys + +extern NSString * const ISHLogDNAServiceKeyBundleShortVersion; +extern NSString * const ISHLogDNAServiceKeyBundleVersion; +extern NSString * const ISHLogDNAServiceKeyErrorCode; +extern NSString * const ISHLogDNAServiceKeyErrorDescription; +extern NSString * const ISHLogDNAServiceKeyErrorDomain; +extern NSString * const ISHLogDNAServiceKeyModelName; +extern NSString * const ISHLogDNAServiceKeySystemVersion; +extern NSString * const ISHLogDNAServiceKeyUnderlyingError; + +#pragma mark - Log Levels + +typedef NS_ENUM(NSUInteger, ISHLogDNALevel) { + ISHLogDNALevelDebug, + ISHLogDNALevelInfo, + ISHLogDNALevelWarn, + ISHLogDNALevelError, + ISHLogDNALevelFatal, +}; + +#pragma mark - Message + +/** + * A log message can be sent to LogDNA via the ISHLogDNAService. + */ +@interface ISHLogDNAMessage : NSObject + +/** + * The line that will be logged. + */ +@property (nonatomic, readonly) NSString *line; + +/** + * The timestamp of the creation of the message object. + */ +@property (nonatomic, readonly) NSDate *timestamp; + +/** + * Meta data associated with the message. Contains user-defined + * entries and entries added by `messageWithLine:level:meta:`. + * + * @sa messageWithLine:level:meta: + */ +@property (nonatomic, readonly) NSDictionary *meta; + +/** + * The log level used for this message. + */ +@property (nonatomic, readonly) ISHLogDNALevel level; + +/** + * Create messages using this constructor. + * + * @param line The message line should not be empty. + * @param level The log level of this message. + * @param meta The optional meta field must be encodable into JSON using NSJSONSerialization. + * + * @return An immutable timestamped message to be logged via the ISHLogDNAService. + * + * @note You have to provide a consistent type per key across all messages' meta fields. + * If inconsistent value types are used, that line's metadata will not be parsed. + * For example, if a line is passed with a meta object, such as meta.myfield of type + * String, any subsequent lines with meta.myfield must have a String as its value type + * for meta.myfield. + * + * This method will add the bundle's version (build number), short version, operating + * system version, and model identifer to meta automatically, but will never overwrite + * the given meta information if keys overlap. + * + * Use the following keys to overwrite the respective information: + * + * * ISHLogDNAServiceKeyBundleShortVersion + * * ISHLogDNAServiceKeyBundleVersion + * * ISHLogDNAServiceKeyModelName + * * ISHLogDNAServiceKeySystemVersion + * + */ ++ (instancetype)messageWithLine:(NSString *)line level:(ISHLogDNALevel)level meta:(nullable NSDictionary *)meta; + +/** + * Helper method to create meta entries from the given error. + * + * Will set ISHLogDNAServiceKeyErrorDescription, ISHLogDNAServiceKeyErrorCode, and + * ISHLogDNAServiceKeyErrorDomain, if available. + * + * Will add the same information for the recursive underlying errors + * (via ISHLogDNAServiceKeyUnderlyingError), if present. + * + * Will return an empty dictionary if the error parameter was nil. + */ ++ (NSDictionary *)metaDictionaryWithError:(nullable NSError *)error; + +/** + * @sa messageWithLine:level:meta: + */ +- (instancetype)init NS_UNAVAILABLE; + +/** + * @sa messageWithLine:level:meta: + */ ++ (instancetype)new NS_UNAVAILABLE; + +@end + +#pragma mark - Service + +/** + * This service provides remote logging methods via LogDNA. + * + * Make sure to call +[ISHLogDNAService setupWithIngestionKey:hostName:appName:] + * before using any logging methods. + */ +@interface ISHLogDNAService : NSObject + +/** + * Setup the ISHLogDNAService. Must be called before logging any messages. + */ ++ (instancetype)setupWithIngestionKey:(NSString *)key hostName:(NSString *)host appName:(NSString *)appName; + +/** + * Sends an array of log messages to LogDNA. Make sure to setup the service before calling this method. + */ ++ (void)logMessages:(NSArray *)messages; + +/** + * Log messages are only sent to the server if the service is enabled and will silently be ignored otherwise. + * + * The default value is set to the user's advertising preferences, if AdSupport is available. Defaults to `NO` + * on other platforms. + */ +@property (class, nonatomic) BOOL enabled; + +/** + * @sa setupWithIngestionKey:hostName:appName: + */ +- (instancetype)init NS_UNAVAILABLE; + +/** + * @sa setupWithIngestionKey:hostName:appName: + */ ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Xendit.framework/Headers/Xendit-Swift.h b/Xendit.framework/Headers/Xendit-Swift.h index c655fab..a233179 100644 --- a/Xendit.framework/Headers/Xendit-Swift.h +++ b/Xendit.framework/Headers/Xendit-Swift.h @@ -1,4 +1,4 @@ -// Generated by Apple Swift version 4.2 effective-3.4 (swiftlang-1000.11.37.1 clang-1000.11.45.1) +// Generated by Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" @@ -202,6 +202,8 @@ SWIFT_CLASS_NAMED("CardData") @property (nonatomic, strong) NSNumber * _Null_unspecified amount; @property (nonatomic) BOOL isMultipleUse; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@property (nonatomic, readonly, copy) NSString * _Nonnull maskedNumber; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @@ -250,6 +252,8 @@ SWIFT_CLASS_NAMED("XenditAuthentication") + + SWIFT_CLASS_NAMED("XenditCCToken") @interface XENCCToken : NSObject @property (nonatomic, copy) NSString * _Null_unspecified tokenID; @@ -263,15 +267,25 @@ SWIFT_CLASS_NAMED("XenditCCToken") + + SWIFT_CLASS_NAMED("XenditError") @interface XENError : NSObject @property (nonatomic, copy) NSString * _Null_unspecified errorCode; @property (nonatomic, copy) NSString * _Null_unspecified message; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end +typedef SWIFT_ENUM_NAMED(NSUInteger, XENLogLevel, "XenditLogLevel", closed) { + XENLogLevelVerbose = 0, + XENLogLevelInfo = 1, + XENLogLevelWarning = 2, + XENLogLevelError = 3, +}; + #if __has_attribute(external_source_symbol) # pragma clang attribute pop #endif diff --git a/Xendit.framework/Headers/Xendit.h b/Xendit.framework/Headers/Xendit.h index b66e4ac..3e965c5 100755 --- a/Xendit.framework/Headers/Xendit.h +++ b/Xendit.framework/Headers/Xendit.h @@ -7,6 +7,8 @@ // #import +#import "ISHLogDNAService.h" +#import "IDFAHelper.h" //! Project version number for Xendit. FOUNDATION_EXPORT double XenditVersionNumber; diff --git a/Xendit.framework/Info.plist b/Xendit.framework/Info.plist index b5b9c9f..efb7a7f 100644 Binary files a/Xendit.framework/Info.plist and b/Xendit.framework/Info.plist differ diff --git a/Xendit.framework/LICENSE b/Xendit.framework/LICENSE new file mode 100644 index 0000000..d7c38e0 --- /dev/null +++ b/Xendit.framework/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 iosphere GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftdoc b/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftdoc index cb511b0..38627af 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftdoc and b/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftdoc differ diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftmodule b/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftmodule index 8a7c6eb..90fe81f 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftmodule and b/Xendit.framework/Modules/Xendit.swiftmodule/arm.swiftmodule differ diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftdoc b/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftdoc index 87d0e6d..b8f227b 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftdoc and b/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftdoc differ diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftmodule b/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftmodule index 7558ebb..6fa63fa 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftmodule and b/Xendit.framework/Modules/Xendit.swiftmodule/arm64.swiftmodule differ diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftdoc b/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftdoc index 71d984b..ef0a970 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftdoc and b/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftdoc differ diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftmodule b/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftmodule index 4d18385..736410c 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftmodule and b/Xendit.framework/Modules/Xendit.swiftmodule/i386.swiftmodule differ diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftdoc b/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftdoc index e078b6f..d44d38c 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftdoc and b/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftdoc differ diff --git a/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftmodule b/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftmodule index bc02970..885ad06 100644 Binary files a/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftmodule and b/Xendit.framework/Modules/Xendit.swiftmodule/x86_64.swiftmodule differ diff --git a/Xendit.framework/Xendit b/Xendit.framework/Xendit index 56da7fa..25d49a4 100755 Binary files a/Xendit.framework/Xendit and b/Xendit.framework/Xendit differ diff --git a/Xendit.podspec b/Xendit.podspec index 87f5e1a..f492d96 100644 --- a/Xendit.podspec +++ b/Xendit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Xendit" - s.version = "1.2.2" + s.version = "2.0.0" s.summary = "Xendit makes it easy to collect credit card data securely without it having to touch your server" s.homepage = "https://www.xendit.co" s.license = "MIT"