Why is Remote Debugging for Safari Mobile so inconsistent? - ios

I've been developing JavaScript for many years with OSX and Mobile Safari, and I've noticed Remote Debugging has ALWAYS been extremely inconsistent.
Currently, I am running Safari 10.0 on El Capitan 10.11.6, and iOS 10.0.2 (the latest), and I'm not getting it to work AT ALL. I actually hadn't attempted to use this feature for several months before recently, so not sure if maybe the feature is just completely broken now.
In the past, if you quit Safari Mobile, and quit Safari (desktop) both, then started them back up, sometimes it would begin working, and then sometimes continue to not work (shows "No Inspectable Applications", or device doesn't show in menu). I am NOT changing any settings between these steps, and I know they are what they should be according to documentation, and tips I've read.
Develop menu is on. Web Inspector is enabled. Fraudulent Website Warnings is off (someone suggested this has something to do with it). iOS is open, and on a web page.
I know other people who've encountered this exact problem again and again. It seems that it is clearly a bug that Apple needs to resolve. I know how to use weinre, and this is a great workaround; however, it is highly irritating to waste my time trying to get this to work several (many) times, and then have to give up, and go set up weinre every time (it happens a lot).
So! I've read through several StackOverflow topics on this (can't find them ATM), but none of them that I've seen specifically address the spottiness of this issue, or how to solve it once and for all.

Related

iOS universal link does not work on one device (although works on other iOS devices)

I'm facing a strange issue with universal links on iPhone - iOS 12.2.
I'm trying to open the APP using a registered universal link (the same link works on other devices using both - the same and different version of iOS), using identical application (the same version).
What's strange is that I can't even find the option to open the link in a native app when holding the link for a while on this device, although I found it in other devices.
It used to work, but then suddenly stopped to open the APP. I tried rebooting and reinstalling the app.
Did anyone face similar issue? Any suggestion in debugging? I'd really like to avoid factory reset of the phone.
You might be running into either of these two bugs:
https://openradar.appspot.com/45201697
https://openradar.appspot.com/33893852
I just ran into this. Deleting the app, reboot the device, wait an hour or so (unsure of time needed to wait) then reinstall the app. That seems to force it to re-check the AASA.
Seems like there could be a process running after reboot blocking swcd from running.
Have you tried to delete the app and restart the phone to check if this is not a apple-app-site-association problem?
So after upgrading to the newest iOS the problem still remained in Chrome.
I was able to open the contextual menu and open the app through the Open in... item from Safari, and since then it works as expected across all the browsers. This doesn't explain the origin of this issue, but I hope this will help you as well.

Trouble compiling for iOS 11.1 with Xamarin (Visual Studio)

There is not much of a point in posting actual code here, because we're talking about 7 different apps.
All of these apps have been up on the Apple Store and running fine. Until the new iOS 11.1 came out. Now I am being forced to update all of those apps, and rearrange the screen to allow for the new layout of the iPhone X.
Now all of this seems mostly reasonable, if not ridiculous for them changing their own design standard. But the real problem is that I went through all of that. Upgraded Xamarin (Visual Studio), and packages, and Xcode, and the Simulators, AND my Mac system. Everything is up to speed. The apps compile and test fine on any simulator I install them on.
The only change to the code is moving stuff around on the screen. Well, that, and I now need to drop support for anything i386. It all has to be x86_64 now.
From what I can tell, that is a difference from 32-bit to 64-bit. And that change is a dropdown menu choice in the Project Options. In any case, there is no indication at all that there is anything wrong with these apps at all.
So with all of this, I submit my apps for approval, and every single one of them gets rejected because "The app crashes on startup." And they kindly attach a log file showing what went wrong.
Now, I know I can simply scour those logs, for all 7 apps... The log files need to be fed into some other program that can decipher them, because they are not human-readable. Which is just annoying...
What I'm hoping is that someone can save me some trouble and explain what they changed in their systems that is not being caught by the compilers or the simulators.
Any help would be hot.
I am posting my own answer because I have not seen one anywhere that addresses what I have found to have worked. So I am providing this information for the next small developer, like myself, can get some useful answers to questions where Apple and Xamarin are simply NO HELP at all.
Xamarin does provide a page that essentially says, "get your app ready for iOS 11." The most useful part of this is where it shows you how to remove any linkage to anything 32-bit.
Architecture changes
This is mostly helpful. And I thought that once that was done, I'd be all set. There are 2 other things they completely fail to mention:
- You must set your target device to 11.1. You cannot have it set for 9.0. That will make the app crash on an 11.1 system.
- You must make a change in the manual code editing (source) section of the info.plst file. Why this is not done automatically, I cannot say. You must add an entry to the "Required Device Capabilities" section for "arm64". You also must remove the one for arm7.
Failure to do these two things, even after making their suggested changes will cause the app to crash on iOS 11.1 devices.
If you think I'm having a bit of an attitude problem about this, yes, I am. And I will not apologize for it.
It is absurd for Apple to change their design specs, give us very little time to make changes, and then not provide the absolutely essential information to actually make the changes. I blame Xamarin too. For the exact same reasons.
It is also absurd to totally deprecate all the testing devices I have, and then ask, "why don't you test on an actual device?" Because I cannot afford a new $1000 phone for the sake of testing apps that barely make me any money anyway. That's why.
And people wonder why I think it's a pain in the bum to develop for iOS devices.
1) Some of the frameworks that your app use may use libraries, that does not work correctly on iPhone. The reason for that is that when you compile your project on the simulator, is still compile it for a PC architecture, not a mobile one. And if there are any differences, only a real device could tell you about them.
2) I would suggest you to use this method to symbolicate crash reports from Apple. That at least should give you some clue. In summary, what you need to do is after you compile your app, you need to save a few files (.dSYM and .ipa) Then when apple send you back a report, you would be able to symbolicate it into human readable. You can find more info on how to do it here: https://developer.xamarin.com/guides/ios/troubleshooting/questions/symbolicate-ios-crash/

