简体   繁体   English

游戏制作工作室访问 iOS 应用程序的 NSUserDefaults,这可能吗?

[英]Game maker studio accessing iOS app's NSUserDefaults, is it possible?

I have a native app deployed to my iPhone, and would like to make another app (game) by using game maker studio.我有一个本地应用程序部署到我的 iPhone,并想使用游戏制作工作室制作另一个应用程序(游戏)。

On the native app, I have some data like: username, date of birth, etc. And I would like to access those data from the game.在本机应用程序上,我有一些数据,例如:用户名、出生日期等。我想从游戏中访问这些数据。

I have been searching around and most people suggest to use web service for the data communication method.我一直在四处寻找,大多数人建议使用网络服务作为数据通信方法。 Is there any other way to do it?有没有其他方法可以做到? Maybe sharing a database or using NSUserDefaults.也许共享一个数据库或使用 NSUserDefaults。 Is it at all possible?有可能吗?

the web service is your best bet as Apple has a big thing about privacy and such for the reason being that they dont want the possibility of the app being accessed and the users data being stolen! Web 服务是您最好的选择,因为 Apple 对隐私非常重视,原因是他们不希望应用程序被访问和用户数据被盗! So if you want one app to get data from another app as that is what i am understanding from your question, then as i said sharing the data over a web service is your best bet!因此,如果您希望一个应用程序从另一个应用程序获取数据,正如我从您的问题中所理解的那样,那么正如我所说,通过网络服务共享数据是您最好的选择! I hope this was what you were looking for.我希望这就是你要找的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM