#development

1 messages · Page 183 of 1

kind herald
#

Wtf why is it not working

reef trail
kind herald
#

:(

hasty ruin
kind herald
hasty ruin
#

Nah

kind herald
#

What's wrong with it

reef trail
kind herald
#

Oh

#

Ok

reef trail
#

after the meow

kind herald
#

What about now

reef trail
#

lgtm

kind herald
#

Worked. Thank you developers.

slate isle
#

does anyone know how to use locsim with gpx

#

keeps failinf for me

#

*failoing

kind herald
orchid fulcrum
#

Can't argue with that

reef trail
primal perch
#

turn 3

sonic totem
#

Average git experience

tepid olive
#

everyone uses it incorrectly

#

eg squash commits

reef trail
#

i’ve never needed to squash

#

i group things with prs most of the time

placid kraken
#

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

reef trail
#

merging prs squashes anyway iirc

#

on gh it does at least

tepid olive
#

icraze integer overflow

gentle grove
gentle grove
#

it doesn't squash by default unless you picked squash the last time you merged a PR

reef trail
#

i must’ve just checked that once and it’s always been like that

gentle grove
#

if you click the dropdown next to merge you can see all the options

#

including rebase which no one has picked on purpose before

spare zinc
#

how do I fix this?

spare zinc
#

this chat is dead

kind herald
#

Ok

torn oriole
#

and make sure automake, autoconf, aclocal and m4 are installed as well

spare zinc
spare zinc
tepid olive
#

It’s part of auto tools

spare zinc
tepid olive
faint timber
#

No one has compile more tihmware than me even tihmstar himeself hasn’t even compiled his own tools as much as me supershocked

tepid olive
#

i've compiled my own distro 😮

tepid olive
tepid olive
faint timber
wooden yarrow
faint timber
#

but even before that too

wooden yarrow
#

is it docker

#

or that CI shell script

faint timber
#

I have my own procursus build system written in python

#

no I won't release it cuz its bad and it was for myself

wooden yarrow
#

damn

faint timber
#

I build linux in docker on top of vmare on mac I build windows in msys2

wooden yarrow
#

guess it's still time for me to update all dependencies manually

native orbit
#

timhstar when stdbool exist: supershocked

wooden yarrow
#

i hate libgeneral

faint timber
#

I hate it all

#

luckily my new tools are only touching opaware

wooden yarrow
#

i am of the belief the only based thing tihmstar has done is e77f3e9c5e6c00086aa7b68e58994a639cc360d6027c90b53eb8b3b015f72f56

faint timber
#

what repo is that

wooden yarrow
#

none

faint timber
#

ah

#

gotcha

pine holly
#

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

queen ruin
dense basin
#

what’s the difference between Neko and dopa?

sonic totem
#

Dopamine is better

faint stag
#

you're supposed to work smarter, not harder

#

like wow
writing your own xpc services just to eliminate one dependency fr

slender glade
wooden yarrow
#

MRYIPC's last commit was 3 years ago

#

hm

faint stag
slender glade
#

we should all use distributed notifs instead TrollFront

faint stag
#

(that isn't rocketbootstrap)

faint stag
wooden yarrow
#

which could potentially just die with a release of a new jb

#

because xpcs sure ain't going away

slender glade
wooden yarrow
slender glade
wooden yarrow
#

wtf

faint stag
wooden yarrow
#

hate u fr nfr

faint stag
#

it's not a complex library either

#

man

wooden yarrow
faint stag
faint stag
wooden yarrow
#

that message did not get processed in my head

#

cool

faint stag
#

lmao

#

launchd handles all the communication while at the same time handling services/daemons themselves

steady nest
#

unless launchd keeps you in the prison realm

worthy mulch
#

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

opal ridge
#

@lime pivot where's the plains package.swift

lime pivot
opal ridge
#

@slender glade

slender glade
#

hello

lime pivot
#

hi

worthy mulch
opal ridge
#

@lime pivot @slender glade okay nevermind neither sileo or zebra wants to work on mac now

opal ridge
lime pivot
#

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

pine holly
#

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

radiant idol
#

Objective-C ftw

#

also xpc is in C I think lol

hasty ruin
#

🗣️🔥🔥

pine holly
#

You are right I think

radiant idol
#

me when i try to work with pointers in swift

pine holly
hasty ruin
faint stag
frail cedar
#

Sort of

#

there's 3 ways to use it

#
  • c type mach XPC
  • objc/swift type mach XPC
  • objc/swift type XPC bundle
pine holly
#

Hell no 😭

#

Get that shit out

wind ravine
#

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

placid kraken
#

swift syntax <<<<

swift primitives <<<<

swift ui <<<<<<

swift <<<<<<<

the look and feel of apps in swift >>>> objc

slim bramble
orchid fulcrum
#

Objc syntax is alright imo

slim bramble
orchid fulcrum
#

Right

placid kraken
#

i like objc syntax yeah

#

it’s like self-commenting code on steroids

wind ravine
#

objc is ugly

placid kraken
wind ravine
#

swift isnt that bad

#

but look at it compared to basuc C

slender glade
#

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

worthy mulch
slender glade
#
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

slender glade
worthy mulch
#

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

placid kraken
#

i need to remember to make elle types lowercase

#

capitalized types look so weird

radiant idol
#

pain

placid kraken
#

block syntax is such a cool idea

radiant idol
#

you can install it on your phone and then ssh into the phone and use it on your pc's terminal

orchid fulcrum
radiant idol
#

no

placid kraken
#

no

#

the [] thing

radiant idol
#

no

orchid fulcrum
#

no

radiant idol
#

umm how do I even explain it

#

this stupid stuff

placid kraken
#

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

radiant idol
#

swift has the same thing

#

but that's not block syntax

placid kraken
#

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;
}),
radiant idol
#

