
Hello, fellow front-end developers! Imagine a tool that’s not about punching in commands but a gateway to a world of coding artistry. That’s what the macOS Terminal became for me at Luxoft.
Developing for Apple desktop OS
Hello, fellow front-end developers! Imagine a tool that’s not about punching in commands but a gateway to a world of coding artistry. That’s what the macOS Terminal became for me at Luxoft.
Asynchronous programming is commonly employed for efficient implementation of network interactions in C++. The essence of this approach lies in the fact that the results of socket read/write functions are not immediately available but become accessible after some time. This approach allows for loading the processor with useful work during the wait for data. Various implementations of this approach exist, such as callbacks, actors, future/promise, coroutines. In C++, these implementations are available as libraries from third-party developers or can be implemented independently.
Coroutines are the most challenging to implement as they require writing platform-dependent code. However, the recent version of the C++ 20 language standard introduces support for coroutines at the compiler and standard library levels. Coroutines are functions that can suspend their execution, preserving their state, and later return to that state to resume the function's work. The compiler automatically creates a checkpoint with the coroutine's state.
For a comprehensive understanding of C++ 20 coroutines, refer to this article. Below, we examine a code example using coroutines and describe important points applied during implementation.
Command-line interfaces (CLI) are a common way to use applications. In iOS, we usually use scripting languages like Bash or Ruby to build those CLIs and automate mundane tasks. The most popular CLI for app signing and build automation is, without a doubt, Fastlane, which was initially written in Ruby. Fastlane is a great tool, convenient and fairly easy to use, and a lot of effort came into building it.
However, there's a great chance you considered moving away from Fastlane to avoid learning Ruby and to lower the entry threshold for your developers. Setting up a Ruby environment could be quite tedious and require additional devs' expertise to write and support those scripts.
Explore how to build your own command line tools with Swift in this article.
An example of using Electron + React JS and a native ffmpeg addon to access a webcamera
This guide may be helpful to someone who is trying to find a way
to work with Electron if they need to use a c++ library or code
I was looking for a more realistic example than a simple 'hello world' and i didn't succeed
Here are the links in advance:
- electron - https://github.com/khomin/electron_camera_ffmpeg
- addon - https://github.com/khomin/electron_ffmpeg_addon_camera
So let me share my experience...
At the very beginning of this year, Apple released the source code for macOS – Big Sur. It includes XNU, the kernel of the macOS operating system. A few years ago, PVS-Studio has already checked the kernel source code. It coincided with the analyzer release on macOS. It's been a while since then. The new kernel source code has been released. A second check? Why not?
struct Test<T>: Codable where T: Codable {
enum CodingKeys: String, CodingKey {
case value
}
let value: T
let info: String
}
extension Test {
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.value = try container.decode(T.self, forKey: .value)
self.info = "Default init(from decoder:)"
}
}
extension Test where T == String {
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.value = try container.decode(T.self, forKey: .value)
self.info = "Custom init(from decoder:)"
}
}
let data = #"{"value":"Hello, World!"}"#.data(using: .utf8)!
let object = try? JSONDecoder().decode(Test<String>.self, from: data)
print(object.debugDescription)
Optional(
Test<String>(
value: "Hello, World!",
info: "Default init(from decoder:)"
)
)
Last month, we announced the first preview builds of the next version of Microsoft Edge for Windows 10. Today, we are pleased to announce the availability of the Microsoft Edge Canary channel for macOS. You can now install preview builds from the Microsoft Edge Insider site for your macOS or Windows 10 PC, with more Windows version support coming soon.
With macOS Mojave, Apple introduced support for Hardened Runtime and Notary service. These two services are designed to improve application security on macOS. Recently Apple has stated:
“Beginning in macOS 10.14.5, all new or updated kernel extensions and all software from developers new to distributing with Developer ID must be notarized in order to run. In a future version of macOS, notarization will be required by default for all software.”