GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-02-26T23:05:47.000+0000 |
Affected Version/s | Release 5.5.1, Release 6.3.0, Release 7.0.2 |
Fix Version/s | Release 7.1.0 |
Components | iOS |
Labels | applebug, injection, webview |
Reporter | Victor Vazquez Montero |
Assignee | Vijay Singh |
Created | 2018-02-08T19:51:48.000+0000 |
Updated | 2018-04-23T11:15:24.000+0000 |
*Issue*
In the app they have a signature drawing controller, which loads signature.html in webview. The html has Ti.App.addEventListener & Ti.App.fireEvent to communicate between webview and controller. HTML gives error on Ti accessing in html. This is happening in iOS 11.3 beta 1 & beta 2.
Code works fine on iOS 11.2 and earlier
*Steps to recreate:*
download TestiOSBeta
run project on simulator for iOS 11.3
*Expected results:*
Drawable canvas and text turn green.
We need to * file a bug at Apple as this is a breaking change in a non-major version (nogo). Maybe the fix it before releasing the 11.3 GA * Find out what's going on there. I suspect the evaluation may have changed * Fix it. Maybe do a 7.0.3 for this in case Apple does not fix it Test-Case: *app.js*
*test.html*
I've files radar #37423632 at Apple to be hopefully followed up soon.
No fix in the 11.3 beta 3 released today. I'm getting worried that they GA 11.3 and it will break all my existing installs out there with no remedy. Any movement/acknowledgment on Apple's end?
This is going to break our apps as well. Do you know if this is with webview and wkwebview?
We are in dialog with Apple to resolve this. It looks like they did not know about the issue before. I will update this issue once we have an update.
Our app also has the same problem. It seems the script can not access Ti object at all. I am waiting for the update.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/9877 PR (7_1_X): https://github.com/appcelerator/titanium_mobile/pull/9878 Note - We should follow to apple to get it fixed from their side also.
Apple is investigating our native test case (also attached as "test_webview_native.zip" to this ticket) right now. If they are really not able to fix this in iOS 11.3, we have a workaround ready to be put in the next release. You can also apply the above pull request to your current SDK by modifying the "TiUIWebView.m" with the one of the ticket. Please let us know if that works for all of you guys! In addition, I will provide a custom 7.0.2 SDK that is the current GA + this fix. Thanks everyone! *EDIT*: Custom 7.0.3 build that is basically 7.0.2.GA + the above pull request ~ [Download](https://www.dropbox.com/s/yqgo91mkpuemc3y/mobilesdk-7.0.3-osx.zip?dl=1)
Hans, I was able to install your modified 7.0.3 build. It actually broke some things on iOS 11.2. I use socket.io within a hidden webview within my application (don't ask -- it's legacy code). 7.0.3 breaks when I call the socket.io connect method. No error message. Just appears to stop processing. However, 7.0.3 on 11.3.beta3 gets further than it did before. Previously, it didn't even appear to be loading the local html file. Now, it gets to the same point as 11.2 with the same behavior.
[~killroyboy] Some follow up questions then: * Did the socket.io implementation work on iOS 11.2 before? If so, can you give an example? * What's the exact error message with socket.io now? * You said "some things", but only stated the socket.io one, what else? We could eventually only apply the fix for iOS 11.3 (although the Ti.App.fireEvent tests also passed on 11.2), but if you say that it even breaks 11.2, it's looks like a weird behavior, because iOS 11.2 should be unaffected by this.
@hknochel Thanks for the response. 1) Yes. The app works fine with 11.2 and 7.0.1.GA. Once I switch to 7.0.3, it fails to connect. I'll try to put together an example. 2) There is no error message. It just doesn't connect and stops processing the javascript in the html file. 3) Sorry to be imprecise. The socket.io problem was the only problem I experienced because my entire app is dependent on that socket.io connection.
[~killroyboy] Interesting, interesting. Would you mind trying [this build](https://www.dropbox.com/s/mx0d4naj7rcdw50/mobilesdk-7.0.3-r2-osx.zip?dl=0) to see if it makes a difference? And we definitely need your test case.
Hans, I have tried your builds. - 7.0.3 r1 with 11.3: Ti object is available, but an error occurs because html does not read external scripts. - 7.0.3 r2 with 11.3: It worked fine! I confirmed that it works well at least in my environment. Great!
[~toru] That are great news! r2 uses a different approach. [~vijaysingh] Can you update your PR to match my changes or should I file an own one? In any way, this is going into 7.1.0 which is planned for the next weeks. In addition, developers who don't trust Apple to fix the actual issue can use the 7.0.3 build right now. Thanks everyone!
Hans, I can also confirm that r2 fixed both 11.2 and 11.3 issues for me. Thanks so much!
[~hknoechel] I have updated master PR. Can you please update 7_1_X PR. Thanks!
All updated!
FR Passed. HTML does not error in webview when accessing eventListener. Tested using provided sample code, webview suite, and confirming customer responses
Verified changes are included in SDK builds: 7.1.0.v20180227113527 & 7.2.0.v20180228075644
[~hknoechel] How can I install 7.0.3 r2? I tried appc ti sdk install --branch 7_1_X -d but too bleeding edge for me. I have tried appc ti sdk install --branch 7_0_X -d but is 7.0.3 r2 a specific one?
[~threethirds] This change will go in 7.1.0. But you can download it from [here](https://www.dropbox.com/s/mx0d4naj7rcdw50/mobilesdk-7.0.3-r2-osx.zip?dl=0). Thanks!
thanks [~vijaysingh]. appreciate it.
Hans Knöchel added a comment - 10/Feb/18 9:50 AM I've files radar #37423632 at Apple to be hopefully followed up soon. <<< where can I check the status of ticket? I've checked at https://openradar.appspot.com but couldn't find the radar no (#37423632).
[~jignesh.igp]
37423632
is the Apple bug reporter ID. I've just added it to my list of radars on AppSpot: https://openradar.appspot.com/radar?id=5035922554880000okay. thanks Hans Knöchel