-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS is referencing System.ServiceModel #27
Comments
Searching for 'System.ServiceModel' in all *.csproj files returns no result, so there is no explicit reference to System.ServiceModel in the Mapsui projects. When building Android (did not test iOS) I can see System.ServiceModel dlls generated by the obj folder. Perhaps it is caused by the PCL profile. I could experiment with this. How could this be tested? Where do you see the System.ServiceModel references? |
When I start a new Android project and add BruTile, which is just a single PCL with Profile336 I see, System.ServiceModel.dll generated in the \obj\Debug\assemblies folder. I don' see those without BruTile. So I think this is either a Xamarin bug or they consider PCL Profile336 as not supported by Indy. Perhaps you could report this to Xamarin. |
hmm, creating a new empty Profile336 PCL and adding it to a new Android project does not generate the System.ServiceModel assembly. Narrowing it down could take some time. |
Android did not give me any messages concerning the System.ServiceModel assembly, it seems to be iOS only. This is the part that strikes me the most, what's different in iOS that could cause this? Unfortunately I can't get any specific error from Xamarin, the license message shows up when I try to build (using NuGet). I can try to build mapsui from source to find out more tomorrow. |
Perhaps you can reproduce it with only BruTile. It is simpler |
I'm able to open and run the samples of BruTile. I've opened the full repository of mapsui and I'm able to run the android samples/tests but not the iOS samples due to the same assembly reference. In the application output window I've found which assemblies are loaded, which results in this list. It looks like the reference is caused by mono or am I mistaken?
|
So you can run the iOS BruTile samples but can't run the iOS Mapsui Samples? Is the error where running or while building? I used dotpeek to inspect MapsuiSamplesiOS.exe and I see that Mapsui references System.ServiceModel.Web and I don't see why. It is not Profile336 in itself because BruTile does not have this dependency and has the same profile. |
I've tested with different licenses. The error is shown while building and the build gets cancelled, Xamarin comes with a window to register a business account and no additional information is shown. With the business license I can build normally (as I'm allowed to refer ServiceModel.Web) which gave me above launch output. There are no samples/tests for iOS on BruTile, I just tried to build it which was succesful. I have also tried a profile336 pcl project which did not seem to give any issues. Interesting note: I can't build Mapsui.Samples.iOS but I can build the following projects:
|
It is hard for me to investigate this. If anyone finds out more please let me know. |
I am closing this issue. We have since release two Mapsui iOS apps and did not come across this problem. This could easily have been one of the (many) bugs that Xamarin fixes quickly. |
Reopened because this was reported again https://github.com/pauldendulk/Mapsui/issues/43 |
I just did some further tests. If I remove RequestHelper.cs from BruTile the assemblies folder is not generated (so no assemblies folder at all). Perhaps this solves the issue for Xamarin.Indy developers. RequestHelper is not used from BruTile itself but it offered as a kind of utilities class. It does add some value but perhaps it could be removed and be presented as a sample. |
To Xamarin.Indy developers. You could test this:
If this solves the problem we will consider removing RequestHelper.cs. If it is removed we will have to release a new BruTile package and Mapsui package. |
Can I get a RequestHelper.cs-removed-BruTile.dll? |
Forgot about that one. You can just remove RequestHelper there and only assign the argument. Your app will probably not run though. It is just to test Indy. |
It would also be interesting to see what happens if you compile RequestHelper.cs as part of the Android app itself. |
Itried:
to iOS project's AppDelegate#FinishedLaunching and Android project's MainActivity#OnCreate.
If I tested bad way or what you don't wanted, please tell me. Regards, |
Thanks for your clear report. We should conclude this does not solve the problem. The fact that iOS needs business and Android not is weird, and indicates it is a bug. We could try to randomly cut parts out of BruTile (maybe anything using system.net) and see if it fixes the problem. But maybe we should first try to ask Xamarin. |
Reported. https://bugzilla.xamarin.com/show_bug.cgi?id=30621 Thank you for helping us! |
Thanks a lot! |
Xamarin reported it will fix in Xam.iOS 8.10.3 |
Ah great! Thanks for taking care of this. |
Closing. I assume this is fixed although not tested. Reopen when seen again. |
I have an issue which seems to be mostly related to Xamarin, but I wonder what's causing it. Mapsui is referencing System.ServiceModel assembly, but only on iOS. The System.ServiceModel is part of Windows Communication Foundation (WCF) which requires higher licenses on Xamarin. I've tried to backtrack the origin of the reference but couldn't find anything. It suprises me that iOS requires this while Android builds fine without the reference.
Other projects came across the same issue (mvvmcross, xlabs) and resolved it by removing the reference or changing PCL profile.
https://github.com/XLabs/Xamarin-Forms-Labs/issues/336
MvvmCross/MvvmCross#394
When looking through the System.ServiceModel namespace (http://msdn.microsoft.com/en-us/library/system.servicemodel.aspx) I don't see anything that seems required in Mapsui. Any idea what's causing this reference?
The text was updated successfully, but these errors were encountered: