Mac – Cocoanetics https://www.cocoanetics.com Our DNA is written in Swift Thu, 03 Oct 2019 09:16:30 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.3 39982308 Old and New https://www.cocoanetics.com/2019/10/old-and-new/ https://www.cocoanetics.com/2019/10/old-and-new/#respond Thu, 03 Oct 2019 09:16:30 +0000 https://www.cocoanetics.com/?p=10623 I know, I know, I cannot seem to find any time to reasonably blog about my life as developer. Nevertheless here are a few tidbits of late.

Mac Mini Time Machine replaces Time Capsule

For a long time I had an older generation Apple Time Capsule (1TB) for my backups, but it became more or less useless to me when a full backup of just one of my machines takes 75% of the capacity. A year ago, I had migrated all my WiFi to a Ubiquity setup with 3 Hotspots positioned throughout the house and one on the roof for some outdoor coverage. That had made the WiFi coming out of Time Capsule obsolete.

Then I bought a new Mac Mini (2018) which Apple finally refreshed after a very long time. I kept the Time Capsule and used a USB-connected 4 TB external HDD as backup destination. But that didn’t work so well, that I didn’t even enable backups when I moved to a newer iMac and my girlfriend got my previous one.

So yesterday, I finally decided to remove the Time Capsule from my network and instead plug the external HDD into the Mac Mini. Naturally, the USB 3 is much faster than USB 1 on the Time Capsule. And of course having Gigabit-Ethernet connecting them, increases throughput by another order of magnitude.

In order to see the backup drive on other machines you need to share the volume/folder as a time machine destination.

Share as a Time Machine backup destination

I kept getting an error about permissions, even though I had given the user read and write permissions in the sharing dialog. But then I remembered, since this was a previously used drive, I also needed to adjust the file system permissions. The administrators’ group also needed to be able to read/write.

Fix File Permissions

I had disabled my iMac’s wired ethernet connection to test something and because of this the first backup was still going on the next morning. But as soon as I re-enabled the cable connection, the backup speed increased dramatically. Which makes sense, the WiFi Connection is reported as 54 Mbit/s, whereas the Ethernet can do 1 Gbit/s – a factor of 18x faster.

That is, theoretic maximum throughput. So what was the actual transfer speed?

With the free Blackmagic Disk Speed Test I measured the writing from MacMini to the external HDD at 75 MB/s, that would be 600 Mbit/s. When I ran the same speed test from my iMac via network, I got a writing speed of around 100 MB/s, which is very odd: why would it write faster oder the network than when directly connected?!

I didn’t test the speed of the USB connection of the Time Capsule, but I found that somebody had gotten 44 MB/s for the internal drive and and 11 MB/s for an external USB drive. Connecting the external USB 3 HDD to the Mac mini as opposed to the Time Capsule increased my backup speed about 7x. No wonder that backups would be so painfully slow with this USB bottleneck.

Those old Radars

After many years of campaigning against the infamous Radar Web, Apple introduced Feedback Assistant for Developers (in June 2019) a new web app and also native Mac app. This app apparently is now preinstalled in macOS 10.14 or higher.

It basically works somewhat similar to the previous Radar web app, but feels fresher and more friendly. During the beta phase of iOS 13 I filed a few bug reports and was pleased to see that there seems to be much more responsiveness in the new system. It feels more like a dialog with Apple now, as opposed to the prior Radar black hole. One – probably automated – kind of response would be to check the problem again with a newly released updated version of Xcode.

Mixed into your inbox you’ll also find a couple of Announcements pertaining to release notes or a new beta program. Then there’s a Sent Folder which contains copies of all Radars I filed for the past 11 years.

Bildschirmfoto 2019 10 03 um 09 07 49

For a while it was not possible to download attachments we had uploaded. So if I had meticulously crafted an app to reproduce an issue, I had no way to download it. Apple fixed that at the end of August 2019 for the web version. I’m still unable to download anything via the Mac app.

But the thing that delighted me yesterday was receiving this – again automated – response to one of my oldest open Radars, one from July 2012. The original Radar had been closed as duplicate of another one, but the copy of it in Feedback Assistant was still showing as open. As are most other imported bug reports. I have a response that it has been closed as duplicate, but the status is still Open. Possibly we’ll see Apple close these bit by bit the same way.

