首页 > 解决方案 > Is it possible to ship an IOS app with different data on each app?

问题描述

I am creating an IOS app using swift. I am wondering if it is possible to add different data to each app that is downloaded.

Say I have an app on the App Store:

User 1 downloads the app and the array "fruits" is set to:

["banana", "apple", "orange"]

but if user 2 downloads the same app the array would be set differently:

["pineapple", "strawberry", "mango"]

and user 3

["blueberry", "peach", "watermelon"]

I know this is easily possibly by downloading the array of fruits, but I am looking to do this without connecting to the internet or exposing the entire list of fruits (e.g. having all of the fruits and then choosing them randomly)

标签: iosswift

解决方案


答案是——不,你不能。

应用商店上的应用就像一个盒子。每个用户都得到同一个盒子。但是,正如 Shantanu 所提到的,您可以显示一个随机子集。话虽如此,它并不能起到在被阻止的 URL 中找出工作 URL 的目的。如果您打算向用户显示可访问的 Url,那么您只需遍历主列表并检查哪些是可访问的。例如,如果您总共有 10 个网址,则首先 ping 以检查它是否可以访问。如果没有,则转到下一个。随机化可能无助于实现这一目标。


推荐阅读