yes

orchid fulcrum
#

I think i never used this 💀

radiant idol
#
someFunction(true, shouldExplodeDevice:false, usersConnected:1, memoryLeakSize:MemoryLayout<Int>.size)
placid kraken
#

its a way to pass essentially a lambda function around

radiant idol
#

whatever it is in swift

#

i think its size(of:

placid kraken
radiant idol
#

yeah ik

placid kraken
#

the [] syntax feels more contained idk how to explain it

radiant idol
#

i was just showing that swift also has that

placid kraken
#

oh ok

radiant idol
#

idk how to do sizeof(int) in swift

placid kraken
#

i also dont know how the fuck im gonna implement sizeof in elle

radiant idol
#

apparently it is MemoryLayout<Int>.size

placid kraken
#

its a compile time operation, i dont have access to the size of structs that C creates in the c ffi

radiant idol
#

have fun!

placid kraken
#

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

slender glade
placid kraken
#

yeah i know

slender glade
radiant idol
#

Then how do you do it in swift

slender glade
#

give me one second im finding the article

placid kraken
#

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
#

func

#

Please

#

Not fn

placid kraken
#

you know what

#

i will make it any variation of function in order

slender glade
#

@radiant idol ah nvm it's the same after 3

radiant idol
#

Let’s gooo

placid kraken
#

fn will work, func will work, fun will work, function will work

placid kraken
#

fucon will.. also work

radiant idol
#

I finally broke Rosie

placid kraken
slender glade
#

it looks ugly because they put newlines at the wrong places but otherwise it's just GKAccessPoint.shared.observe(\.frameInScreenCoordinates) { ... }

placid kraken
#

where it will work for any variation as long as the characters are in order

placid kraken
#

i recall a joke programming language having this functionality

#

but i think it could actually be a cool thing to implement

slender glade
#

they're actually very pretty when used correctly which they are 90% of the time

slender glade
#

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

placid kraken
#

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
slender glade
#

you do not need to do that at all LOL

#

this is the most disengenious example i've ever seen in my life omg

placid kraken
slender glade
#

? idk it's normal

slender glade
#

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

placid kraken
#

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

radiant idol
#

ok THAT annoys me

slender glade
#

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

frail cedar
#

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

soft ether
#

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

weary heath
#

You can disassemble it and set breakpoints on instructions by adding the address + aslr slide

orchid fulcrum
#

Has anybody used lldb on windows or wsl ?

slim bramble
orchid fulcrum
#

Debug apps

slim bramble
orchid fulcrum
#

Yeah

slim bramble
orchid fulcrum
spare zinc
faint timber
#

pyimg4 img4lib and blacktop ipsw

native orbit
#

ipsw goated

slim bramble
soft ether
gentle grove
#

"WatchTube" requires a provisioning profile.
Select a provisioning profile in the Signing & Capabilities editor.

gentle grove
#

do you know how to help make an unsigned ipa

wooden yarrow
#

CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

gentle grove
#

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

wooden yarrow
gentle grove
#

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 trol

#

i see

crisp frost
#

capt Xcode tutorial

wooden yarrow
gentle grove
#

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

kind herald
#

can't you use it with Sideloadly or something

gentle grove
#

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

rugged gull
#

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?

slender glade
#

banger tweet follow me

#

@wooden yarrow yeah no video my voice just isn't cut out for that, i'll write an article instead

faint timber
#

Don’t wake me up again

atomic girder
#

is there any decent beginner guide to writing tweaks? rootfull, rootless, which framework to use (theos?) etc

radiant idol
reef trail
placid kraken
#

i’m pretty sure CORDIC is made in a way that it’s extremely fast

#

is it just ios being slow

orchid fulcrum
#

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

reef trail
#

just use wsl

#

no need to use a werid windows version

orchid fulcrum
#

Alright but like its the same issue

#

Also how did i get member plus role lol

reef trail
#

just get good /j

#

maybe try using the lldb theos provides (if it does provide any?)

orchid fulcrum
orchid fulcrum
reef trail
#

no doesnt look like it

orchid fulcrum
#

damm

#

will try

reef trail
#

looking at docs online it seems remote-ios is only for mac hosts

#

i could be wrong though

orchid fulcrum
#

docs of lldb ?

reef trail
#

yeah

orchid fulcrum
orchid fulcrum
#

do u remember where it was

reef trail
#

it might not of been the docs actually

#

it mightve been a stack overflow page

#

i speed researched lol

orchid fulcrum
#

oh stackoverflow says its impossible to compile for ios without a mac too 💀

reef trail
#

cos normally it is

#

theos is a botched together tool

orchid fulcrum
#

I mean it works pretty well lol

#

but i see the point

reef trail
orchid fulcrum
#

theos works pretty well

reef trail
#

yes

#

yes

orchid fulcrum
#

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

orchid fulcrum
#

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

faint timber
random field
#

@fading shell I’ve reported an issue with Glance on GitHub. Can u check it pls?

sudden heron
#

anyone here able to make an iphone automation framework similar to appium?

cloud yacht
#

Able to: probably
Willing to: probably not

soft ether
#

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

weary heath
#

you can compare the instructions by running memory read <ptr> --format i

soft ether
soft ether
#

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

weary heath
#

you need to add the aslr slide too

soft ether
#

uhh what's that

weary heath
#

security measure to make exploits harder but it's not really a hurdle for us

#

run image list <process-name>

soft ether
#

right i saw stuff online for that but didn't understand it lol, booting up my mac again (i just turned it off lol)

weary heath
#

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

soft ether
#

OHHHH

#

yeah i saw that and added 0x1003fc00 instead of 0x3fc00

#

will give that a shot

soft ether
#

HA THE BREAKPOINT SET

#

THANKS

#

<3

weary heath
#

awesome, have fun

soft ether
#

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

void fjord
#

Hey! Is it possible to give a specific app root access?

tepid olive
#

like an app from the app store root or a command line app or wdym?

frail cedar
#

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

frail cedar
#

root user access or root filesystem access

frail cedar
radiant idol
#

Good

frail cedar
#

you can just

#

extension MKMapType: Codable { }

#

instead

radiant idol
#

Alfie hated me when he saw that I did
@{}.mutableCopy

frail cedar
#

im sorry what.

radiant idol
#

It’s almost the same thing as [NSMutableDictionary new]

torn oriole
#

@sonic totem ooooo @{}.mutableCopy

radiant idol
torn oriole
#

@{}.mutableCopy

#

@{}.mutableCopy

#

@{}.mutableCopy

#

@{}.mutableCopy

gentle grove
#

@{}.mutableCopy

placid kraken
#

@{}.mutableCopy

sonic totem
#

@[].mutableCopy equally as bad

placid kraken
#

for the record i agree with alfie on this one that way of getting an NSMutableDict is sooo cursed

#

AGGREGATW???

gentle grove
#

you aggregate

slim bramble
wooden yarrow
#

idk objc but

#

@"".mutableCopy

torn oriole
#

Shiggy

torn oriole
#

Shiggy

torn oriole
#

Shiggy

slender glade
torn oriole
kind herald
#

holy moly…

wooden yarrow
wooden yarrow
frail cedar
#

they let me into the private MKMapView header

wooden yarrow
#

smh why do they not align the equals

gentle grove
wooden yarrow
#

wtf

#

it's over

slender glade
frail cedar
#

this is not a function on the UIViewController

frail cedar
wooden yarrow
#

how would u mutate it then

frail cedar
#

exactly

slender glade
frail cedar
#

i have to give it an instance of MKMapView to modify

slender glade
frail cedar
#

WHAT

slender glade
#

inout for classes just allows u to change the variable entirely in the func scope

slender glade
frail cedar
#

TIL

wooden yarrow
slender glade
frail cedar
#

Is that an expensive check

#

Or could I wrap each private toggle with that check so they only show if actually usable

slender glade
#

it's very cheap

wooden yarrow
# slender glade ?

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

frail cedar
#

Nice

wooden yarrow
#

so

frail cedar
#

I'll do that then

frail cedar
#

<- only checked 15.2.1 headers

slender glade
wooden yarrow
# slender glade i dont get it

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?

frail cedar
#

MapViewConfiguration is basically a bunch of Bools in a class

#

That function there dumps them all to the mapView

slender glade
frail cedar
#

OH

slender glade
frail cedar
#

I was under the assumption they were not, and inout kinda did the pointer thing

frail cedar
wooden yarrow
slender glade
wooden yarrow
#

so

slender glade
#

structs in rust r on the stack not the heap?

#

so

#

and also they're not just pointers

frail cedar
slender glade
wooden yarrow
slender glade
#

yes

wooden yarrow
#

which in rust would be traits

frail cedar
#

why I can't self = instance

#

ohhh ok

wooden yarrow
#

and there can be trait objects

slender glade
#

I thought traits were just the equivalent of an extension/protocol

wooden yarrow
#

which need to be wrapped in a Box<dyn TraitType>

#

to be passed

#

and you can't just pass some TraitType

slender glade
slender glade
wooden yarrow
#

wait so then @slender glade how would you pass class objs as consts

slender glade
#

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]

wooden yarrow
frail cedar
#

Swift classes still conform to NSObject

wooden yarrow
#

me when objc bridge

frail cedar
#

I love objective c bridging header

slender glade
# frail cedar How's that work
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
  }
}
slender glade
frail cedar
slender glade
#

it's a number

#

1 singular number

#

which contains other numbers

frail cedar
#

why is there only one

#

how does that work

slender glade
#

bits

#

bitfields

#

bitmasks

wooden yarrow
#

why is it not called a BitSet

#

troll

slender glade
#

they're really common in C

#

no idea

wooden yarrow
#

or a BitArray

frail cedar
#

you are speaking in tongues

wooden yarrow
slender glade
#

instead of having 20 diff bool variables

#

you have 1 number

frail cedar
#

i don't know what a bitmask is

wooden yarrow
#

from a number

frail cedar
#

Wtf

wooden yarrow
#

(or multiple)

frail cedar
#

That's

#

Cursed

#

Sorta

slender glade
#

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

wooden yarrow
slender glade
#

you define numbers like 1 << n

#

and then you check for them with .contains(.staticVariableName)

frail cedar
#

this feels more complex than a bunch of bools

slender glade
#

remove with .remove(.staticVariableName)

#

it saves way more memory

wooden yarrow
#

.

slender glade
frail cedar
slender glade
#