Closing Old Radars

At first I thought that this might be a new text snipped, but then I looked back and found the earliest copy of this text in a response from Apple, dated May 5, 2015.

Thank you for filing this bug report.

This is an older report and much has changed since it was filed. We are closing it. If this is still an issue for you, or if you have questions regarding the resolution of this issue, please update your bug report with them.

Please be sure to regularly check new Apple releases for any updates that might affect this issue. Again, thank you for taking the time to submit bugs. We sincerely appreciate your input.

I hope that Apple will now take a more active role in communicating with developers about issues in their software. Apple could have started with a fresh slate, but they chose to import more than a decade worth of old Radars. Now they have to start closing those Feedbacks, or how are we now colloquially referring to those issues we raise?

Always-On Apple Watch

The third new thing is that for a while I had been tracking my sleep with Sleep++ to see how accurate this is. For this purpose I had a series 3 ceramic Watch that I would wear at night and then during the day I would switch to my series 4. The one major announcement which made me jump up to find my wallet, was the announcement of the Always-On functionality on series 5.

It came as quite a surprise to me, because I had resigned to the situation that we would never have the battery capacity in those small devices to power a screen for an entire day. Being able to adjust the refresh rate of the display – amongst other tricks – allows the watch to finally do what a watch should do: to tell time!

Always-On

The first versions of watchOS 6 and iOS 13 had some issues where the battery would drain too quickly. But I am happy to report that battery endurance seems normal now, at least for my current rhythm alternating watches between day and night. 3 hours sitting at the iMac, typing, and I am at 93%.

A built-in compass (series 5 only) and the noise meter are two additional new features that managed to delight me. It is really true that being able to glance at your watch without having to move your wrist gives the watch an entirely different feel.

]]>
https://www.cocoanetics.com/2019/10/old-and-new/feed/ 0 10623
Mac Mini 2018 as Build Server https://www.cocoanetics.com/2018/11/mac-mini-2018-as-build-server/ https://www.cocoanetics.com/2018/11/mac-mini-2018-as-build-server/#comments Thu, 15 Nov 2018 23:18:47 +0000 https://www.cocoanetics.com/?p=10594 I’ve long had a longing to have a Mac Mini as build server in my technics room. After Apple finally updated it to (now) fashionable space grey, it was a must purchase for my company.

It took me a while to decide the specs to go for, because the base configuration should have been totally fine for my needs. But my lust and anticipation got the better of me, and so I sprang for the 6-core CPU, 16 GB or RAM and the 512 GB SSD.

I thought that I would be able to use my old Apple Thunderbolt monitor for setting up the Mini, but it turns out that it only has the USB-C style “Thunderbolt 3” plugs – and I don’t have an adapter for that. Fortunately the TV in our guest room has HDMI, and so I was able to do the initial setup there.

After having Apple Remote Desktop enabled in the Sharing pref panel, I could move the Mac Mini into my server rack and continue controlling it from my office.

The second confusing thing for me – was that there is still documentation on Apple’s website speaking of Mac OS X Server, but this is nowhere to be found for Mohave. Instead Xcode Server is built into Xcode since version 9. You can simply turn it on there, on the right-most tab of the preferences.

The second thing to setup was a GitLab Runner, which would be available to Continuously Integrate, when my other macs are sleeping. A few learnings from this process:

  • On Mohave there was no /usr/local/bin folder. I created it.
  • I also needed xcpretty, installed via gem install
  • Created a new ssh key
  • Needed to do a clone once from the command line, so that the host key would be accepted
  • The runner showed as locked (whatever that means). You can change the state either via web UI or by specifying –locked=false during registration
  • Needed to copy my Mac development certificates (plus private keys) into the Mini’s keychain
  • Needed to accept codesign’s access to the private keys a couple of times with the Always option

Then to create a bot in Xcode to try out the Xcode server:

  • Under Product – Create Bot
  • Select a Server. Since there is none yet, Add New Server.
  • Choose the Mac Mini, enter username and password
  • Got a ton of “The Server SSH fingerprint failed to verify” – needed to trust the key for all git submodules, then also confirm the authentication for all

