Sidecar vs Duet Display

Sidecar-vs-Duet-Display.jpg

While working at home I have a 27" screen attached to my laptop. That's why when I'm working outside home I'm left with much smaller screen real estate and it's really nice to add at least some of it with an iPad.

I'm using Duet Display probably for few years now, but at the recent WWDC Apple announced Sidecar - using your iPad as a secondary monitor, wirelessly.

I tried it on the Mac OS Catalina beta along with my iPad running iPadOS 13 beta but still returned (at least for now) back to Duet Display.

Here's my take on advantages and disadvantages of Sidecar in comparison to Duet Display.

Pros:

  • Works wirelessly (who needs wires anyway πŸ™‚)
  • Can be enabled with one click
  • No 3rd party installation required
  • First party solution - so works flawlessly (ignoring early Beta software bugs)
  • Doesn't drain your Mac's battery if you're on it
  • Touch-bar controls (if you're into that)
  • Free

Cons:

  • No touch events are passed - in Duet Display you can tap the screen and it would register them as mouse clicks. In sidecar this behavior is disabled. With Duet display you can draw with your finger or Apple Pencil right in Mac OS if needed (to sign documents, etc.) and with Duet Display Air and Pro extra purchases you get even more Apple Pencil functionality, transforming your iPad back into a tablet πŸ™‚ (not the entertainment device as it is but as a drawing Wacom-like tablet). Not a big deal for me personally, but decided to share
  • Resolution - and this is a big one for me. Sidecar provides less resolution (probably because wireless transmission bandwidth is limited) than Duet Display, thus the iPad fits less info, granted the info it fits is much bigger physically which can help reading smaller texts from far

So overall, Sidecar is a nice general-purpose feature which is free and easy to use. But at least for now the main issue for me is the lower resolution operation which leaves not enough physical space to put all the secondary (by value) apps onto the secondary screen. That may change, but for now I'll stick with Duet Display.

WWDC'19 Summary

This was a big one.

The dev conference started with a TV series announcement trailer πŸ˜‘

WWDC-2019

tvOS 13

  • PS4/Xbox One controller support
  • New wallpapers

watchOS 6

  • New watch faces
  • Hourly beeping sound
  • Audiobooks, voice memos, calculator
  • Independent standalone apps
  • Audio streaming API
  • Own App Store
  • Activity trends
  • Noise app to monitor noise pollution
  • Cycle tracking
  • Health summaries
  • New bands

iOS 13

  • Speed improvements
  • Dark mode
  • Improved Safari, Mail, Notes, Reminders
  • Improved Maps with Street View (SF only as usual?)
  • β€˜Just once’ location access option
  • Sign in with Apple - private social login
  • One-time email address generation
  • HomeKit secure video
  • iMessage avatar pictures
  • Enhanced Memoji with earrings, teeth, eyeshades, etc.
  • Memoji stickers
  • Improvements to photo capture and post-production
  • Rotate videos, filters and effects for videos
  • ML to remove photo dupes and choose the best of them
  • Improved Photos.app to remove clutter and let focus on important moments
  • AirPods reading and replying to messages
  • AirPods audio sharing
  • HomePod handoff
  • Siri live radio support with iHeartRadio, TuneIn, etc. 100k stations.
  • Updated CarPlay
  • CarPlay integration with 3rd party apps
  • Neural TTS - much better sounding Siri voice

iPadOS 1?

  • Much improved multitasking
  • Multi-window support for the same app
  • Improved Files.app
  • iCloud Drive folder sharing
  • SMB File sharing
  • Mass Storage Device support
  • External device support via usb-c
  • Desktop class browsing on Safari iPad
  • Download manager
  • Custom fonts
  • Working with text is now much easier
  • Apple Pencil latency down to 9ms from 20ms
  • New notes app
  • PencilKit

New Mac Pro

  • 28-core Xeon CPU
  • 12 DIMM slots
  • PCIe expansions
  • Special dual-core Vega II GPU
  • Custom designed video processing card
  • 1.4kW PSU
  • Optional wheels
  • New 6k, HDR, anti-reflective, 1000 nits display
  • Mac pro starts at $5999, new display at $3999/$4999

MacOS 10.15 Catalina

  • iTunes now broken down into Apple Music, Podcasts and Apple TV apps
  • iPhone sync moves to Finder
  • Podcasts will have content search
  • Apple TV 4k HDR playback on Mac
  • Sidecar - wireless connectivity tablets as second screens/tablets
  • Voice control
  • Improved find my Mac even when it’s offline
  • ScreenTime

Dev Tools

  • iPad apps migration tool to Mac
  • RealityKit - kit for building photorealistic scenes, includes 3d scene tools
  • ARKit3 with real-time people occlusion, motion capture
  • Real-world Minecraft
  • SwiftUI - new UI framework written in Swift - less code, live preview in sim and device (sic!)
  • Native UI framework for watchOS

It was probably the most packed WWDC I've seen. I hope all of the new stuff will be working reliably when it's out πŸ™‚

Fix AirPrint -9923 scanner error on MacOS Mojave

After upgrading to MacOS Mojave last autumn I actually had no problem using my Brother DCP-L2532DW via AirPrint. But everything changed when 10.14.3 rolled out few weeks ago.

AirPrint

My Mac did see the printer on the network but when I tried to scan it gave me the -9923 error and obviously nothing happened afterwards.

The solution was actually simple: to turn off IPv6 in my printer's settings, switching it to IPv4 only. If your printer doesn't have settings, try adjusting your router's settings to disable IPv6 and have each wireless devices (including the printer) to obtain an IPv4-only IP address.

Now I wonder when IPv6 becomes reliable enough for regular household items πŸ™‚

How to merge mp3s on Mac

In case you have a bunch of mp3 files (chapters of an audiobook for example) which you want to merge and keep or listen as a single file here's a quick hint for you:

  1. First you open Terminal and cd to the folder with files
  2. Then you just type `cat file1.mp3 file2.mp3 file3.mp3 > outputfile.mp3' and hit Enter!

Merge-mp3

You will get a big mp3 file which unfortunately will have an incorrect duration from the first file of the batch. But you can easily fix that with ffmpeg or other utilities. I prefer a small GUI apps without installing any other libraries. My app of choice is the MP3 Scan + Repair App. You just open the merged mp3 file with it and push the wrench/fix button. That's about it!

Mac Safari YouTube picture in picture

If you're using Safari on the Mac and you like watching YouTube (who doesn't), you can watch your videos in a floating window by using Mac OS's picture in picture mode.

Safari-PIP

To do so, open any Youtube video, double right click on it and select 'Enter Picture in Picture':
Safari-PIP2

That's it! Now you can move away your Safari window and enjoy your videos over other apps.

Easier to recommend before

As I recently mentioned in my iPhone portrait and camera zoom posts, previously it was easier to recommend Apple products to people around me.

I've touched this topic few days ago by saying how for many years I was amazed and blown away buy the sheer technical accomplishments Apple was able to achieve.

MacBook
I remember the days of the Sony Vaio laptop series, how it had the thinnest, lightest and most powerful Windows devices at the time. And when I learned about Apple's MacBooks which were even more slick, powerful and compact I couldn't wrap my head around on how that was even possible. Being a teenager at that time I was very lucky to get a white polycarbonate MacBook as a gift from my dad. And that was truly an exceptional device for that time, far ahead of the competition in every imaginable manner.

iPod-nano-2
But my first actual Apple device I got a year before my first MacBook. It was an iPod Nano 2g with 2GB of ram which was leaps and bounds better than my iRiver mp3 player that it replaced. The iPod was so thin and so well built and so comfortable to use with the click wheel, I to this day wonder how two similar but so different (iRiver and iPod) products could exist at the same time. The difference and superiority of the iPod was uncanny.

MacBook -unibody
After my first MacBook in few years I again was lucky to upgrade it to the first unibody aluminum MacBook Pro. It was such a huge upgrade in terms of look and feel and it pushed the MacBook so far away, since not any other competitor could match the quality even of the previous white MacBook, and this new device with a chassis milled from a single piece of aluminum was just lightyears ahead of anything on the market.

iPhone-3g
And then came the original iPhone. First, I was like 'eww, it can only run 1 app at a time when my Nokia can hold 32 apps in the background no problem'. But then, when the iPhone 3G came I finally understood how good that 1 app at a time were. At that time, I was already using one of the Sony-Ericsson smartphones with a stylus and the transition to using a phone with your finger went incredibly smooth. Since the iPhone 3G I owned each version of it, since all the internal (not always the external) upgrades were compelling to push me for the latest version each year.

Both the MacBook and the iPhone was a pain to use in an environment of Windows computers and smart and dumb phones of that time. On Mac OS I had problems printing, working with office documents, working with network devices. On the iPhone I couldn't send anyone files via Bluetooth, I didn't have MMS for a while, first few iPhones had to be unlocked via a proxy sim card to work outside of US.

But all of that was worth it for what you were getting. On the MacBook there were no viruses on Mac OS (still almost virus-free), it had a stellar trackpad (still the best among all laptops), long battery life, insane build quality. The iPhone was just an all-screen device, with one of the best cameras since the 3GS era and most importantly it had a fluid intuitive UI and new, best, innovative 3rd party apps when the App Store launched in 2008.

Though the years under Steve Jobs Apple kept innovating and being far ahead of the competition in many aspects: great hardware and software design, build quality and materials, newest technologies, seamless ecosystem and hardware+software integration, first platform of choice for desktop and mobile developers. But I guess it's hard to keep the lead forever. This is why in my opinion Apple gradually lost a few of their advantages to the competitors and this is why it's now harder to recommend their products anymore.

Microsoft Surface

Yesterday I was listening to the latest episode of ATP where one of the hosts discussed what he saw on his recent flight.

The host as many of the Apple customers has few different devices in each category. And him being an independent developer he tries doing work on the go. That's where to his flight he brought his MacBook Pro which he uses for development and his iPad Pro that he uses for everything else. And this is a real case: you can't code not on an iPad because Xcode requires a proper desktop OS, in this case Mac OS. But doing everything outside coding is more often better doing on an iPad (or tablets in general, but since Android tablets are essentially non-existent, I'm using the most successful tablet for reference).

For the flight the host took an almost $3k spec'd MacBook Pro and the most current generation bezel-less $1300 iPad Pro. And what he was doing with them? As most developers do - coding on the Mac and browsing and reading Twitter on the iPad, because the former is limited to Mac OS and requires typing via a proper keyboard and the latter is done so much better via touch on an all-screen device.

From the host's story he saw a guy next to him using a Microsoft Surface Pro or Go. And that guy used it for a while like a laptop, then flipped the keyboard and used it like a tablet, adding some pen input from the stylus. And all of that in one convertible device with a touchscreen, which starts from $500 for the Go up to only $1500 for the Pro. Whereas if you're in the Mac ecosystem, you would have to have to pay 2x-3x more and struggle with two separate devices, charging and managing them separately, etc. Even if Apple is building something for a bright future, Microsoft actually delivers something already.

I've played with the Surface lineup few times and was amazed how well built the devices are and how well-thought, well-designed and sturdy their stand mechanism is. Yes, they might not have USB-C sometimes at all, so they're less future-proof, but they are well equipped for now and who knows when. I'm in the USB-C (aka dongle) world for two years already and the transition to it is painfully slow, albeit faster than before the USB-C push from Apple with their latest laptop lineups.

Another situation was when we went to our friends and one of them was swiping pictures on her laptop. My wife was blown away with a touch screen on a laptop, since she has been surrounded with non-touch MacBooks all the time. And although a laptop with a touchscreen looks like a mess from all of those fingerprints, people actually enjoy using them, the same as everyone does enjoy using their smartphones despite them being covered with skin oil πŸ™‚

Sometimes it feels stronger than ever that Apple lives in their own universe where people use what Apple thinks is best and not what people actually enjoy and understand using. On one hand Apple brought the touchscreens into the masses, but on the other they refuse bringing them to the laptops despite people nowadays trying to touch each screen by default and then revert to physical controls. Having an iPad in Apple's lineup helps but its OS still is very limited to let the iPad replace traditional computers.

Speaking of OSes, for me having Windows on the Surface is the big downside. I worked with both Mac OS and Windows for years and Mac OS is so much better for work. Although I would admit, with Apple's major focus on the iPhone and iOS, Mac OS becomes more and more overlooked overtime with clumsy bugs creeping in over and over again. I wish we would get a touch-based Mac OS device or a major improvement in iOS's productivity, so Apple users would be also able to get a one for all device in the nearest future. And I hope Apple's direction is not just towards the PC market at all.

Setting up Fastlane for mobile automatization on Mac OS

Fastlane is used to automatize different routines in mobile development. In this note (or serious of notes) I'll describe how to use Fastlane to automize your iOS project builds and uploads to TestFlight.

You start by installing latest Xcode tools
xcode-select --install

Next, you install Fastlane via RubyGems
sudo gem install fastlane -NV

or via brew
brew cask install fastlane

Then cd to your project and initialize Fastlane:
fastlane init

Last, edit fastlane/Fastfile to this:

platform :ios do

  before_all do
    ENV["FASTLANE_DONT_STORE_PASSWORD"] = "1"
    ENV["FASTLANE_USER"] = "<Your App Store Connect email"
  end

  desc "Build and upload to TestFlight"
  lane :beta do
        build_app(scheme: "<Your project's scheme>",
                      workspace: "<Your project's>.xcworkspace",
                  include_bitcode: true)
        upload_to_testflight
  end
end

If you want to store your password in the Keychain, just remove ENV["FASTLANE_DONT_STORE_PASSWORD"] = "1"

If you want to store your password in the Fastfile, add ENV["FASTLANE_PASSWORD"] = "<yourPassword>" into the before_all do / end section.

Now run 'fastlane beta' in your Terminal and enjoy an automatic build and upload to TestFlight πŸ™‚

You can use this manual on your own computer. For running it on a remote machine look out for part 2 of this series.

Autostart scripts and services on Mac OS with launchd

When it comes to autostarting custom scripts/services after booting your Mac, adding stuff to start with your system on Mac OS might now be always possible via System Preferences.app -> Users & Groups -> Login Items. [1]

So in order to make your script or service to launch on start, follow my example on running a DynDNS service on boot and each 5 minutes afterwards.

First start by creating a shell script that launches your service. In my case that's a script that curl's a specific url with parameters of my current IP to assign it to the domain I'm using:
nano ~/Documents/dyndns.sh

with:

IP=$(curl ifconfig.co)
curl "https://dynamicdns.park-your-domain.com/update?host=@&domain=example.com&$

Next I create a system service plist:
nano /Library/LaunchDaemons/dyndns.plist

And enter the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
        <dict>
                <key>Label</key>
                <string>com.igor.dyndns</string>
                <key>ProgramArguments</key>
                <array>
                <string>/bin/sh</string>
                <string>/Users/igor/Documents/dyndns.sh</string>
                </array>
                <key>RunAtLoad</key>
                <true/>
                <key>StartInterval</key>
                <integer>300</integer>
        </dict>
</plist>

You can avoid the StartInterval key if what you need is just to load on start. You also might label your service something else than com.igor.dyndns

If you're launching your service via shell or you just have a shell script, you'll have to add the absolute path to it via <string>/bin/sh</string> followed by the absolute path to your script within <key>ProgramArguments</key>. If you're not using shell, you just have to specify what you're launching using absolute paths.

My personal recommendation is to specify one launch script here and enter eveything what needs to be launched to that script and not to the plist itself.

Last step is to load your custom service to launchd via:
sudo launchctl load -w /Library/LaunchDaemons/dyndns.plist


  1. Since we're here, you can visit these settings in order to remove something unwanted from your startup which might got there without your consent and might actually slow down your system startup β†©οΈŽ

How to use PPTP VPN on Mac OS Sierra and later

In iOS 10 and Mac OS Sierra Apple removed support for PPTP VPNs from their major OSes and technically had the right for it since PPTP is not secure and outdated. But in case you still have the need to connect to a VPN that works only via PPTP and you're rocking Mac OS Sierra or later you're out of luck. Unless you try using Shimo or Flow VPN which both for me didn't work at all, you're really out of luck πŸ™‚

Thankfully guys at Apple removed only the GUI part of the PPTP client, and you still can use the pppd daemon throught Terminal. But before that you'll have to create a configuration first:
sudo nano /etc/ppp/peers/vpn.example.com

Next, fill it with this info, replacing vpn info with yours:

plugin PPTP.ppp
noauth
# logfile /tmp/ppp.log
remoteaddress "vpn.example.com"
user "username"
password "password"
redialcount 1
redialtimer 5
idle 1800
# mru 1368
# mtu 1368
receive-all
novj 0:0
ipcp-accept-local
ipcp-accept-remote
# noauth
refuse-eap
refuse-pap
refuse-chap
refuse-chap-md5
refuse-mschap
hide-password
mppe-stateless
mppe-128
# require-mppe-128
looplocal
nodetach
# ms-dns 8.8.8.8
usepeerdns
# ipparam gwvpn
defaultroute
debug

Save the file and then start your connection via:
sudo pppd call vpn.example.com

To stop the deamon, close the Terminal with the PPTP session, open a new one and enter:
sudo killall pppd