App Switcher Snapshot

Wednesday, 30 December 2020

App Switcher Snapshot

You might have noticed that some apps, especially bank apps, present a different screen when the app goes background. Have a look at the App Switcher of your iPhone right now.

App Switcher 1 App Switcher 2

It is most certainly for privacy, but it seems to have an additional benefit: It prevents iOS from killing it.

Apparently the system will consider if your app is consuming less resources (more specifically UI resources) in the background by analyzing the top most screen of the app and it won’t knock out the app.

In my experience, I worked in a company that used to make smart doors. The doors would verify via a sensor a light pattern emitted from the app and they would open if all checks passed. Among other features, the app also had a Bluetooth connection for the convenience of opening the door touchfree and a heavy UI. Sometimes the system was killing the app and we figured out a way to keep it active in the background by adding a transparent screen every time the app was entering the background mode.

It’s a good practice not to consume unwieldy resources in the background and UI is a back-breaking demanding one. But if your app eventually needs a little bit of more stamina whilst running in the background, this might be a solution.

If you want to understand more about the App’s Life Cycle, here’s the Apple’s official documentation.

Flash Note Cards: Take notes different

Thursday, 24 September 2020

As promised at the beginning of the year, one of my goals for 2020 was to release an indie app. And I did it!

Here we go!

The announcement of SwiftUI allowing us to build a fully fledged app sounded mind blowing and exciting at the same time. I put my hands on the Fruta app and started to sketch some ideas in my mind with what I could build, fully in SwiftUI.

Finally I was glad with this idea, which is a combination of quick note taking and flash cards.

Introducing Flash Note Cards

Flash Note Cards is made to make your productivity sky-rocket by focusing on what really matters in that moment.

It’s 100% SwiftUI and it’s got Widgets!

You can enter information like title, icon, note and colors; so they can be easily identified. Quickly find the card you need using a global search and many sorting options. Additionally, you can take advantage of duplicating and archiving note cards. A dedicated card screen gives the focus you need by gathering it all in a single place.

The Watch app performs same features described above; it works 100% independently from your iPhone and has a good variety of complications.

With iCloud, all cards are synced in your iPhone, iPad and Apple Watch.

With the iOS and iPadOS apps, you can create templates to simply pre-fill the fields in the next card you create. You can make the app your own by choosing the app icon and app tint.

Link to Download on App Store

Available on iPhone, iPad and Apple Watch.

Less than 24 hours for #DubDub2020

Sunday, 21 June 2020

Tomorrow 23rd WWDC takes place. This time, due to Corona crisis, it is going to be fully online and in a more democratic fashion, so to speak.

Here is my humble wishlist for dub²20²1:


  1. Unified playlist – be able to listen to a podcast episode and add a music from Apple Music to play next, then play a book-in-blinks from Blinkist after
  2. Vertical split screen
  3. Split Screen on iPhones
  4. Choose default applications for maps, mail, browsing, and so on
  5. Xcode for iPads – there have been a lot debates around it, but why not? iPads Pro have overcome MacBooks in perfomance benchmarks for a while
  6. Custom apps on Control Center
  7. Custom apps in lock screen shortcuts – rather than flashlight and native camera
  8. Dedicated Dictionary app
  9. Rotation Lock config – choose apps to ignore this config like video and camera apps
  10. Helper Menu on iPad
  11. Multi-user support on iPad
  12. App Store to send push notifications when trial is about to end or to renew subscription – not just when the subscription price changes


  1. Sleep mode
  2. Alarm unification with iPhone
  3. Keyboard – emoji, swype and all of that
  4. Third-party API for watch faces


  1. Nothing really


  1. Support for Google’s 4K video codec

All Platforms

  1. Safari to have a context menu option to open a link in private mode from a non private tab
  1. I know that dub²20² is not mathematically correct, but sounds like fun when you think about “20” as a string.

Swift Playgrounds for Mac