I went initially with an integration every hour – which seems to be the default – but then I realised that this would result in way to many integrations without changes. So I changed the setting to only integrate on new commits.

Bots can be managed and their results viewed on the “Reports Navigator”. This is the tab in Xcode with the speech bubble icon. You need to select By Group to see the build servers below your apps. Below the build server you see the bots running on it and you can modify the settings via right-click.

Then for the bonus activity… setting up Windows 10 in VirtualBox. I have a configuration tool by my home automation system, which is only made for Windows. It feels right at home there. It was quite simple to install. You only need to configure a virtual machine and then you can install Windows from the ISO image which you can get from the Microsoft website. I think at some point in the future, Microsoft will want some money from me for the license.

During the Windows setup process, I would chuckle multiple times because there were some dialogs which Microsoft seems to have gotten inspired to by Apple. For example one that asks if you want to share your unique advertisement identifier to get more personalised ads.

So far so good, I’ve setup my totally over-powered Mac Mini for use with Xcode bots, as a GitLab runner and created a virtual machine for Windows.

Conclusion

It was fun to set up and it’s great that this computer can be running while all my other Macs are sleeping. This way integrations via GitLab CI can still occur when clients of mine – from other time zones – push commits to my GitLab.

What other things might I be putting on my Mini…

My time machine has lately been complaining that it is running out of disk space. Maybe I could plug an external hard disk into the Mini and use it as time machine server, too?

]]>
https://www.cocoanetics.com/2018/11/mac-mini-2018-as-build-server/feed/ 15 10594
My Terminal is Less Boring Than Yours https://www.cocoanetics.com/2012/02/my-terminal-is-less-boring-than-yours/ https://www.cocoanetics.com/2012/02/my-terminal-is-less-boring-than-yours/#comments Wed, 01 Feb 2012 14:57:41 +0000 http://www.cocoanetics.com/?p=5875 There’s a category of developers – probably coming from other Linux-based desktops – who are feeling at home in the console (aka terminal). Especially when working with SCM systems like Git or Subversion you’re often faster committing or updating doing that via short commands as compared to Xcode.

Unfortunately Apple did not think to make the console a nice thing to look at from the get go. Let me show you quickly how you can geek up your terminal as well. Your colleagues will be impressed.

It’s really simple. You need to add these lines to your .profile which resides in your user home directory. If the file does not exist, create it.

export CLICOLOR=1
export LSCOLORS=Gxfxcxdxbxegedabagacad

The first line activates color support for the CLI (command line interface), the second line specifies which colors to use for certain kinds of things. When this is set every new console window will emit special ANSI sequences to set the colors.

You also need to enable these colors for your terminal. Make sure you have set your terminal emulation to xterm-color in Preferences – Advanced in the Terminal app. While you are here you can also set up some other things for how the Terminal should be styled. I prefer the “Pro” style which has a tinted glass background, sort of like a holographic display which you can see through.

The above settings will make your terminal look like this:

If these colors are not your style, don’t fret, Geoff Greer has build a cool online generator to piece together the LSCOLORS code. Just make your own color finger print and paste it into your .profile.

There’s more! Git also sports several color options:

git config color.branch auto
git config color.diff auto
git config color.interactive auto
git config color.status auto

… or you use the catch-all setting which includes all of the above:

git config color.ui true

This adds splashes of colors here and there, for examples a git diff:

Many other tools also support a color option, for example viewing a command’s man page is so much more interesting with a touch of color. If you have additional suggestions on how to make better use of color in terminal please don’t hesitate to comment below.

]]>
https://www.cocoanetics.com/2012/02/my-terminal-is-less-boring-than-yours/feed/ 3 5875
Control of Cables https://www.cocoanetics.com/2011/05/control-of-cables/ https://www.cocoanetics.com/2011/05/control-of-cables/#comments Thu, 12 May 2011 07:18:15 +0000 http://www.cocoanetics.com/?p=4990 Ever since I got my first earbuds with an Apple device (must have been an original iPhone) I’ve been wondering something, maybe you as well: what is the purpose of this extra clip on the wire. There’s this movable thingy between where the cable parts and the earpiece.

In fact if you google that, then there’s only one other person that asks the same question:

