How to add App Preference / Setting Bundle? (SOLVED)

I would like to allow user to input text in the Setting Panel in iOS. May I know how to implement it via Defold?

Many Thanks.

Make a settings bundle according to the Apple docs, then put it in bundle_resources/ios/ (and make sure you add the bundle_resources dir to “Bundled resources” in game.project:

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html

4 Likes

Thanks for your reply. Surely it will work. I am wondering, is it possible to implement this feature inside Defold?

I don’t see why. The settings bundle is something that you should be able to fully customise and being able to put it in bundle_resources already gives you that flexibility. There’s no point adding another layer of complexity over it. At most, somebody could write a native extension to pull settings out of NSUserDefaults, so that you don’t have to write that yourself.

2 Likes

We have not considered doing this. I think the solution and reasoning provided by @dapetcu21 is good.

2 Likes