1 Combine basics Combine is a declarative, reactive framework for processing asynchronous events over time. It aims to solve existing problems, like unifying tools for asynchronous programming, dealing with mutable state and making error handling a starting team player. Combine revolves around three main types: publishers to emit events over time, operators to asynchronously process… Continue reading Combine Asynchronous Programming
Category: Mobile
MongoDB on Mac
1.What’s MongoDB? MongoDB is a document database which belongs to a family of databases called NoSQL - not only SQL. In MongoDB, records are documents which behave a lot like JSON objects in JavaScript. Values in documents can be looked up by their field’s key. Documents can have some fields/keys and not others, which makes… Continue reading MongoDB on Mac
Python3 Virtualenv Setup
Install python3 brew install python3 Pip3 is installed with Python3 Upgrade virtualenv To install virtualenv via pip run: pip install --upgrade virtualenv Create virtualenv virtualenv -p python3 python3-venv Activate the virtualenv source python3-venv/bin/activate Deactivate the virtualenv deactivate
Xcode instruments
 The two columns worth noting in Instruments are # Persistent and # Transient. The Persistent column keeps a count of the number of objects of each type that currently exist in memory. The Transient column shows the number of objects that have existed but have since been deallocated. Persistent objects are using up memory,… Continue reading Xcode instruments
Views vs. layers
A layer is a simple model class that exposes a number of properties to represents some image-based content. Every UIView is backed by a layer, so you can think of layers as the lower-level behind the scenes class behind your content. A layer is different from a view (with respect to animations) for the following… Continue reading Views vs. layers
Xcode tips and ticks
Faster Testing When using TDD you can work more quickly by running a subset of tests – press ⌃⌥⌘G to re-run only your last test, or ⌘-click several tests to run only them. Opening Xcode If you’re in a folder that has both a workspace and a project, use xed . to open the workspace… Continue reading Xcode tips and ticks
Intermediate iOS Debugging
1. Stop when exception 1.1 Open Breakpoint navigator (Cmd + 8) 1.2 Add Exception Breakpoint  1.3 Keep default values  1.4 Move breakpoint to User level  2. Edit breakpoint Edit Breakpoint  Add Debugger Command:  We will see the following output: 7.89903245455977 7.890427382096 7.87502883137136 7.87004694731339 or Add Log Message  ScreensFromBottom: @screensFromBottom@… Continue reading Intermediate iOS Debugging
Key-Value Observing
Key-value observing is a mechanism that allows objects to be notified of changes to specified properties of other objects. You can use key-value observing with a Swift class, as long as the class inherits from the NSObject class. You can use these two steps to implement key-value observing in Swift. Add the dynamic modifier and… Continue reading Key-Value Observing
How to upload an App with universal framework to AppStore?
Cocoapods is a popular dependencies management tool for iOS development. We notice that in Cocoapods-v1.3, the framework MUST include simulator (x86_64, i386) architectures, otherwise the pod spec lint will fail and the pod cannot be uploaded to Cocoapods server. It shows error as follows: xcodebuild: fatal error: lipo: -remove's specified would result in an empty… Continue reading How to upload an App with universal framework to AppStore?
Cocoapod tips
check installed cocoapod plugin gem list --local | grep cocoapods create pod pod spec create POD_NAME https://eladnava.com/publish-a-universal-binary-ios-framework-in-swift-using-cocoapods/ Register an account by running the following, entering your full name and e-mail address: pod trunk register you@email.com 'Full Name' create pod demo pod lib create SwiftKit pod spec lint --verbose ...... pod trunk push SwiftKit.podspec https://s3.amazonaws.com/elasticbeanstalk-us-east-1-564874457370/SwiftKit.zip check… Continue reading Cocoapod tips