On my iPhone headset (the one that came with the device, as well as the in-ear buds) there’s a little piece of plastic that slides on the cable to one earbud, and can clip onto the other cable.

  • It’s not large enough to accommodate the headset cable below the split, so it can’t be used to somehow hold the cable in place when it’s curled up.
  • It’s not tight enough to stay in place if I slide it nearer the earbud, so it can’t be used to essentially move the point where the cable splits closer to the earbuds.
  • It’s not tight enough to really hold on to the other earbud cable. It takes nearly no effort at all to pull the cables apart.

What in the world is it good for?!?

After some research we found what it is mean to be used for, as well as several other tricks with Apple cables that you might not have known.

When I asked my twitter followers if they had any good explanations, one stood out:

… either to hold slack under your chin or to hold the buds together at the top when you wrap them up. That’s how I use it anyway. – Jonathan H.

The one place that we SHOULD consult as the authoritative source on the meaning of the clip is Apple. Or rather the user guides. And indeed I found an illustration in the iPod User Guide:

So the answer to my question is that this clip is indeed meant to shift the place where the cables split closer to your throat. There might be physical activities where you want less dangling cable in front of you. Like when I am gardening (read: shoveling) I usually let my cord run under my T-Shirt so that it does not get tangled with the equipment. Don’t you love how Apple describes this feature? “The earphone cord is adjustable”, indeed, any other company would have put an exclamation mark there instead of a period and put this into the advertisement brochure.

Remotely In Command

The above graphic also reminds us of the fact that we are blessed with a remote control on the other wire. I usually listen on my iPhone to podcasts while walking the dog and love to be collecting miles at the same time with Nike+. Now if you have an app that plays background audio it will take over the remote control API and interpret your commands itself.

Because of this I go used to the original set of commands that work while Nike+ is running:

  • One pinch: Play, Pause which are also starting and stopping the workout
  • Double pinch: skip to next track
  • Triple pinch: skip to previous track
  • Long pinch: voice information on how quick you are running/moving

But that Nike+ only supports these commands, does not mean that there aren’t any more. I often found that I wanted to skip Leo Laporte’s advertisements, which I do by going into the iPod app and hitting the 2x button while he tells me for the umpteenth time that I should pay for carbonate. But if you don’t have an app in charge of the interpretation of your remote commands, then here’s the complete list, again from the user guide.

  • Pause a song or video: Press the center button. Press again to resume playback.
  • Skip to the next song: Press the center button twice quickly.
  • Return to previous song: Press the center button three times quickly.
  • Fast-forward: Press the center button twice quickly and hold.
  • Rewind: Press the center button three times quickly and hold.
  • Adjust the volume: Press the + or – button.
  • Answer an incoming call: Press the center button.
  • End the current call: Press the center button.
  • Decline an incoming call: Press and hold the center button for about two seconds, then let go. Two low beeps confirm you declined the call.
  • Switch to an incoming or on-hold call and put the current call on hold: Press the center button. Press again to switch back to the first call.
  • Switch to an incoming or on-hold call and end the current call: Press and hold the center button for about two seconds, then let go. Two low beeps confirm you ended the first call.
  • Use Voice Control – Press and hold the center button.

I made the items bold that I bet you did not know about. I know I didn’t, boy how would I love the fast-forward function for those ads … but for some reason Apple/Nike did not think it would be useful to fast-forward a workout. 🙂

How you Wind it

Since it was suspected that this mysterious clip might play a role our interest shifted to researching methods to wrap up your earphones in a way that would not be hazardous to their health. It has since been established that you cannot use the clip for that because it is too small to clip onto the cable below the split where there are two cables. I found 3 methods.

The Devil’s Horn

This employs the gesture invented by none other than John Lennon to warp up the cord and then it up with itself. The gesture itself makes it Rock’n’Roll.

//www.youtube.com/watch?v=fY9LIFKlDaU

The Lifehacker Wrap

This is similar to the horn but does not use the gesture. Instead of the tight wrapping at the end the elasticity of the cable itself is used by simply sticking it through the loop.

Unfortunately the video is on Yahoo from where I could not embed it. Watch it in the original article.

The Ultimate Wrap

HackCollege first bashes all other methods for they are twisting and turning the cable causing it to age quickly. Their method comes from a technique that IT guys have known for use with other long cables since the dark ages.

