-
Notifications
You must be signed in to change notification settings - Fork 1.9k
UIWebView deprecated workaround not working with a bare shell app #10967
Comments
I did forget to mention that I run Resharper and MFractor as well so I have attached my source in case the generation of the project from the template was affected in some way. |
Did you actually submit this to Apple? I have seen cases where you get false positives in the build output, but Apple will accept them without a problem. Furthermore please provide the information and output from the suggestions here: #10739 (comment) |
I have not submitted to Apple .. until it stops reporting the error why try, I mean I don't want to "wonder" every time right? I start a command prompt run this command "FINDSTR /M /s /i uiwebview . > uiwebviewresults.txt" get this output in the file |
PLEASE, don't hesitate to ask me to run with some debug options / switches or something turned on if it will get you more information .... I have been a paid user of Xamarin since it was Monotouch and was EXPENSIVE so I know we are in a MUCH BETTER PLACE now but we still have some issues occasionally and I am willing to help... |
FYI, I just upgraded OSX (wasn't that far behind) and still get the same results .... |
I also replaced the default bundle id just in case that was causing the build to bypass a step and that didn't do anything .... |
Hi @stephenhauck. Did you find a solution? I was trying this too: --optimize=experimental-xforms-product-type but the app crashed when apple team made tests. |
Thanks for the additional information! I have not submitted to the app store because when I grep (findstr) after the build it finds the reference so why even bother. I am NOT interested in GUESSING or HOPING, this is programming and I should know that when the software leaves my control that I have built the best product possible and that it will pass without issue. Are you able to simply start a new project and get it to build without the reference being included ? |
I’ve just created a File > New Shell App. Applied all the necessary bits and it’s accepted by Apple without any warning. So I’m not really able to reproduce this behavior unfortunately |
@jfversluis if you grep or findstr it finds the reference correct ? |
I just updated to Xamarin.Forms 4.6.0.847 and findstr still reports it found a reference in |
I am not seeing any references or warnings in Visual Studio as well. I have to note that this is on a Mac with Visual Studio for Mac although that shouldn't matter. The thing I'm noticing is that the build configuration sometimes will jump back to using the Simulator. Not sure if this is a bug in VS/VSMac or anything and if it even has to do with anything, but it's strange. So, with your project I do see the warnings pop up in VSMac at least. Can't really determine what the difference is between your project and mine |
I am comparing right now ... |
Why should Android be involved? This is a pure iOS specific problem. But I guess that is a difference. So one testing scenario could be to create a separate solution with just the bits for your iOS app then |
Android should not affect it I agree ... So .. I made a new Shell app on VS Mac (Android included), updated nuget packages included by default and built .. it DOES NOT give the warnings ! |
I just brought the same project from the Mac to a Windows Machine and it fails with the warnings. |
BTW, not sure I mentioned .. I ONLY use the stable channel for updates and release NuGet packages! |
@jfversluis can you confirm you are seeing the same thing as me ? |
From a quick test I think I see the same thing happening, yes.
I just did, doesn't work. So, at this point this seems to be the case:
I'll go ahead and try to upload the one I know that works from VSMac but does produce warnings on VSWin to see if it's a false positive. Edit: OK, so ignoring the warnings and just uploading works. No warning from Apple. That means VSWin will give false positives |
OK, I just confirmed your assessment that if it's created on a Mac and built on a Mac it works. |
The problem with these findings is, is that the results are now unreliable for this part. I mean, it could pass on Apples side and the warnings are false positives. But you, as the developer, could also have done something wrong and it won't pass, which makes the warnings valid. In any case, I would say this is more something on the tooling/Visual Studio/Xamarin.iOS side of things rather than a Forms thing. |
OK ... so ... how would you advise us to deal with the issue at this time ? |
Since the binary is accepted by Apple, I would expect that the "string search" method would need to come up empty whenever a build is valid. That might be something interesting to try in this whole scenario. A quick test of mine seems to verify that; doing a Other than that, only Apple gets to decide what they accept or not and how they determine they do, so trial and error. |
I am a little confused because I get these results when I build and check using "FINDSTR /M /s /i UIWebView . > uiwebviewresults.txt" in the output folder TestUIWebView_OnMac.dll It's really not supposed to be this hard ... |
Tbh I don't think it is that hard. Because all we are talking about here is theory. Well, not all, I have submitted two builds and they were both accepted without any problem. I think the results you are seeing are valid. What happens is, is that the actual build happens on your Mac. So the binaries that you are looking on on Windows and you are running the If you build and IPA and extract that, or locate the temp files on your mac, and inspect those, I'm sure the references won't show up. I'll open an issue for the false positives on the Xamarin.iOS repo, other than that I don't see any problem here :) |
As mentioned, whatever is going on, it's not Forms related. Added an issue on the X.iOS repo here: xamarin/xamarin-macios#8814 Hence, closing this one. Thank you so much for all the investigation, collaboration and patience so far! |
Trying to get an app to build for submission and can't get rid of the UIWebView reference so I tried a bare bones out of the box shell app .. same failure ...
I need help ASAP!
Xcode is current
Here are my iOS build settings
Here is the output
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch @/Users/stephenhauck/Library/Caches/Xamarin/mtbs/builds/UIWebKitTest.iOS/1188bde15273392423d3b6bb90f2fefd/obj/iPhone/Release/response-file.rsp --optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(842,3): warning MT1502: One or more reference(s) to type 'UIKit.UIWebView' already exists inside 'Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' before linking
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(842,3): warning MT1503: One or more reference(s) to type 'UIKit.UIWebView' still exists inside 'Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' after linking
3> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -num-threads 4 -z -o bin/iPhone/Release/UIWebKitTest.iOS.app.dSYM bin/iPhone/Release/UIWebKitTest.iOS.app/UIWebKitTest.iOS
3> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -i -s obj/iPhone/Release/mtouch-symbols.list bin/iPhone/Release/UIWebKitTest.iOS.app/UIWebKitTest.iOS
3> /usr/bin/mdimport bin/iPhone/Release/UIWebKitTest.iOS.app/../
3> /usr/bin/codesign --verify -vvvv "-R=anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)" bin/iPhone/Release/UIWebKitTest.iOS.app
========== Rebuild All: 3 succeeded, 0 failed, 0 skipped ==========
The text was updated successfully, but these errors were encountered: