Joseph Michael Pesch
VP Programming

XCode Hangs on Startup

by 1. November 2020 15:13

Try deleting this directory:

~/Library/Saved Application State/



Image Test

by 11. September 2020 06:50


Chrome Browser Default Color Blue looks like Purple

by 30. June 2020 09:08

Go to chrome://flags and set the "Force color profile" to sRGB


SQL Server on Mac via Docker to Support .Net SQL Based Project

by 5. May 2020 17:50

To run SQL server on Mac using Docker, follow the steps below.

  1. Download, Install and Run the Docker Desktop Application for Mac:
  2. Open Terminal window and run the following statements:
    1. sudo docker pull

    2. sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD={PASSWORD_HERE}" -p 1433:1433 --name sqlserver -d

    3. docker ps (to see running processes, or use the desktop application dashboard)

To initialize the SQL for .Net project:

  1. Create the following folder if it doesn't already exist: Users/{username}/.microsoft/usersecrets
  2. dotnet user-secrets init
  3. dotnet ef migrations script -i -o migration.sql
  4. dotnet dev-certs https --trust

VS Code Extensions:

  1. ms-dotnettools.csharp
  2. ms-mssql.mssql
  3. esbenp.prettier-vscode
  4. dbaeumer.vscode-eslint


Mac OS | SQL Server

NgCore - Angular App with Dot Net Core

by 8. September 2019 12:57