//www.youtube.com/watch?v=kcND46YrB1o

This third wrap employes a little extra gimmick to keep the coiled up cable together, but that’s a small price to pay compared to what new earphones are costing these day. So that’s the one I use from now on. If you don’t have this extra thing handy then I suggest practicing the devil’s horn but instead of the tight final wrap simply stick the end through the loop as in the Lifehacker wrap.

Bonus: Saving your Power Adapters

Since we are speaking of cables, here’s a trick that was shown to me by the guys that made Superpin.

Apple power adapters for MacBooks some with a wonderful mechanism to roll up the cord and I trust that you know how this is used. But what you probably don’t know is that with a little trick you can roll it up in a way that you can have gravity unroll it without doing any harm to it.

Instead of starting to roll it up the normal way, you make an extra loop like shown in this picture.

To unroll you simply take the end of the cable, hold your hand sufficiently high and let the adapter give in to gravity. Because of this extra loop the weight of the adapter will not rip the cable out of the case. Or if this bungee jumping action is too much for your stomach, then let the adapter fall on a sofa or bed. But because of this extra measure the wear on the connection is significantly reduced.

Unless of course you have cats. There’s no way of wrapping you can employ to prevent these critters from gnawing away on the cord.

 

]]>
https://www.cocoanetics.com/2011/05/control-of-cables/feed/ 2 4990
BIG OUTCH – MacBook Falls From Hammock https://www.cocoanetics.com/2009/06/big-outch-macbook-falls-from-hammock/ https://www.cocoanetics.com/2009/06/big-outch-macbook-falls-from-hammock/#respond Sat, 27 Jun 2009 20:24:25 +0000 http://www.drobnik.com/touch/?p=1062 I bought my first MacBook Pro last September to get started on my Mac journey. The whole family on the side of my wife had been fully Mac’edized and I figured I wanted to give it a chance as well, after having had a small Laptop provided by the company I work for. Also shortly before that time Apple had released the SDK and iPhone OS 2.0 enabling third party apps. So I justified the expense to myself by needing a Mac to be able to develop for the iPhone.

I had been one of the first Austrians with an iPhone 2G and when iPhone 3G became the first official iPhone in Austria I jumped at the chance of upgrading. My then girlfriend (now wife) inherited the 2G and I started developing for my 3G in September 2008.

Shortly thereafter Apple released a new generation of MacBooks in the famous aluminum unibody case. As usual when you purchase Mac hardware you soon feel a minor regret because usually 1-2 months after such a purchase something new arrives to be lusted after. But an upgrade 2 months after having purchased my Mac was out of the question, I was still amortizing the first one.

Then came the WWDC and my mind was blown once more. Apple dangled the Mac carrot even closer in front of my nose by reducing prices, adding a SecureDigital slot, and a great new battery which promises 5 hours of wireless work. And at the same time announcing the release date of the next update to OSX, dubbed Snow Leopard coming in September.

The crack in my heart started to get a little bit wider. Outwardly I told myself that I cannot buy more than one Mac Laptop per year, that I preferred the silver keyboard to the black ones anyway and that the glossy screen is useless. But unknowingly I had already ordered from the universe the circumstances that would make upgrading irrefutable.

When grabbing a couple of things in our Wintergarten the smooth Mac slipped and dropped onto the stone floor. The lower backside corner got dented and I was somewhat wrecked. I researched my options and found that I had cancelled the only insurance which would have covered it 2 years ago. The bottom case would cost $200 and another $200 at an authorized Mac support center to get it installed. Essentially the bottom case is the frame where all parts are mounted inside. So it takes long time to take it all apart.

I found the bottom case for around $50 with shipping on ebay and figured that I would just pay a handy friend to replace it for me. When I received the lower case I figured I’ll wait with replacing it so that I could get a new Mac first in a couple of months and then, after having moved all my development tools to the new one, could refurbish the device and put it on ebay. Or keep it as emergency Mac.

I thought so until today. After a nice day I wanted to climb into my hammock in the same Wintergarten I mentioned before. But when I pulled myself up to the hammock the MacBook felt like exiting it and heading for a second encounter with stone. OMG. F*CK.

Mac Crash MacBook Crash MacBook Crash

