Skip to content

Instantly share code, notes, and snippets.

Avatar

Igor Castañeda Ferreira igorcferreira

View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / Info.plist
Created Oct 27, 2019
[Catalyst] Registering for & responding to AppleScript events in a Mac Catalyst app
View Info.plist
<key>NSAppleScriptEnabled</key>
<true/>
<key>OSAScriptingDefinition</key>
<string>ScriptableTasks.sdef</string>
@steipete
steipete / HowToUseURLByResolvingBookmarkDataOnMacCatalyst.md
Last active Aug 7, 2020
Using URLByResolvingBookmarkData on Mac Catalyst: Access sandboxed URLs after an app restart.
View HowToUseURLByResolvingBookmarkDataOnMacCatalyst.md

Here's what needs to be done in order to use security scoped bookmarks on Mac Catalyst:

  1. You need an entitlement: "com.apple.security.files.bookmarks.app-scope" needs to be se to 1.

  2. Pass both NSURLBookmarkCreationWithSecurityScope and NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess when creating the bookmark.

Note: The headers mark these API as unavailable for iOS, and this indeed does only work on Mac and not iOS. However, Mac Catalyst really is a Mac app, so using these values is fine. In order to allow compilation, use following:

@steventroughtonsmith
steventroughtonsmith / UIView+Tooltips.h
Last active Nov 14, 2020
WIP tooltips for Mac Catalyst
View UIView+Tooltips.h
//
// UIView+Tooltips.h
// Crossword
//
// Created by Steven Troughton-Smith on 13/09/2019.
// Copyright © 2019 Steven Troughton-Smith. All rights reserved.
//
#import <UIKit/UIKit.h>
@ethanhuang13
ethanhuang13 / xcode-beta-slink.sh
Last active Nov 24, 2020
Symbolic link from Xcode.app to Xcode-beta.app (Xcode 11.2)
View xcode-beta-slink.sh
@mauimauer
mauimauer / AA-AndroidWearCrashlytics.md
Last active Aug 29, 2017
Forward Wear Crashed to Smartphone/Tablet for reporting via Crashlytics (or other Crash Analytics solutions)
View AA-AndroidWearCrashlytics.md

Send uncaught Exceptions from Android Wear to Android

This is a short Gist showing how I transmit any uncaught exceptions happening in the Wearable part of my App to the connected Smartphone/Tablet. This is necessary because Android Wear devices are not directly connected to the Internet themselves.

##Wear

  • WearApp.java
  • AndroidManifest.xml
  • ErrorService.java