Skip to content

Instantly share code, notes, and snippets.

Avatar

Christian Beer chbeer

View GitHub Profile
@chbeer
chbeer / AppDelegate.swift
Created Sep 12, 2020
Prevent PDFView from stealing first responder when setting document
View AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
SwizzlePDFDocumentView()
...
}
@chbeer
chbeer / ExportOptions.plist
Created Sep 10, 2020
Shell script to deploy to AppStoreConnect
View ExportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
<key>destination</key>
<string>upload</string>
@chbeer
chbeer / MSLogger set Logging.m
Last active Apr 22, 2020
Set logging of MS AppCenter
View MSLogger set Logging.m
@interface MSLogger ()
+ (void)setCurrentLogLevel:(MSLogLevel)currentLogLevel;
@end
[MSLogger setCurrentLogLevel:MSLogLevelVerbose];
@chbeer
chbeer / gist:3666e4b7b2e71eb47b15eaae63d4192f
Last active Jun 28, 2019 — forked from odrobnik/gist:e8ac59e13b62ea80b623
Calling AppleScript from Swift App, passing a parameter. Swift 3 version.
View gist:3666e4b7b2e71eb47b15eaae63d4192f
// updated for Swift 3
import Carbon
// Swift version of https://developer.apple.com/library/mac/technotes/tn2084/_index.html
@IBAction func testButtonPushed(sender: AnyObject) {
guard let url = NSBundle.main.url(forResource: "SendFinderMessage", withExtension: "scpt") else {
return
}
@chbeer
chbeer / Dev Links.md
Last active Aug 29, 2015
Developer Links
View Dev Links.md
@chbeer
chbeer / gist:0d02b09b3b127bf4915c
Created Jan 23, 2015
Crash with "Show Detail" Segue
View gist:0d02b09b3b127bf4915c
(lldb) bt
* thread #1: tid = 0x6b9a, 0x00000001974c00a8 libobjc.A.dylib`objc_exception_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x00000001974c00a8 libobjc.A.dylib`objc_exception_throw
frame #1: 0x0000000186c53290 CoreFoundation`-[__NSArrayM insertObject:atIndex:] + 844
frame #2: 0x000000018b5b7ad0 UIKit`-[UINavigationBar pushNavigationItem:] + 268
frame #3: 0x000000018b5b78bc UIKit`-[UINavigationBar _pushNavigationItem:transition:] + 392
frame #4: 0x000000018b7fa334 UIKit`-[UINavigationBar _addItem:withEffectiveDelegate:transition:] + 152
frame #5: 0x000000018b839bfc UIKit`-[UIViewController _appendNavigationItemsToNavigationController:transition:] + 456
frame #6: 0x000000018b5b7340 UIKit`__71-[UINavigationController pushViewController:transition:forceImmediate:]_block_invoke + 292
frame #7: 0x000000018b5d114c UIKit`-[UINavigationController _startDeferredTransitionIfNeeded:] + 980
@chbeer
chbeer / gist:a59b655b25962dccfe02
Last active Aug 29, 2015
Examining Avea via gatttool
View gist:a59b655b25962dccfe02

Find Avea

pi@raspberrypi ~ $ sudo hcitool lescan
LE Scan ...
…
B4:99:4C:49:4D:7B Avea_7B4D
…
@chbeer
chbeer / gist:fe5e66786683786c3b75
Created Oct 30, 2014
strings Keys for "Display Pattern" and "Null Placeholder"
View gist:fe5e66786683786c3b75
"<objectid>.ibShadowedDisplayPattern" = "Localized Text %{value1}@";
"<objectid>.ibShadowedIsNilPlaceholder" = "Null Placeholder i18n";
@chbeer
chbeer / gist:708c696115230a0d7a56
Created Oct 6, 2014
Mapping of old OS X date format (as used in strftime) to unicode format (as used nowadays)
View gist:708c696115230a0d7a56
OLD NEW
--------------------------------------------------------------------
%A EEEE
%a E
%B MMMM
%b MMM
%C ??
%c ??
%D MM/dd/yy
%d dd
View keybase.md

Keybase proof

I hereby claim:

  • I am chbeer on github.
  • I am chbeer (https://keybase.io/chbeer) on keybase.
  • I have a public key whose fingerprint is 955E 7830 DD98 0982 3A8C FC4E 1114 A855 051E 77B4

To claim this, I am signing this object:

You can’t perform that action at this time.