App crashes on iOS Simulator without debugging

If your app in the iOS Simulator works when debugging with Xcode, but the very same app crashes if you try to launch it without debugging, check your app for a framework listed under Linked Frameworks and Libraries, but not listed under Embedded Binaries. Once the framework shows up in both places, deploy the app again by debugging with Xcode, and then stop the debugging and try to launch it again on the Simulator.

BTW, Happy Birthday to Randall Munroe, creator of the xkcd web comic.

Visual Studio 2017 launches to a black or invisible screen, part 2

It turns out that disabling the Intel and Nvidia drivers on my Windows notebook computer are not really sufficient to fix the issue when Visual Studio 2017 launches to a black or invisible screen, as by doing this, I lost the ability to connect an external monitor to the HDMI port on the computer. Super bummer.

A bit more digging through the interwebs led me to this answer to a question on Stack Overflow:

White screen while opening visual studio

Basically, I re-enabled the Intel and Nvidia display options, then opened the Nvidia Control Panel by right-clicking on the desktop, selected Manage 3D Settings and changed the Preferred graphics processor selection from Auto-select to High-performance NVIDIA processor. Now everything is back to working the way I would like it to.

BTW, there are no birthdays today worthy of mention (cough, cough), so Happy International Left Handers Day!

Visual Studio 2017 launches to a black or invisible screen

So I am working along on a .NET project in Visual Studio 2017 on my Windows 10 Pro laptop, and all of a sudden when I launch the application, I get either a black window where the IDE should be, or the window area is transparent and I just see a shadow of the window edge. Very frustrating, as it was working fine the day before.

Finally I tracked it down to some kind of problem with a display driver. My laptop came preloaded with Intel and Nvidia display drivers and control panels, so I went into the computer management and disabled both the Intel and Nvidia display adapters. After rebooting, my screen still works, and magically I can see Visual Studio when I fire it up. Sure, there are some negatives to this, such as not being able to change the display resolution of the laptop panel, as the only choice in the dropdown is the native resolution of the panel. But at least I am able to once again get stuff done.

BTW, Happy Birthday to Joe Satriani. I hope Joe and the band make a tour stop somewhere near central Ohio soon. I saw the G3 tour last year in Cleveland, but there wasn’t enough Joe.

LINQ to SQL DBML file shows up as XML code in Visual Studio Community 2017

I have a project from a few years ago that I am looking back into again, and while it builds just fine in Visual Studio Community 2017, when I open the DBML file, I get a big XML file instead of a nice design surface with the data tables.

The solution to this issue is to install the correct component to handle this type of file. To do this, you need to exit Visual Studio IDE and then launch the Visual Studio Installer. Once there, click Modify, click the Individual components tab at the top, scroll down to the Code tools section, select LINQ to SQL tools so that there is a check mark next to it, and click the Modify button at the bottom right corner of the window. Once this finishes and you go back into Visual Studio, the DBML file should now show up as a design surface instead of XML source code.

BTW, a posthumous Happy Birthday to Gilda Radner, who left us far too soon.

Swift app crashes with dyld Library not loaded message

So you are humming along on your new Swift app, and all of a sudden, when you bring in a framework revision or try to deploy to a device, you suddenly start getting dyld: Library not loaded messages when the app tries to launch.

Most likely, the reason for this is that the setting for embedding the Swift standard libraries is turned off, and the app for some reason needs them. The fix is easy enough, just go into your build settings for your app and look for “Always Embed Standard Swift Libraries”. Turn this setting on for your app’s target, clean, and then try to run again.

BTW, Happy 20th Anniversary to the iMac, which was announced to the world by former Apple CEO Steve Jobs on this date in 1998. I have had a few iMacs through the years, and they are great machines.

Simple React Native networking

If you are doing some cross platform mobile development, and find yourself in need of doing some simple React Native networking, never fear, fetch is here.

Here is a simple example of what one of your React Native files might look like. Keep in mind that I have gutted out a bunch of stuff from this file just to keep it readable, but you should get the idea from the networking functions getMoviesFromApiAsync() and moviesResponse() below.

import React, { Component } from 'react';
import { Platform, StyleSheet, View } from 'react-native';
import Styles from './Styles'
 
export default class Home extends Component<{}> {
 
  constructor(props) {
    super(props);
  }
 
  static navigationOptions = {
    header: (
      <View style={Styles.header}>
        <View style={{flex:1.0,justifyContent:'center',alignItems:'center'}}>
          <Text style={Styles.locBtnText}> Title </Text>
        </View>
      </View>
    )
  };
 
  render() {
    return (
      <View style={Styles.container}>
        {/* Your stuff goes here */}
      </View>
    );
  }
 
  {/* Networking call done here */}
  getMoviesFromApiAsync() {
    return fetch('https://facebook.github.io/react-native/movies.json')
      .then(response => response.text())
      .then(text => this.moviesResponse(text))
      .catch((error) => {
        console.error(error);
      });
  }
 
  {/* Response comes in here */}
  moviesResponse(text) {
    this.setState({waitCursorShowing: false});
    console.log("Movies response: " + text);
  }
 
}
 
const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor:'white',
    alignItems: 'center',
    justifyContent:'center'
  },
});

BTW, Happy Anniversary to 2001: A Space Odyssey, which debuted to the public 50 years ago today. Sure it is a little slow, but oh what a jump cut.

WWDC goat rodeo

I have an idea for Apple on how to avoid the whole WWDC goat rodeo in terms of the tickets lottery. There are so many developers that do not get a chance to go to the event due to seats being taken up by people who only attend the keynote.

So here’s a thought, have separate tickets for the keynote and for the rest of the event. See, I’m an idea person.

BTW, a posthumous Happy Birthday to Denton “Cy” Young, one of the greatest pitchers in the history of baseball, born this date in 1867.

Back to the future?

What kind of sorcery is going with my framework modification dates?

BTW, a posthumous Happy Birthday to Mr. Fabulous, Alan Rubin. I feel the need now to go and watch Blues Brothers for like the 500th time.

Visual Studio Community 2017 crashes when running application

If you have Visual Studio Community 2017 and it crashes when you try running an application, I have heard that you can solve the problem by making sure that the .NET Framework 4.7.1 package is installed on your Windows machine.

BTW, Happy Birthday to the Great One, Wayne Gretzky.

Advent of Code 2017

Well this year’s Advent of Code 2017 must have been easier than the past two years. Either that, or I am getting better at this software development thing, as I am actually finished with it on the final day of the challenge. Huzzah!

Please feel free to check out my Github site for all the Swift 4 goodness needed to solve the 25 challenges:

https://github.com/Wave39/AdventOfCode2017

BTW, Merry Christmas (or insert your own holiday here) to all, and here’s hoping your 2018 is the best it can be.