Various personal issues with Jekyll


layout: post
title: Jekyll tips
date: 2021-08-21 17:41 +8
description: Various personal issues with Jekyll
toc: false
share: true
comments: true
tags: Jekyll Development

Compilation Issues

ffi-1.11.1-x64-mingw32 requires ruby version < 2.7.dev, >= 2.2, which is incompatible with the current version, ruby 2.7.4p191
In 2019, I used Ruby 2.5, and in 2021, I switched to another computer and started using Ruby 2.7.4. As a result, the original project failed to deploy with bundle exec jekyll serve.

Solution: Run bundle update to see if it resolves the issue.

Common Issues with Xamarin iOS


layout: post
title: Common Issues with Xamarin iOS
date: 2021-08-21 15:57 +8
description: Various personal issues encountered when compiling and deploying with Xamarin iOS
toc: false
share: true
comments: true
tags: Xamarin iOS Development VisualStudio

Study Notes

Testflight

  1. Since uploading to the store may encounter unforeseen issues (thanks to Apple), it's best to upload a new version a week before the app expires!
  2. As long as the Testflight app has not expired, you can reuse the original version number by just incrementing the Build Number. This way, users don't need to reload the app, and you don't have to wait for Apple's review.
  3. The review process usually takes about two to three days.

Visual Studio 2019 (Windows) + macOS on VMWare Workstation Pro

Q: Uploading keeps showing "altool" exited with code 1.?

It might be that the app-specific password is incorrect or the SDK is outdated, so update XCode and Visual Studio.
Visual Studio can't display the exact error; to see the exact error, go to macOS's XCode > Windows > Organizer and upload manually.
The last screen will show the reason.

Q: Provisioning Profile disappeared? Isn't it supposed to work automatically if you have a subscription?

Delete the %localappdata%\Temp\Xamarin\XMA folder and restart VS.

Q: Unable to upload to the store in macOS either, saying a new SDK is required?

Congratulations, you'll need to start from scratch—download the latest OS dmg from your current macOS, then convert it to an iso file directly in macOS. Don't use Windows's dmg2iso; I tried and it failed.
Don't download VMWARE IMG from the internet, as it's meant for people without macOS and has many bugs and performance issues. It can't be updated, so just download the official latest version.
Once the OS is sorted, download the latest XCode. Then update Visual Studio on Windows (VS version and XCode are interdependent; once upgraded, you can't downgrade, and you won't find detailed historical versions online).
Follow Microsoft's instructions to generate new Provisioning Profiles and Certificates. Manually download them in both VS and XCODE to see if they appear in the list. Restart macOS, restart VS, and delete the XMA folder.

Q: Can't delete %localappdata%\Temp\Xamarin\XMA, files are in use?

End the Broker and IOS tasks in Task Manager, or use Process Hacker 2 to search for XMA.

Q: iOS Release Build takes forever!?

Stay calm~ Wait for ten minutes. Debug builds are faster, which is normal, probably because ARM is slower than X86.

Q: Upload To Store shows empty Profile and Certificate

The Certificate generated by macOS is tied to the OS, so generate new Profiles and Certificates in the Apple Developer Account.
Download the new Profile in XCode settings and in Visual Studio settings.

Q: Authenticate Service not available.

A1: Too many frequent operations, Apple locked it for an hour.
A2: Check the Developer Account to see if new terms need to be accepted. Without acceptance, this message will appear.

Q: After generating a new Certificate in macOS, VS shows Not in keychain?

It means the Certificate is not in the macOS keychain, so download it from the Certificate creation page and import it into the Login keychain. Don't put it in System or iCloud.

Q: Even though it's in Login, the Certificate shows an error in red instead of Valid?

The Developer Relations Intermediate Certificate might have expired, so download it from https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer and import it. Then redo the Certificate generation steps.
Reference: https://developer.apple.com/forums/thread/662300

Q: Can connect to macOS, but Build, Archive, or Distribute shows cannot connect to macOS?

Delete the %localappdata%\Temp\Xamarin\XMA folder and restart VS and macOS.

Thoughts

Using Visual Studio on Windows connected to macOS on VMWare is a great combo for budget-conscious developers.
This year I convinced the company to buy an M1 Mac Mini 16G/512G 1G, and the build speed is much faster! The emulator opens instantly.
The downside is I can only use Visual Studio Community for Mac
since, unlike on Windows, Visual Studio Enterprise isn't readily available on the internet (?).

Quick access to remote PCs by clicking on shortcuts pinned on Windows Start Menu

YouTube Video

The Windows version in the showcase video is Windows 11, but this techniq is not limited to Windows 11