Cordova app running fine on safari, but crashing when installed as app

I've built a tool for a client, which basically is a tool that displays a number of items and filters them base on the set parameters. This tool started as a web-based project and it runs on all browsers and it should run when opening the html-file from the filebrowser(so when no server is involved).
We tested this on tablets/phones as we knew that it would needed to be ported. So this code is running fine on our ipad3(first gen retina) when we open it up on safari. Now we've been setting this up with cordova. But the moment this loads, we get memory warning, saying that the memory should be cleared etc... the app is running sluggish and some new bugs are showing, probably due to the memory issue's...
I've been looking into profiling/timelineing to find memory-leaks etc, but i can't really find any notable memory-leaks.
Another quirky thing: If we build this app in portrait mode only, the issue's dissapear. But the code that is being executed is exactly the same, we don't do anything differently when in portrait mode besides other styling.
Could be CSS/Mediaqueries/images(png's) be causing these issue's?
If anyone could point me in a direction, that would be great.
If you guys need code/examples/... shout and I will provide.
thx
I found the issue last week. Apparently this was cause by my css. The results were shown as small items in a list of approx 60 items. And they had an on-hover/touch event that would flip the item. But the css that was adding the perspective/backfacing etc was causing memory issue's. I removed them, and everything was working perfectly.
I do still however wonder why this is causing issue's in Cordova, but not in native safari, I would presume that the same app with same code on the same browser would give the same performance .... But apparently there are some differences between a webview and the native safari app?
Unless you installed a WkWebview plugin, Cordova will run your app in a UiWebview which has a lot of performance and memory issues that are not present in WkWebview.
Native safari uses WkWebview under the hood, which explains the performance and stability differences between your Cordova app and Safari.

Slow webapp load time in Safari iOS 9.1

Our webapp takes approximately 30 seconds to load for the first time in Safari on iOS 9.1. Most of the visual loading happens in a timely manner, but HTTP requests cannot be handled for about 30 seconds. I have only been able to reproduce this on an iPad by going to the following link: http://tco.ekotrope.com/tco/?deployment=eko-dev&#community/default. And I can only reproduce it once, due to caching. It can be reproduced another time by going to the following link, http://tco.ekotrope.com/tco/?deployment=eko-dev&#community/sunwood-bridgewater.
I have tried investigating looking at the Developer Tools Network Tab while the iPad is plugged into a Macbook, but for some odd reason, the page loads quickly when it's plugged in and I'm looking at the Network Tab.
Any ideas what could be going on or what I could do for further investigation? Thanks!
We were able to resolve the problem on our webapp.
In a nutshell, the problem is with how iOS 9.1 Safari chooses to schedule HTTP connections. For reasons probably related to increasing performance in certain cases has caused certain edge-cases to become problematic. In our case we had several images trying to load at the same time as we needed an XHR to occur. In other browsers like desktop Chrome this was not an issue, but iOS 9.1 Safari chokes when it tries to do all of that at once. Our solution was to have the images that trigger the problem load one after the other rather than all at the same time. This spread things out enough that things operated smoothly.

Why isn't my app showing up in the Android Market?

I uploaded my app this morning, I *THINK I've satisfied all the requirements for uploading. The app shows up as active in the developer console, but I can't find in in the market via the phone or computer internet version of the market.
Now I haven't done much with the permissions yet, but in the console it shows that the app is compatible with 611 devices including my droid x.
Still, I would think it would at least show up.
Is there generally a delay in the publishing? From what I've seen it should be pretty much instant.
It's also not showing up by using the link format market://details?id=.
Otherwise, can you think of anything I could be missing in the app to keep it from showing up like this?
This is my first time publishing, so try to think back to the elementary concepts of publishing lol.
25 October 2011 - Recently published apps not appearing in Android
Market We're aware of reports from some developers that apps recently
published don't appear in Android Market. This issue is impacting both
app searches and when viewing a developer's app catalog on both mobile
devices and the web view of Android Market. We're investigating this
issue and are striving to resolve it as soon as possible.
Lol well there's you're problem... That's so my luck. I upload my first app, have no clue what i'm doing and then turns out the market broke, and I was doing stuff right. haha go figure

Resources