3 Replies Latest reply: Mar 20, 2013 11:19 AM by sb0117
Gregg42 Level 1 Level 1 (0 points)

Hi,

 

    I have created an html file with .js files and also .css files. When I drop the widget into iBooks, it tells me I do not have a defined main HTML file. In the .plist file, I have defined it. Any ideas?


iPad, OS X Mountain Lion (10.8.2), Using IBook Author 3
  • 1. Re: plist file
    sb0117 Level 2 Level 2 (225 points)

    You need to package your widget using dashcode where you have your main.html and your plist files as well as any CSS and JS you need to run the widget. See this page for more info on HTML widgets:

     

    http://support.apple.com/kb/HT5068

  • 2. Re: plist file
    K T Level 7 Level 7 (23,700 points)

    Can you show that plist here?

     

    Example from Apple:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"

    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0">

    <dict>

    <key>CFBundleDevelopmentRegion</key>

    <string>English</string>

    <key>CFBundleDisplayName</key>

    <string>Hello World</string>

    <key>CFBundleIdentifier</key>

    <string>com.apple.widget.HelloWorld</string>

    <key>CFBundleName</key>

    <string>Hello World</string>

    <key>CFBundleShortVersionString</key>

    <string>1.0</string>

    <key>CFBundleVersion</key>

    <string>1.0</string>

    <key>Height</key>

    <integer>768</integer>

    <key>MainHTML</key>

    <string>HelloWorld.html</string>

    <key>Width</key>

    <integer>1024</integer>

    <key>IBNotifiesOnReady</key>

    <true/>

    </dict>

    </plist>

  • 3. Re: plist file
    sb0117 Level 2 Level 2 (225 points)

    Gregg42: Please post your plist content as suggested by K T

     

    Here's the one I use for all my widgets:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0">

    <dict>

      <!-- Modify these properties as desired -->

      <key>Width</key>

      <integer>1024</integer>

      <key>Height</key>

      <integer>768</integer>

      <key>MainHTML</key>

      <string>main.html</string>

     

      <!-- These are required, but have no user-facing effect -->

      <key>CFBundleDevelopmentRegion</key>

      <string>English</string>

      <key>CFBundleIdentifier</key>

      <string>com.niceoak.widgettemplate</string>

      <key>CFBundleName</key>

      <string>iBooks HTML Widget template</string>

    </dict>

    </plist>