If you frequently need to connect to remote desktops using VncViewer or TeamViewer, you may want to create shortcuts that can launch these connections with one click. You can also pin these shortcuts to your Windows Start Menu for easy access. In this blog post, I will show you how to do that using command line parameters and connection files.

VNC Viewer

VNC Viewer is a software that allows you to remotely control another computer using the Virtual Network Computing (VNC) protocol. To create a shortcut that can launch a VncViewer connection, you need to have a connection file that contains the information of the remote device, such as its IP address, port number, encryption mode, and password. You can create a connection file by saving the settings of an existing connection in VncViewer.

To create a shortcut that can launch a VncViewer connection, follow these steps:

  1. Right-click on an empty space on your desktop and select New > Shortcut.
  2. In the Create Shortcut window, type the following command in the location field:
  3. Follow one approach guide list below

Approach 1: load from a connection file

"C:\Program Files\RealVNC\VNC Viewer\vncviewer.exe" "path-to-your-vnc-file.vnc"

Replace "path-to-your-vnc-file.vnc" with the path to your connection file. You can use quotation marks if the path contains spaces.

Approach 2: store destination address in the shortcut

Let's say if you want to access remote PC without creating a connection file, you can also type the following command instead:
"C:\Program Files\RealVNC\VNC Viewer\vncviewer.exe" 192.168.1.123:7777
The pro is you don't have to create a connection file apparently; the con is you have to type the password each time you try to connect to the remote PC.

  1. Click Next and give a name to your shortcut, such as "VncViewer Remote Desktop".
  2. Click Finish and you will see the shortcut on your desktop.
  3. To pin the shortcut to your Windows Start Menu, right-click on it and select Pin to Start.

Now you can launch the VNC cViewer connection by clicking on the shortcut or selecting it from the Start Menu.

TeamViewer

TeamViewer is another software that allows you to remotely control another computer using a secure connection. To create a shortcut that can launch a TeamViewer connection, you need to have a control file that contains the information of the remote device, such as its ID, password, and connection mode. You can create a control file by saving the settings of an existing connection in TeamViewer.

To create a shortcut that can launch a TeamViewer connection, follow these steps:

  1. Right-click on an empty space on your desktop and select New > Shortcut.
  2. In the Create Shortcut window, type the following command in the location field:

"C:\Program Files (x86)\TeamViewer\TeamViewer.exe" -i 192.168.1.123 --Password 123456789

Replace "192.168.1.123" with the ip address (domain name also work) of the remote PC, and replace "123456789" with the TeamViewer quick access password of the remote PC.

Please estimate the risk of storing visible password in a .lnk file, this may make your remote PC vulnerable.*

  1. Click Next and give a name to your shortcut, such as "TeamViewer Remote Desktop".
  2. Click Finish and you will see the shortcut on your desktop.
  3. To pin the shortcut to your Windows Start Menu, right-click on it and select Pin to Start.

Now you can launch the TeamViewer connection by clicking on the shortcut or selecting it from the Start Menu.

Conclusion

In this blog post, I have shown you how to create shortcuts that can execute commands to connect to remote desktops using VNC Viewer or TeamViewer. You can also pin these shortcuts to your Windows Start Menu for easy access. This way, you can save time and effort when you need to remotely control another computer.

Resolving the Black Screen Issue When Switching to Desktop Mode on Steam Deck

When you encounter a black screen while attempting to switch to desktop mode on your Steam Deck, it can be a frustrating experience. However, there's a straightforward solution that can help resolve this issue. Here's a step-by-step guide to fixing the problem:

Solution

  1. Switching Accounts:

    • Start by logging into a new Steam account through the game interface.
    • Switch to desktop mode using this new account.
    • If the switch is successful, proceed to delete all files (excluding folders) located in Home/.local/share/kscreen and Home/.local/share/kscreen/outputs.
    • For safety, instead of deleting, you may choose to cut and backup these files elsewhere before removing them from the original location.
    • After backing up, switch back to the game mode, log into the original account that was experiencing issues, and try switching to desktop mode again. The problem should now be resolved.
  2. For Users with Decky Extension Framework Installed:

    • Ensure that you have the Decky Extension Framework installed and have set up a root password beforehand.
    • Install the Decky Terminal extension.
    • Execute sudo -i to log in as root, then run the following commands:
      cd /home/deck/.local/share/kscreen
      rm *
      cd /home/deck/.local/share/kscreen/outputs
      rm *
      exit
    • After executing these commands, close the Terminal and attempt to enter desktop mode again; the issue should be fixed.
    • It's recommended to create a script file named fix.sh containing the above commands and store it in /home/deck/. Remember to make the script executable with the command sudo chmod +x /home/deck/fix.sh.

By following these steps, you should be able to overcome the black screen issue on your Steam Deck and enjoy a seamless gaming experience.