Tutorial by Examples: central

When working with multi-module projects, it is helpful to centralize dependencies in a single location rather than having them spread across many build files, especially for common libraries such as the Android support libraries and the Firebase libraries. One recommended way is to separate the Gra...
With this fundamental workflow model, a master branch contains all active development. Contributors will need to be especially sure they pull the latest changes before continuing development, for this branch will be changing rapidly. Everyone has access to this repo and can commit changes right to t...
Grand Central Dispatch works on the concept of "Dispatch Queues". A dispatch queue executes tasks you designate in the order which they are passed. There are three types of dispatch queues: Serial Dispatch Queues (aka private dispatch queues) execute one task at a time, in order. They a...
3.0 To run tasks on a dispatch queue, use the sync, async, and after methods. To dispatch a task to a queue asynchronously: let queue = DispatchQueue(label: "myQueueName") queue.async { //do something DispatchQueue.main.async { //this will be called in main t...
GCD will guarantee that your singleton only gets instantiated once, even if called from multiple threads. Insert this into any class for a singleton instance called shared. + (instancetype)shared { // Variable that will point to the singleton instance. The `static` // modifier makes it ...
You can define central config info's in a separate gradle include file Centralizing dependencies via "dependencies.gradle" file a stand alone properties file Versioning your builds via "version.properties" file or do it with root gradle.properties file the project structu...
What is Concurrency? Doing multiple things at the same time. Taking advantage of number of cores available in multicore CPUs. Running multiple programs in parallel. Objectives of Concurrency Running program in background without hogging CPU. Define Tasks, Define Rules and let...
Swift: var centralManager:CBCentralManager! centralManager = CBCentralManager(delegate: self, queue: nil) Objective C: @property (nonatomic, strong) CBCentralManager *centralManager; centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
Swift: var centralManager:CBCentralManager! centralManager = CBCentralManager(delegate: self, queue: nil, options: [CBCentralManagerOptionRestoreIdentifierKey : "com.companyname.appname.central"]) Objective C: @property (nonatomic, strong) CBCentralManager *centralManager; self....

Page 1 of 1