Extending iOSGraphics

I have this sample code from Jason King:

[code]Function Pixel(extends g as iOSGraphics, x as integer, y as integer) As Color
'Jason King
'It works on both iOSGraphics and iOSImage. Just call img.Pixel(x,y) or g.Pixel(x,y) to get the color at the specified position. Enjoy!

	  const UIKitLib =  "UIKit.framework"
	  const CoreGraphicsLib = "CoreGraphics.framework"
	  const FoundationLib = "Foundation.framework"
	  declare function CGBitmapContextCreateImage lib CoreGraphicsLib (context as ptr) as ptr
	  dim cgimageref as ptr = CGBitmapContextCreateImage(g.Handle)
	  declare function imageWithCGImage lib UIKitLib selector "imageWithCGImage:" (clsRef as ptr, img as ptr) as ptr
	  declare function NSClassFromString lib FoundationLib (clsName as CFStringRef) as ptr
	  dim newUIImage as ptr = imageWithCGImage(NSClassFromString("UIImage"), cgimageref)
	  Return iOSImage.FromHandle(newUIImage).Pixel(x,y)
	End Function[/code]

Silly question: I added this to a global method as a new function, but I cant seem to get it to appear as a function of an iOSGraphics object.
Where should I be putting this code to make it work?

Did you create the method in a Module?

The library has 2 Pixel functions.
One calls the other but I was missing one.

The code doesn’t work in 64bit I believe. I was never able to update it so it did. Just as a heads up

Didn’t Apple stop accepting 32bit iOS Apps a year or so ago (ahead of macOS?)
I know the apps I’ve been playing with lately are all 64bit and I know I used to be able to do either (non-Xojo)

or did you mean Xojo 64bit has an issue with it?

Seems to be working for me in debug mode…

Great to hear