diff --git a/docs/website/Makefile b/docs/website/Makefile index 260fcf0cbeea..7876d3e81e2e 100644 --- a/docs/website/Makefile +++ b/docs/website/Makefile @@ -3,18 +3,18 @@ WEBSITE_DOCS ?= $(TOP)/documentation XAMARIN_ANALYSIS ?=$(TOP)/xamarin-analysis/shared/Xamarin.Analysis XAMARIN_ANALYSIS_DOC = xamarin-analysis-doc-tool/bin/Debug -diff: - -diff -u $(WEBSITE_DOCS)/guides/ios/troubleshooting/mtouch-errors/index.md mtouch-errors.md - -diff -u $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/objective-c-libraries/index.md binding_objc_libs.md - -diff -u $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/binding-types-reference/index.md binding_types_reference_guide.md - -diff -u $(WEBSITE_DOCS)/guides/ios/troubleshooting/xamarin-ios-analysis/index.md xamarin-ios-analysis.md - all: xamarin-analysis-doc cp mtouch-errors.md $(WEBSITE_DOCS)/guides/ios/troubleshooting/mtouch-errors/index.md cp binding_objc_libs.md $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/objective-c-libraries/index.md cp binding_types_reference_guide.md $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/binding-types-reference/index.md cp xamarin-ios-analysis.md $(WEBSITE_DOCS)/guides/ios/troubleshooting/xamarin-ios-analysis/index.md +diff: + -diff -u $(WEBSITE_DOCS)/guides/ios/troubleshooting/mtouch-errors/index.md mtouch-errors.md + -diff -u $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/objective-c-libraries/index.md binding_objc_libs.md + -diff -u $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/binding-types-reference/index.md binding_types_reference_guide.md + -diff -u $(WEBSITE_DOCS)/guides/ios/troubleshooting/xamarin-ios-analysis/index.md xamarin-ios-analysis.md + xamarin-analysis-doc: msbuild xamarin-analysis-doc-tool/xamarin-analysis-doc.sln mono $(XAMARIN_ANALYSIS_DOC)/xamarin-analysis-doc.exe $(XAMARIN_ANALYSIS)/Xamarin.iOS.Analysis.targets diff --git a/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs b/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs index 84bc20c741f6..8d7f7b05ddec 100644 --- a/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs +++ b/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs @@ -37,6 +37,10 @@ static void GenerateAnalysisDoc (string path) section += "[//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/)\n"; section += "[//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes)\n"; section += "[//]: # (Modifications outside of xamarin-macios/master will be lost on future updates)\n\n"; + section += "Xamarin.iOS analysis is a set of rules that check your project settings to help you determine if better/more optimized settings are available.\n\n"; + section += "Run the analysis rules as often as possible to find possible improvements early on and save development time.\n\n"; + section += "To run the rules, in Visual Studio for Mac's menu, select **Project > Run Code Analysis**.\n\n"; + section += "> ⚠️ **NOTE:** Xamarin.iOS analysis only runs on your currently selected configuration. We highly recommend running the tool for debug **and** release configurations.\n\n"; var root = XDocument.Load (path); diff --git a/docs/website/xamarin-ios-analysis.md b/docs/website/xamarin-ios-analysis.md index d1aa4bd88163..dd861c469fdf 100644 --- a/docs/website/xamarin-ios-analysis.md +++ b/docs/website/xamarin-ios-analysis.md @@ -1,13 +1,21 @@ --- -id: C29B69F5-08E4-4DCC-831E-7FD692AB0886 -title: "Xamarin.iOS Analysis Rules" -dateupdated: 2017-06-26 +id: c29b69f5-08e4-4dcc-831e-7fd692ab0886 +title: Xamarin.iOS Analysis Rules +dateupdated: 2017-12-07 --- [//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/) [//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes) [//]: # (Modifications outside of xamarin-macios/master will be lost on future updates) +Xamarin.iOS analysis is a set of rules that check your project settings to help you determine if better/more optimized settings are available. + +Run the analysis rules as often as possible to find possible improvements early on and save development time. + +To run the rules, in Visual Studio for Mac's menu, select **Project > Run Code Analysis**. + +> ⚠️ **NOTE:** Xamarin.iOS analysis only runs on your currently selected configuration. We highly recommend running the tool for debug **and** release configurations. + ### XIA0001: DisabledLinkerRule - **Problem:** The linker is disabled on device for the debug mode. @@ -31,5 +39,11 @@ To set it up, go to Project > iOS Build > Linker Behavior. ### XIA0005: Float32Rule -- **Problem:** Not using the float32 option (--aot-options=-O=float32) leads to hefty performance cost, specially on mobile, where double precision math is measurably slower. Note that .NET uses double precision internally, even for float, so enabling this option affects precision and, possibly, compatibility. +- **Problem:** Not using the float32 option (--aot-options=-O=float32) leads to hefty performance cost, especially on mobile, where double precision math is measurably slower. Note that .NET uses double precision internally, even for float, so enabling this option affects precision and, possibly, compatibility. - **Fix:** Double click on your iOS project, go to Build > iOS Build and uncheck the "Perform all 32-bit float operations as 64-bit float". + +### XIA0006: HttpClientAvoidManaged + +- **Problem:** We recommend using the native HttpClient handler instead of the managed one for better performance, smaller executable size, and to easily support the newer standards. +- **Fix:** Double click on your iOS project, go to Build > iOS Build and change the HttpClient implementation to either NSUrlSession (iOS 7+) or CFNetwork to support version preceding iOS 7. + diff --git a/mk/xamarin.mk b/mk/xamarin.mk index 5fe775034b97..fe79a8c01879 100644 --- a/mk/xamarin.mk +++ b/mk/xamarin.mk @@ -1,5 +1,5 @@ ifdef ENABLE_XAMARIN -NEEDED_MACCORE_VERSION := c3913ff3ab308ab9aa741e0ccd3df602d5754ff5 +NEEDED_MACCORE_VERSION := a2f9f44167c11f71ca9c210118fe88c69f4a1869 NEEDED_MACCORE_BRANCH := master MACCORE_DIRECTORY := maccore