Develop Mac Menu Bar App

Visitors it's free and simpler, it just shows the active users but it refreshes very fast, compared to 'Active Users app'. Menu Bar Extras. A menu bar extra exposes app-specific functionality via an icon that appears in the menu bar when your app is running, even when it’s not the frontmost app. Menu bar extras are on the opposite side of the menu bar from your app's menus. The system hides menu bar extras to make room for app.

-->

Watch this video and follow along to create your first mobile app with Xamarin.Forms.

Step-by-step instructions for Windows

Follow these steps along with the video above:

  1. Choose File > New > Project... or press the Create new project... button:

  2. Search for 'Xamarin' or choose Mobile from the Project type menu. Select the Mobile App (Xamarin.Forms) project type:

  3. Choose a project name – the example uses 'AwesomeApp':

  4. Click on the Blank project type and ensure Android and iOS are selected:

  5. Wait until the NuGet packages are restored (a 'Restore completed' message will appear in the status bar).

  6. New Visual Studio 2019 installations won't have an Android emulator configured. Click the dropdown arrow on the Debug button and choose Create Android Emulator to launch the emulator creation screen:

  7. In the emulator creation screen, use the default settings and click the Create button:

  8. Creating an emulator will return you to the Device Manager window. Click the Start button to launch the new emulator:

  9. Visual Studio 2019 should now show the name of the new emulator on the Debug button:

  10. Click the Debug button to build and deploy the application to the Android emulator:

Customize the application

The application can be customized to add interactive functionality. Perform the following steps to add user interaction to the application:

  1. Edit MainPage.xaml, adding this XAML before the end of the </StackLayout>:

  2. Edit MainPage.xaml.cs, adding this code to the end of the class:

  3. Debug the app on Android:

Note

The sample application includes the additional interactive functionality that is not covered in the video.

Build an iOS app in Visual Studio 2019

It's possible to build and debug the iOS app from Visual Studio with a networked Mac computer. Refer to the setup instructions for more information.

This video covers the process of building and testing an iOS app using Visual Studio 2019 on Windows:

Step-by-step instructions for Windows

Follow these steps along with the video above:

  1. Choose File > New > Project... or press the Create new project... button, then select Visual C# > Cross-Platform > Mobile App (Xamarin.Forms):

  2. Ensure Android and iOS are selected, with .NET Standard code sharing:

  3. Wait until the NuGet packages are restored (a 'Restore completed' message will appear in the status bar).

  4. Launch Android emulator by pressing the debug button (or the Debug > Start Debugging menu item).

  5. Edit MainPage.xaml, adding this XAML before the end of the </StackLayout>:

  6. Edit MainPage.xaml.cs, adding this code to the end of the class:

  7. Debug the app on Android:

    Tip

    It is possible to build and debug the iOS app from Visual Studio with anetworked Mac computer. Refer to the setup instructionsfor more information.

Step-by-step instructions for Mac

Follow these steps along with the video above:

  1. Choose File > New Solution... or press the New Project... button, then select Multiplatform > App > Blank Forms App:

  2. Ensure Android and iOS are selected, with .NET Standard code sharing:

  3. Restore NuGet packages, by right-clicking on the solution:

  4. Launch Android emulator by pressing the debug button (or Run > Start Debugging).

  5. Edit MainPage.xaml, adding this XAML before the end of the </StackLayout>:

  6. Edit MainPage.xaml.cs, adding this code to the end of the class:

  7. Debug the app on Android:

  8. Right-click to set iOS to the Startup Project:

  9. Debug the app on iOS:

You can download the completed code from the samples gallery or view it on GitHub.

Next Steps

  • Single Page Quickstart – Build a more functional app.
  • Xamarin.Forms Samples – Download and run code examples and sample apps.
  • Creating Mobile Apps ebook – In-depth chapters that teach Xamarin.Forms development, available as a PDF and including hundreds of additional samples.
Mac

A lot of users are complaining about Safari, saying it’s causing freezing issues. By freezing, it is meant that your Mac is completely unresponsive.

It seems that Safari causes the entire macOS system to lock up.

You may be experiencing some of the following symptoms:

  • Scrolling a webpage in Safari causes your Mac to freeze.
  • The keyboard does not work.
  • Forcibly rebooting your Mac is the only way to fix it.

We know that crashes and freezes in macOS are extremely rare however you may still find that your Mac has become unresponsive, and you may get very frustrated when your Mac isn’t doing what you expect.

Please try the tips below. Try each fix until your issue is fixed.

See this article if you cannot open Safari.

Before you do anything, make sure that your Mac is running the latest version of the macOS software. Here is how you can update your Mac:

  • Click the Apple menu.
  • Click System Preferences.
  • Click Software Update. This will check for updates. If there is an update available, click the Update Now button and follow the onscreen instructions.

If you are using an earlier version of the macOS software (macOS High Sierra and earlier), you can update your Mac by going to the App Store app. And then click Updates.

Fix 1:

  1. Force quit the unresponsive apps, e.g., Safari.
  2. Apple menu > Force Quit.
  3. Or press Option-Command (⌘)-Esc.
  4. Then select the unresponsive apps and select quit.

Fix 2:

Check Safari extensions. Some extensions may cause issues. Here is how you can troubleshoot this problem:

  1. Open Safari.
  2. Click Safari and Preferences.
  3. Click the Extensions tab.
  4. Deselect the checkbox “Enable… extension.” Repeat this for all the extensions you have installed.
  5. Now close the Safari and reopen it. Does this resolve your issue? If not, you can reenable the extensions. If so, then one of your extensions is causing this problem. You can reenable them individually until you find the extension that is causing the issue.

Fix 3:

You may want to delete Safari caches. Here is how:

  • On your Mac, open Safari.
  • Click Safari > Preferences.
  • Click the Advanced tab.
  • Select the “Show Develop menu in menu bar” checkbox.
  • Now restart Safari.
  • Then, in Safari, click Develop (menu bar).
  • Select “Empty Caches”.

Fix 4:

  1. Close Safari.
  2. Open the Terminal app (Applications > Utilities > Terminal).
  3. Enter the following command:
  4. defaults write com.apple.Safari IncludeInternalDebugMenu 1
  5. Then hit return (see below how you can disable the debug menu).
  6. Now relaunch Safari.
  7. You will see the Debug menu in Safari’s menubar.
  8. Click Debug.
  9. Select Drawing/Compositing Flags.
  10. Choose “Disable Canvas Accelerated Drawing” and “Disable Full Page Accelerated Drawing”.
  11. Now check to see if your problem is fixed.

Fix 5:

  1. Restart your computer in Safe Mode. Here is how:
  2. Turn off your Mac.
  3. Now turn on your Mac.
  4. Press and hold the Shift key the instant when you hear the startup chime.
  5. Release the keys when you see the Apple logo or the login screen.
  6. If Safe Boot resolves this issue, restart the Mac normally without pressing the Shift key.

See also: Mac Stuck On “Setting up your Mac”, Fix

Notes:

1-You can now, if you want, disable Safari’s debug menu by entering the following command in the Terminal app:

Develop Mac Menu Bar App Download

You will have to relaunch Safari.

Apple Menu Bar Mac

2-It seems that especially macOS Sierra users are facing this problem.

See also: How to reset Safari.