Thursday, 13 February 2020

My Twitter timeline went crazy with the news about Apple bringing Swift Playgrounds to Mac. About time!

The Catalyst app is available now on its official page.

Education is really important and Apple knows its way on this matter.

No previous knowledge is needed to start. Just start and have a happy coding!

Ethical Source Definition

Wednesday, 29 January 2020

Software is considered Ethical Source if it meets the following criteria:

  1. Freely distributed with source code and can be used or combined with other software without a royalty or fee.
  2. Developed in public view and welcoming of community contributions.
  3. The community of contributors is governed by a code of conduct that is consistently and fairly enforced.
  4. Creators have the right to prohibit use by individuals or organizations engaged in human rights violations or other behavior deemed unethical.
  5. Creators have the right to solicit reasonable and voluntary compensation from the communities or institutions that benefit from the software.

I facepalmed when I read the fifth criterium.

The Privacy Company Does Not Encrypt Your Backups

Tuesday, 21 January 2020

Joseph Menn, for Reuters:

Apple Inc dropped plans to let iPhone users fully encrypt backups of their devices in the company’s iCloud service after the FBI complained that the move would harm investigations, six sources familiar with the matter told Reuters.

Ever since Trump unleashed on Twitter about Apple not helping the government to unlock iPhones and Apple’s response stated that they have actually contributed handing over iCloud backups, something started to seem odd.

Now with this Reuters’ report, can we affirm: That’s the backdoor?

Apple Acquires AI Startup

Thursday, 16 January 2020

Apple has acquired another Seattle-based AI startup, The startup specializes in low-power edge-based tools that allow AI to operate on devices, rather than in the cloud.

This ubiquitous AI can increase privacy of processing, introduce an offline behavior for Siri and help it get smarter.

Nota Terminal

Thursday, 16 January 2020

Nota is a nice terminal calculator with rich notation rendering. It is designed for your quick calculations and therefore provides you with a tiny and beautiful language so you can express your ideas easily. Keep in mind that Nota is all about beauty and ASCII art.

Fun to play around if you enjoy math and ASCII, and don’t bother not using the arrow keys.

Deep Fusion Paid Off Again

Sunday, 12 January 2020

A couple of months ago I took this random picture in my place. I didn’t realize that my Halide configuration was set to use Deep Fusion. Then I took a picture with the normal picture and the result of the comparison was mind blowing.

Look at the lighted wall on both pictures! First one without Deep Fusion and Second one with.

I shared on Twitter in October.

Deep Fusion Off

Deep Fusion Off

Deep Fusion On

Deep Fusion On

The grains in the wall are way more visible in the second picture.

Deep Fusion paid off once again.

I was in Louvre this weekend for the special exhibition on the 500th anniversary of Leonardo da Vinci’s death. This exhibition gathers over one hundred works made by the Renascence artist.

The in pictures below of the Portrait of Leonardo da Vinci in red chalk, attributed to Francesco Melzi, we can see how much detail Deep Fusion was able to extract from the Piece.

Deep Fusion Off

Deep Fusion Off

Deep Fusion On

Deep Fusion On

Deep Fusion Off Cropped

Deep Fusion Off Cropped

Deep Fusion On Cropped

Deep Fusion On Cropped

This is astonishing!

Daughter by Apple

Sunday, 12 January 2020

Once again Apple casts Hollywood to put iPhone 11 Pro to work. This time, Theodore Melfi (director) and Lawrence Sher (director of photography) collaborate to produce a sensitive piece, with Zhuo Xun as the leading actress.

The story is about a mother who has to figure out ways to take care of her child and face unfinished issues with her mother.

Lawrence Sher is one of the big names in the spotlight for this year’s academy awards by his applause-worthy work in Joker. Theodore Melfi was the director of the movie Hidden Figures, nominated for The Best Picture in 2017 Oscars.

