Hey folks! I'm completely stumped with an issue I'm facing, and I could really use some help. I've built a Google Apps Script Web App that's set up to log attendance data into a Google Sheet, and while everything runs smoothly on Android, Windows, and desktop browsers, I'm hitting a wall with iOS. Here's the breakdown: I have a user form that gets submitted via fetch or AJAX, and it works perfectly on non-iOS devices—rows are added to the sheet just fine. However, on iOS (whether using Safari, Chrome, or even in-app browsers), the submission appears to be a success, but the data never actually reaches the Google Sheet. The `doPost` function isn't being triggered at all on iOS, which is super frustrating. I've tried all sorts of troubleshooting steps like changing the deployment settings, different POST methods, and even using a hidden HTML form, but nothing seems to make a difference. Despite the network tab indicating that the POST succeeded, no new rows appear in the Sheet, and it looks like the `doPost` function isn't running. Has anyone encountered a similar issue? Are there new iOS restrictions I should know about? I'd appreciate any tips, workarounds, or insights into what might be happening here! Thanks!
1 Answer
You might want to consider switching to pure JavaScript for submission instead of AJAX. Sometimes the differences in how iOS handles requests can be a headache, and using native methods might help you bypass some issues. It’s also worth checking the Content-Type of your request. Make sure you’re setting it properly for what your server expects.
That makes sense! I'm not super experienced with JS yet, but I know the basics. Maybe I'll start experimenting with pure JS forms, see if that gets it working.