UIWebView warning in Xamarin Forms iOS - visual-studio

Sending my .ipa to Apple, I received this warning:
Apple will no longer accept submissions of new apps that use UIWebView as of April 30, 2020 and app updates that use UIWebView as of December 2020. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).
I followed carefully this solution
Forms 4.5 or newer.
Xamarin.iOS 13.10.0.17
Visual Studio 16.4.3
This flag in the additional mtouch arguments field: --optimize=experimental-xforms-product-type
Still getting the warning.
I think it is because I references Telerik controls in my project, but I also followed this solution
No luck yet

This post has the answer
In my project I have as a nuget a reference to
Xamarin.Forms.Visual.Material
and this internally references to
Xamarin.iOS.MaterialComponents
The version of the components was old (72) so I added as a new nuget the latest version Xamarin.iOS.MaterialComponents, (nowadays it is 92), uploaded a new .IPA and the error dissapeared.

Related

WebUI Deprecated mail even after the following the steps mentioned in Xamarin forum

Recently we have been receiving the UIWebView deprecated warnings from Appstore, for which xamarin forms has directed the developers to do the below four things
Update Xamarin.Forms to 4.5 or higher – Pre-release versions of Xamarin.Forms 4.5 can be used.
Use Xamarin.iOS 13.10.0.17 or higher – Check your Xamarin.iOS version in Visual Studio. This version of Xamarin.iOS is included with Visual Studio for Mac 8.4.1 and Visual Studio 16.4.3.
Remove references to UIWebView – Your code should not have any references to UIWebView or any classes that make use of UIWebView.
And add the additional mtouch argument ‘--optimize=experimental-xforms-product-type’
But even after doing all those things we are still getting the warning mail form apple.
We are using a third part package which is using the older Xamarin.Forms component Whether this may be the cause of the warning mail?
I'm afraid it's the Xamarin.Forms version
I saw someone faced the issue here but he consumed some third-party libraries:
https://forums.xamarin.com/discussion/comment/404242
It works after removing the Calabash.
Moreover, we need to change the linker behavior to make the linker remove the UIWebView part. Please refer to this blog for more information:
https://devblogs.microsoft.com/xamarin/uiwebview-deprecation-xamarin-forms/

Need lower version of visual studio for mac