The iPhone 11 Pro is a storytelling tool. It makes me feel that anything is possible. So write a story, reach in your pocket, grab your phone and you show us how you see the world.

Here you can see the making-of.

Apple’s Services Getting In The Way

Friday, 10 January 2020

Tim Hardwick synopsized in bullet points Apple’s services year-in-review post for MacRumors. It clearly shows how Apple is trying some alternatives not to depend solely on iPhone sales. The iPhones are selling less for at least these reasons: 1 - Too expensive. 2 - People are keeping their iPhones for longer periods.

App Store customers spent a record $1.42 billion between Christmas Eve and New Year’s Eve, a 16 percent increase over last year, and $386 million on New Year’s Day 2020 alone, a 20 percent increase over last year and a new single-day record.

It seems that Services might be a right bet.

Did We Mention How Safe It Is?

Friday, 10 January 2020

Linking to John Gruber’s link on Daring Fireball, that linked to Apple Recaps Its Year in Services.

App Store might be somehow safe, but the reviewers also allow this type of scam to be in the reach of everyone.

How Well Can Computers Connect Symptoms to Diseases?

Friday, 10 January 2020

Rob Matheson, for MIT News:

The team analyzed how various models used electronic health record (EHR) data, containing medical and treatment histories of patients, to automatically “learn” patterns of disease-symptom correlations. They found that the models performed particularly poorly for diseases that have high percentages of very old or young patients, or high percentages of male or female patients – but that choosing the right data for the right model, and making other modifications, can improve performance.

We are still in the very early stages of medical AI, but we need to start somewhere. This decade has all the indicators to be AI-focused.

Choices in the dataset-creation process impacted the model performance as well. One of the datasets aggregates each of the 140,400 patient histories as one data point each. Another dataset treats each of the 7.4 million annotations as a separate data point. A final one creates “episodes” for each patient, defined as a continuous series of visits without a break of more than 30 days, yielding a total of around 1.4 million episodes.

Computers do things uncountably faster than us. Bringing this amount of data together is remarkable.

I see this data in my mind like The Matrix.

You Can Use SwiftUI Today

Tuesday, 7 January 2020

Gui Rambo:

If you don’t have the habit of creating your own internal tools to make your job easier, I highly recommend it. They don’t have to be perfect, they just have to fulfill your own needs, and you should make them with no expectation that you’re ever going to make them available to anyone else.

That‘s true! SwiftUI is more than ready for personal tools that can help you on a daily basis.

When I was rebuilding this site, I had in mind that I didn’t want to have a computer with me all the time to write a post, so I wanted this process to be as flexible as my iPhone or iPad.

This site is made on top of Jekyll and Jekyll files have a specific header that you can add the information of post, such as title, date, external URL, excerpt, and so on.

This is where SwiftUI came in handy for me. I wrote an app a couple of weeks ago to help me set up this Jekyll header in a blink and save my time.

Normally I use Ulysses to write my posts and Working Copy to publish them. As they are also in iOS, my life got even easier.

This very same post was writen and posted right from my iPhone.

When All Email Protection Tools Fail, AI Comes to the Rescue

Monday, 6 January 2020

Eyal Benishti, for TechTalks:

AI has the capability to go beyond signature detection and dynamically self-learn mailbox and communication habits. Thus, the system can automatically detect any anomalies based on both email data and metadata, leading to improved trust and authentication of email communications.

Another advantage of AI is its ability to scan disparate systems and detect patterns.

Interesting article lists forms how our emails get hacked and AI can keep them free from getting hacked.

Applications can use computer vision to categorize emails and do actions without us even knowing it, like something that filters do today. Not only that, it learns overtime, getting smarter.

Maybe this is gonna be one of the advantages when Singularity is reached.

Making an Indie App This Year

Friday, 3 January 2020

One of my resolutions in 2020 is to release a new app, after a couple of years without making one and with a focus more targeted to the open source community. Now they paths have been swapped.

I don’t have any ideas just yet.

