Friday, November 26, 2021

Add Picture to PDF File

Preview is a versatile tool to view and edit various types of files, including PDF. For example, by using Preview, you can add new text, lines, object shapes to a PDF file. However, it seems, at first,  that images could not be directly added to PDF file(no ways from Previews' menu or toolbar icons), none be directly pasted to.


Just a shorting time searching from internet, I found a way to do that.  Here is the trick to do that:
  1. First copy and paste an image to Preview by Ctrl+N as a new image file;
  2. then select all or part of image and make a copy (Ctrl+C).
  3. Paste the selection by Ctrl+V.
  4. Select all again (Ctrl+A), and
  5. cut the selection(Ctrl+X). This new copy will be as an object instead of image.
  6. The last step is to paste the object to your PDF file in Preview by Ctrl+V!

References

Monday, April 13, 2020

Link to a note in Notes.app

Notes.app is a very good app in Apple eco-system. You can add a note on Mac or iPhone or iCloud. Then all the notes are synced in iCloud if you enable notes on iCloud.

There is a problem to access to a note, especially when you have hundreds or thousands of notes. It is really hard to find out an interested note.

I developed an app: TapToCount-3W. This is a convenient and creative tool to write notes anywhere when you have an iPhone. By categories you define, it is very easy to organize your taps or notes. With a finger tapping on screen, you can create a tap with 3 pieces information: When, Where and What. "What" is a note associated to a tap.

Normally, I don't like to write a lot of text in my app's note. It is much better to use Notes.app or EverNote to write a note. Then, a question comes to my mind. Can I have a URL link in a note, and then I copy/paste the link to my app.

Yes, it is possible. Just follow these simple steps:

  1. Click or tap a note's Add People icon
  2. Enter an email, it can be just you!
  3. Then a link is available in Sharing. I could not find Copy Link in iPhone, but it is in Mac.




In this way, I can have a link in my app.





From this story, I think that any shared resources in Apple devices should have a link or URL available for accessing.


References


Sunday, January 19, 2020

Remove Sunflower Sound Source Drive

I installed Sunflower sound drive long time ago. From System Preferences or Sound source list, 2 soundflower items are displayed. Since this sound source is not working well in Mac OS Catalina, and I have never used it as audio output, I need to remove them.

I found that sound items were installed as extensions to Mac. I don't have original package with uninstaller, hence, I have to manually remove them. Here are steps I found:


  1. Open Terminal
  2. Change folder to /Library/Extensions

    cd /Library/Extensions

  3. Check soundflower is there with command

    ls Soundflower.kext

  4. Remove it with the command

    sudo rm -rf Soundflower.kext

  5. Reboot
After reboot, soundflower items are no longer in audio output list.

One more interesting I found that in the folder of /Library/StagedExtensions/Library/Extensions/, I can still see Soundflower.kext file there, but I cannot remove it with above command. Anyway, the removal seems working fine in terms audio output list, I don't bother to figure out how to remove it from the second place.

Wednesday, January 8, 2020

Connect to Wifi with QR Code

When you go to a new place, such as friends house, hotel, restaurant, airport, public place. One thing you want to find out is if there is Wifi network available? For free Wifi, it is quite easy to make connection. If a password is requite, you have to get it and enter it with your fingers, not so easy when password is long and complicated.

Recently, I read a news about NFC tag to access to Wifi. It is quite easy. You can move your phone to  a nearby NFC tag to access to Wifi. This intrigues me to a related tech: QR code. Soon I find out it is possible. Here are my findings.

Create Wifi QR Code


The first step is to create a Wifi QR Code. The most convenient way is to go to the web site qifi.org. You need to provide following information to generate a Wifi QR code:


where, SSID is a Wifi name, Key is a password, and the choice of Encryption is normally WPA/WPA2. With those information entered, you can generate Wifi QR code by clicking on "Generate!"



In addition to this web service, there are many free apps available on mobile phones. I tried some and some claimed to provide Wifi QR code. However, all my tests were failed. Another thing is that most of apps actually requite Internet access. Maybe they get QR code from online QR services in background. That makes sense. Otherwise, those app would include considerable QR library, which takes some extra space.

From my exploration, I find out the above web service is the most notable and reliable.

Scan QR Code


With Wifi QR code ready, you can use it as a way to easy access to Wifi network. You can save the Wifi QR code image to your mobile phone, or print it out and hanging out on your refrigerator. You can also leave it on your computer/mobile's web browser for people to scan.

Here is a tip. When you cut the QR code, add a title on the top of the image. This makes it easy to recall what this QR code is. There are many other usages of QR codes.



For iPhone users, it is very easy to access to Wifi network just by pointing Apple's Camera app at the code. In photo mode, there is a popup message on the top when you focus on the image:



Tap on the message, another popup window with options is displayed.



Note: your iPhone should be iOS 11 or above. If not showing this popup message, check your Setttings-Camera:



There are many QR Reader apps on iPhone, some claiming support for Wifi code. However, I tried many of them, none of their generated Wifi QR codes is working. Therefore, I choose qifi.org as my best choice.

Another interesting thing about iPhone is that you cannot use any third party apps to access to Wifi automatically by scanning QR code(I'll explain it later). All the QR code reader apps can read Wifi QR code and display its content as text. The following is an example:



If you cannot access to Wifi network automatically, you can still use QR reader app to get all the information, copy the password, and manually set your Wifi access.

For Android users, QR reader apps are requited. Based on the recommendation of qifi.org, two apps are listed in the following section of References.

Security Concerns


Although Wifi QR code techology provides a convenient and quick way to access Wifi network, it also introduce security vulnerability. This is my understanding. A Wifi QR code contains all the information about access to Wifi network. If an app could read all those information and request change of Wifi network without user content(in background, for example), it could change user's network environment without user notice. This would open security hole for hackers to steal user's mobile information, to install evil apps or to monitor user activities.

In this regard, iPhone is doing better. None of any none-Apple apps can do Wifi change automatically. Even for Apple's Camera app, it still displays a message to let user aware what's happening.

Another interesting thing I found is to memorize Wifi settings. I use iPhone. If I manually set up my home Wifi access, for example, my iPhone would remember my home Wifi settings. Next time when I come home, it would atomically reconnect me back to my home Wifi.

However, if I use Wifi QR code to access to home Wifi network, my iPhone will not remember those settings. The next time I am back to my home, my iPhone would not reconnect me back. I have to retype my password again for my home Wifi access.

This may be good for some people if they do not want to let users' iPhone to remember Wifi settings.

If you want your iPhone to remember those settings and want to use Wifi QR code, I found a secret. In the above qifi.org web page, there is an option "Hidden". Check this box and generate QR code. This will make your iPhone to remember Wifi settings!

References




Saturday, December 28, 2019

Manage Safari's Favorites

If you tap or press cmd+L keys in Safari, you will see a dropdown list of icons. Sometimes, you may find some icons aren't valid or you don't need, or, you may want to add some weblinks there. How can you manage those icons?



I found one article about how to remove some icons from the list(just drag one out of the list), but it does not mention how to add new.

If you pay attention to those icons, you would find out they are listed in several groups, first one Favorites, second Frequently Visited... Actually, they are all in Safari's Bookmarks. Soon I found a simple way to add. Just select from menu Bookmarks | Add Bookmark...,



a prompt window will show where to add, and what text will be displayed for the current view webpage,  by default to Favorites.




Further explore, I found that Edit Bookmarks from menu is the place to reveal all the information of icons displayed in address dropdown list window.




References

Tuesday, December 10, 2019

Live YouTube with OBS

I recently got a request from a group of my friends to do a live streaming on YouTube. I did this long time before on my Mac. I thought that it should be easy, even though I still decided to do preparation one week ahead of time. I could not get it to work at start. I have spent several days struggling to figure out how to stream video and audio to YouTube. Finally, I got it work. Here I would like to make some notes on this experience.

What I need for Live Streaming


YouTube raised bar to do live streaming for mobile devices, at least 1,000 subscribes for the time being (Dec 10, 2019). I have to do it with software on my Mac. Here is the list I have to set up:

  • Live streaming software: OBS (Open Broadcaster Software);
  • Web camera as movable camera to shoot: EpocCam for iPhone to shoot, and EpocCam View on Mac to receive video from EpocCam on iPhone;
  • External microphone for audio recording.
and of course, YouTube account is requested to do live streaming. Another thing is that Chrome is required to run Live YouTube, since Safari does not support some features by Live Y.

iPhone as Web Camera


EpocCam iPhone Webcam Viewer is a Mac app, which can be obtained from App Store. On iPhone side, you can also get EpocCam iOS app. In order for Mac to get video source, run the iOS app first, and then run the Mac app on my Mac computer. Both should be on the same network. This is very easy and straightforward step up.


OBS Configuration for Video Source

OBS installation is very easy as well. For Catalina OS, you may experience some issue to run the installation package since it is not from from App Store. Open System Preferences | Security & Privacy, and you will see in General tab that installation... for permission.

Catalina OS has more security features, thereafter, capturing screen/windows, and accessing to a mic have to be permitted by user.

The first difficulty is to get video source for OBS streaming. After one or two days's investigation I eventually found a way to get video source: window capturing. This can be set by adding video source from source panel:



EpocCam running window can be found in window list:



OBS Configuration for Audio Source

The most difficult one is to configure audio source. Before set it up, the following app should be installed first:

iShowU Audio Capture

Basically, this app is used to install a driver as extension to OS X so that it can used as a way to capture audio on Mac computer. The installation process requires to give permission from System Preferences | Security & Privacy.

The next step is to set up audio output device by running Mac utility app: Audio MIDI Setup. Add a new Multi-output Device from left panel:



above is the case of Multi-Output Device with iShowU Audio Capture and Built-in Output checked.

Remember: each time start a live OBS streaming, make sure this Multi-Output Device is selected as output device either from System Preferences | Sound Output tab, from top right Speaker icon:



or



The final and very important step is to start OBS from Terminal with the following command(audio capture would not work if launching OBS directly from Applications!):

open /Applications/OBS.app/Contents/MacOS/OBS --args -picture

When you first time to run this command from Terminal, you will get permission prompt to let this shell to access mic. I think that access to microphone is done by running OBS with argument settings from Terminal. You can verify it by looking at Audio Mixer penal on OBS window's bottom.

Don't close Terminal during live streaming period!

This is my OBS settings for Audio:



The above are all my findings after several days and long hours struggling. I am very happy to get all the issues resolved.

I wrote this blog for my future reference and hope it may help you with similar difficulties.

References

Sunday, December 8, 2019

Watch AppleTV on AppleTV Device

Recently I joined Apple TV subscription by using family sharing. I can watch AppleTV content on my iPhone and Mac computers. However I could not watch the content on my AppleTV device straight through AppleTV app(TV app in short). On my other devices, I can watch TV content when I open TV app since I use the same AppleID with family sharing setting. On my AppleTV device, when I open the TV app, I get prompt to sign in with password for my AppleID. There is no problem to sign in, but I see Trial icon which is not showing on my other devices.

I could mirror or redirect content from my other Apple devices to my big TV screen, but it is painful to watch high resolution TV streaming in this way, always stuck or spinning wheels on screen. My device is 3rd generation one.

After several days trying and investigation, I could not find solution. I decided to get help from Apple. I found Apple support from web. I clicked on call support link from my AppleID page, I was told that Apple support would call me directly. That's new and interesting. Indeed, I got a call from Apple in no time. It was about 8pm on Saturday night.

I explained my issue. The support person actually was not the right one for this issue, but I was forward to multimedia streaming support department.

Solution: Password+Passcode


To cut the story short, the solution is very simple. In the sign in prompt when I open TV app, I was told to type in my AppleID password plus passcode. The passcode can be get from my iPhone. In settings, tap on my name, then Password & Security. Scroll down there is Get Verification Code link to get passcode.

That's very wired and so simple. This requirement is one time. After that, I don't see Trial icon and no need to sign in again. Now I can enjoy my AppleTV content straight from my AppleTV device!