I just want to download a lower version of Visual Studio for Mac. The current version is 7.5.1 and I want to download 7.4.3.
Can anyone tell me where can I get that download file or link?
From some guesswork I found it by using this URL :
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.4.2.12.dmg
Not installed it tho.
From this, comment on the 9th May link seems like you have to open a support ticket?!?!
As an update on this topic, all of the recent previous Xamarin.iOS,
Xamarin.Android, and Xamarin.Mac packages are available in the
archives on the open source continuous builds server (under the
Xamarin.Android and Xamarin.MaciOS tabs). And the Mono Framework MDK
is similarly available in the Mono Project download archive. I have
now updated the 15.7 Release Xamarin Release Blog post to provide the
links to those locations. In many cases, the latest version of Visual
Studio for Mac will be backwards compatible with previous versions of
the Xamarin SDKs, so you can in many cases just install those earlier
Xamarin SDK versions over the current versions and leave Visual Studio
for Mac and Mono Framework MDK at the latest.
If you do need to get an older version of Visual Studio for Mac
itself, the best option at this time is still to create a support
incident to request the version you'd like. The updated info for
creating a Visual Studio for Mac support incident is to go to
Technical Support > Product: Visual Studio > Assisted Support on
https://www.visualstudio.com/vs/support/ and then select Visual Studio
Community/Professional/Enterprise 2017 for Mac.
I used to download previous releases from my Xamarin account page
which now doesn't seem to exist anymore.
At the moment, the direct link to the old downloads page
(https://store.xamarin.com/account/my/subscription/downloads) is not
yet set to redirect, so it is still possible to access that page, but
indeed that page is considered deprecated in favor of the open source
continuous builds archive at this time, and the previous versions
provided on that page are from the earlier Xamarin 15.5 Release rather
than the Xamarin 15.6 Release.
Bunch of other versions in case someone needs them:
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.3.0.797.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.3.0.799.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.3.3.5.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.3.2.12.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.4.0.1033.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.4.0.839.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.3.3.5.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.4.0.884.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.4.0.985.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.4.0.1026.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.5.0.933.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.5.0.1062.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.4.1.48.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.5.0.1161.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.5.0.1244.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.5.0.1222.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-Preview-7.6.0.711.dmg
https://dl.xamarin.com/VsMac/VisualStudioForMac-7.8.4.1.dmg
Note: These are from the index.xml files that VS4M downloads that includes all the matching packages for each release
You could also look for versions listed at the brew repository.
Use the url pattern https://dl.xamarin.com/VsMac/VisualStudioForMac-{version}.dmg.

Problems building Xamarin.iOS project with Visual Studio using Xamarin 3. Error 11 The maximum deployment target for iOS is 9.1

We use Xamarin on Windows with Visual Studio to build our app for iOS.
We recently upgraded to Xamarin 4 and found we were not able to build.
Various errors including builds hanging, Linked Away exceptions.
After some effort we decided to revert to Xamarin 3 using the links on this page
https://store.xamarin.com/account/my/subscription/downloads#xamarin3
Where it says "Looking for the version before Xamarin 4? Get the latest stable version of Xamarin 3".
We now cannot build and get the following error:
**Error 178 The maximum deployment target for iOS is 9.1 (current deployment target is 9.2).
Please select an older deployment target in your project's Info.plist.**
In Visual Studio, this setting is selected in the project settings and the only value available is 9.2. If I try and update in the .csproj file xml, it gets overwritten.
I have had a look at all the various versions of Xamarin for Visual Studio and for the Mac (in the show all versions on the above page) and cannot find versions that will allow us to build. i.e. versions with the old build client with matching Xamarin.iOS versions.
Are there matching Xamarin.iOS releases still available for both Mac and windows that use Xamarin 3?
Is there a way I am missing of forcing the SDK value to match the build server?
For what it's worth the answer was in the error message (kind of).
The necessary update to Info.plist was adding the following:
<key>MinimumOSVersion</key>
<string>9.1</string>
This was only apparent after I had noticed that there was an editor called PListEditoryFactory, which gives a ui to edit Info.plist.
The file didn't open in PListEditoryFactory by default, so it just looked like an xml file to me.
In the ui the field needed editing is called 'Deployment Target', needs to be 9.1.
Another curveball was that the error message says that the 'current deployment target ' is 9.2, which was the value selected (and only option) in the iOS project settings TargetSDK dropdown.
What this is for and how it is different to the Info.plist setting I dont know.

Can not compile after migrating unified api in xamarin forms

We have migrated the xamarin forms project to unified api.
But we have the strange compile error like this:
Could not AOT the assembly '.../iOS/obj/iPhone/Debug/mtouch-cache/Build/Xamarin.Forms.Labs.dll
So I changed the settings in iOS project's options.
In ios Build Tab of Project options(iOS) I changed the "don't link" to "Link all assemblies".
But the app is crashed when it is started.
xamarin version is 5.7.1(build 17).
xamarin forms's version is 1.3.5.6337.
xamarin forms labs's version is 1.0.1.5.
Please help me if you have the experience with this error.
Replace Xamarin.Forms.Labs with XLabs.Forms.
There has been a major refactoring on how the XLabs project is structured so your existing project based on the 1.x.x will break. The reason for the refactoring was simple; separate functionality that does not depend on Xamarin.Forms into different assemblies. This allows the use of functionality like IoC, Serialization and even platform specific services without referencing XF.
To upgrade:
Uninstall any existing Xamarin.Forms.Labs packages from your
project.
Install XLabs.Forms package to your projects (PCL, iOS, Droid & WP). This will update Xamarin.Forms to the latest stable release (1.4.x)
Refactor code to reference the correct namespaces.

How To add Flurry SDK to WP7 project?

I have a WP7 project and i want to add Flurry for Analytics and there is no WP7 sdk on there site when i contacted them in support they said " the Flurry WP8 SDK v3.1.2 which is backward compatible with WP7.x apps."
But when tried to add to my app Visual studio said "A reference to higher version or incompatible assembly cannot added to project"
The WP8 SDK isn't backwards-compatible the last I checked - I had to get a specific WP7 SDK .dll file from their support to get it working. I'd contact them again to let them know that it isn't backwards-compatible, and that you need the WP7 SDK.
This dll version is backwards compatible, and the message you are seeing is often an error that has to do with "unblocking" the dll. Could you please verify if you've tried the following steps?
Unzip the dll - right-click on the file
Select Properties, click "Unblock", and then save the change
(Full disclosure: I work at Flurry)

Resources