Skip to content

Instantly share code, notes, and snippets.

View igorcferreira's full-sized avatar

Igor Castañeda Ferreira igorcferreira

View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / UIView+Tooltips.h
Last active December 23, 2023 11:05
WIP tooltips for Mac Catalyst
//
// 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 February 3, 2023 20:21
Symbolic link from Xcode.app to Xcode-beta.app (Xcode 11.2)
@steipete
steipete / HowToUseURLByResolvingBookmarkDataOnMacCatalyst.md
Last active October 3, 2022 16:32
Using URLByResolvingBookmarkData on Mac Catalyst: Access sandboxed URLs after an app restart.

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:

@insidegui
insidegui / reloadplugins.sh
Created January 29, 2022 23:00
Make your Mac app's extensions immediately available on macOS with a run script build phase
# Add this to a "Run Script" build phase in your app's main target, as the last step.
# It will use the pluginkit command-line tool to force the plugin system on macOS to add your extensions to its database, making them available.
# I made this specifically for widgets, but it should work for pretty much any extension type (appex bundle).
find $CODESIGNING_FOLDER_PATH -name '*.appex' -exec pluginkit -a {} \;
@steventroughtonsmith
steventroughtonsmith / Info.plist
Created October 27, 2019 17:02
[Catalyst] Registering for & responding to AppleScript events in a Mac Catalyst app
<key>NSAppleScriptEnabled</key>
<true/>
<key>OSAScriptingDefinition</key>
<string>ScriptableTasks.sdef</string>
@mauimauer
mauimauer / AA-AndroidWearCrashlytics.md
Last active November 24, 2021 09:58
Forward Wear Crashed to Smartphone/Tablet for reporting via Crashlytics (or other Crash Analytics solutions)

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