Before getting started, I recommend looking at using for Command Editor.  


  1. Angular installed globally: 
    npm install -g @angular/cli
  2. Visual Studio Code or Visual Studio Community (or other full version)
  3. Node.js v. 8.10.0 or higher ( to check current version, run command: 
    node -v

Steps to create project:

  1. Create folder for the project, in my case "NgCore"
  2. Run the following command from within the project folder:  
    ng new NgCoreApp
  3. Run the following command from withing the "NgCoreApp" folder: 
    ng build
  4. Run the app from the "dist" folder (created by the "ng build")


Angular | ASP.Net Core

by 8. September 2019 12:54



by 6. September 2019 06:20


MacBook SSD Upgrade

by 28. August 2019 11:36


Mac OS

HTML Textbox Auto Complete

by 15. August 2019 19:44



Postman Collection Runner Save Response Body to Environment Variable

by 9. August 2019 08:14

First, create an environment variable called responseData, with the value [].

Then, add the following code under 'Tests' in Builder. Postman environment variables are intended to be used as string, so we will parse the object then push the JSON responses from the API into the object array.

var jsonData = JSON.parse(responseBody); var old = pm.environment.get("responseData"); old = JSON.parse(old); // filter jsonData if needed

old.push(jsonData); old = JSON.stringify(old); pm.environment.set("responseData", old); console.log(pm.environment.get("responseData")); Now you can retrieve a nested JSON object with all the response data included by viewing the environment variables value (see example below).

Warning: you must reset the responseData value as [] after every use of Collection Runner in order to avoid keeping data from previous runs.



by 21. May 2019 12:40


Python Async without Await

by 19. May 2019 16:26

import asyncio
import time
async def px(x):
    print(x + ': ' + str(time.time()))
async def main():
    x = px('x')
    y = px('y')



Google GSuite Drive File Stream

by 19. May 2019 10:12


Local Cache Location:

  • Win: %USERPROFILE%\AppData\Local\Google\DriveFS
  • Mac: ~/Library/Application Support/Google/DriveFS



Swift IOS UITableViewCell Button

by 5. January 2019 12:40

There are two steps to add a working button to a table view cell. The first step is to add a button like this:

cell.accessoryType = .detailDisclosureButton

The second step is to take action when the button is tapped by creating the accessoryButtonTappedForRowWith method:

override func tableView(_ tableView: UITableView, accessoryButtonTappedForRowWith indexPath: IndexPath) {


XCode | iOS | Swift

xCode Support for IOS Device

by 24. November 2018 06:47

Trying to run xCode against connected iPhone and receive error message below:

Could not locate device support files. This iPhone 6s Plus is running iOS 12.0.1 (16A404), which may not be supported by this version of Xcode.


Download latest xCode from (as .xip file), extract the .app file (

Right click on latest xCode .app and select "Show Package Contents" and navigate to:


Select the required version(s) and copy to:


Look into this path as well: /Users/xxx/Library/Developer/Xcode/iOS DeviceSupport



xCode Facebook Login Integration Using CocoaPods

by 18. November 2018 09:26

Terminal window, navigated to root folder where xCode project exists and run the following commands:

  • $ sudo gem install cocoapods
  • $ pod init

This will create a file named Podfile in your project's root directory. Open the Podfile with a text editor and add the following:

  • pod 'FBSDKLoginKit'

Back in the Terminal window, run the following command:

  • $ pod install 

Register app with Facebook (follow steps in this link:

Configure the information property list file (info.plist) with an XML snippet that contains data about your app. Right-click info.plist, and choose Open As Source Code. Copy and paste the following XML snippet into the body of your file ( ...)


To use any of the Facebook dialogs (e.g., Login, Share, App Invites, etc.) that can perform an app switch to Facebook apps, your application's info.plist also needs to include:


Go to the Project Navigator in Xcode and select your project to see project settings. Select Other Linker Flags for editing. Add the flag -ObjC to Other Linker Flags for all build targets. NOTE: Use the find feature to easily locate the Other Linker Flags in the settins area.

If you still have the xCode project open close it. Open the new Workspace that should have been created in the same root folder as the project (e.g. MyApp.xcodeproj should now have a MyApp.xcworkspace partner).

Update the applications AppDelegate method to include the FBSDKLoginKit import reference and methods with FBSDKApplicationDelegate and FBSDKAppEvents (sample shown below).

import UIKit
import FBSDKLoginKit

class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.

        // FaceBook
        return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
    func applicationWillResignActive(_ application: UIApplication) {
        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
        // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.

        // FaceBook
    func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
        return FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: sourceApplication, annotation: annotation)

    func applicationDidEnterBackground(_ application: UIApplication) {
        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.

    func applicationWillEnterForeground(_ application: UIApplication) {
        // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.

    func applicationDidBecomeActive(_ application: UIApplication) {
        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.

    func applicationWillTerminate(_ application: UIApplication) {
        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.


Build Project for Running to make sure everything compiles correctly.



Facebook | XCode

Hosted Site Issues with Roslyn - This program is blocked by group policy. For more information, contact your system administrator

by 9. September 2018 12:24
NOTE: Had to remove package: Microsoft.CodeDom.Providers.DotNetCompilerPlatform
      Due to hosting limitation, throwing this error:
      This program is blocked by group policy. For more information, contact your system administrator
      Cannot execute a program. The command being executed was 
              /shared /keepalive:"10" /noconfig  
              /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\bd40b76f\3452b533\33n50imf.cmdline"
NOTE: See nuget url for package details:
NOTE: Some of the new C# 6.0 language features if used in Views (MVC project) will not compile. 
      Many of my views use the ? null checking operator for accessing Model properties.  
      All of these views now return errors on my Godaddy hosted MVC 5 application.
      This error occurs because Views (by default) are compiled at runtime using the .NET pipeline (not pre-compiled).
      To resolve this issue, simply uncheck the "Allow precompiled site to be updatable" option in your publish profile settings.  
      This should pre-compile your views and allow your C# 6.0 (Latest version of Roslyn Compiler) to run like a champ.



Angular 2 Compile Warning "Critical dependency: the request of a dependency is an expression"

by 28. February 2018 15:11

When compiling Angular 2 application I received compile warning "Critical dependency: the request of a dependency is an expression" when using the require() method with a variable vs. literal string value (see examples below).


This throws compile warning:

let path = 'path_to_item';

let item = require(path);


This does not throw compile warning:

let item = require('path_to_item');




Angular Component StyleUrls Not Working

by 16. February 2018 15:08

Issue with component level styles not working, import "ViewEncapsulation: from @angular/core and add encapsulation: ViewEncapsoulation.None to the @Component decorator as shown below.

import { Component, OnInit, ViewEncapsulation } from '@angular/core';


    selector: 'app-demo',

    templateUrl: './demo.component.html',

    styleUrls: ['./demo.component.css'],

    encapsulation: ViewEncapsulation.None



Angular | JavaScript | TypeScript

JavaScript/TypeScript JSON Navigate by Dotted String Path

by 16. February 2018 15:00

Navigate a JSON object by a dotted string path (e.g. "somePath.subPath.anotherSubPath").

console.log('somePath.subPath.anotherSubPath'.split('.').reduce((o, i) => o[i], jsonObject));


Angular | JavaScript | TypeScript