Get iOS, iPadOS and macOS app Versions and Build numbers programmatically.

Here is a small function I have written that you can use in your iOS, iPadOS or macOS Catalyst app to get your app’s current version, build number, and print it on the screen whether it will be on the app’s about or support view.

Copy the below function in the Xcode project’s UIViewController Swift class file.

Continue reading “Get iOS, iPadOS and macOS app Versions and Build numbers programmatically.”

Reset the Bluetooth module using the Terminal app on your Mac.

Here is the simplest way to reset the Bluetooth module on your Mac if you face any issues using your Bluetooth mouse (Magic Mouse) or Bluetooth keyboard (Magic Keyboard).

This command will reset Bluetooth on your Mac and then connect to all Bluetooth devices again after the reset.

Step 01:
Open the Terminal app from your Mac’s Applications > Utility folder.

Step 02:
Now copy-paste the below command in the terminal to reset Bluetooth on your Mac

Continue reading “Reset the Bluetooth module using the Terminal app on your Mac.”

How to save your contact’s WhatsApp Profile Photo

A few years ago WhatsApp was allowing WhatsApp Mobile / iPhone / Android and Mac app used to save any contact’s profile photo by clicking on the action sheet button and then tapping save.

But then WhatsApp removed that button.

But somehow one trick works.

Assumption: We assume that you have connected WhatsApp iPhone & Mac apps. You have already added your WhatsApp mac app to your iPhone number by scanning a QR code.

Step 01: Choose any of your WhatsApp contacts.

Step 02: Click on their name or photo at the top header or navigation bar.

Continue reading “How to save your contact’s WhatsApp Profile Photo”

Implementing Meta Theme Color modern HTML5 and CSS3 websites.

Apple Safari has started supporting theme-color Meta Tag from the Safari 15 release.

Here is how to Implement a theme-color meta tag in HTML.

You have to copy-paste the theme-color meta tag into a section of your website. It will look something like this:

<meta name="theme-color" content="#ff0000"/>

You can use the following code to implement theme color specific to system light or dark modes.

<meta name="theme-color" content="#ff0000" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#ff0000" media="(prefers-color-scheme: dark)">
Continue reading “Implementing Meta Theme Color modern HTML5 and CSS3 websites.”

Here is how to locate downloaded Audio/Video Podcast app files on macOS. So that you can export or copy it to the new location on Macintosh HD.

You may have been listing to or watching a great podcast on Mac’s Podcast app, and you may want to export it and store it elsewhere on your Macintosh HD for safekeeping.

It seems Apple has disabled the functionality of dragging Podcast items to the desktop to store or export them elsewhere.

So here is how to do it in an alternative way.

Step 01: Click on Finder

Continue reading “Here is how to locate downloaded Audio/Video Podcast app files on macOS. So that you can export or copy it to the new location on Macintosh HD.”

Find the Bundle ID of any app on Mac.

There are many ways to identify the bundle ID of any macOS app using the Mac itself.

The following steps will help you identify a Finder app’s bundle ID using the Terminal. Replace the app name written in step 02 with the exact words of your desired app name.

Step 01:
Open Terminal on your Mac.

Step 02:
Run the following command:

Continue reading “Find the Bundle ID of any app on Mac.”

How to fix and repair anything related to iCloud, App Store, and Mac App Store if not at all working correctly on Apple iPhone, iPad and Mac with just one simple solution!

After using your Apple Mac, iPhone or iPad for more than 2 to 3 years upgrading the operating system multiple times you may realise after upgrading system some features like iCloud, Mac / App Store App Downloads and Updates, Keychain Sync, Safari Passwords Sync, Contacts Sync are not working across devices.

Precautions:

1. If you are on iPhone and iPad first backup your device using Mac. And also backup your iPhone and iPad photos using Apple Photos.

2. If you are on Mac backup your Mac using TimeMachine

Continue reading “How to fix and repair anything related to iCloud, App Store, and Mac App Store if not at all working correctly on Apple iPhone, iPad and Mac with just one simple solution!”

Essential factors to be considered while choosing UILabel and UITextView to display text for iOS, iPadOS and macOS apps.

Choosing between UILabel and UITextView starts when you want to display text in your Apple iOS, iPadOS or macOS Catalyst App.

I have even gone through the process of choosing UILabel or UITextView to display text on my app.

So, I have made a small numbered list to help you choose the right option…

Choose UILable to display text:

  1. If the text word count is small in number
  2. If Top Aligning text to the top border is not the requirement
  3. UILable is not tappable interactive, or selectable to the user’s input
  4. if you want to automatically adjust the font size and fit text to the UILabel bounding box layout

Here is a Sample Code for UILabel:

Continue reading “Essential factors to be considered while choosing UILabel and UITextView to display text for iOS, iPadOS and macOS apps.”

Show/hide the navigation bar on a particular view without disturbing the navigation bar hierarchy in iOS/iPadOS app.

Sometimes, you want to hide the Navigation Bar from a particular view without manually deleting it from Main.storyboard,

So, I have documented how to do it programmatically instead.

Step 01:
Copy the following code to your ViewController’s Swift file’s ‘viewWillAppear’ method for which view you want to hide the Navigation Bar on its load on your iPhone, iPad or Mac’s (Catalyst) app screen.

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
self.navigationController?.setNavigationBarHidden(true, animated: true)
}
Continue reading “Show/hide the navigation bar on a particular view without disturbing the navigation bar hierarchy in iOS/iPadOS app.”

Programmatically add Fab (Floating Action Button) Button to iPhone, iPad and Mac App.

When Google released the Material Design Guidelines, they introduced many new design elements, including the Fabeingutton, a Floating Action Button.

Normally, we see the Fab button in Android Mobile Apps, but many Apple iPhone, iPad, and Mac App Developers have started using it in their designs.

Here, we will see how to programmatically add the Fab button in your iOS, iPadOS, and macOS app on any view, including UICollectionView or UITableView.

Step 01: First, declare the UIButton variable in your View Controller

var fabButton = UIButton()

Step 02: Add this code to viewDidLoad()

Continue reading “Programmatically add Fab (Floating Action Button) Button to iPhone, iPad and Mac App.”