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
// | |
// OCXML.swift | |
// Created by Marco Arment on 9/23/24. | |
// | |
// Released into the public domain. Do whatever you'd like with this. | |
// No guarantees that it'll do anything, or do it correctly. Good luck! | |
// | |
import Foundation |
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
pushd ${ANDROID_HOME}/emulator | |
./emulator -list-avds | cat -n | |
printf "Select AVD: " | |
read index | |
avd=$(./emulator -list-avds | sed "${index}q;d") | |
echo "Selected $avd" | |
./emulator -netdelay none -netspeed full -avd $avd | |
popd |
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
// Author: SwiftUI-Lab (swiftui-lab.com) | |
// Description: this learning tool is designed to showcase the different | |
// Grid and GridRow view options, added in SwiftUI 2022. It is part of the | |
// blog article: https://swiftui-lab.com/eager-grids | |
// | |
import SwiftUI | |
import UniformTypeIdentifiers | |
// The root view of the application | |
struct ContentView: View { |
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
data class DownloadItem(val bytesDownloadedSoFar: Long = -1, val totalSizeBytes: Long = -1, val status: Int) | |
class DownloadProgressLiveData(private val application: Application, private val requestId: Long) : LiveData<DownloadItem>(), CoroutineScope { | |
private val downloadManager by lazy { | |
application.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager | |
} | |
private val job = Job() |
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 XCTest | |
import StoreKitTest | |
@available(iOS 14.0, *) | |
class SubscriptionTests: XCTestCase { | |
private var session: SKTestSession! | |
private var subscriptionsController: SubscriptionsController! | |
override func setUpWithError() throws { |
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
class LeakCheckTestCase: XCTestCase { | |
private var excludedProperties = [String: Any]() | |
private var weakReferences = NSMapTable<NSString, AnyObject>.weakToWeakObjects() | |
// MARK: - SetUp | |
override func setUpWithError() throws { | |
try super.setUpWithError() |
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
public abstract class BaseViewBindingFragment extends Fragment { | |
private Field bindingField; | |
private Method inflate; | |
{ | |
try { | |
for (Field declaredField : this.getClass().getDeclaredFields()) { | |
if (ViewBinding.class.isAssignableFrom(declaredField.getType())) { | |
bindingField = declaredField; |
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
// | |
// PasscodeKeychain.swift | |
// Example | |
// | |
// Created by Ricardo Pereira on 23/12/2016. | |
// Copyright © 2016 RP. All rights reserved. | |
// | |
import Foundation |
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 SwiftUI | |
import Combine | |
@propertyWrapper | |
@dynamicMemberLookup | |
public struct Transaction<Value>: DynamicProperty { | |
@State private var derived: Value | |
@Binding private var source: Value | |
fileprivate init(source: Binding<Value>) { |
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
Test Case '-[Ably_iOS_Tests.RestClientChannel publish__with_a_Message_object__publishes_the_message_and_invokes_callback_with_success]' started. | |
2020-07-09 14:46:17.273356+0100 xctest[31356:914686] DEBUG: (ARTAuth.m:163) RS:0x7fd39c9411a0 validating <ARTClientOptions: 0x7fd39c92d7f0> - | |
key: _tmp__nL2MA.1KbX9A:ooIOdVMRWxMziqOk; | |
token: (null); | |
authUrl: (null); | |
authMethod: GET; | |
hasAuthCallback: 0; | |
clientId: (null); | |
2020-07-09 14:46:17.280911+0100 xctest[31356:914686] DEBUG: (ARTAuth.m:169) RS:0x7fd39c9411a0 setting up auth method Basic (anonymous) | |
2020-07-09 14:46:17.281595+0100 xctest[31356:914686] DEBUG: (ARTRestChannel.m:129) RS:0x7fd39a7f2010 instantiating under 'test-5-CECA5948-5BF4-4FAC-8518-D7CBC2993F22-31356-00004E247C318640' |
NewerOlder