fair

wooden yarrow
frail cedar
#

pref bundle update

slender glade
#

Looks good

frail cedar
#

The clear cache button is broken in the RC i sent oh well

#

Gotta give the pref bundle binary entitlements

frail cedar
#

Default is Some i believe

#

I'll check later

granite frigate
wooden yarrow
#

@frail cedar what can u do with the tweak

kind herald
#

relocate

#

but better

gentle grove
slender glade
#

rust does not have classes

gentle grove
#

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

gentle grove
wooden yarrow
#

or

#

well

#

passed

gentle grove
#

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

wooden yarrow
#

does swift even have stack structs?

gentle grove
#

if it doesn't that would surprise me but I don't know much about the design of swift

wooden yarrow
#

@slender glade does it

slender glade
#

?

#

yes

gentle grove
#

Aren't there both classes and structs

slender glade
#

structs and enums are exclusively on the stack

#

classes r on the heap

gentle grove
#

they couldn't decide I guess

wooden yarrow
#

huh

#

why the destinction

#

then

#

why not just have structs

gentle grove
#

people like OOP maybe trol

wooden yarrow
#

perhaps

#

oh, right

gentle grove
#

no inheritance on structs in swift

wooden yarrow
#

swift literally comes from Objective-C

gentle grove
#

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

