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
# The command below will delete all iOS 18.0 simulators you have. You can replace "18.0" with any version you prefer. | |
xcrun simctl list devices | sed -n '/-- iOS 18.0 --/,/^--/p' | grep -oE '[0-9A-F\-]{36}' | xargs -n 1 xcrun simctl delete | |
# You can use same command for watchOS and tvOS simulators. | |
xcrun simctl list devices | sed -n '/-- watchOS 11.0 --/,/^--/p' | grep -oE '[0-9A-F\-]{36}' | xargs -n 1 xcrun simctl delete |
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
import requests | |
import json | |
import csv | |
def get_reviews(app_id, jwt_token, fetch_all): | |
url = f"https://api.appstoreconnect.apple.com/v1/apps/{app_id}/customerReviews?limit=200&sort=-createdDate" | |
headers = { | |
"Authorization": f"Bearer {jwt_token}" | |
} |
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
import jwt | |
import time | |
def generate_token(key_id, issuer_id, private_key_path): | |
with open(private_key_path, 'r') as key_file: | |
private_key = key_file.read() | |
headers = { | |
"alg": "ES256", | |
"kid": key_id |
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
#!/bin/bash | |
# COLOR codes to use in logs | |
RED='\033[0;31m' | |
YELLOW='\033[1;33m' | |
GREEN='\033[0;32m' | |
BOLD='\033[1m' | |
NC='\033[0m' # No Color | |
# LOG tag of file |
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
house | leader | seat | |
---|---|---|---|
Stark | Jon Snow | Winterfell | |
Lannister | Cersei Lannister | Kings Landing | |
Targaryen | Daenerys Targaryen | Dragonstone | |
Greyjoy | Pyke | Euron Greyjoy |
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
[ | |
{ | |
"name": { | |
"common": "Bulgaria", | |
"official": "Republic of Bulgaria", | |
"nativeName": { | |
"bul": { | |
"official": "Република България", | |
"common": "България" | |
} |
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
import Foundation | |
class MockURL: URLProtocol { | |
static var requestHandler: ((URLRequest) throws -> (HTTPURLResponse, Data?))? | |
override class func canInit(with request: URLRequest) -> Bool { | |
// To check if this protocol can handle the given request. | |
return true |
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
import Foundation | |
/// This is a helper class for Unit Tests to load required response | |
class JSONTestHelper { | |
/// Reads local json file from test resources | |
/// - Parameter name: File name without extension | |
/// - Returns: Data represantation of file |
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
// For All countries | |
let serviceProvider: ServiceProvider<AllCountriesServices> = ServiceProvider<AllCountriesServices>() | |
serviceProvider.request(service: .all, decodeType: AllCountriesResponseModel.self) { result in | |
switch result { | |
case .success(let data): | |
print(data) | |
case .failure(let error): | |
print(error) |
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
import Foundation | |
// MARK: - CountryResponseModelElement | |
struct CountryResponseModelElement: Codable { | |
let name: Name? | |
let tld: [String]? | |
let cca2, ccn3, cca3, cioc: String? | |
let independent: Bool? | |
let status: String? | |
let unMember: Bool? |
NewerOlder