How To Install Firebase Pods on Apple Silicon Macs

When trying to install firebase pod and you try to build that project in Xcode you might end up with this error.

FIRAnalyticsConnector’ for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

To get around this. Delete the xcworkspace, update your Podfile. On your Podfile you need to specify the version and append with -M1 as such.

When you run “pod install“, if you get this error

[!] CocoaPods could not find compatible versions for pod “Firebase/Analytics”:
In Podfile:
Firebase/Analytics (= 7.2-M1)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 7.2-M1)`.

run “pod repo update” and run “pod install” again.

Open the xcworkspace and then the build should start working.

Error Running CocoaPod pod install on MacOS BigSur With ffi

On MacOS Big Sur, running pod install against a simple Podfile is throwing an error in Ruby.


LoadError – dlsym(0x7fc9ddbb5340, Init_ffi_c): symbol not found – /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle

To get around this error. It seems you have to install ffi and disable the ffi ruby library that comes shipped with MacOS Big Sur.

sudo gem inst ffi -- --disable-system-libffi
Building native extensions with: '--disable-system-libffi'
This could take a while...
Successfully installed ffi-1.13.1
Parsing documentation for ffi-1.13.1
Done installing documentation for ffi after 3 seconds
1 gem installed

After running the command I can now run pod install successfully.

How to Install Intel Apps From The Terminal On M1 Apple Silicon Macs

With the latest Apple Silicon M1 Macs. Program compatibility was going to be an issue with early adopters as not all applications for the M1 which uses a different arm architecture compared to intel architecture apps. For Apple to get around this problem, they introduced Rosetta 2. This app is sort of an emulation software. This allows Intel Apps to be M1 arm architecture.

One of the apps I used is the homebrew. As per the time of writing this blog post. It is not yet supported.

If you go and run installing command from your terminal

You’ll be greeted with this error

Homebrew is not (yet) supported on ARM processors!
Rerun the Homebrew installer under Rosetta 2.
If you really know what you are doing and are prepared for a very broken
experience you can use another installation option for installing on ARM:

There are two ways to get around this.

You can specify to use rosetta 2 by “arch -x86_64″ then the bash command”

Or you can open the and right click then Get Info(Command+i). Then tick the option Open with Rosetta. Restart the terminal and not need to specify the architecture, you would be able to run the install command as is.

If you would like to use the native terminal. You can clone the Terminal app and have one version to open in Rosetta and the other as is.

So if the application you are trying to install it not yet compatible with M1/Arm. Then install using the Rosetta Terminal.

How To Use a SwiftUI Dictionary

Beginner Tutorial for SwiftUI

Swift Arrays are a collection where each item uses a numerical index. Code below returns the value “signs”

var categories = ["signs","roads","behaviour"]

With Dictionary instead of using numerical indexes, you can specify a unique key. Code below returns the value “signs”

var categories = ["basics" : "signs", "intermediate": "roads", "advanced":"behaviour"]

Forbidden You don’t have permission to access /~username/directory in Mac OS X

I have this weird issue with my website backups. When I store them inside my Sites folder and try to view them from the browser.

1. They do not appear listed when I do a directory listing
2. Accessing the folder manually produces the error

You don’t have permission to access on localhost /~username/mydirectory

This is well known and documented on Apple here.

But my issue is it is only a problem for this backups, the existing directories I have in my system works fine.

The solution is not straightforward but this works.

Follow the solution from Apple website. edit your username.conf file using terminal and then add the following line before closing.

Options +FollowSymLinks

So it looks like this.

<Directory “/Users/username/Sites/”>
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
Options +FollowSymLinks

Then restart apache

service apachectl restart

R.I.P Steve Jobs, Stay Hungry Stay Foolish

Whenever I feel down and need inspiration, your speech at Handford(2005) always never fails to reenergize my spirit and continue to what I am doing.

[youtube UF8uR6Z6KLc]

We have truly lost a visionary. Rest In Peace Mr. Jobs.

Safari Bug on Lion: The application Safari canceled restart

Noticed a bug on my Safari after upgrading to Lion. Haven’t been able to recreate it is as it appears to be random, when using Safari and you close some tabs. When you try to quit the Safari, the option is greyed out from the Safari Menu and Command+Q does not work. If you try to restart your mac you’ll get the screen shot below.
Read the rest of this entry »

Installing Mac OS X Lion and making an installer backup

Finally decided to upgrade to OS X Lion and check what all the fuzz is all about, Lion no longer support PowerPC apps which is the one thing so far that I dont like but could live with it.

Read the rest of this entry »

Setup EC2 and FileZilla with PPK file on Mac OS X

Coming from a Windows platform where I have tools like Putty to connect via SSH to our EC2 (Elastic Cloud Compute) instance on Amazon web services(AWS) and a tool like Pageant where I can load a .ppk key to allow me to connect my Filezilla client to connect via SFTP.

I had  to do the same on Mac OS X which eventually took me a bit of time to figure out. So I’m writing this short tutorial to document how I got it configured, so I can refer to it in the future and also help out those having a hard time setting it up. This tutorial is basically for those users who connect to Ec2 from a Windows platform and then moved to a Mac OS X platform.

1. On Windows using a telnet application like Putty to connect via SSH, you require a .ppk key. So first thing is to locate your PPK key in Windows.

2. Next you need to convert the PPK key to an OpenSSH format. Using PuttyGen load the .ppk file and then save the .ssh file generated. (eg. files aws_rsa.ppk and aws_rsa.ssh)

3. Copy the .ssh file and the original .ppk file over to your Mac directory like the Documents folder

4. Next open up Terminal on your Mac and create a new directory

# mkdir ~/.ec2

5. Copy the .ssh file to the ~/.ec2 directory

#mv /Users/myUser/Documents/aws_rsa.ssh ~/.ec2/aws_rsa.ssh

6. Change the file permission

# sudo chmod 600 aws_rsa.ssh

7. Finally connect to your instance.

# ssh -i aws_rsa.ssh

Replace with your EC2 public address.

Hopefully you should be able to connect to your server instance then.

Next is straightforward, this is for using a GUI like FileZilla to connect to your instance.

1. Open up FileZilla then go to Preferences

2. Go under SFTP and click on Add Key

3. Browse over to your Documents folder where you saved your .ppk file

4. Create a new site and add the public address for the host and protocol as SFTP (SSH File Transfer Protocol), user as root and password leave as blank.

That should be it you should be it. You could now SSH using the Terminal or connect via SFTP using FileZilla. Happy cloud computing.

Transfer Analog MiniDV to a MacBook Pro with Firewire 800

If your like me who still uses an Analog miniDV to capture videos on special events, since early 2008 the MacBook Pro now uses a Firewire 800 and went away with the Firewire 400. You would need special cable or adapter to get the job done.

The last MacBook Pro I used which was issued to me when I was working for the local government was an older model around (2007) not the new unibody. Port available to me back then was the Firewire 400. The cable I used was a 4pin to 6 pin to convert my analog miniDV to digital.

Here is my Sony HC 32 cradle for my analog miniDV where I hook up the 4 pin to the second slot marked DV.

So you can either get an adapter that converts Firewire 400 to Firewire 800.

Or get a 4pin to 9 pin Firewire cable.

I got the 4pin to 9pin cable which cost P900( around $21-$22) in a store I found in SM Megamall.

Now I started to convert all those analog miniDVs I have collected and planning to get a digital camcorder in the future or a point and shoot camera that shoots HD videos.