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

#1

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.

0 Likes

#2

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

#3

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

0 Likes

#4

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

#5

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

2 Likes