How To Generate a Self-Signed SSL Certificate With SAN

For development and integration use cases you may need to create or renew a self-signed certificate and store the certificate to your web server host or pass the certificate to your target system to trust only connections from an app using the certificate.

If you are storing the certificate on your webserver and enabled only secured connection via HTTPS on your server.

Chrome may not recognize the SSL certificate as secure without SAN (Subject Alternative Name).

Prerequisite: You should have openssl installed on your machine. Check and download from

To create one in command do the following steps:

Create a configuration file: eg. req.cnf

distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
C = NZ
L = Auckland
O = Quonsepto
OU = MyDivision
CN = localhost
keyUsage = critical, digitalSignature, keyAgreement
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
DNS.1 = localhost

Next from the terminal or command prompt run the following:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt -config req.cnf -sha256

You can then generated certificate and it should be compatible with Chrome.

Check this video for sample installing on a locally hosted node app.

How To Create Symlink For Sublime Text and Visual Studio Code in a Mac

This tip is for creating symlink for your favorite text editor, it is like an alias but more powerful. This would allow you to launch the application from the command line. ( You can do the same by setting paths as an alternative to symlinks). Symlinks can only be created from the terminal.

First find out the bin executable directory for the application. Then for the location where the symlink is to be created – /usr/local/bin/

The following command allows you to create symlink for Sublime Text

sudo ln -s "/Applications/Sublime" /usr/local/bin/subl

Then to launch it from the terminal simply type : subl

The following command allows you to create symlink for Visual Studio Code

sudo ln -s "Applications/Visual Studio" /usr/local/bin/code

Then to launch it from the terminal simply type : code

Fix Swift Framework Error: Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2.4 compiler:

Chances are you upgraded to the latest Xcode and along with it, your Swift compiler is updated as well. Then existing projects using a particular project have stopped working with similar error such as.

Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2.4 compiler:


Or you are checking out some hosted on code on Github using some framework, the framework might have been built using an older compiler version, if you try to run the associated .xcodeproj or .xworkspace it won’t build the project.

This is only for frameworks built using Carthage. I haven’t experienced this on CocoaPods. Make sure you have Carthage installed – check this documentation on how to install Carthage –

To fix, take a backup of your project, or better yet make sure you are using version control. Delete the framework that is failing from your project.

Go to the Project directory from the Terminal and make sure the Cartfile is available and run. Choose the right platform for the app.

carthage update --platform IOS

It should create a newly .framework on the Carthage/Build folder.

On Xcode go the General Tab and under Framework, Libraries and Embedded Content. Drag and drop the files

Then finally, try running the build and your project should be working.

Hope you find this tip useful.

Troubleshooting pod install Error on CocoaPods

Going through the Getting Started guide for Firebase I encountered this error ‘JSON::ParserError – 767: unexpected token at ‘ and thought to blog and share how to fix it.

I went to the Xcode project directory in the terminal and ran

pod init

Then I defined the PodFile spec

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Firebase Getting Started' do
  # Comment the next line if you don't want to use dynamic frameworks

  # Pods for Firebase Getting Started
  pod 'Firebase/Analytics'
  # Add the pods for any other Firebase products you want to use in your app
  # For example, to use Firebase Authentication and Cloud Firestore
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'


But when I ran

pod install

I encountered this error

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:

If none exists, create a ticket, with the template displayed above, on:

Be sure to first read the contributing guide for details on how to properly submit a ticket:

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
 - [1.9.2] Error during pod install JSON::ParserError - 767: unexpected token [open] [31 comments]
   8 hours ago

 - [closed] [3 comments]
   2 weeks ago

 - Error during pod install: Encountered an unknown error (783: unexpected token at [closed] [92 comments]
   22 hours ago

and 12 more at:

[!] Automatically assigning platform `iOS` with version `13.5` on target `Firebase Getting Started` because no platform was specified. Please specify a platform for this target in your Podfile. See ``.

After checking the issues. It turns out the cocoapods repo cache on my machine somehow got corrupted. To fix the error I simply deleted the cache.

sudo rm -rf ~/.cocoapods/repos

And running pod install after that worked.