Problem with the 'Orientation' preference

  • 1
  • Question
  • Updated 9 years ago
  • Answered
My .XML file works fine and I've never experienced any errors to date when uploading it as part of a zip to PhoneGap build. However, after adding in: "" I get an error: "malformed config.xml".

Any ideas what I'm doing wrong?
Photo of Meteor Pixel

Meteor Pixel

  • 5 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of Meteor Pixel

Meteor Pixel

  • 5 Posts
  • 0 Reply Likes
Meant to say, after adding in:

preference name="orientation" value="landscape"

but with the < > either side (for some reason, it gets stripped out if I post it?
Photo of Meteor Pixel

Meteor Pixel

  • 5 Posts
  • 0 Reply Likes
For some reason, if you remove any spaces before the ' on this line, the issue is resolved?
Photo of Meteor Pixel

Meteor Pixel

  • 5 Posts
  • 0 Reply Likes
...However after testing this, by removing the spaces, the preference don't work! Any ideas?
Photo of robNeo

robNeo

  • 54 Posts
  • 1 Reply Like
You maybe arnt terminating you element correctly. Try putting a slash before the closing chevron:

ie "/'>"
Photo of Meteor Pixel

Meteor Pixel

  • 5 Posts
  • 0 Reply Likes
I feel like a complete moron- thanks robNeo, it was just missing the '/' at the end. My own fault from copy/pasting straight from the 'Using Config.XML' tutorial. Maybe this could be tweaked by an admin to include the '/' for future users?

Cheers,
Sam
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Ah yes, this was a typo on my end. Sorry for the confusion.