Resolving "cannot upload bitcode because bitcode is imbalanced" error when uploading to App Store Connect

27 September 2022

I received the following error from fastlane when uploading to App Store Connect:

exportArchive: exportOptionsPlist error for key ‘uploadBitcode’: cannot upload bitcode because bitcode is imbalanced

This error occurred because, as stated in the XCode 14 deprecation notes:

Starting with Xcode 14, bitcode is no longer required for watchOS and tvOS applications, and the App Store no longer accepts bitcode submissions from Xcode 14.

Xcode no longer builds bitcode by default and generates a warning message if a project explicitly enables bitcode: “Building with bitcode is deprecated. Please update your project and/or target settings to disable bitcode.” The capability to build with bitcode will be removed in a future Xcode release. IPAs that contain bitcode will have the bitcode stripped before being submitted to the App Store. Debug symbols for past bitcode submissions remain available for download.

Read More...

Using React to visualize the knapsack algorithm

14 June 2022

React and Tailwind CSS are popular frontend technologies. I had not used either and wanted to try them. After completing some React tutorials, I wanted to create my own app. I decided to create an app that would step through the knapsack algorithm. This would help me solidify my understanding of the algorithm while learning React and Tailwind CSS. This post lists the design and technology choices I made to build the app. For details about the algorithm itself, please visit https://monicagranbois.com/knapsack-algorithm-visualization/.

Read More...

Install PostgreSQL onto Ubuntu multipass vm

15 February 2022

I recently installed PostgreSQL on a virtual machine on my dev computer. This post describes what I did to:

  1. install a vm
  2. install PostgreSQL
  3. access PostgreSQL from the host machine via pgAdmin
  4. install a sample database into PostgreSQL
Read More...

How to mock nanoid

16 November 2021

This short blog post describes how to use Jest to mock nanoid. The nanoid function generates a unique string id. I used it to generate an id for an object. However, I wanted a stable id when unit testing the code. To accomplish this, I mocked the nanoid module and function by doing the following:

jest.mock("nanoid", () => {
  return { nanoid: () => "1234" };
});
Read More...

How to free up disk space for XCode Beta install

09 September 2021

TL;DR - delete Time Machine local snapshots to free up space.

Does anyone else find installing XCode frustrating? I always need more free disk space, especially when installing a beta. This was the case when I downloaded XCode 13 Beta 5 from the Apple Developer Downloads page. When I tried to extract the xip file I got an error stating:

“The archive XCode_13_beta_5.xip can’t be expanded because the current volume doesn’t have enough free space.”

Read More...

Generating A New Apple Distribution Certificate

29 March 2021

This post is a note to my future self about generating Apple Distribution Certificates. I received an email stating:

Your Distribution Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles.

Read More...

How To Use GitHub Actions To Deploy an 11ty Website To S3

11 February 2021

I use 11ty to generate a static website and S3 to host it. This post describes how I set up a workflow in GitHub Actions to build and deploy the website. The workflow uses the AWS - CLI S3 - sync command to transfer the files.

This post describes how to:

  • create an AWS policy with only those permission needed by the sync command
  • create an AWS individual IAM user with the above policy
  • create a GitHub Action workflow using the sync command to upload the files

I will provide the policy and workflow files first for those wanting only the code. A detailed walkthrough is provided below these files. This post assumes you already have set up an S3 bucket. If not, please see the Hosting a static website using Amazon S3 guide.

Read More...

TIL: Python has an assertLogs function for unit testing log statements

06 January 2021

Today I learned how to unit test log statements with Python. I updated @bcdevexbot to check the status of an opportunity. The bot logs an error message if it encounters an unknown status. To test this scenario I used the assertLogs function.

Read More...

Switching to Utterances For Comments

06 January 2021

I removed disqus as the comments provider on my website because I do not like its privacy policy. I’m trying utterances as the comment provider now. From the website, it’s: A lightweight comments widget built on GitHub issues. Use GitHub issues for blog comments, wiki pages and more!

Read More...

Autoscaling PDF Images On Apple watchOS

25 November 2020

In this post, I will discuss autoscaling PDF images and how to add one to a watchOS project.

The PDF format allows an image to scale without looking fuzzy at different sizes. This format is best used with vector artwork; think icons. Programs like Inkscape, Adobe Illustrator and, Vectornator can export PDF images.

For more details on designing a PDF image see the Image Optimization page in the Human Interface Guidelines for watchOS. It includes the scales used for the different screen sizes.

Setting certain flags in XCode will tell WatchKit to scale the image based on screen size. And so, you have an autoscaling PDF image. This means the project only needs one image for all screen sizes. Otherwise, the project would need multiple scaled image files.

Read More...