#development
1 messages · Page 183 of 1
cos you smell
:(

Does my code look right
Nah
What's wrong with it
you forgot a semi colon
after the meow
lgtm
Worked. Thank you developers.
Can't argue with that
what
turn 3
Average git experience
imo git is actually ok for the most part
everyone uses it incorrectly
eg squash commits
whats wrong with squash???
some people make like a billion commits in their pr
it would be foolish to merge each commit unsquashed into upstream
squashing it helps it stay more organized imo
icraze integer overflow
a lot of repos I see ask you to rebase your PR so they can be merged
look at commit history on https://github.com/positiv/isso for example
Only if you pick it to
it doesn't squash by default unless you picked squash the last time you merged a PR
i must’ve just checked that once and it’s always been like that
if you click the dropdown next to merge you can see all the options
including rebase which no one has picked on purpose before
how do I fix this?
this chat is dead
Ok
install libtool
and make sure automake, autoconf, aclocal and m4 are installed as well
also, how do I install aclocal
It’s part of auto tools
but how do I install it
it's part of automake in homebrew
No one has compile more tihmware than me even tihmstar himeself hasn’t even compiled his own tools as much as me 
i've compiled my own distro 😮
lfs?
not exactly
why exactly do you need to compile tihmware
does this mean you have a way of building tihmware without any problems

literally since 2021
but even before that too
I have my own procursus build system written in python
no I won't release it cuz its bad and it was for myself
damn
I build linux in docker on top of vmare on mac I build windows in msys2
guess it's still time for me to update all dependencies manually
timhstar when stdbool exist: 
i hate libgeneral
i am of the belief the only based thing tihmstar has done is e77f3e9c5e6c00086aa7b68e58994a639cc360d6027c90b53eb8b3b015f72f56
what repo is that
none
Can we all switch to MRYIPC on iOS 15/16. We always use different tools
We need to stick to one
L1ghtmann made rootless fork
Working on a tweak with it rn
Yeah I was gonna ask if there was even an official rootless one yet
what’s the difference between Neko and dopa?
Dopamine is better
you're supposed to work smarter, not harder
like wow
writing your own xpc services just to eliminate one dependency 
unironically a good tradeoff
i still fail to see how having an ipc library is a bad thing
we should all use distributed notifs instead 
(that isn't rocketbootstrap)
yeah because last time muirey used it was for cr4shed and that never became rootless
hm is it still worth using a 3 yr lib then
which could potentially just die with a release of a new jb
because xpcs sure ain't going away
bro doesn't know abt RBPC 😭
I have no idea what that is yes
neither do I bc I made that up
wtf
didn't we just say it was forked with rootless support
hate u fr nfr
you did not
we
.
that's unlikely too
how are you going to even use a daemon without xpc
lmao
launchd handles all the communication while at the same time handling services/daemons themselves
nah, i'd win
What do you guys usually do for on-device debugging? Frida really isn’t a debugger
Is there anything like gdb?
I don’t have a Mac device, and tbh, really don’t want to use one except over ssh
lldb
@lime pivot where's the plains package.swift
bro I haven’t worked on that in like 2 years
@slender glade
hello
hi
Thank you!
@lime pivot @slender glade okay nevermind neither sileo or zebra wants to work on mac now
😃
😭
awesome
there's honestly probably a debug build somewhere in this server if you search for it
idk how far behind main it'll be
you can at least somewhat browse around with it, Sources and Installed tabs are implemented
We could update it. It has been already by piracy repo’s I believe
Personal skill issue
Not wanting to learn more about that already shitty language
Filthy language
I feel like a whore as I type Objective-C, it’s painful
if you learnt more, you'd realise that objective-c is actually a great language and is super powerful
🗣️🔥🔥
You are right I think
me when i try to work with pointers in swift
The issue isn’t the language really itself. It’s the relationship between me and the language

well yeah, frida isn't a debugger, it's for introspection
poking into things
you're looking for something along the lines of lldb (which requires debugserver installed on the target device)
It is
Sort of
there's 3 ways to use it
- c type mach XPC
- objc/swift type mach XPC
- objc/swift type XPC bundle
i need to reprogram my whole tweak bc i initially wrote the important part in swift and that no longer works on ios 16+ for some reason
swift syntax <<<<
swift primitives <<<<
swift ui <<<<<<
swift <<<<<<<
the look and feel of apps in swift >>>> objc
Rewrite it in objc
Then you account for objc syntax
Objc syntax is alright imo
Once you get used to it
Right
objc is ugly
compared to swift syntax i disagree
objc syntax is not ugly in any sense besides blocks but why do you guys never show whatever swift syntax you found ugly
it's the most plain language to ever exist in terms of syntax
the 1 exception is adding 50 different keywords to result builders for DSL stuff but you can also make objc look ugly with block syntax
but LLDB needs the xcode sdk, is it possible to get that on Linux?
class RandomClass {
static let shared = RandomClass()
var someProperty: String? = nil
func doX() {
print("Hello")
if let someProperty {
// do stuff with said property
}
}
}
struct DataModel: Codable {
let name: String
let address: String
let age: Int
}
This is more or less like 60-70% of all Swift code you'll see and like call me crazy and all but it looks just ok in terms of syntax
you can't build it on Linux with some standard SDK?
@worthy mulch https://lldb.llvm.org/resources/build.html
nah, since it seems to want the xcode sdk
i’m going to try with darling
but at what point would it be a better time investment to just give up and use a mac? I absolutely hate their keyboards and trackpads and life choices, but they aren’t miserable to use once the terminal is open
and would probably be not awful if I only had to interact with it over ssh
lldb gives the error just after I select the remote-ios platform
block syntax is such a cool idea
you can use lldb on-device fyi
you can install it on your phone and then ssh into the phone and use it on your pc's terminal
What is block syntax ? The stuff with @ that needs to have an @end at the finish ?
no
no
no
OH
i know what you mean
someFuction(true, false, 1, sizeof(int)); // hard to read
[someClass someFunction:true shouldExplodeDevice:false usersConnected:1 memoryLeakSize:sizeof(int)] // easier to read
not this but
this is one thing i like about objc
this
imp_implementationWithBlock(^(id self, SEL _cmd) {
UIColor *originalColor = originalColorWithCGColor(self, _cmd);
// Disable tintColor in google services
if ([[[NSBundle mainBundle] bundleIdentifier] hasPrefix:@"com.google"] && [name isEqualToString:@"tintColor"]) {
return originalColor;
}
if ([name isEqualToString:@"whiteColor"] && ![preferences boolForKey:@"whiteColorEnabled"]) {
return originalColor;
}
if ([[preferences objectForKey:@"mode"] isEqualToString:@"Simple"]) {
return [Utilities simpleColorWithIndex:index preferences:preferences originalColor:originalColor];
}
// It's necessary to use NSUserDefaults instead of GcColorPickerUtils here
// so that we can take advantage of libSandy for the preferences
NSString *originalColorHex = [Utilities hexStringFromColor:originalColor];
NSString *colorFromDefaults = [preferences objectForKey:name] ?: originalColorHex;
UIColor *parsedColor = [Utilities colorFromHexString:colorFromDefaults];
return parsedColor;
}),
yes
I think i never used this 💀
someFunction(true, shouldExplodeDevice:false, usersConnected:1, memoryLeakSize:MemoryLayout<Int>.size)
its a way to pass essentially a lambda function around
no its not about the keyword arguments
yeah ik
the [] syntax feels more contained idk how to explain it
i was just showing that swift also has that
oh ok
idk how to do sizeof(int) in swift
i also dont know how the fuck im gonna implement sizeof in elle
apparently it is MemoryLayout<Int>.size
its a compile time operation, i dont have access to the size of structs that C creates in the c ffi
have fun!
i can do it relatively easy for stuff that is defined in elle but like imagine a file pointer returned by fdopen
how the fuck do i get the size of that
no
yeah i know
kinda different from sizeof
Then how do you do it in swift
give me one second im finding the article
sweet sweet lowercase types
fn add(int size, ...) {
int res = 0;
variadic args[size];
defer free(args);
for _ = 0 to size - 1 {
res += args yield int;
}
return res;
}
pub fn main() {
int res = add.(1, 2, 3, 4);
printf!("%d\n", res);
return 0;
}
@radiant idol ah nvm it's the same after 3
Let’s gooo
fn will work, func will work, fun will work, function will work
And do public too
fucon will.. also work
I finally broke Rosie
what in the same way
it looks ugly because they put newlines at the wrong places but otherwise it's just GKAccessPoint.shared.observe(\.frameInScreenCoordinates) { ... }
where it will work for any variation as long as the characters are in order
Why is there a \
i recall a joke programming language having this functionality
but i think it could actually be a cool thing to implement
it's the way KeyPaths are referenced
they're actually very pretty when used correctly which they are 90% of the time
which index type?
it differs based on the collection
also you are not supposed to do that at all for Strings
like there's a reason why it's not allowed to just do it straight up
no the whole point is like why is it so complicated to get the index of a substring in a string
also syntax like this is so hard to read coming from like any other language
var result: [Range<Index>] = []
var startIndex = self.startIndex
while startIndex < endIndex,
let range = self[startIndex...]
.range(of: string, options: options) {
result.append(range)
startIndex = range.lowerBound < range.upperBound ? range.upperBound :
index(range.lowerBound, offsetBy: 1, limitedBy: endIndex) ?? endIndex
}
return result
you do not need to do that at all LOL
this is the most disengenious example i've ever seen in my life omg
who decided stride was a good name??
? idk it's normal
this is psychotic
nobody writes swift like that
if the standard of syntax quality was SO answers i'm pretty sure we'd have disowned like 80% of programming langs
fair enough
one other thing that annoys me is array.index(of: element) instead of array.indexOf(element) but this is just personal preference
that whole idea of cutting off the function name and then putting the rest of it as a keyword argument
ok THAT annoys me
this allows for a lot of useful cases
allows you to have index(of:) to find a specific element, and index(where:) where you can pass an anoymous function that returns a bool
it makes sense in the context of xcode autocomplete
index(
autofills all possible continuations
it also fixes a weird quirk of objc that annoyed me, the first argument not having a name when being called
functionNameGoesHere:arg1 name2:arg2
no name1
is there a way to place breakpoints on an ios app that's been sideloaded? i lack the source code
if it's possible to do so on an app deployed to an app store that'd be preferrable but from what i know that's not possible, hence i ask about a sideloaded copy
Install debugserver on the device, attach it to the app then connect to it through lldb
You can disassemble it and set breakpoints on instructions by adding the address + aslr slide
Has anybody used lldb on windows or wsl ?
To do what ?
Debug apps
iOS apps ?
Yeah
There is a ping here
Sorry ? Not a native speaker. What i want to do is is to debug apps without a mac
Mb I meant ping
Lemme find it
reverse engineering
There are better options
pyimg4 img4lib and blacktop ipsw
ipsw goated
Fr
this reinspired me to try jailbreaking my phone again (i can't jailbreak with chimera cos the home button's broken) and it worked first try ha, will give this stuff a shot once i get properly set up
"WatchTube" requires a provisioning profile.
Select a provisioning profile in the Signing & Capabilities editor.
do you know how to help make an unsigned ipa
can't u like
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
where do i do that
i think kirb went to sleep
ive never used xcode before and i have no idea whats going on and why it keeps asking to create a team or something
o
u either put it as arguments to xcodebuild or u change sdksettings in the iphone sdk
ok im gonna be honest i have no clue what file that is
why does xcode not have a file explorer
oh i already have it open
not when theres build errors 
i see
capt Xcode tutorial
capt Xcode youtube tutorial
OH
theres buttons
windows????
build watchtube
does it matter which one
WatchTube Watch App
i now have a number larger than 32 when building
thats a good sign
kirb just got back to me
what does it do
can other acana oacanothepr oplepsing can other people sign it
can't you use it with Sideloadly or something
it started a simulator
my computer died for a second
yeah it was saying unknown team or something
with an ID or smeting
until i dsiabled it
this is very hard to type when i am getting 1 frame out every 2.5 seconds
oh cool i have an archive now
idk what option he wants me to pick
or how to send it to him
What would be the best way to have a timer in my code that I can grab the time left on then run a completion block from it? Is GCD the best way?
banger tweet follow me
@wooden yarrow yeah no video my voice just isn't cut out for that, i'll write an article instead
qhar
but
sure
ok
Don’t wake me up again
is there any decent beginner guide to writing tweaks? rootfull, rootless, which framework to use (theos?) etc
you can find help here once you know the basics :) https://theos.dev/discord
why does it take so long to get the result from cosine
i’m pretty sure CORDIC is made in a way that it’s extremely fast
is it just ios being slow
Hi everybody, does anybody use lldb on windows to debug apps on an ios device ? Idk if this is possible but i managed to install lldb on windows, problem is when i do platform select remote-ios it complains about missing a sdk so i downloaded 17.4 sdk but i can't seem to find a command for setting the sdk path for lldb
idk sorry, i dont use a debugger cos i dont write bugs
just get good /j
maybe try using the lldb theos provides (if it does provide any?)
Insane flex lol
Pretty sure it doesn't
looking at docs online it seems remote-ios is only for mac hosts
i could be wrong though
docs of lldb ?
yeah
https://github.com/ios-control/ios-deploy seems promising?
this is macos only
couldn't find in remote debugging section
do u remember where it was
it might not of been the docs actually
it mightve been a stack overflow page
i speed researched lol
oh stackoverflow says its impossible to compile for ios without a mac too 💀
?
theos works pretty well
this seems like a stupid question but what does that screenshot mean xd. when i look at theos source on github and use the search with "lldb" i can't seem to find it
means i couldn’t find it?
i guess, but anyway i solved the sdk error and it says unable to find a plug-in for the platform named "ios-remote" seems like its only for macos after all
Check the tweet, it’s a for loop, serenas was the cosine one
@fading shell I’ve reported an issue with Glance on GitHub. Can u check it pls?
anyone here able to make an iphone automation framework similar to appium?
Able to: probably
Willing to: probably not
hi i tried setting breakpoints but i kept getting error 9
i was able to attach though, pause and continue the app, and some other stuff
manage to even pass command line args using debugserver lol
You have a mac right
idk what error 9 is, are you sure you have the right address
you can compare the instructions by running memory read <ptr> --format i
yeah i just copied it from ghidra
yeah
the highlighted thing but with 0x at the start
it just says
error 9: sending the breakpoint request
whenever i try to set one, using breakpoint list says it failed to resolve the breakpoint
will give this a shot
you need to add the aslr slide too
uhh what's that
security measure to make exploits harder but it's not really a hurdle for us
run image list <process-name>
right i saw stuff online for that but didn't understand it lol, booting up my mac again (i just turned it off lol)
it'll print it's start address, so if it's like 0x1003fc00, then it's shifted by 0x3fc00 and you need to add that to 0x100a83568
OHHHH
yeah i saw that and added 0x1003fc00 instead of 0x3fc00
will give that a shot
omg it worked with this
HA THE BREAKPOINT SET
THANKS
<3
awesome, have fun
will do lol
okay now i get an error about encrypted memory when i step and such
oh it must've been a one off
it works now
Hey! Is it possible to give a specific app root access?
like an app from the app store root or a command line app or wdym?
i have ported objective c to swift
mapView.mapType = [.standard, .mutedStandard, .hybrid, .hybridFlyover, .satellite, .satelliteFlyover][["STANDARD", "MUTEDSTANDARD", "HYBRID", "HYBRIDFLYOVER", "SATELLITE", "SATELLITEFLYOVER"].firstIndex(of: mapViewConfig.mapType) ?? 0]
bracket notation for all
what exactly do you mean
root user access or root filesystem access
Stop
I did
Good
Alfie hated me when he saw that I did
@{}.mutableCopy
im sorry what.
It’s almost the same thing as [NSMutableDictionary new]
@sonic totem ooooo @{}.mutableCopy
Careful… you might also get told off by him
@{}.mutableCopy
@{}.mutableCopy

@[].mutableCopy equally as bad
for the record i agree with alfie on this one that way of getting an NSMutableDict is sooo cursed
AGGREGATW???
you aggregate
I had a phase okay
Smh
Shiggy
Shiggy
Shiggy
this is so fucking funny
holy moly…
they let me into the private MKMapView header
smh why do they not align the equals
only soydevs do
remove inout
lame
exactly
it's a class
i have to give it an instance of MKMapView to modify
Yes for classes you can just modify them without inout
WHAT
inout for classes just allows u to change the variable entirely in the func scope
yeah they work a bit diff from structs
TIL
wouldn't that mean you need sumn like self
if you want to do future-proofing make sure to use if mapView.respondsToSelector for each private property btw
?
Ooh ok
Is that an expensive check
Or could I wrap each private toggle with that check so they only show if actually usable
it's very cheap
i mean if i take java for example you can modify the instance of the class like that without having to pass it as a param
Nice
so
Yeah
I'll do that then
i dont get it
<- only checked 15.2.1 headers
^-^
wait so ok on the flip side why the hell does that work in swift, does it only work with objects with the same class as the method?
I'm passing the MKMapView from its viewcontroller to this function which is on a different class (the VC has an instance of it)
MapViewConfiguration is basically a bunch of Bools in a class
That function there dumps them all to the mapView
if you pass in an object (class instance) as a parameter and modify it's instance variables, they stay changed after the function scope because classes in swift and in objc r pointers
OH
consider using an OptionSet btw
I was under the assumption they were not, and inout kinda did the pointer thing
why is that hidden
How's that work
hidden?
structs in rust r on the stack not the heap?
so
and also they're not just pointers
Is this the whole thing with swift memory layout and init functions you were telling me abt earlier
one thing
Yea
you're talking about classes right
yes
which in rust would be traits
and there can be trait objects
I thought traits were just the equivalent of an extension/protocol
which need to be wrapped in a Box<dyn TraitType>
to be passed
and you can't just pass some TraitType
i forgor the specific reason why but smth about SwiftObject and how it's alloc'd
idk rust is diff but this is how swift and objc both operate
wait so then @slender glade how would you pass class objs as consts
you have to put ur properties in them as let rather than var
if u wanna copy a class u have to use -[NSObject copy]
wtf did u just switch to objc
Swift classes still conform to NSObject
me when objc bridge
I love objective c bridging header
struct MapConfigurationOptions: OptionSet {
let rawValue: Int
static let showsUserLocation = MapConfigurationOptions(rawValue: 1 << 1)
static let showsTrafficIncidents = MapConfigurationOptions(rawValue: 1 << 2)
// etc
func configure(mapView: MKMapView) {
// ...
self._showsTrafficIncidents = self.contains(.showsTrafficIncidents) // for example
}
}
class SomeClass: NSObject
this does not make sense to me
or a BitArray
you are speaking in tongues
do you know what bits are
Wtf
(or multiple)
a singular integer which "contains" other integers but for your purposes swift hides all that from you and you basically have an array-like interface to work with them
have you never seen sumn like num & 1 == 0 ?
you define numbers like 1 << n
and then you check for them with .contains(.staticVariableName)
this feels more complex than a bunch of bools
they do not contain other integers they contain bits
.
idk how else to explain it
i'm already eating 200mb for my mapview i think a few kb will be fine
fair
is this the principle which electron was built on

pref bundle update
Looks good
The clear cache button is broken in the RC i sent oh well
Gotta give the pref bundle binary entitlements
The memory savings just dictates when the mapview gets unloaded
Default is Some i believe
I'll check later
how long did it take to make that tweak
@frail cedar what can u do with the tweak
nothings on the heap by default unless the class puts itself on the heap in its constructors and stuff
rust does not have classes
I called it class because it made more sense in the context
structs in rust are classes if you put the right methods on them
not in the sense of classes being pointers to an object always but that has more to do with the theory of how objects work in the language than what classes actually are
No
eh close enough to how it's being used in swift
or
well
passed
completely different from classes
hold on
i mean there isn't really any closer way to compare it to than interfaces
structs are rust's classes
if you want the OOP style then Box<SomeStruct> is rust's way I guess
does swift even have stack structs?
if it doesn't that would surprise me but I don't know much about the design of swift
@slender glade does it
Aren't there both classes and structs
they couldn't decide I guess
people like OOP maybe 
no inheritance on structs in swift
swift literally comes from Objective-C
Idk I thought like it's not really coming from anything
Pretty sure they misworded this
this makes it sound like it's static (in Java terms) which im pretty sure isn't what they were going for
i guess each instance instead of every instance is what makes the distinction?
they should word it clearer tho
oh protocol is a thing
traits are like protocol in swift
like exactly identical I think
yeah
they could
it makes sense to have one data type on the stack and one on the heap
structs also are faster sometimes because they don't have to hold the weight of the objective-c runtime
I don't really get it, i don't see where having a type be always on the heap is useful
like with rust everything is stack basically
if you need to have something on the heap, you place it in a Box
variability and flexibility
there's no types that are just on the heap inherently
Doesnt it make it less flexible by forcing your type to be on the heap
no
heap is a lot more flexible than the stack iirc
which is why you can Box anything in rust that needs to be on the heap
oh my god who gives a fuck about Box
you just encapsulate specific things that need to be on the heap
instead of forcing types to be on the heap on the type level
if you don't want it to be on the heap then use a struct
what
they're different types for a reason
wait so why wouldn't i just use a struct all the time
i mean i don't understand what's the use of class existing at all, compared to just giving all your capabilities to structs instead and making things more value oriented at the call site
and alloc the struct if i need it on the heap
objc-compat
o
u can take a guess as to where objc classes live
well it's just everything's in the heap I believe
like how Java is I presume
oh my god it's apple's java
all your objects are reference types pointing to heap
that's what I always thought of it as
also identify
perhaps an oversimplified way but still
cant u just impl that on structs
why is there a ===
What exactly
Compare value probably
oh
no
Would you rather be .eq(..) like Java instead of ===, (since == compares the refernece)
== for structs is meant to compare the properties inside each one by one
=== (and the default impl of == in classes till overriden for a specific class) check the pointers
ie if they're the same address in memory
not possible with structs
since structs are the value
The struct isn't a pointer
i imagine that's done by encapsulating it or something
so you'd be ==='ing on the encapsulating type instead
not the struct inside
so that changes stuff
huh, so the fact that it's on the heap is kinda hidden away
given that the default is comparing values
sounds like java 
not possible in swift
It's the exact opposite of Java
is there no alloc function in swift or something ??
what
hm
yeah
ig more intuitive for the default to be comparing values?
i am not so sure about this because that was based on rust Box logic
wait so @slender glade what the hell do i do if i don't want all the shit that comes with the objc runtime but want things to be on the heap
Probably just cry like with Java
😭
damn that sounds inflexible to me
you can't even start to move away from objc
you just always have to stay stuck to it
What wdym
bc if you want shit on the heap
you use classes
classes come with all the objc stuff
so
.
is that right?
classes require you to enter the objc runtime?
I thought it was just that you get classes as a concept because of the need to have something to mirror objc types when you need to deal with them
that's how I understood it from earlier
https://github.com/apple/swift/blob/main/docs/ObjCInterop.md
"All Swift classes are also Objective-C classes. When Swift classes inherit from an Objective-C class, they inherit in exactly the same way an Objective-C class would, by generating an Objective-C class structure whose superclass field points to the Objective-C superclass. Pure Swift classes with no superclass generate an Objective-C class that subclasses the internal SwiftObject class in the runtime. SwiftObject implements a minimal interface allowing these objects to be passed around through Objective-C code with correct memory management and basic functionality."
huh.
Class without NSObjecf inheritance
true
huh, what about the statement of "Pure Swift classes with no superclass generate an Objective-C class that subclasses the internal SwiftObject class in the runtime."
seems very intermingled with objc
shrug
to me
is that talking about interop with objc?
i mean it is from the objcinterop doc
i don't think that has anything to do with when you just make a class in swift and that's it
so
no objc involved
i think that's talking about when you're making a swift class and getting ready to access it from objc
it gets turned into a thing
so the compiler generates all the objc interop for you if you decide to interop with Obj-C?
interesting
(or the compiler generates shit anyways and removes using dead code elimination)
this
Im having trouble visualizing where anything here is taking place
so back to earlier, is there just no way to throw a struct onto the heap when necessary other than make a class
or can you like do stuff that requires it to be in the heap and it automatically gets put there transparently via ARC
this is like that tweet saying hardware engineers make hardware more efficient so that software engineers can bloat their software enough to the point where all the efficiency gains are destroyed
😭
(can't find the actual tweet rn)
no
i dont think so
i mean yeah of course the gains aren't lost in this case
but they really should've only generated it when necessary
i.e. lazy generation
that's hardware and software
i don't think anything is generated anywhere but I don't know what's going on
swift performance is on par with objective-c
Oh I just found exactly the article I was looking for
that is not what i am saying
.
i'm saying compilers are too smart
fair
I imagine it only does stuff when you inherit NSObject or something
maybe
this statement is still kinda bugging me tho
because this also implies no connection to NSObject
probably if you import the clsss from objc it does it
how did they come up with .m for objc
it doesn't have an m in either word
wtf swift doesn't bootstrap itself ⁉️
or is this only for objc interop
message
objc interop
o
Darn it
cool
their crazy naming
everything
this kinda makes sense
because classes give you identity
there needs to be better documentation about swift's interaction with objective-c
The third point here
huh, if it's completely separated like this then shouldn't it be quite easy to simply not include any objc stuff at compile time, thus removing the need for dead code elim
classes make the idea of an "object" a thing
swift is open source
you know what that means
!
learn about the swift-objc interop process from code review and write docs yourself
that's really interesting to me

basically the idea is you use struct for all but a very small amount of cases
i mean yeah isn't that like java
everything is from classes
thus everything is object

which is either objc interop or needing the idea of objects and identity,
Yes like classes
it's neat to me because it didn't occur to me
rust doesn't have any analog of that
probably because rust devs thought oop was bad
but swift needs this because legacy objc code
in rust you just store some identifier in the struct or something (maybe the fd) and in your PartialEq implementation (there's no equality comparison implemented by default) you compare that
so you redefine what equality comparison means at every type
but if you have a class, you just have a single object in the world for that fd
and it makes more sense from a semantic view
That's very neat
i typed out "idk isn't that basically sugar for inheritance in rust" but then realized rust doesn't even have inheritance so uh
i guess closest would be including a struct in your struct?
to "extend" it
/ a newtype
No
instead of inheritance you do things through traits
oh, yeah combining traits together
the idea is there isn't really much use inheriting stuff if you can just compose traits together
composition is preferred even in Java to be honest
at least from the modern perspective
inheritance is kinda crusty
@slender glade do you know how to interpret waitpid status in swift
it's rare that inheritance even makes sense
just like in C?
those are macros
i mean if you have a similar type with a shit ton of traits
i think it would be nice to just be able to gain allat and add a few more
trol
wym waitpid is a function? Are you talking about return status macros?
right the return status macros
can u show me a piece of C code and i'll translate it for u
the way i used it before is
does it make sense though
if you really think things through
var status: CInt = -1
waipid(pid, &status, 0)
@opal ridge and if the return status is not >= then check errno
right and how are you going to interpret status
inheritance makes sense if you have something that's fundametally inherited in like a theoretical way which is somewhat rare
i mean ig you can just make a new trait that impls all of that
and it would be fine to just use that new trait
yeah
because in C it is done with WIFEXITED WIFSIGNALED WCOREDUMP WIFSTOPPED macros
that's a supertrait, but I think you're arguing syntactic sanity and code cleanliness where I'm talking about what makes sense in the theory and logic
let me check
but there's lots of times supertraits make sense and they exist a lot
why is there function-like macros for this instead of it just being a constant 
did they need to encapsulate the comparison too
but thinking of trying to recreate inheritance is wrong because it's not supposed to exist in rust
hm
fair
@opal ridge yea figured it out lemme just write it
i mean it's certainly possible to manually expand the macros
and then write it in swift
but that's 
no you don't need to
@opal ridge so what those macros do is check the return status of _WSTATUS, which can be written in swift as:
func _WSTATUS(_ status: Int32) -> Int32 {
return status & 0x7f
}
is that not expanding the macros
as a reference point ^
_W_INT is just the status
This would make a great blog post and gave me some ideas
@opal ridge u could also just convert the macros into actual functions by calling them inside some (Obj-)C function then call that using interop
trol
inline functions in c bridge
oh it's not just one comparison
no wonder they need to encapsulate it
is there a way to flush the dns cache on ios without rebooting?
i jailbroke with chimera so i reallllyyyy don't wanna go through that again 😭
okay apparently airplane mode should help
yep that worked sweet
uhhh killall -HUP mDNSResponder or something
i forgot what the exact daemon
what game is that :o
neko atsume
So specifically, Retroarch has a option to browse the file system. Since its sandboxed it cant browse files outside of its folder. I have a older version where it gave me the option to start at the "/" directory so its psuedo out of its sandbox but it cant read files inside of /private>var>(blank) it just shows nothing in there. One of the guys on the team at RA told me that as soon as im jailbroken it should be able to escape its sandbox and see. I jailbroke but still the same thing so they told me that possibly it needs entitlements to actually view the files.
wtf
Discord lagged out hard
lmao
So specifically, Retroarch has a option to browse the file system. Since its sandboxed it cant browse files outside of its folder. I have a older version where it gave me the option to start at the "/" directory so its psuedo out of its sandbox but it cant read files inside of /private>var>(blank) it just shows nothing in there. One of the guys on the team at RA told me that as soon as im jailbroken it should be able to escape its sandbox and see. I jailbroke but still the same thing so they told me that possibly it needs entitlements to actually view the files.
im not sure the answer to that but any reason why you can't just put roms in its sandbox
So the reason im doing this is because I dont have that much room left on my ipad so Im trying to have the roms stored on a usb but the file path for the usb is deep and RA cant see it. Theres also no files app option on retroarch I gotta use its own browser. I think the path is private>var>mobilelives>etc and Retroarch stops at Var
escaping sandbox is not a default feature of a jailbreak that’s incredibly irresponsible
only checkra1n/palera1n disables sandbox
Oh meow
it also triggers a ton of jailbreak detection, so like yeah
Word okay, yea I also heard someone say that anything installed via trollstore automatically removes sandbox but same thing my RA was installed via trollstore and still stuck.
you would have to check the trollstore thing to see if it says that
i’m not sure how that works
Yea this is just my gaming device so im down to go all the way for this lol. Yea when it installs it shows you if the app is sandboxed or not and it stated that it was but was no option to edit that.
you can try signing with com.apple.private.security.no-sandbox
I finally found a tutorial on how to give Entitlements, it includes me unzipping the ipa and plist editing. Etc. okay yea ill try that. Do you know if theres a youtube video that shows doing that? Im a visual person and the website im about to use is a bunch of text
theres a couple entitlements that should work
look into the ldid manpage
Bet thank you I was gonna ask if there was a service where I could do it via the ipad I did see some stuff about ldid
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.private.security.no-sandbox</key>
<true/>
</dict>
</plist>
save to ents.plist
ldid -Sents.plist -M path/to/bundle.app
merge
you could ldid -e then edit that plist and sign witht hat
i’ve never used it
but this is easier
no i dont think
Okay so I did some quick reading,
Basically I get the ipa for RA then I extract the files from the ipa. After that I use ldid to dump the entitlements. I then edit the entitlements by adding the no sandbox command. After that I save it or replace the entitlement, rezip, and install the ipa?
more or less
all of what you need is here
no but that could be cool to implement
i’m kinda surprised that’s not already a thing
i thought that was like
the whole point lol
guess not
i mean, the expectation is to have the correct entitlements set
once you have it built
some entitlements have consequences
lel
mmmmmm CS debugged
nice idea
i can’t really think of how the ui would work
it's a plist
Massive page witch check boxes
to be totally user friendly
AppIndex already has a UI to show ents, write could also be added
does it show everything
Yes
or just the ones that are generally allowed
all
wdym
I mean you could just add the common ones with descriptions and then have a sub page for more advanced ones or you just you can edit it as a text file
you write to an NSMutableDictionary
entitlements are seriously undocumented it’s kinda sad lol
Oh that's unfortunate
or so you think
jlevin’s database isn’t really documented
is there somewhere else i don’t know about
oh who said anything abt Levin's
my mind
Not really documented then
uh yea it is
im writing a multi-app tweak and im trying to share settings between them (rootless)
does anyone have ideas on how to store the settings?
NSUserDefaults
document these
sadly not shared between apps
plist then
which ones
no write permissions
no idea then tbh
Yeah I could use them in webshade which worked in multiple apps
its a tweak for multiple apps
so its not shared between those apps
??
you know you can specify domain with NSUserDefaults right
i thought that said "look into the lead mortgage" am i dyslexic
yes, i tried it twice and it requires app group to be configured
sounds like you may have ingested some lead
ah that might be why
What's the general workflow for making a tweak from scratch?
I've just started to get the hang of using instrumentation and static analysis to find the methods and classes I want to modify, but how do I take the step from frida scripts to something I can compile and inject an IPA with from sideloadly or upload to a repo or something
I can write code, and I can reverse stuff, but there's some fundamental thing I'm missing that would link the two
@serene hawk @weary heath @wooden yarrow ended up the article instead: https://nsantoine.dev/posts/CALayerCaptureHiding
any idea what the (1 << 1) or (1 << 4) flags actually are or are used for?