The drop this time was more than twice the height, but still it survived… technically. Not aestethically. I had to bend the frame above the Maglock power connector  back, but apart from this the Mac performs as if nothing had happened. This serves as proof of the superior build quality and sturdiness of the MacBook Pro design. So I can tell you from my own experience: Macs bend, they don’t break.

Looks to me as now I don’t have much of a choice to get a new unibody MacBook Pro next month. Incidently it’s my birthday then and I am getting my income tax refund so there now is really no way around it.

Donations for AntiCrack and My App Sales are now being saved to offset the cost of new hardware.

]]>
https://www.cocoanetics.com/2009/06/big-outch-macbook-falls-from-hammock/feed/ 0 1062
Wife Widowed, Kids Orphaned 'cause Daddy's got a Mac https://www.cocoanetics.com/2009/05/wife-widowed-kids-orphaned-cause-daddys-got-a-mac/ https://www.cocoanetics.com/2009/05/wife-widowed-kids-orphaned-cause-daddys-got-a-mac/#respond Tue, 19 May 2009 20:57:22 +0000 http://www.drobnik.com/touch/?p=861 (Note from editor: When Dr. Touch is not coding or in surgery he preaches the Mac gospel and sometimes somebody hears the calling and switches. This article illustrates this, the title where his own words on twitter.)

Jayman888Thanks to Dr Touch for the opportunity to make a contribution to his blog. I’m a new MacBook user and have had my gorgeous new white MacBook for 48 whole hours. I’m writing this with it sat on my lap. I’ve decided to give it a name ‘Polo’. I don’t know if the meaning will translate into other countries, but in the UK a polo is a small, white mint and is cool.

I’ve been a PC Windows user all my life; I’m 38 now and started using computers on a regular daily basis in the early to mid 90’s. One of the main reasons for the switch is the slow ‘Applefication’ of my life. It started as I replaced an MP3 player with an iPod shuffle, and then an iPod Classic and then I replaced my mobile with an iPhone.

I work in the media and have done all my working life and have always been exposed to Apple products but always thought they where for ‘creatives’ not business people. I’m the later, not really the former.

I was in the market for a new computer and was looking at either a Samsung NC10 netbook or a Macbook. I was helped along the way with my friends and followers on twitter (@jayman888). Dr Touch certainly helped me make up my mind.

Okay, so reasons for buying

  1. Unrivaled reliability, (my brother has had a MacBook for 5 years, bought 2 new batteries, never crashed or broken down. I’m looking to use mine for running my business on, emails, Twitter, etc etc. I need a Laptop which will never crash or break down.
  2. Unmistakeable style and coolness. Loads and load of people have samey and very boring laptops, the MacBook stand out and looks so cool.
  3. I’ve definitely been subject to ‘Applefication’. It’s like owning a top of the range German car. It just feels right.

So that’s the gushy stuff out of the way. Here’s how I really feel about it. Now that I’ve unpacked it and used it for 2 whole days these are my early thoughts and worries.

After spending nearly 15 years with PC Windows etc, it has been slightly weird doing some really basic bits and bobs on the Mac. The other weird thing is that I’m still using a Windows laptop side by side for my ‘day’ job (company issue). It is however REALLY REFRESHING to be learning a little something different.

Even in my early stages of MacBook ownership I can already feel and experience ‘Mac Logic’ and in time I’ll have forgotten about PC’s, their constant virus issues, crashes and incompatibility issues. I can honestly say, even at this early stage, I have made the right decision to ‘switch’.

So far all I’m doing on the MacBook is writing this, personal emails, Twitter, on Tweetdeck, and planning my new business venture. Dr Touch has given me the idea of starting my own blog so I’ll be doing a bit of that from here too.

I’d love to come back and blog here again in a couple of months to let you all know how Mac life is treating me. (Only if Dr Touch will have me?)

I’ll sign off now, ‘Polo’ and jayman888 have vegetables to water, children to put to bed and a new blog to set up. Thanks for the opportunity to ramble on!

If anyone wants to touch base with me catch me on Twitter, I’ll tweet my blog address once I’ve set it up. Thank you Dr Touch!

]]>
https://www.cocoanetics.com/2009/05/wife-widowed-kids-orphaned-cause-daddys-got-a-mac/feed/ 0 861