This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum ReceiptValidationError: Error { | |
case urlNotInitialized(string: String) | |
case urlResponseIsNil(data: Data?, error: Error?) | |
case wrongResponseJsonFormat(jsonObjectDescription: String) | |
case unacceptableVerificationStatus(Int) | |
case verificationStatusSuccessButNoReceiptFound(responseDescription: String) | |
} | |
struct ReceiptValidationAPI: ReceiptValidationAPIProtocol { | |
private let appSpecificSharedSecret: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSAlert+Error.swift | |
// | |
// Created by Oleksii Nezhyborets on 18.12.2024. | |
// | |
import AppKit | |
import Photos | |
@available(macOS 10.15, *) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error Domain: SKErrorDomain | |
Error Code: 0 | |
NSLocalizedDescription: An unknown error occurred | |
NSUnderlyingError: | |
Error Domain=ASDErrorDomain | |
Code=500 "(null)" | |
UserInfo = { | |
NSUnderlyingError=0x600000e20210 { | |
Error Domain=AMSErrorDomain | |
Code=305 "Purchase Failed Server canceled the purchase" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Localize.py - Incremental localization on XCode projects | |
# João Moreno 2009 | |
# http://joaomoreno.com/ | |
# Modified by Steve Streeting 2010 http://www.stevestreeting.com | |
# Changes | |
# - Use .strings files encoded as UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation Test1 { | |
NSString *stringProp; | |
} | |
- (instancetype)init { | |
self = [super init]; | |
if (self) { | |
[self test]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Inspectable corner radius for all UIViews | |
extension UIView { | |
@IBInspectable var cornerRadius: CGFloat { | |
get { | |
return layer.cornerRadius | |
} | |
set { | |
layer.cornerRadius = newValue | |
layer.masksToBounds = newValue > 0 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let controller = s.feedbackDisplayController, controller.feedbackFormShouldShow() { | |
let controller = FeedbackViewController(controlsAB: controller.controlsAB(), name: controller.userName) | |
controller.modalTransitionStyle = .crossDissolve | |
controller.modalPresentationStyle = .overCurrentContext | |
if s.presentingViewController != nil { | |
s.present(controller, animated: true, completion: nil) | |
} else { | |
s.parent?.present(controller, animated: true, completion: nil) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static func login(completion: (Result<(User, Bool)>) -> ()) { | |
let digits = Digits.sharedInstance() | |
let oauthSigning = DGTOAuthSigning(authConfig:digits.authConfig, authSession:digits.session()) | |
let authHeaders = oauthSigning.OAuthEchoHeadersToVerifyCredentials() | |
print(authHeaders) | |
UIPasteboard.generalPasteboard().string = authHeaders.description | |
guard let urlString = authHeaders[TWTROAuthEchoRequestURLStringKey] as? String else { | |
let error = ErrorGenerator.customErrorWithMessage("TWTROAuthEchoRequestURLStringKey not found in auth headers") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PushManager.swift | |
// Debts | |
// | |
// Created by Alexei on 13.04.15. | |
// Copyright (c) 2015 Onix. All rights reserved. | |
// | |
import UIKit | |
import AudioToolbox |