I decided to use an old Apple ID of mine to enroll it in the Apple Developer Program, because my former Developer Apple ID is linked to Brazil and I didn’t feel like changing it to Europe due to a little bit of bureaucracy. However, when I tried to add two-factor authentication to this account, it wouldn’t let me. Apparently I have to wait three days if I change some big thing.

When changes are made security settings on an Apple ID, such as security questions reset or password change, this can delay the Two Factor Authentication process.

What I did was simply resetting the security questions that I didn’t remember. But guess what? To enroll an account in the Developer Program you need to have two-factor authentication enabled for your account. Therefore I cannot push code to a device until then.

These things are confused, just like logging in on iCloud using a browser and getting prompted for the six-digit code right on the computer you are using to log in. Very secure!

Using AI to Improve Breast Cancer Screening

Wednesday, 1 January 2020

Shravya Shetty, M.S. and Daniel Tse, M.D., for Google Health Blog:

These findings show that our AI model spotted breast cancer in de-identified screening mammograms (where identifiable information has been removed) with greater accuracy, fewer false positives, and fewer false negatives than experts. This sets the stage for future applications where the model could potentially support radiologists performing breast cancer screenings.

We also wanted to see if the model could generalize to other healthcare systems. To do this, we trained the model only on the data from the women in the U.K. and then evaluated it on the data set from women in the U.S. In this separate experiment, there was a 3.5 percent reduction in false positives and an 8.1 percent reduction in false negatives, showing the model’s potential to generalize to new clinical settings while still performing at a higher level than experts.

News like these ones are always impressive. The rate of false positives dropped and this is something to celebrate. This is scenario that I always thought of when the “Artificial Intelligence and Humans” topic is discussed.

The Friction of Exporting Live Photos, Portraits and RAW Images From iOS

Wednesday, 1 January 2020

A fresh new day of a brand new year has come, so you might want to check the pictures you took during the celebration of the New Year’s Eve. If you have iCloud Photos enabled then it’s all fine, your data is saved as is, including your Live Photos and Portraits. However, the trouble comes if you want to export your pics right from your iOS device to some third-party storage service like OneDrive, Google Drive and Dropbox.

When you upload an image from your iOS device using the apps of these mentioned services, they convert your Live Photos or RAW images into a JPEG files, removing all the important content of the picture. This is unbelievable!

If you still want to save your pictures in those services and keep the full range of data, you need to use the Mac Photos app, and it requires you to have one Mac available. The biggest advantage to use Photos is to extract the very own content of the media with the option of “Export Unmodified Original File”, so Live Photos would be extracted as a still image and its corresponding video, RAW images would be a RAW file and a JPEG counterpart be generated, and so on. Portrait is different case though, the metadata is not saved in a different media file. But, for a trip, would you bring your Mac along just for that?

The issue here is not the iOS itself, but the laziness or lack of priority of these services to provide this feature in the app.

Programmatically speaking and digging to the Photos API, we can find two classes called PHAsset and PHInternalResources. They are basically the classes that handle medias on iOS.

This first snippet below is a normal image. As you can see it’s a JPEG file with only one resource, so only one image is extracted from this asset.

<PHAsset: 0x105521bb0> 6D5E7526-BF88-4AC5-8570-6A453816F181/L0/001 mediaType=1/16, sourceType=1, (3024x4032), creationDate=2018-11-16 15:09:21 +0000, location=1, hidden=0, favorite=0 
	<PHInternalAssetResource: 0x282f64ab0> type=photo size={3024, 4032} fileSize=1683098 uti=public.jpeg filename=IMG_4111.JPG assetLocalIdentifier=6D5E7526-BF88-4AC5-8570-6A453816F181/L0/001

This second asset is Live Photo and it contains two resources, an HEIC image and a video. This allows us to extract two files.