wooden yarrow
#

i guess each instance instead of every instance is what makes the distinction?

#

they should word it clearer tho

gentle grove
#

oh protocol is a thing

#

traits are like protocol in swift

#

like exactly identical I think

slender glade
#

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

gentle grove
#

like with rust everything is stack basically

#

if you need to have something on the heap, you place it in a Box

gentle grove
#

there's no types that are just on the heap inherently

wooden yarrow
#

seems harder to use for no alloc situations like embedded programming

#

trol

gentle grove
slender glade
#

heap is a lot more flexible than the stack iirc

gentle grove
#

which is why you can Box anything in rust that needs to be on the heap

slender glade
#

oh my god who gives a fuck about Box

gentle grove
#

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

slender glade
#

if you don't want it to be on the heap then use a struct

gentle grove
slender glade
#

they're different types for a reason

wooden yarrow
gentle grove
#

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

wooden yarrow
#

and alloc the struct if i need it on the heap

slender glade
gentle grove
#

o

wooden yarrow
#

wtf

slender glade
#

u can take a guess as to where objc classes live

gentle grove
#

like how Java is I presume

wooden yarrow
#

oh my god it's apple's java

gentle grove
#

all your objects are reference types pointing to heap

#

that's what I always thought of it as

slender glade
#

also identify

gentle grove
#

perhaps an oversimplified way but still

slender glade
#

==

#

===

wooden yarrow
slender glade
#

yes

#

what

#

sorry i thought u replied to the == one

#

=== for structs? no

wooden yarrow
#

why is there a ===

gentle grove
wooden yarrow
#

is this javascript 2

#

💀

gentle grove
wooden yarrow
#

oh

slender glade
wooden yarrow
#

is that not just sugar

#

then

gentle grove
slender glade
#

== 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

wooden yarrow
#

lol

gentle grove
#

since structs are the value

gentle grove
wooden yarrow
#

no like

#

if you alloc structs

#

on the heap

#

u get a struct ptr

gentle grove
#

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

wooden yarrow
#

given that the default is comparing values

#

sounds like java troll

slender glade
gentle grove
#

