Skip to content

Instantly share code, notes, and snippets.

@brunow
brunow / gist:69763de7793d1d01e2f1f124cec55d4c
Created April 14, 2021 05:41
SwiftUI os specific modifier
/// After reading an article from Antoine v.d. SwiftLee  @twannl about conditional view modifier, I had an idea to improve my code I write for specific OS.
/// https://www.avanderlee.com/swiftui/conditional-view-modifier
extension Bool {
static var iOS: Bool {
#if os(iOS)
return true
#else
return false
#endif
@brunow
brunow / ContentView.swift
Created August 26, 2020 15:43
Donate a NSUserActivity and restore it with SwiftUI
import SwiftUI
struct UserActivityView: View {
@State private(set) var activityType: String? = nil
@State private(set) var currentActivity: NSUserActivity? = nil
var body: some View {
Text(activityType ?? "No activity restored yet")
.onContinueUserActivity("userActivity", perform: { userActivity in
self.activityType = userActivity.activityType
@brunow
brunow / README.MD
Created November 12, 2018 09:32
README.MD

Description

Development

Dependencies

  • Ruby (>= 2.4, rbenv or rvm recommended)
  • Bundler (gem install bundler)

Bootstrap

@brunow
brunow / CHANGELOG.MD
Created November 12, 2018 09:08
CHANGELOG.MD

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog.

[Unreleased]

Added

Changed

@brunow
brunow / keybase.md
Created October 11, 2018 09:04
Keybase proof

Keybase proof

I hereby claim:

  • I am brunow on github.
  • I am brunow (https://keybase.io/brunow) on keybase.
  • I have a public key ASDO2E9hfZUnvvJgEIVXfSnH8O1nw0mCoXKSau286dsPIAo

To claim this, I am signing this object:

@brunow
brunow / gist:60ceb5682e4f602545e2564192805a14
Created January 18, 2017 12:11
Run on iOS device >= 10 from Xcode 7
cp -R /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.2\ \(14C89\) \
/Applications/Xcode-7.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport