#development
1 messages Ā· Page 247 of 1
rather than leave, just mute the server
also idk why
but it is so satisfying
to just
throw this little dude
around
yeah you can mute but it doesn't change the fact that you can just go into it and talk
leaving is a better approach for trying to get away from the server rather then muting
you can import more by dragging and dropping a zip file on the page
idk what id be importing
leaving seems to work better
didn't import
anything in the console?
this tbh
i don't think i care enough to continue working on it beyond this stage
main.js:1 Uncaught (in promise) TypeError: file.bytes is not a function
at fileDrop.ondrop (main.js:1:1156)
surely fix thsi
which browser?
hm
i only tested it with firefox and safari but i would've expected it to work on chrome 
i mean
i would hope so
chrome is the main browser
š
oh shit
you can natively use c++ in swift
thats wild
swift is goated
yes
but swift can use both that and objc and c++ and c
i might actually start putting some c and c++ into my codebases now
W
i like c++ generally
i dont like c
but
c++ is kinda neat ngl
see you next saturday
yeah but its eh
there are certain frameworks that just don't work because of how swift c++ handles memory
ah fair
another issue is it acts as a plague on ur packages
how so
because you need to add cxx compiler support to literally everything
oh true
i.e. if you depend on a package that depends on a c++ package, your package still needs to manually enable cxx
oh shit
so its literally viral
okay
that kinda does suck
You should do the same thing
could they not have come up with a better syntax for this š„
dang this is recent
oh no it's ES6
I'm trying to reverse engineer a macos binary that I have the swift source to, and the decomp in ida looks basically nothing like the source code that i'm looking at, is there a reason for this or a way to make it a little bit understandable?
welcome to how swift works
does it compile to obj c or something
c++
hmmmm
I see a lot of functions with objc in the name almost implying there's some kind of bridge
yeah, a bridging layer exists to talk to objc methods
but these bridges are just calling the objc runtime methods, the same way it would look for pure objc code
ah so is that why it's such a mess
depends what ur looking at
if its swift coding interacting with an objc framework its pretty good but if its pure swift then it becomes a clusterfuck because it can optimise itself to a much greater extent
yea it's pure swift
that would explain the clusterfuck š
does this "Swift plugin" do jack shit
it deobfuscates symbols and does some small cleanups
what would you propose?
hm
Anything else
https://github.com/swiftlang/swift/tree/main/stdlib looking up information on stdlib functions can help you annotate the decompilation better
alright thanks
is there a server or something specifically for swift reing?
not really
(to my knowledge anyway)
damn unfortunate
also should have added that Apple are super unlike other companies like Facebook, they usually wonāt adopt anything that isnāt bleeding edge. compare to Facebook who dogfoods changes to React/React Native for months before it hits github
canāt say I like Facebook, not even if you held a gun to my head (pls donāt do that), but they at least build things they want to use themselves. rather than other teams being sceptical and refusing to adopt it
zstd is pretty neat
god uikit can be a pain
so many hacky fixes
delaying updates by like 0.01 of a second so it doesnt crash

Thatās a race condition
im actually not sure what it is because it happens when snapshotting a view
so i doubt its a race condition
i mean
what im doing
is making one
but i dont know why i have to
either way it crashes on ios 6 anyways for other easons
ios 7 ironed out so many kinks in uikit

guys
where are the header dumps
for ios
limeos is back up gg
does anyone know of a fast way to get a screen capture
renderincontext is too fucking slow
how do you use private apis
_captureScreenImage in FastScreenCapture.o
"_CoreSurfaceBufferUnlock", referenced from:
_captureScreenImage in FastScreenCapture.o
"_IOMobileFramebufferGetLayerDefaultSurface", referenced from:
_captureScreenImage in FastScreenCapture.o
"_CoreSurfaceBufferLock", referenced from:
_captureScreenImage in FastScreenCapture.o
"_CoreSurfaceBufferGetBytesPerRow", referenced from:
_captureScreenImage in FastScreenCapture.o
"_CoreSurfaceBufferGetBaseAddress", referenced from:
_captureScreenImage in FastScreenCapture.o
"_CoreSurfaceBufferGetPixelFormatType", referenced from:
_captureScreenImage in FastScreenCapture.o
"_CoreSurfaceBufferGetHeight", referenced from:
_captureScreenImage in FastScreenCapture.o
"_CoreSurfaceBufferGetWidth", referenced from:
_captureScreenImage in FastScreenCapture.o
"_kIOMasterPortDefault", referenced from:
_captureScreenImage in FastScreenCapture.o
"_IOMobileFramebufferOpen", referenced from:
_captureScreenImage in FastScreenCapture.o
"_IOServiceMatching", referenced from:
_captureScreenImage in FastScreenCapture.o
ld: symbol(s) not found for architecture x86_64
i cant figure ts out
okay i figured out how to get past that bit
but i cannot for the life of me get the iosurface to open
found a library that uses iosurface (pain in the ass to setup)
its like
5 times faster
lets fucking go
only downside is i can no longer build for simulators

Look into using https://www.man7.org/linux/man-pages/man3/dlsym.3.html
i might end up ditching this methods lmao
its crashing on ios
6
grrrrr ios 6 why do you do thsi to me
You can dynamically call private symbols so that:
A: No annoying linking
B: Easier to hide in App Store
also yeah i know about that
yes i know
dlopen
ive tried it
it's useless
the app has to link against the older framework
iosurface itself moved from privateframeworks to frameworks and has new symbols in ios 11
lol
plus
Then just do if available on what you open
the frameworks are arm
lol
it cant compile with them there it implicitly links them
Isnāt every iOS framework arm 
No
Nearly every framework is x64
otherwise the sim wouldnt be able to use it
lol
Sim is a diff story
Thatās not a huge downside
either way it doesn't seem to work on ios 6 even though apparently it was made for it?
kinda sucks but oh well
project if anyone is interested
its substantially faster than renderincontext thats for sure
renderincontext is fucking slow as balls
//
// UIView+FastScreenshot.m
// FastScreenshotDemo
//
// Created by Anton Bukov on 27.08.13.
// Copyright (c) 2013 Anton Bukov. All rights reserved.
//
// Fix for iPad compatibility found on:
// https://github.com/coolstar/RecordMyScreen/blob/master/RecordMyScreen/CSScreenRecorder.m
#import "IOSurface.h"
#import "UIView+FastScreenshot.h"
@implementation UIView (FastScreenshot)
+ (UIImage *)screenshot
{
CGSize screenSize = [UIScreen mainScreen].bounds.size;
float scale = [UIScreen mainScreen].scale;
NSInteger width, height;
// setup the width and height of the framebuffer for the device
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
// iPhone frame buffer is Portrait
width = screenSize.width * scale;
height = screenSize.height * scale;
} else {
// iPad frame buffer is Landscape
width = screenSize.height * scale;
height = screenSize.width * scale;
}
NSInteger bytesPerElement = 4;
NSInteger bytesPerRow = bytesPerElement * width;
NSInteger totalBytes = bytesPerRow * height;
NSDictionary *properties = @{
(__bridge NSString *)kIOSurfaceIsGlobal:@YES,
(__bridge NSString *)kIOSurfaceBytesPerElement:@(bytesPerElement),
(__bridge NSString *)kIOSurfaceBytesPerRow:@(bytesPerRow),
(__bridge NSString *)kIOSurfaceWidth:@(width),
(__bridge NSString *)kIOSurfaceHeight:@(height),
(__bridge NSString *)kIOSurfacePixelFormat:@(0x42475241),//'ARGB'
(__bridge NSString *)kIOSurfaceAllocSize:@(bytesPerRow * height)
};
IOSurfaceRef surface = IOSurfaceCreate((__bridge CFDictionaryRef)properties);
IOSurfaceLock(surface, 0, nil);
extern void CARenderServerRenderDisplay(int a, CFStringRef display, IOSurfaceRef surface, int b, int c);
CARenderServerRenderDisplay(0, CFSTR("LCD"), surface, 0, 0);
void * baseAddr = IOSurfaceGetBaseAddress(surface);
NSData * data = [NSData dataWithBytes:baseAddr length:totalBytes];
IOSurfaceUnlock(surface, 0, 0);
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, data.bytes, data.length, NULL);
CGImageRef imageRef = CGImageCreate(width, height, 8, 8*bytesPerElement, bytesPerRow,
CGColorSpaceCreateDeviceRGB(),
kCGBitmapByteOrder32Host | kCGImageAlphaFirst,
provider, NULL, false, kCGRenderingIntentDefault);
UIImage * image = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
CFRelease(surface);
return image;
}
@end
pretty cool stuff
shame it isn't seeming to work on ios 6
apple sucks
idk why they hide all this stuff away
it actually pisses me off
why do they give us devs such shit methods
they added drawviewhierachy in ios 7 asw
all i have is the awful renderincontext
ive optimised the shit out of the entire rest of the app
if you dont run renderincontext its a smooth 60fps with super heavy effects
3 blur kernels
and then boom renderincontext and it just chugs 
grr grr grr
Sorry bro I donāt understand 80% of stuff you talk about but I feel like youāre talking to yourself
Thatās because I am kinda
Publicly logging my experience Ig allowing anyone to weigh in if they feel like it
dispatch_async(dispatch_get_main_queue(), ^{}) without a delay can be fine for this, because you're scheduling for the next tick of the run loop
that's enough to let another layout pass happen
what if the main queue has other things though
LF someone who has tinkered with SEPROM.
go ahead, ask
It looks using a private key for generating keyIds. And there are a counter how many keyId do you have. Maybe if we reset private key in the SEP we can generate new keyIds.
or maybe something can possible?
Flashbacks
Please make a blog
I will buy the domain for you
do not
Google blogspot?
github pages
+1
I hate html
Tried that
And I already have a website
lol
jekyll template that lets ypu use markdown
And a domain
No like I have everything about web development
Literally everything j hate every workflow
Web development sucks
Iāve tried numerous libraries including jekyll
ask chatgpt to make it for you then
I already did that for the bulk of my website lol
It's annoying and slow tho
Progress update
Use hugo so you write with markdown
Please
Or just upload text files
Wordpress
Something
lol
webdev is a shitehole anyways
make ai do the satans work (javascript)
Unpopular opinion, vibe coding is cool as long as itās not for a job
Like if you need a quick python script or html thatās fine
But if your doing something that your publishing outside of a personal website, nah donāt
I think you're always doing yourself a disservice by using ai
personal service i guess
if you choose to shit your own pants..
were in a free country
it was a bad analogy but you get it
what the fuck is flexing am i learning css flexboxes
oh my god it all makes sense its so cool
using CSS on a native UI framework š„
i didnt mean that š
it sounded like flexbox
I dont understand why it doesnt work in this menu though
id love to get rid of āsiri suggested websitesā
Disconnect from the internet
or understand why i cant selevt that part
i dont want ads
lmao im being entertained my moving shit around
this is so fun
Nevermind, Apple banned A10 devices for app attestation, tested. I think it was possible. @steady nest
Also, probrably they banned around August 2025.
Same way
not gonna lie this looks kinda good
instead of the search pills
or whatever they are
it goes back š¢
i cant get it working in discord
On Vitreux you can enable glass underlay effect
test said aegea
fr
i dont udnerstand why i cant move shit inside apps
RCTView over all the shit probably
You have to open flex after you open that menu
and that
ohh okay
makes sense th
i opened it on the springboard so it does its thing on the springboard
im getting rid of fucking siri suggestions
Yup
Tap and hold anywhere on the screen with three fingers
Havenāt fucked around with flex in quite a bit
when did i say gay :33
loo
lol
Select item, click on it, in this case YYLabel, scroll to first property change the value to the text u want
scroll from the menu?
okay found it
i crashed the fcking
phone
i think
its running like delayed
is there emergency restart springboard
The fuck did you do š
Thereās tweaks to do that
The jailbreak app
okay found it
silly
hehe
im just a silly
Oh wow this is dangerous
What did you do/find out
You can doctor text kinda
Im not gonna do anything tho
i would never
Ok
me when xcode freezes up every 2 hours essentially forcing me to go outside
then you're enqueued to run asap, which is still the case with timers. you're being run at some point after the timeout expires
i just have to do this
public func textViewDidChange(_ textView: UITextView) {
backgroundView.frameInterval = 60*60*60
let width = textView.bounds.width > 0 ? textView.bounds.width : 100 // fallback
let size = textView.sizeThatFits(CGSize(width: width, height: 1000000))
let clampedHeight = max(40, min(size.height, 120))
if clampedHeight != self.bounds.height {
self.invalidateIntrinsicContentSize()
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
self.backgroundView.frameInterval = 6
}
}```
if i don't then it crashes i'm assuming because sometimes it tries and captures the frame while its in animation
and im guessing there are a few frames
where the bounds are functionally zero
and it craps out
it also can't snapshot an animating view very well so
its fine tho
holy fuck
i am actually crashing out
idk why io surface captures dont work on ios 6 for images
they really got inspect element for ios
there is inspect element on safari too
same
i did a thing i think its cool
https://tomcat.sh
(new footer) (check it out)
Cool
good design
bad mobile support
Preyyy cool
LMAO
i think i figured out why atomic_store happens
i am so stupid
š
because of my laziness
i didnt build compiler-rt
turns out
compiler-rt has its OWN implementation of atomic_store
now it just so happens
that ios 7+ DOES have atomic_store in libsystem.b
but swift was never meant to link against that
it was meant to link against compiler-rt's atomic_store

now i have to rebuild all my toolchains AGAIN
did you need to split this into 14 messages
lobby for my movement to move jwi swift log to either a personal blog or at least a thread
nothing wrong with it i find it interesting, but realistically it doesn't need to span my whole viewport š
i think it's past the point of getting in the way of other development conversation happening
i see people just give up talking in here because it gets flooded by jwi's singular blog
even i was never as bad as this
i mean here's the thing though like that's all good and well
but this is a public channel
and generally most of the time when i'm talking here the channel is fairly dead
in fact most of the time the channel is dead anyways
and even when it's not, generally when i'm dev logging it's at a time of day where most people are asleep and so i don't really find that i interrupt others conversations much, or at least, i'm not conscious of it. plus, if there's already a conversation going on in here, either i'll relate to it and join in or not relate to it and not say anything like a regular person. it just so happens that in the periods of time where this channel would usually be filled with nothing, i dev log my experience in hopes of 1 storing it 2 allowing others already here to see it and not hiding it away on the millions of dev logs that exist and will never be found and 3 easily allowing myself to ask questions about my experience
which, if i'm not wrong, is the point of this channel
now, i do tend to split my messages up a lot which i can certainly understand to some is annoying, and sometimes i do try and put extra effort into not doing so, but this just so happens to be the way that i talk online due to various reasons that i'd rather not get into. i do however apologise if i have ever accidentally cut off or interrupted someones thoughts/conversations
it's more for asking questions about development and sharing one off links / comments
not really a running commentary
(that part was directed towards the last part)
well points 1 and 3 would still be solved if you ran your own dev log
you could make a thread off this channel, then you get best of both worlds š¤·āāļø
i didn't mean to insult you it's just whenever i see this channel nowadays i miss the actual conversation and just see a wall of text which could've been a sentence
alr
ill limit my use of this channel, sry if i've made the experience worse for anyone
Well, I think I have solved atomic store. The method in which I have gone about doing this is a bit wacky, so I will have to document it
FUCK YES
Step 1:
Go to compiler-rt/lib/builtins/CMakeLists.txt
Step 2:
At the place
set(GENERIC_SOURCES
${GENERIC_SOURCES}
atomic.c)
endif()```
change it to
```set(GENERIC_SOURCES
${GENERIC_SOURCES}
atomic.c)```
Step 3
Rebuild LLVM via the swift build script using the command
```./utils/build-script \
--release \
--ios \
--install-prefix=/tmp/swift-ios-toolchain \
--darwin-deployment-version-ios=7.0 \
--darwin-deployment-version-osx=10.15 \
--extra-cmake-options="-G Ninja \
-DLLVM_BUILD_RUNTIME=ON \
-DSWIFT_INCLUDE_TESTS=OFF \
-DCOMPILER_RT_BUILD_SANITIZERS=OFF \
-DCOMPILER_RT_BUILD_BUILTINS=ON \
-DCOMPILER_RT_ENABLE_IOS=ON \
-DCOMPILER_RT_USE_COMPILER_RT_BUNDLED=ON \
-DCOMPILER_RT_USE_LIBCXX=ON \
-DCOMPILER_RT_HAS_ATOMICS=ON" \
--skip-build-benchmarks \
--skip-test-ios \
--skip-test-ios-simulator \
--skip-build-linux \
--skip-build-freebsd \
--skip-build-cygwin \
--skip-test-swift
Step 4
Go to build/Ninja-ReleaseAssert/llvm-macosx-x86_64/tools/clang/runtime/compiler-rt-bins/lib/builtins
Step 5
Use
libclang_rt.builtins_armv7_ios.a \
libclang_rt.builtins_armv7s_ios.a \
libclang_rt.builtins_arm64_ios.a \
-output libclang_rt.ios.a```
to build a fat binary
Step 6
Go to build-script-impl in swift/utils
Step 7
find this line
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" ]
and where it has a path linking to the library, paste the path to your recompiled fat binary
Step 8 rebuild using this command (do not clear build folder)
```./utils/build-script \
--release \
--ios \
--install-prefix=/tmp/swift-ios-toolchain \
--darwin-deployment-version-ios=7.0 \
--extra-cmake-options="-G Ninja \
-DLLVM_BUILD_RUNTIME=ON \
-DSWIFT_INCLUDE_TESTS=OFF \
-DCOMPILER_RT_BUILD_SANITIZERS=OFF \
-DCOMPILER_RT_BUILD_BUILTINS=ON \
-DCOMPILER_RT_ENABLE_IOS=ON \
-DCOMPILER_RT_USE_COMPILER_RT_BUNDLED=ON \
-DCOMPILER_RT_USE_LIBCXX=ON \
-DCOMPILER_RT_HAS_ATOMICS=ON" \
--skip-build-benchmarks \
--skip-test-ios \
--skip-test-ios-simulator \
--skip-build-ios-simulator \
--skip-build-linux \
--skip-build-freebsd \
--skip-build-cygwin \
--skip-build-osx \
--skip-test-swift
in case anyone wants to know
consider that it might be dead because you kill it constantly
You prevent people from initiating conversation when the entire channel is filled with your unfiltered brain activity, because it makes the channel be already full
It is OK for a channel to not be filled with messages 24/7
This.
Okay
Sorry about that, I tend to get very focused and consumed by the things that I'm passionate about working on and generally there hasn't been a lot of people who take interest in said activities let alone have discussions about them, and especially with this I guess I have been overly excited about developments since I haven't really done something like this before and actually had it work out properly, but I don't mean to stifle other's conversations and I apologise if I have done so. I fear that in oversharing and not having a filter on my thoughts I have had a negative impact here rather than a positive one, which is not what I want to do.
@magic hazel yk what you should do? create a thread in the Theos server for your dev log
Whoever wants to access it will be able to, and whoever doesnāt, wonāt
Alr
1 is a horrible reason
Do not use discord as a place to store info
What happens when you get banned or this server gets nuked or deleted
Yep fair enough
Itās less of a permanent storage and more of idk a storage thatās convenient but I get your point and I do try and backup anything important to a better place, but obviously itās not ideal for anyone here to have to wade through walls of my unfiltered thoughts
ptsd
Does anyone know anything about Compiler-RT beyond the surface level
Hot take: If your git commit message has an "and" in it, it should probably be two commits
The first one
That's what people make fun of it for in my experience
It's what I've seen
ngl, the second is pretty simliar
to swiftui
but the first is too
Different parts of it I would think
the first looks like stacking issues, the second looks like chained modifier issues
yep
not like you would be able to write the same code in both ways
nah bcus the first one is just "stack style" but its really not stacking
but yeah nested code like that is a big swiftui issue
this is why you split views into smaller views
ok but what if I work on a feature, get sidetracked by another, then come back to that one then commit
What if i fix one thing and then that in turn fixes another thing
you make two commits for the two changes
just stop having adhd
No i mean one fix fixes another thing along with what i was fixing originally
fix: adhd
The message usually shouldn't say what you fix, it should say what you did
Dont care
Usually I get creative with my usage of git add -p
perhaps
dude thinks he's the git police
Anyone know why UIKit can't be run on a background thread
It seems like an odd limitation
Can SwiftUI be run on a background thread?
Itās a conscious design decision in favour of performance
I see
Well, interestingly, it's tanking my performance
Then youāre doing it wrong
Well sadly Apple decided to make renderInContext CPU based
And since it always runs on the main thread, it's causing immense slowdown
Thereās a lot of good Apple talks on how to optimise your app for this main thread model
Apple has never provided a non single threaded model for snapshotting the view in UIKit to my knowledge
They themselves don't even use their API for it
They use IOSurface
Just draw your app directly on the framebuffer and use kernel apis directly to get touch events

Thatās intentional
This does not take into account the fact that you're rendering a retina screen to a UIImage every frame on the main thread I've already read this, plus, it's for SwiftUI, no?
And they basically just say
"Go multithreaded"
Which, no shit
Oh then youāre doing it wrong
You should thumbnail the image before presenting it
If I understood they correctly
Wait
?
Why are you rendering to a uiimage
There has to be better methods of blurring screen content than capturing it, blurring the image and then displaying the image
I would be happy to implement such a method
However, I have spent a good deal of time searching
If anyone knows one I will try it
Remember that this is supposed to act like any regular UIBlurEffect
So it has to dynamically reflect what's under it
Have you looked into reverse engineering how uiblureffect works
I already have
IOSurface
They literally just reuse framebuffer from what I can see
I have tried to implement their method
However for whatever reason, video capture works, whereas image capture does not
I tried to use RecordMyScreen as a jumping off point
It works on iOS 7
But not on iOS 6
But video capture works on both
It is very confusing why
Blurring is prob done inside backboardd
since itself is rendering the views, it can read the pixels and apply blur effect in place(?)
Oh yeah true
mineek ass solution
You would do that
rt
Bro this cannot get any funnier
*in asm
Yk whatās funny
Render in context brings my iPhone SE 2 to a halt when running 2 full res captures
Thatās how slow it is
Itās truly a terrible API
I wish they exposed their actual api
Okay I'm actually really confused
When I dismiss my ViewController, my images are still held in memory
I really don't understand why
Depending on where youāre presenting it, the container may still be holding a reference
A view controller being dismissed != deallocated straight away
It NEVER gets deallocated
Like ever ever ever
never
it literally memory leaked last night
i left the sim on
and it leaked
it NEVER deallocs
its the images
If you create a memory graph in Xcode can you see whatās holding a reference to your vc
its not the vc
its the images
inside
also i tried that but i have no idea how to navigate the graph
But then surely if the images are inside your vc somehow thereās a reference somewhere
otherwise theyāre not in your vc
example of one
Idk what's happening in here
I can see a bunch of stuff that i know about in isolation but idk how it's connected or how to read the graph
Wtf
š
That looks like every single reference that could be possibly held is still being held
It suggests that the vc that had these views still exists in memory
So either:
- One of your views is holding a reference as part of the view controller life cycle
- Your view is being leaked in some way
i thought it was this but i got rid of this
func setupWebsocketWatchers() {
let center = NotificationCenter.default
observers.append(center.addObserver(forName: .messageCreate, object: nil, queue: .main) { [weak self] notification in
self?.createMessage(notification: notification as NSNotification)
})
observers.append(center.addObserver(forName: .messageDelete, object: nil, queue: .main) { [weak self] notification in
self?.deleteMessage(notification: notification as NSNotification)
})
observers.append(center.addObserver(forName: .messageUpdate, object: nil, queue: .main) { [weak self] notification in
self?.updateMessage(notification: notification as NSNotification)
})
}
deinit {
for observer in observers {
NotificationCenter.default.removeObserver(observer)
}
print("ā
DMViewController deinitialized")
}```
also it DEFINITELY deinits
but the messageviews don't
the vc itself does
idk what on earth is talking to the messageviews
deinit {
unloadHeavyContent()
print("Deinit!")
}```
this never runs
this is the vc
Line 164 165?
Iām on mobile, wasnāt sure if I was missing a removeObserver somewhere
That is the only issue I can see though from my scan through
nope
still didnt goa way
let center = NotificationCenter.default
observers.append(center.addObserver(forName: UIResponder.keyboardWillShowNotification, object: nil, queue: .main) { [weak self] notification in
self?.keyboardWillAppear(notification: notification as NSNotification)
})
observers.append(center.addObserver(forName: UIResponder.keyboardWillHideNotification, object: nil, queue: .main) { [weak self] notification in
self?.keyboardWillDisappear(notification: notification as NSNotification)
})```
Oh
You remove the observers in deinit
But deinit wonāt be called until there are no references
So it will never run
ā DMViewController deinitialized
Really?
it does run
what
yep
it runs
lol
it 100% runs
the gesture recogniser gets dealloced too wtaf is going on
š
its not even my websocket
i am actually completely lost here
attachment.fetch { [weak self] content in
guard let self = self else { return }
guard let image = content as? UIImage else { return }
let imageView = UIImageView(image: image)
imageView.contentMode = .scaleAspectFit
imageView.translatesAutoresizingMaskIntoConstraints = false
let originalSize = image.size
let aspectRatio = originalSize.height / originalSize.width
self.messageAttachments = imageView
self.messageContent.addArrangedSubview(imageView)
NSLayoutConstraint.activate([
imageView.leadingAnchor.constraint(equalTo: self.messageContent.leadingAnchor),
imageView.trailingAnchor.constraint(equalTo: self.messageContent.trailingAnchor),
imageView.heightAnchor.constraint(equalTo: imageView.widthAnchor, multiplier: image.size.height / image.size.width)
])
self.setNeedsLayout()
self.layoutIfNeeded()
}```
i run weak self on literally everything
nothing should be retained
Does this happen every time
Or just during tests
Like
Itās a rare issue or constant
always
bruh the fucking stack view isnt getting removed
what on earth is still referencing the stack view
š
yeah okay so removing the stackview on deinit solves most of the issues but there's still stuff left over
i do not want to resort to manual cleanup though
If youāre still stuck when I wake up Iāll have a proper look with a fresh head
This really shouldnāt be needed
i know
chatgpt's only solution is "oh nil out all contents"
like fuck right off
thats not fixing the problem
its a bandaid
useless ahh
Possibly a dumb question, but do you have unit tests for your old iOS UIKit layer to verify itās not an issue with that somewhere
I see references to if available iOS 7
i dont do unit tests
what layer?
Didnāt you write a library that lets you use new uikit apis on older devices
I donāt think Iām going insane I swear you did this like 2 weeks ago
Iām just spitballing, this is a really odd issue
I would high recommend going forward, being saved by good tests is so fun
yeah i did
rn im literally using actual apis tho
i thought it was that
i changed deploy target to max
so it auto gets rid of those
š
my sep module extractor has been saved countless times from a breaking change due to me running it on all versions of sepfws
!
Iāll have another look tomorrow when Iām not hazy af, itās most likely something really annoying (my favourite)
Thatās basically a unit test

Memory leaks are my favourite issue to debug icl
i really should start making tests for specific functions though
Sure, it can help give you more granular results, but the end result would be the same
Fwiw this has been on my to do list for so long at work and Iām slowly increasing our test coverage
in c if you don't free it's a memory leak but if you do it too much it's a double free and thus it's always better to keep memory leaks QED

i hate memory leaks
the amount of time i've spent trying to debug memory issues on dsc though
without a proper debugging setup
pain
NSLog(@"") was basically my only tool
and also top
maybe its my constraint system...? nah it cant be its using real constraints
well
i found the culprit
its inputview
i just dont know why
i dont know what inside of inputview is calling it
if i make snapshotview a weak var it fixes the issue
i think thats not a hack
i think thats actually reasonable
lol yeah i know why
snapshot view is literally owned already
so if i dont make it a weak var itll cause a retain cycle
bruh im a dumb ass
also i didnt put weak self in the addaction closure so it was going to be retained either way
okay so memory leaks have been avoided
mostly
however
there's 5mb of god knows what that WILL not disappear and i'm unsure how to find it
it keeps building up on every reopen
possible thoughts?
@magic hazel
@native dune Is it working
Yeah
Can someone open this app on iPhone X iOS 16.7.12, with jailbreak palehide (dopamine roothide) paid reward . https://apps.apple.com/br/app/c6-bank-cartão-conta-e-mais/id1463463143
āBaixe o app do C6 Bank e abra sua conta digital em real, dólar ou euro em minutos. CartĆ£o de crĆ©dito (sujeito a anĆ”lise), pontos que nĆ£o expiram, uma das menores taxas de cĆ¢mbio do mercado e mais.
Somos um banco completo com tecnologias de seguranƧa exclusivas para proteção do seu dinheiro no Brasiā¦
@solar wing
Hey, if i wanted to develop small personal tweaks e.g. stop my phone from vibrating when my watch is not connected to it; where could i learn that
!t becomejbdev
Hey @mighty smelt, have a look at this!
that is intended toward developing jailbreaks themselves
if you haven't programmed in a c based language before i would say start with the first few videos in the stanford objective c course, it's quite good. after that, take a look at Theos, and it's tutorials, it's pretty easy to get a hold of after you learn objective c.
@visual meadow do you have any neat/cool way of doing XPC between a troll store app and an executable spawned by that trollstore app. I can't use standard xpc mach services because that relies on the daemon being spawned by launchd.
Is there any dumb fuckery I can do
stdin/stdout?
The daemon can be connected to by numerous clients at once
but will it realistically do that?
OK my next best idea is some sort of socket
Idk if you can make Unix sockets but otherwise just open a port
You can just use bootstrap_check_in to register your mach service
launchd is just the one reserving the Mach name for you so others canāt impersonate, if you have a name thatās not reserved you can freely register it
Woah really? Thatās incredible
Sorry I was late to this but Duys solution is best
Iāll try it in the morning if that works itāll be such a life saver
You can even register your processās task port for fun
@light owl is it working
Im trying
Does Apple place a limit on how many times an app can toggle the flashlight in one second?
Your app has to be in the foreground, I think thats the limit
what could you possibly be trying to do
serial communication via flashlight š„
@frank fossil should I be running bootstrap_check_in before or after starting my NSXPCListener?
Chance that it might have been called internally, try setting it up without calling bootstrap_check_in and see if other processes can find it
its doing something
Without doing check in I get
[Aemulo] Error With Service: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.amywhile.aemulod was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.amywhile.aemulod was invalidated: failed at lookup with error 3 - No such process.} after trying to get the remote proxy object
But if I do it with bootstrap_check_in before starting the listener (and after) the call to remoteObjectProxy in the client becomes blocking
and will continue to block until I kill the daemon
so its doing something
Aemulo here is my client app.
aemulod is the daemon, which is just spawned with posix_spawn from inside Aemulo and runs setsid so it can become long lived
aemulod is whats starting the listener, and I want to be able to connect to it from the aemulo app
- (BOOL) listener:(NSXPCListener *) listener shouldAcceptNewConnection:(NSXPCConnection *) newConnection; is just never being called in the daemon it seems. theres a strong reference to the listener and the daemon is alive (-[NSRunLoop run])
What if you use C API instead (eg xpc_connection_create_mach_service)?
also this might be related
gimme a sec to setup the c api version. just for clarity, bootstrap_check_in does succeed.
Check in result: 0x00000000, Port: 6403
wait i never return an output how does that compile without getting mad
xpc_type_error (<OS_xpc_error: <dictionary: 0x211c39360> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x211c394f8> { length = 18, contents = "Connection invalid" }
Flashing it to emulate an incandescent to help calibrate a turntable
You might want to also try xpc_connection_create_listener
how do i install cycript?
does this exist?
I can't find it on apple docs or just even searching up the symbol on github
oh nvm im really bad at searching
neat
lmao
I'm basically at this point, I've tried commenting out the listener checkin (which is just an extension method). As soon as I call resume the connection fires the connection invalid method.
What does @convention do?
it means that its types can be represented as swift types https://developer.apple.com/documentation/swift/using-imported-c-functions-in-swift
WHAT
I thought you had to bridge š
That would have been so useful when I was trying to fix the global dispatch queue
this is honestly my favourite piece of swift documentation
a bunch of shit that its in the language but not "public"
@_marker is an incredibly nice one
WARNING: This information is provided primarily for compiler and standard library developers. Usage of these attributes outside of the Swift monorepo is STRONGLY DISCOURAGED.
I am going to use this so much
Actually, I've used one of these before. Before @lavish mirage was a thing, it was @_functionBuilder from memory, and back when I thought I was going to be stuck with Swift 5.1, I used it a decent bit
@_spi is actually really helpful and should just be public atp
Sorry result builder (why does it do that š )
It shouldn't even be a hidden type, it's has an actual, proper purpose
@_unavailableFromAsync Will be useful when converting async await codebases
what use case do you have for this?
Letting other people know that itās not longer an asynchronous function
Swift 5.5 async await sucked balls, it only got good with Swift 5.10
True
Maybe one day I will backport the backport of concurrency
if you have this method
func example() async -> Int {
return 3
}
and later change it to
func example() -> Int {
return 3
}
the compiler will just warn the user, its not an error to use await on a function thats not async, just a warning
if im understanding you correctly
its also not an error to mark a function as async that makes no await calls
but thats besides the point
Yes but the maintainer should have an easier time seeing
imo a warning would be a lot better than an error
because its not code breaking
error is for something that would cause a crash. this is just something for the compiler to optimise out
Calling await is a crash
at all?
Yep
see thats diff š
How is it supposed to resolve? Even the concurrency backport is built for iOS 13+, every single call is marked as iOS 13+ in semantics
see I keep forgetting that you're trying to backport software from iOS 13 to iOS 6
thats just such an odd thing to do that these things never cross my mind
a lot of these are just sat in proposal hell
@_implementationOnly import Thesis was only just added in Swift 6.0 as internal import Thesis
and in Swift 6.2 internal import is the new default
currently the default is public import
Why did it change I liked it being public
makes more sense imo
But itās been that way forever
everything was done that way forever until it wasn't
it makes a lot of sense for package developers
If I'm writing an SDK and I import an internal library that we use, if I publicly import the library then it is exposed in the SDK docs. If I internally import the library then it is hidden from the public interface and its symbols are stripped
I mean Iām not saying internal imports donāt have a place they definitely do
But making it the default?
for 99% of people it won't matter and they won't even notice
its only really gonna matter for sdk devs
I feel like swift 6 has added a whole bunch of rules that are going to bit me in the ass when I eventually port it and switch to it
yup
Yk whats funny, even by swift 5.6 there are warnings about āthis will be an error in swift 6ā
It's a bunch of rules to force you to write code correctly
the vast majority of the errors/warnings it throws are about stopping race conditions
Does it stop me from doing a dispatch race condition
Or is it just swift concurrency
Sometimes
What noā¦.
it will error if you try and send a non thread safe object to a different thread
Oh thatās okay⦠I think
if your object isn't marked as sendable and you throw it into a closure that is marked as @escaping
it will yell at you
because thats a potential RC
@escaping means this closure can be called at any time on any thread
Yes I know
Sendable means accessible from any thread
However generally I donāt touch sendable or mainactor as theyāre part of swift concurrency
technically it more means that its safe to pass this object between threads, not that its safe to access from any thread
well
for value types it means you can pass this data between threads
Yeah yeah in the name, āsendableā
for object types it means it can be accessed from any thread
However I donāt generally end up following the best code practices often as my code bases are a mixture of very modern and legacy patterns sometimes
Generally itās UIKit that shoots me in the foot sometimes, and itās never really the things you notice
Itās small things, like āisdateintodayā being iOS 7+, or the global(qos) api beinf 8+, both of which i did end up patching in with no issues
Swift 6 is actually pretty good at forcing you to do UIKit properly because it will yell at you if you do anything not from the main actor
Yikes Iām cooked, funny how Apple provides you methods to implement your own asynchronous ui
Plus, Facebook made their own asynchronous UIKit, apparently itās very fast
those methods will not yell at you
they're specifically marked that way
I see
I wonder why UIKit isnāt asynchronous or why it couldnāt be because Iāve seen a LOT of ui libraries that are with no issues at all, I get the idea behind it but itās a bit flawed
Is SwiftUI asynchronous?
you know what im gonna say to that
Look, it does make the app more predictable but man is it ever constraining
Especially when so much of UIKit is CPU bound, thatās really the part that gets to me
I actually watched a really good wwdc talk on this that explained it perfectly but I can't for the live of me find it
it was like an hour long presentation with a bunch of useful slides and graphs
and since I watched it and understood it I've never questioned it again
I watched the grand central dispatch one and it made me fall in love with it ever since
It was the iOS 8 one
It was around wwdc2021 when pro motion came to the iphones and the whole point was how to get your app running at 120hz
Oh shit yeah that would be a struggle
its actually not though
think about it. as phones got higher refresh rates, they got better cpus and gpus
Especially since like I said before so much of UIKit is cpu bound when in reality it should be handled by the gpu
Quick question, whats the difference between UIWebView and WKWebView fundamentally
asynchronously loading new cells
I remembre now
I was watching it when making my discord client
this one didn't explain uikit main thread but it was very helpful
Is this iOS version bound or all iOS versions
a bit of both
Mmm I need this
it talks about 4 diff things you can do
Why is ui table view not deprecated
I see
why would it be
Iāll take a look, if one of them is preloading data thatās iOS 10+ sadly
Because ui collection view does everything it does, but better
isn't ur whole thing backporting
collection view adds some unnecessary complexity when its not needed
It is, but something like that isnāt a mere extension. I could try, but I wonāt be reimplementing UICollectionView as a whole. Itās always easier to backport something when itās open source
Speaking of which, is there any way to use FoundationNetworking on iOS
everything is open source if you know how to use ida
iOS 26
iOS 27
What
Or core libs foundation
I know its possible to use CFNetwork
because that was one of the only ways to do web sockets for the longest time
I need itās URLSession implementation, Iām not happy with my own backport (this only occurred to me after I saw how much more advanced the source was)
Maybe I could just copy paste it inā¦
what specific stuff are you looking to backport
oh wait
you'll love this, theres a piece of documentation in URLSession that is just wonderufl
Because thatās not really what youāre doing to have compatibility as much as you are targeting iOS 15
Unless you have a specific reason to use URLSession, use Network framework for new WebSocket code.
they added the api and then in the same docs update added a note saying pls dont use me
š
Wild
I donāt really want the websockets, those are iOS 13+
And probably always will be since theyāre built off swift concurrency
Thatās wild
well
Thatās odd though, swift 5.10+ concurrency is excellent
NetworkConnection does
but NetworkConnection is basically an async wrapper of NWConnection which is a Swift warpper of the C nw_connection_t
Welcome to all of swift foundation
but because NetworkConnectionis iOS 26.0+ it basically doesn't exist yet
š
give it 5 years, then we can start using it
Ngl so much of foundation STILL just wraps objective c
interop
Itās annoying for me because those are the things that make it harder to use funnily enough
When a type is purely in the stdlib it resolves itself
I also need core libs foundation URLComponents, as they are iOS 7+ as well
I am not a big c programmer so forgive me, why is there a t on the end of everything?
Iām so gonna upset someone by not giving the exact reason from the c standards
By default you have to prefix the decl with struct or enum. So struct MyStruct val. The convention is to add the typedef so that MyStruct_t actually means struct MyStruct
Makes things look neater
Yeah
Add it to the list of things I dislike about c ./j
Ive become more receptive to C, C really Isnt so bad, itās only bad when you try and use it to do things it was never built for
Iām pretty sure itās one of the things clang tidy will scream at you over
If you look at C as a language that exists as a single layer abstraction over asm itās place starts to make a whole lot more sense
I had a project that would always crash in release mode and I never figured out what the bug was, I just did everything clang tidy said and it stopped happening
Oh and fwiw that project was in production for like 3 months
Honestly, yeah. I guess this is the effect of learning a high level language first and then going to low level looks awful
I write a lot of C for embedded systems where itās perfect
Because the alternative is asm, which limits what chips I can run on
my course uses C and i have to implement every dang data structure myself

i cba to write 100 hashmap implementations
lol
the code we get given doesnāt work
88 compiler errors from the damn template code
last week
"close enough" ass code
It was all just variable typos and stuff
I think nearly all of the errors could be solved with Xcodeās auto suggestion
and the reason is:
A: The code is never tested before itās given to us
B: Itās quickly thrown together from multiple sources with the pray they all connect
as opposed to just being written by the lecturer
Umm maybe I need to try it myself before telling you random stuff š
Btw have you tried something like -[NSXPCListener initWithMachServiceName:]?
Thatās what I was trying initially
Iām gonna experiment with just using Mach messages directly. I think the problem is I canāt give my xpc_connection the Mach port I get from check_in. So itās just asking launchd and then launchd says no
I could try looking at figuring out how to just hand the xpc_connection my Mach port, it is open sourceā¦
I did look for undocumented APIs and thereās seemingly a way for it
I believe there has to be. In the docs for bootstrap_check_in it says it can be used for xpc
Before going to that way, I have another approach (canāt test as I only have a jailed device with me rn)
xpc_endpoint_t endpoint = xpc_endpoint_create(connection);
// (ignore the name, itās only used internally to extract the port to pass it to iOS simulatorās launchd)
mach_port_t port = xpc_endpoint_copy_listener_port_4sim(endpoint);
bootstrap_register(bootstrap_port, "mach.service.name", port);
Iām developing a C++ UI library built with OpenGL, heavily inspired by SwiftUIās declarative design. As a small showcase, Iāve even recreated a portion of the iOS lock screen using it.
why opengl
what cpp standard
thatās very neat
it sucks that nothing has really replaced opengl in terms of support
opengl is everywhere
vulkan is pretty close to everywhere except on Apple :/
directx is winblows
moltenvk?)
not official but
its the best we've got
hell if it was a system library i wouldnt care
but having to bundle vulkan and moltenvk in apps is so infuriating and a major blocker for a lot of devs
static lib
but every app has to statically link it
so every app has to bundle it
as opposed to just linking against /usr/lib/libMoltenVK.dylib
yo, has anyone evaluated the landscape of objc_msgSend tracers in 2025? i used to use inspectiveC back in the old days and that one was great, but now my needs are different, in that it needs to work outside the jb ecosystem (and ideally x64 linux)
Frida is still a good option I use a lot
i asked chatgpt and out of the options it gave me are:
- https://github.com/johnno1962/SwiftTrace Seems like the only active English one, non-starter for me since its written in Swift
- https://github.com/everettjf/AppleTrace Chinese one based on hookzz, which is based on frida-gum, codebase seems bloated
- https://github.com/omxcodec/OCMethodTrace Chinese one written from scratch, and supports x64
Exactly. And for me, I just could not bring myself to start with C when I knew there was other, better solutions for what I wanted to achieve
I'm inclined to go with the 3rd one, or yeah, just learn Frida
Well from looking at those 3, I can tell you that Frida is still actively being maintained and supports inspecting Windows, Linux and *OS
OpenGL is the C of graphics
I doubt it will ever go away
It's marked as deprecated in *OS with a warning that it will be removed in a future release
just not when or which release
Indium (metal to vulkan)
(granted its been deprecated for like 5 years now)
The only problem is frida is LGPL
It is so ubiquitous and has been ubiquitous for so long that I find it hard to believe it will ever truly be removed in full
The biggest reason to not use it on *OS is some of its calls are CPU rendered only. They stopped updating the GPU drivers for them
so OpenGL is kinda fucked on recent apple silicon
That is true, depreciated in this circumstance kind of translates to "we won't update it anymore"
yeah but you could use MoltenVK to get to Vulkan, and Vulkan is already on Windows and Linux natively
I am slightly confused at why though, Metal is much, much more low level than OpenGL is no?
So is Vulkan
MoltenVK is a nightmare to vendor in my experience
the overall point is that theres nothing that can universally replace OpenGL
because there hasn't been another universal lib
Yep
that's ANGLE, i would argue
to an extent yes
target openGL ES 3.0 and ride on the back of google chrome
I spoke with the graphics team at wwdc about this and straight up asked when they intended to remove it and they said they have no near plans
and that they aren't in the business of breaking it right now, but they're not putting any work into it
and their dirty fix is just offload a lot of it to cpu
Which in modern times is powerful enough
Especially to run the legacy code you'd be running
Sucks when playing Minecraft with Shaders 
True, true
That's the thing. What happened with Swift didn't happen with Metal. With Swift, by Swift 5 most companies and devs had moved past Objective C. With Metal however, there are STILL to this day MANY games released that are based on OpenGL
oh thats easy. its an incredible amount of dev work to just do metal
Yeah exactly
where you can do opengl and hit most of your games userbase on Windows
the problem with metal is its so limited in terms of hardware, no game devs are actually going to use it
Purely because Metal is closed source and platform tied, why would you ever target it?
Exactly
look at the steam hardware survey, macOS is 2% of Steam gamers. It's not a good econmincal move to go after that 2% when you could be putting your effort into the 98% and receive more gains
Metal was dead from day 1 and I wish they'd just give up and bring Vulkan
I mean yes and no, their own UI stack does run quite well with metal vs opengl
Sure, but Apple is targeting 100% of the audience by doing that
internally its fine
But for games, it's over
It's just never going to catch on
Vulkan is the future for low level graphics programming and has been for nearly a decade
Vulkans compatability from Wikipedia:
Android, Linux, BSD Unix, Windows, Nintendo Switch, Fuchsia, Raspberry Pi, vxWorks, QNX, HarmonyOS, OpenHarmony, Oniro, Haiku, Stadia, Tizen
Through portability workarounds: macOS, iOS
like, wtf apple
WHY
even the Nintendo Fucking Switch has it
EVERYTHING has Vulkan, it's nearly as ubiquitous as OpenGL, it still has to get the minor things like smaller, hobby cards, but then again, even the fucking Raspberry Pi has it
the raspi isn't that big of a deal, its just a sbc running debian
It's more to say that the only reason Apple won't do it is because it directly competes with Metal
yeah
I wonder if Metal is actually slower than Vulkan
impossible to measure
but I would honestly assume Vulkan is better because it has a lot more people backing it
True, true, but Metal may be better on Apple's systems. I don't know if they have done any special stuff under the hood to make it better
Yeah
I know Vulkan has all the methods of Metal, but there are a lot of features in Vulkan that has no equivalent in Metal. This is mostly from companies wanting a feature and it being generally a lot easier to do that with Vulkan compared to Apple with Metal
true
I would think Vulkan would perform better if you were on a team that knew how to make use of all of these neat optimisations
lmao
I started using your embedded Swift function method and now I use it everywhere
It's awesome
i'm telling you guys, swift is literally rust but apple
can i dump a private framework with frida?
because it sucks?
No that's unrelated
i mean they just translate vulkan to metal
it works pretty well
You should get dsc and load it into ida/etc instead
You can use ipsw to get it
All the MANY ways and types of files you can download.
Yes but we shouldnāt have to use a translation layer
OR they should make it a system component
Not something every developer has to fight with
its apple soooo
good luck
they did made ANGLE a system component just for WebGL
Never š the day that happens is the day we know Apple has lost it they would never do something like that
Hey 26.1 adds a disable Liquid Glass option
Maybe theyāre more receptive to just taking their Lās
I wanna see a battery comparison
I mean itāll obviously be worse with it on but I guess itās by how much
Iām actually totally shocked they added that option
No measurable difference
I think MacRumours did it
Okay well I want a comparison for if I were to update from Monterey š§
Oh I saw a comparison between a bunch of versions
Tahoe is categorically the worst except on the M3 MBA
(Somehow)
Hey, I'm glad you liked it! I chose OpenGL it seem very beginner friendly as I daily drive linux so no DirectX and Vulkan seems quite daunting but maybe someday :)
I'm using cpp 17, no particular reason as such, should I upgrade to 21?
https://github.com/Shadow67a/silver heres the github, do note that the code can be quite messy and unoptimized, this is my first time working on a project of this scale
Hows sequoia on the M5 mbp

lol
(legendary hayden sighting in chat)
I honestly haven't minded being on tahoe that much, a lot of the bugs people are whining about I've had on previous macOS versions so I don't think its fair to blame it on Tahoe, but it would be fair to blame it on poor management from Apples side
Putting all the engineering effort into useless AI rather than actually improving the core experience, but thats another story
my battery life has always been really shit on my macbooks, because all I do with them is programming, typically on quite large projects. Constantly recompiling and running tests just obliterates the battery. The only time the battery life is good is when I'm just watching stuff but I only do that when I'm next to a bunch of chargers
I definitely don't help my case for battery life