• Skip to main content
  • Skip to primary sidebar

Ravi Shankar

Tweaking Apps

  • Swift
  • Tech Tips

Mac Screenshot App – Change default screenshot and recordings location

June 7, 2021 By Ravi Shankar

Screenshot app in Mac OS Big Sur is quite useful tool for taking screenshots and screen recording. The default location for saving screenshots and video recording file is Mac desktop.

Mac OS Big Sur users can change the default location to documents or any other location by using the option menu

Launch Screenshot app.

Click the options menu and select Other location. Then create a folder of your choice. In this example, I have created a folder “Screenshot” under desktop.

Any screenshots or recordings will be stored under the newly created folder.

Filed Under: Mac OS X, Tips Tagged With: Screenshot

Turn on/off Wifi using Keyboard shortcut

June 6, 2021 By Ravi Shankar

Mac users can turn on/off Wifi using option available as part of the Menu bar.

Wifi Menu bar option

Add quick action in Automator app

Launch Automator app on your mac and choose Quick Action.

Automator – Quick Action

Choose action as “Run Shell Script” then set Workflow receives to “no input” and set it to run for for any application and select an image for your action.

Then under the run script window add the following script.

set_wifi_on_or_off() {
  networksetup -getairportpower en${n} | grep ": ${1}";
  if test $? -eq 0;
  then
    echo WiFi interface found: en${n};
    eval "networksetup -setairportpower en${n} ${2}"
    return 0;
  fi
  return 1;
}

for n in $(seq 0 10);
do
  if set_wifi_on_or_off "On" "off"; then break; fi;
  if set_wifi_on_or_off "Off" "on"; then break; fi;
done

You can test the above script using “Run” option and check if Wifi settings turned On or Off based on the current state. Save this quick action by providing a name as “Wifi”

Assign a keyboard shortcut for quick action

Launch Keyboard preferences using System preferences and navigate to Shortcuts tab.

Keyboard Preferences

The newly added Wifi quick action will be available under Services. Now assign a keyboard shortcut for this action.

Note :- Make sure to select 3 letters or more keyboard combination for your shortcut. Sometimes other apps might be using the same set of key combination and this would prevent launching the Automator action.

References

Filed Under: Automator, Mac, Tips Tagged With: Automator, Keyboard Shortcut, Mac

Add path variable in MacOS for flutter

March 26, 2021 By Ravi Shankar

Flutter commands can be executed from macOS terminal app after adding the path variable to installation of flutter directory on the local machine. You can set Path variable temporarily by executing the following command in the Terminal app or within the Terminal window inside Visual Studio Code

export PATH="$PATH:`pwd`[FLUTTER_INSTALLATION_DIRECTORY]/bin"

where FLUTTER_INSTALLATION_DIRECTORY represents the installtion of flutter SDK on your local macOS

Setting PATH variable permanently

Mac users having Catlina OS and above can follow the below mentioned steps for setting the PATH variable permanently.

  1. Launch Terminal App.
  2. type touch ~/.zshrc and press enter
  3. type vi ~/.zshrc
  4. add export PATH = $PATH[FLUTTER_INSTALLATION_DIRECTORY]/bin
  5. save the changes.
  6. Reload the changes by typing ~/.zshrc

Now you should be able to run all flutter commands using terminal app.

Filed Under: Android, ios Tagged With: flutter, macOS, terminal

How to know the size of the folders in iCloud

February 15, 2021 By Ravi Shankar

If you are using Apple iCloud, the folder sizes are not shown by default when they are not downloaded to your Mac. Doing the following will show all the folder size whether they are downloaded or present only in iCloud.

  1. Using Finder, Access the iCloud drive.
  2. Navigate to folder in iCloud drive. As you can see in the below screenshot the folders size are not shown as they available in Cloud.
  1. Click View menu option and select “Show View Options” from the menu list.
  1. Tick the checbox with the label “Calculate all sizes”

Now the Finder should show all the folder size even if they are present in Cloud only.

Filed Under: Mac Tagged With: iCloud, Mac

Errors were encountered while preparing your device

February 14, 2021 By Ravi Shankar

One of the common error that occurs in Xcode is “Error were encounted while preparing your device for development. Please check the Devices and Simulators Window.” I have noticed this error after Mac OS update or Xcode app update Trying the following

  1. Restart your device,
  2. Close Xcode and try re-running the Xcode project.

Sometimes after restarting the device you might see the following “iPhone is Busy: Making iPhone ready for development”. Give some time for the device after a restart, this might fix the problem.

If you have come across these during any other scenarios, please share them in the comments section. Thank you.

Filed Under: iPhone, Mac, Xcode Tagged With: Mac, Mac OS

We have blocked all requests from this device – Firebase Phone Authentication

September 15, 2020 By Ravi Shankar

Firebase enables apps with Phone Authentication feature but when testing your app you might have received the following error.

We have blocked all requests from this device due to unusual activity. Try again later.

This user usually occurs when you have received too many OTP’s within a short period of time.  And we have to wait for an hour to start using the Phone Authentication feature again.

Recently Firebase has added a feature to add test numbers. This can be found under Firebase Console -> Authentication -> Sign-in method -> Phone

PhoneAuthentication

Now you can use “Phone numbers for testing” section to add test phone numbers. The test numbers will not be blocked and will not affect your testing. I believe you can also use the test numbers for Apple Approval process when publishing your app.

Filed Under: Firebase, ios, Swift Tagged With: Authentication, Firebase

iPhone is not available error message in Xcode

September 8, 2020 By Ravi Shankar

If you are receiving an error “iPhone is not available” when connecting Xcode with iPhone then check iOS version on your iPhone. Make sure it is compatible with the Xcode version.

iPhone is not available

The conflict in versions can be found under the Xcode – Window – Devices and Simulators. In my case the following error was mentioned.

Errors

“The current device configuration is unsupported. This iPhone 7 (Model 1660, 1778, 1779, 1780) is running iOS 13.6.1 (17G80), which is not supported by Xcode 11.7”

The fix was to upgrade iOS on my iPhone to iOS 13.7.

Filed Under: Xcode Tagged With: iphone

Clear CocoaPods cache, re-download and reinstall all pods

September 2, 2020 By Ravi Shankar Leave a Comment

Here is the code snippet to clear CocoaPods cache then re-download and reinstall all pods.

rm -rf “${HOME}/Library/Caches/CocoaPods“

rm -rf “`pwd`/Pods/“

pod update

Source

 

Filed Under: Uncategorized Tagged With: CocoaPods, Swift

  1. Pages:
  2. «
  3. 1
  4. 2
  5. 3
  6. 4
  7. 5
  8. 6
  9. 7
  10. ...
  11. 44
  12. »
« Previous Page
Next Page »

Primary Sidebar

TwitterLinkedin

Recent Posts

  • How to block keywords in Jio broadband
  • How to disable opening an app automatically at login in Mac
  • How to set preferred Wifi network on Mac
  • Attribute Unavailable: Estimated section warning before iOS 11.0
  • How to recover Firefox password from Time Machine backup

Pages

  • About
  • Privacy Policy
  • Terms and Conditions

Copyright 2022 © rshankar.com

Terms and Conditions - Privacy Policy