I think if they did this app developers would need to sign and submit four different binaries (iphone, iphone_2x, ipad, ipad_2x). Technically you can already do this. I guess if it's a paid app, the user would have to pay for each device type.
A week later, the candidate discovers that the company instead hired someone else that happens to knows absolutely nothing about template metaprogramming. Except that person is whiter / younger / less married than said candidate.
if the number of different weights is finite and small, you could create a bucket for each different weight.
for example if the possible weights are .25, .5, and .75, put all items into one of those buckets (array backed). The bucket then gets a weight of (individual weight)*(bucket size). First randomly choose a bucket based on the bucket weight, then randomly choose an object from the bucket.