1

I am using Adobe AIR 14.0.0.125 to build an iOS app which works without error when on WiFi, or with any cell service, besides AT&T. When using AT&T, regardless of the service, i.e. 3g, LTE, etc, the XML returned from my server has extra characters, which renders it unreadable by the app.

This only happens on iPhones with AT&T. The same app on Sprint service, Verizon, Wifi, or any Android phone works.

The process is: Post some variables to a PHP file, PHP file searches my database, and echos XML.

What is usually returned by the server when on Wifi, Sprint, Android, etc.:

<?xml version="1.0"?>
<businesses>
  <name>Business A</name>
  <name>Business B</name>
  <name>Business C</name>
</businesses>

What is returned on AT&T service:

16    
<?xml version="1.0"?>
d
<businesses>
1b
  <name>Business A</name>
18
  <name>Business B</name>
12
  <name>Business C</name>
7
</businesses>
41

Any ideas on what is causing this, and how to fix it?

Thanks in advance.

user1129107
  • 205
  • 1
  • 8
  • 16
  • I have the same issue with php files on multiple Android devices on AT&T. For me, even with the page headers, the issue isn't resolved. – John Sep 26 '14 at 17:58
  • I still don't know what the issue is here. Changing servers fixed the problem for me. At the time I was on a GoDaddy server. I switched to BlueHost. Maybe give that a try? – user1129107 Sep 26 '14 at 21:52
  • I'm actually on a Bluehost VPS. I found a solution to the issue on another thread and adding cache control 'no-transform' did the job. http://stackoverflow.com/questions/25600332/ios-web-page-errors-over-cellular-data-but-not-over-wifi-recent-change-to-att – John Sep 26 '14 at 22:16

1 Answers1

0

I found the solution from another question: Remove wierd characters in xml output

You have to set the header for your content. In your example it would be text/plain I think because it's xml.

<head>
  <title>Page name</title>
  <meta http-equiv="Content-Type" content="text/plain; charset=utf-8"/>
</head>
Community
  • 1
  • 1
MrTippet
  • 306
  • 1
  • 3