View AppDelegate.swift
This file contains 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
@UIApplicationMain | |
@objc class AppDelegate: FlutterAppDelegate { | |
var socketChannel: SocketChannel! | |
override func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
GeneratedPluginRegistrant.register(with: self) | |
socketChannel = SocketChannel(window) | |
View RunScript
This file contains 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
cd "$SRCROOT/KotlinSharedNetwork-android" | |
./gradlew :SharedNetwork:packForXCode -PXCODE_CONFIGURATION=${CONFIGURATION} -Pkotlin.device="$KOTLIN_DEVICE" |
View build.gradle
This file contains 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
targets { | |
// Read the "kotlin.device" variable passed by Xcode | |
def isSim = findProperty("kotlin.device") == "iosSim" | |
// Apply the preset according to the device | |
def iosPreset = isSim ? presets.iosX64 : presets.iosArm64 | |
fromPreset(iosPreset, 'iOS') { | |
binaries { | |
framework('SharedNetwork') |
View gist:0834c49e791a3b7269586ca8efbf8058
This file contains 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
def rx_swift | |
pod 'RxSwift', '~> 4.4' | |
end | |
target 'RKProfile' do | |
use_frameworks! | |
workspace 'REKAB' | |
project 'RKProfile/RKProfile.xcodeproj' | |
rx_swift |
View StoryboardInitializable.swift
This file contains 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 UIKit | |
public protocol StoryboardInitializable { | |
static var storyboardIdentifier: String { get } | |
} | |
public extension StoryboardInitializable where Self: UIViewController { | |
public static var storyboardIdentifier: String { | |
return String(describing: Self.self) | |
} |
View CustomRxVar.swift
This file contains 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 var rx_startLoading: AnyObserver<Bool> { | |
return Binder(self, binding: { [weak self] (view, visible) in | |
self?.showLoaingLayer(show: visible) | |
}).asObserver() | |
} |
View BehaviorRelayExample.swift
This file contains 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
var postList = BehaviorRelay<[Post]?>(value: nil) | |
postList.bindTo(to: showList).disposed(by: bag) |
View didSet.swift
This file contains 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
var isLoading: Bool = false { | |
didSet { | |
showLoading() | |
} | |
} |
View actual.kt
This file contains 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 kotlin.coroutines.* | |
import kotlinx.coroutines.* | |
import platform.darwin.* | |
internal actual val dispatcher: CoroutineDispatcher = NsQueueDispatcher(dispatch_get_main_queue()) | |
internal class NsQueueDispatcher(private val dispatchQueue: dispatch_queue_t) : CoroutineDispatcher() { | |
override fun dispatch(context: CoroutineContext, block: Runnable) { | |
dispatch_async(dispatchQueue) { | |
block.run() |
NewerOlder