i wouldnt call that hidden

#

they just flip flopped the logic

gentle grove
wooden yarrow
#

what

wooden yarrow
#

yeah

#

ig more intuitive for the default to be comparing values?

gentle grove
wooden yarrow
#

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

gentle grove
#

Probably just cry like with Java

wooden yarrow
#

😭

#

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

gentle grove
#

What wdym

wooden yarrow
#

bc if you want shit on the heap

#

you use classes

#

classes come with all the objc stuff

#

so

#

.

gentle grove
#

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

wooden yarrow
#

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.

slender glade
gentle grove
#

true

wooden yarrow
#

seems very intermingled with objc

slender glade
#

shrug

wooden yarrow
#

to me

gentle grove
#

is that talking about interop with objc?

wooden yarrow
#

i mean it is from the objcinterop doc

gentle grove
#

i don't think that has anything to do with when you just make a class in swift and that's it

wooden yarrow
#

so

gentle grove
#

no objc involved

gentle grove
#

it gets turned into a thing

wooden yarrow
#

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)

gentle grove
#

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

wooden yarrow
# slender glade this

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)

wooden yarrow
#

but they really should've only generated it when necessary

#

i.e. lazy generation

gentle grove
#

that's hardware and software

gentle grove
slender glade
gentle grove
#

Oh I just found exactly the article I was looking for

wooden yarrow
#

.

#

i'm saying compilers are too smart

slender glade
#

fair

gentle grove
wooden yarrow
#

maybe

wooden yarrow
#

because this also implies no connection to NSObject

gentle grove
#

how did they come up with .m for objc

#

it doesn't have an m in either word

wooden yarrow
#

or is this only for objc interop

slender glade
slender glade
wooden yarrow
gentle grove
wooden yarrow
#

cool

gentle grove
#

their crazy naming

#

everything

#

this kinda makes sense

#

because classes give you identity

slender glade
#

there needs to be better documentation about swift's interaction with objective-c

wooden yarrow
gentle grove
wooden yarrow
#

you know what that means

#

!

gentle grove
#

I don't

#

How can you open the source, is it like a chest

wooden yarrow
gentle grove
wooden yarrow
gentle grove
#

basically the idea is you use struct for all but a very small amount of cases

wooden yarrow
#

everything is from classes

#

thus everything is object

gentle grove
#

which is either objc interop or needing the idea of objects and identity,

gentle grove
#

it's neat to me because it didn't occur to me

#

rust doesn't have any analog of that

wooden yarrow
#

probably because rust devs thought oop was bad

#

but swift needs this because legacy objc code

gentle grove
#

No it's beyond objc interop

#

think of something like a file handle

gentle grove
#

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

wooden yarrow
#

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

gentle grove
#

instead of inheritance you do things through traits

wooden yarrow
#

oh, yeah combining traits together

gentle grove
#

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

opal ridge
#

@slender glade do you know how to interpret waitpid status in swift

gentle grove
#

it's rare that inheritance even makes sense

opal ridge
wooden yarrow
#

i think it would be nice to just be able to gain allat and add a few more

#

trol

slender glade
wooden yarrow
#

seems like a rare case th

#

o

opal ridge
slender glade
#

the way i used it before is

gentle grove
#

if you really think things through

slender glade
#

var status: CInt = -1
waipid(pid, &status, 0)

#

@opal ridge and if the return status is not >= then check errno

opal ridge
#

right and how are you going to interpret status

slender glade
#

uhh

#

one sec

gentle grove
#

inheritance makes sense if you have something that's fundametally inherited in like a theoretical way which is somewhat rare

wooden yarrow
#

and it would be fine to just use that new trait

#

yeah

opal ridge
#

because in C it is done with WIFEXITED WIFSIGNALED WCOREDUMP WIFSTOPPED macros

gentle grove
gentle grove
#

but there's lots of times supertraits make sense and they exist a lot

wooden yarrow
#

did they need to encapsulate the comparison too

gentle grove
#