<PHAsset: 0x1055216d0> 30584E6D-21BD-43AD-9EE4-0746077EFDCB/L0/001 mediaType=1/8, sourceType=1, (3024x4032), creationDate=2018-11-17 15:53:43 +0000, location=1, hidden=0, favorite=0 
	<PHInternalAssetResource: 0x282f6f690> type=photo size={3024, 4032} fileSize=1527095 uti=public.heic filename=IMG_4232.HEIC assetLocalIdentifier=30584E6D-21BD-43AD-9EE4-0746077EFDCB/L0/001,
	<PHInternalAssetResource: 0x282f646c0> type=video_cmpl size={0, 0} fileSize=2450384 filename=IMG_5392.MOV assetLocalIdentifier=30584E6D-21BD-43AD-9EE4-0746077EFDCB/L0/001

And this third asset is RAW image. It will generate two files, a CR2 RAW image and a JPEG image.

<PHAsset: 0x105522770> ABCFBBA5-2B4E-4EEE-97E0-1771F5A6B46D/L0/001 mediaType=1/0, sourceType=1, (6000x4000), creationDate=2018-11-17 15:48:29 +0000, location=0, hidden=0, favorite=0
	<PHInternalAssetResource: 0x282f7fc30> type=photo size={6000, 4000} fileSize=4449694 uti=public.jpeg filename=IMG_3317.JPG assetLocalIdentifier=ABCFBBA5-2B4E-4EEE-97E0-1771F5A6B46D/L0/001, 
	<PHInternalAssetResource: 0x282f685a0> type=photo_alt size={6000, 4000} fileSize=28951621 filename=IMG_3317.CR2 assetLocalIdentifier=ABCFBBA5-2B4E-4EEE-97E0-1771F5A6B46D/L0/001

All of this made me realize that it’s not our iPhones and iPads that have this limitation, but those companies’ apps are poorly implemented.

Sadly, it does not stop there, the very own camera or editing apps does not support it either. With my favorite camera app Halide, you can only export one RAW File at a time and there’s a whole to-do list to follow; open the image, tap on the RAW tag in the top right corner and then export it. Now imagine hundreds of RAW pictures you took during a trip and you have to go through those steps for every single of them.

The only ones that I have found so far that do the work a little bit better is Adobe’s Lightroom and ProCam. Both of them allow you to export several RAW files in a single share, but they lack support for Live Photo and RAW + JPG exportings.

Apple vs Corellium

Tuesday, 31 December 2019

After I read the article from 9to5Mac, it seems for me that Apple is suing Corellium for obvious reasons and Corellium is trying to rally other people and instigate those people against Apple, pushing the blame away from themselves. Corellium charges money for Apple’s software and hardware, that is profiting with Apple intellectual property and infringing Apple’s explicit copyright statement.

Back in August, Apple opened the lawsuit with the following:

Corellium explicitly markets its product as one that allows the creation of “virtual” Apple devices. For a million dollars a year, Corellium will even deliver a “private” installation of its product to any buyer. There is no basis for Corellium to be selling a product that allows the creation of avowedly perfect replicas of Apple’s devices to anyone willing to pay.

For Corellium’s part, Amanda Gorton, CEO of Corellium, wrote:

Apple’s latest filing against Corellium should give all security researchers, app developers, and jailbreakers reason to be concerned. The filing asserts that because Corellium “allows users to jailbreak” and “gave one or more Persons access… to develop software that can be used to jailbreak,” Corellium is “engaging in trafficking” in violation of the DMCA. In other words, Apple is asserting that anyone who provides a tool that allows other people to jailbreak, and anyone who assists in creating such a tool, is violating the DMCA. Apple underscores this position by calling the unc0ver jailbreak tool “unlawful” and stating that it is “designed to circumvent the same technological measures” as Corellium.

Apple just opened the Security Bounty to everyone. It would be contradictory if they would be shutting doors for security researchers, app developers and jailbreakers just now.

It looks like this fight has been going on for a long time now, and it’s far from being over.