0

Is there a way to display a html file in a settings' web view like demonstrated in the InAppSettingsKit sample app? I am able to invoke the web view as a child pane. I specified a html file using the key "Filename" (or in case of using the InAppSettingsKit bundle "File") but how do I link the file to the web view? Following the dictionary item in question:

   <dict>
        <key>File</key>
        <string>settings_about.html</string>
        <key>IASKViewControllerClass</key>
        <string>IASKAppSettingsWebViewController</string>
        <key>IASKViewControllerSelector</key>
        <string>initWithFile:key:</string>
        <key>Title</key>
        <string>WebView</string>
        <key>Type</key>
        <string>PSChildPaneSpecifier</string>
    </dict>

And here is a summary of what I have tried so far: I used the Settings.bundle from the mergSettings demo and added the web view dictionary item. Added the file "settings_about.html" to the "en.lproj" folder included with the settings bundle. Added a "en.lproj" folder including the HTML file in LiveCode's standalone application settings, added the file without an enclosing folder. Used an unmodified copy of the Settings.bundle from "InAppSettingsKitSampleApp". Placed the HTML file in ".lproj" folders inside and outside the bundle. Removed all dictionary items from the plist but the one needed for the web view. Ran all tests using .plist as well as .InApp.plist. All tests were in-app only.

rabit
  • 1
  • 1
  • 2
  • This is not something I've done but as it is InAppSettingsKit then anything you can see in the sample app should be possible with mergSettings. Note that you can do lots of stuff with InAppSettingsKit which Settings.app doesn't support. I'd recommend downloading it from here http://www.inappsettingskit.com and then extracting the Settings.bundle from the sample to see what's possible. – Monte Goulding May 25 '13 at 05:52
  • @Monte, thanks for your comment. Extracting the Settings.bundle from the InAppAettingsKit sample is what I did. I used this bundle with my test app. A bit stumped I added the html file in question in LiveCode's standalone application settings. This did not help. All I got is an empty web view. Later I used the bundle you provided with your sample and added the web view key value pairs from the InAppAettingsKit Settings.bundle. I tested in-app only and all worked as expected except for the web view. I need to display text like acknowledgements, imprints, license agreements and the like. – rabit May 25 '13 at 21:37
  • I expect the HTML file needs to be inside the settings bundle. The InAppSettingsKit docs should help you there. – Monte Goulding May 26 '13 at 23:20
  • Used the Settings.bundle from the InAppAettingsKit sample. Added "settings_about.html" to all .lproj folders included with the Settings.bundle. The result: The web view is still empty. After having spent quite a few hours to get this up and running I am pretty sure there is no easy way to include html content using the current version (1.0.5) of mergSettings. I would love to be proven wrong though. – rabit May 27 '13 at 13:09
  • Can you modify your question with the dictionary item you are adding to the plist. – Monte Goulding May 28 '13 at 06:11
  • Hmm... well, I'm not really sure why it's not working other than the possibility that it doesn't parse these InAppSettingsKit extras unless it's reading a .InApp.plist rather than just a .plist. – Monte Goulding Jun 02 '13 at 21:59

1 Answers1

0

Here is the answer to my own question: The path to your html file as defined in your inApp.plist file is always relative to your stack file. For example, assuming that Settings.bundle is next to your stack and your html file is in a language folder of the bundle, the line in your inApp.plist file defining the path to the html page should read: <string>Settings.bundle/en.lproj/settings_about.html</string>

rabit
  • 1
  • 1
  • 2