but thinking of trying to recreate inheritance is wrong because it's not supposed to exist in rust

slender glade
#

@opal ridge yea figured it out lemme just write it

opal ridge
#

i mean it's certainly possible to manually expand the macros

#

and then write it in swift

#

but that's frcoal

slender glade
#

@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
}
wooden yarrow
#

is that not expanding the macros

opal ridge
#

that's expanding the macros guess ill do that

#

since it only needs to work on darwin

slender glade
#

oh i thought u meant writing a c bridge

#

mb

slender glade
#

as a reference point ^

#

_W_INT is just the status

gentle grove
wooden yarrow
#

@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

opal ridge
#

inline functions in c bridge

wooden yarrow
#

no wonder they need to encapsulate it

soft ether
#

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

native dune
#

i forgot what the exact daemon

placid kraken
granite frigate
weary heath
#

neko atsume

void fjord
#

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.

weary heath
#

wtf

void fjord
#

Discord lagged out hard

weary heath
#

lmao

void fjord
#

Tf

#

Im sorry guys lmao

weary heath
#

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.

void fjord
#

I cant tell if its deleting the message

#

😂😂

weary heath
#

im not sure the answer to that but any reason why you can't just put roms in its sandbox

void fjord
#

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

restive ether
#

only checkra1n/palera1n disables sandbox

tepid olive
restive ether
void fjord
#

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.

restive ether
#

you would have to check the trollstore thing to see if it says that

#

i’m not sure how that works

void fjord
#

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.

restive ether
#

you can try signing with com.apple.private.security.no-sandbox

void fjord
#

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

native dune
#

theres a couple entitlements that should work

void fjord
#

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

native dune
#

merge

restive ether
#

does trollstore let you manage entitlements from in the app

native dune
#

you could ldid -e then edit that plist and sign witht hat

restive ether
#

i’ve never used it

native dune
#

but this is easier

void fjord
#

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?

restive ether
#

more or less

faint stag
restive ether
#

i’m kinda surprised that’s not already a thing

#

i thought that was like

#

the whole point lol

#

guess not

faint stag
#

i mean, the expectation is to have the correct entitlements set

#

once you have it built

#

some entitlements have consequences

#

lel

restive ether
#

mmmmmm CS debugged

restive ether
#

i can’t really think of how the ui would work

slender glade
#

it's a plist

cloud yacht
restive ether
slender glade
#

AppIndex already has a UI to show ents, write could also be added

restive ether
#

does it show everything

slender glade
#

Yes

restive ether
#

or just the ones that are generally allowed

slender glade
#

all

restive ether
#

promising

#

how does that work when it’s a key

#

like true/false or setting a path

slender glade
#

wdym

cloud yacht
#

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

slender glade
#

you write to an NSMutableDictionary

restive ether
cloud yacht
#

Oh that's unfortunate

slender glade
#

or so you think

cloud yacht
#

But doesn't trollstore already have some to show permissions?

#

When installing

restive ether
#

is there somewhere else i don’t know about

slender glade
#

oh who said anything abt Levin's

restive ether
#

then who

#

that’s all i know about

slender glade
#

my mind

cloud yacht
#

Not really documented then

slender glade
#

uh yea it is

atomic girder
#

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?

slender glade
#

NSUserDefaults

restive ether
atomic girder
slender glade
slender glade
atomic girder
slender glade
timid furnace
#

what is wrong with NSUserDefaults

#

your domain is your app's bundle id

cloud yacht
#

Yeah I could use them in webshade which worked in multiple apps

atomic girder
#

so its not shared between those apps

timid furnace
#

??

#

you know you can specify domain with NSUserDefaults right

placid kraken
atomic girder
timid furnace
#

is this jailed or jailbroken?

#

oh wait, the apps are gonna be sandboxed

#

ugh

restive ether
placid kraken
#

ah that might be why

worthy mulch
#

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

slender glade
wooden yarrow
#

yooo

#

🔥

wooden yarrow