In software engineering, dependency injection is a technique in which an object receives other objects that it depends on. These other objects are called dependencies. In the typical “using” relationship the receiving object is called a client and the passed (that is, “injected“) object is called a service.
The code that passes the service to the client can be many kinds of things and is called the injector. Instead of the client specifying which service it will use, the injector tells the client what service to use. The “injection” refers to the passing of a dependency (a service) into the object (a client) that would use it.
material.io is a free, no trick, easy grab, palette tool that will allow you compose your color harmony for Android and iOS in a very simplistic way.
This website is based on Material Design, which is a design language developed by Google. Very popular across the board.
https://material.io/resources/color here you may find a large array of colors and easily generate primaryColor, primaryLightColor, primaryDarkColor, secondaryColor, primaryTextColor, etc.
On top of that, it will allow you to download straightaway a colors.xml or colors.xml file with all the constants well defined, which is pretty convenient. Ready to drop into your Android Studio or XCode project.
Conferences.digital is the best way to watch the latest and greatest videos from your favourite developer conferences for free on your Mac. Either search specifically for conferences, talks, speakers or topics or simply browse through the catalog – you can add talks to your watchlist to save for later, favourite or continue watching where you left off.
As soon as new conferences/talks have been added it will be announced on twitter.
Deep linking basically enables you to open an app from another app or a website while passing on parameters. This mechanism works with custom URL schemes which you can define in the .plist of your app.
Why deep linking?
If you have an app with lookup functionality (e.g. an app for finding song lyrics) you might want to perform a lookup without having to navigate to the designated screen and typing in the query. This can be achieved by opening the following example URL MyAppScheme://myAction=lookup&myQuery=What%20is%20the%20meaning%20of%20life in another app of the browser. In this case the app is programmed to read the ‘myAction’-parameter on startup to determine the action and the ‘myQuery’-parameter for the search query. Often, deep linking doesn’t go as planned and you might need to debug your app.
Why is debugging this difficult?
Deep linking might occur in three kinds of scenarios:
The app hasn’t been installed yet
The app is running in the background (or foreground for that matters)
The app is installed but not running at all
Scenario 1 is irrelevant in this case, so we’ll skip this one. Scenario 2 should be no problem since the app is running on the device (or simulator) while in a debug session. Scenario 3 requires you not to have the app running, but you need the debug session to be able to debug. This is a problem because Xcode starts the app automatically when starting a debug session. Instead of letting Xcode start the app, you want to do it yourself using the deep link URL.
So… tell me how to do this
There is a convenient option which enables you to start a debug session by manually starting the app. To achieve this, go to the ‘Edit scheme’ screen and tick the ‘Wait for MyApp.app to be launched manually’ option on in the ‘Run’ configuration.
Whenever you run the target in Xcode, the app doesn’t automatically starts and the debug session will only start when you manually start the app.
A singleton is a special kind of class where only one instance of the class exists for the current process. (In the case of an iOS app, the one instance is shared across the entire app.) Some examples in UIKit are [UIApplication sharedApplication] (which returns the sole instance of the application itself), and [NSFileManager defaultManager] (which returns the file manager instance). Singletons can be an easy way to share data and common methods across your entire app.
Rather than create instances of the singleton class using alloc/init, you’ll call a class method that will return the singleton object. You can name the class method anything, but common practice is to call it sharedName or defaultName.