Skip to content

Instantly share code, notes, and snippets.

@chichilatte
chichilatte / react-native-permissions+3.10.1.patch
Created August 26, 2024 14:27
Patch to repair the iOS ATT issue #823 for module [email protected]
diff --git a/node_modules/react-native-permissions/ios/AppTrackingTransparency/RNPermissionHandlerAppTrackingTransparency.h b/node_modules/react-native-permissions/ios/AppTrackingTransparency/RNPermissionHandlerAppTrackingTransparency.h
index 69f8999..a1a4df1 100644
--- a/node_modules/react-native-permissions/ios/AppTrackingTransparency/RNPermissionHandlerAppTrackingTransparency.h
+++ b/node_modules/react-native-permissions/ios/AppTrackingTransparency/RNPermissionHandlerAppTrackingTransparency.h
@@ -1,4 +1,4 @@
-#import "RNPermissionsHelper.h"
+#import "RNPermissionsModule.h"
@interface RNPermissionHandlerAppTrackingTransparency : NSObject<RNPermissionHandler>
@chichilatte
chichilatte / MyComponent.tsx
Last active May 16, 2024 12:17
Importing an SVG as a React component (mid 2024)
import {ReactComponent as PencilIcon} from '../assets/icons/pencil.svg'
export default function EditButton(onClick:() => void) {
return <button onClick={onClick}>
<PencilIcon width="12" />
</button>
}
@chichilatte
chichilatte / gist:436f203bb25a90715680
Last active August 29, 2015 14:23
Converting Starling texture to Bitmap
/** Note: Only tested with Starling 1.5.1 */
import flash.display.Bitmap;
import flash.display.BitmapData;
import starling.core.RenderSupport;
import starling.core.Starling;
import starling.display.*;
import flash.geom.Rectangle;
// 'sprite' is a Starling sprite you want to grab the bitmap from