Yeah, I totally get that, but how are there FOSS applications on iOS that aren’t side loaded? At best you can get paid ports/skins of open source software through the app store, but Apple changes developers a small fortune to put apps in the store, which generally equates to no free apps that don’t rely on ads or in-app purchases.
That’s a tough question and depends a lot on what substance(s) is being used. If its an opiate, have your friend take a look at ibogaine therapy; it’s seen some really amazing results for some people, who generally report that it feels like it resets something in their brain and they no longer have any desire for their preferred substance. Obviously, milage will vary, but its definitely worth looking at.