Programmatic AutoLayout Constraints Basics for Xamarin

Create element without an explicit Frame. Set TranslatesAutoresizingMaskIntroConstraints = false Create an array of NSLayoutConstraints Work top-to-bottom, left-to-right, or vice versa. Do this consistently throughout program Use Layout Anchors Use the top-level UIViews SafeAreaLayoutGuide to position relative to the Window / screen For each dimension, set its location (LeadingAnchor / TopAnchor or TrailingAnchor / BottomAnchor) […]

Dell Infuriates Me

Sunday rant: I have a 2016 Dell XPS (high-end) laptop. I bought a Dell 25″ 4K monitor. And on Friday received a Dell Thunderbolt dock for the monitor. I plug it all together and although the monitor displays wonderfully, the dock is not passing USB through. So I start fiddling around with “unplug from dock, […]

Debugging provisioning profiles on the command line

Raise your hand if you’ve ever struggled with getting your app’s bundle identifier, info.plist, and entitlements.plist to match up with your provisioning profile. I tried to explain provisioning profiles using the ten-hundred most common words, but in slightly-less-common words, a development prov-pro associates: A team, a developer, an application identifier, privacy and security entitlements, and […]

Mysterious crashes in your iOS 10 program? Check your info.plist

If you’re developing for iOS 10 and your app “silently” crashes (especially if it’s an older app), the culprit could well be the increased privacy requirements in iOS 10. Namepaces such as HomeKit now require specific privacy-related keys to be in your info.plist (for instance, NSHomeKitUsageDescription). If you don’t have them, the system automatically closes […]

Streaming a Web video to AppleTV with Xamarin

If you have the URL of a streaming video, it’s easy to display on an AppleTV, even though tvOS does not have a UIWebView (which would make it really easy). You have to use some AVFoundation code, such as: Note: This won’t work with normal YouTube page URLs since the YouTube stream URLs are not […]