部署和測試 Xamarin.iOS 應用程式Deploying and Testing Xamarin.iOS Apps

本節涵蓋測試應用程式和散發方式等主題。This section covers topics used to test an application as well as how to distribute it. 本部分的主題包括偵錯工具、如何部署給測試人員、如何將應用程式發佈至 App Store 等。Topics here include things such as tools used for debugging, deployment to testers and how to publish an application to the App Store.

應用程式散發App Distribution

本文將介紹如何設定、建置、發佈 Xamarin.iOS 應用程式,用於透過各種方式進行散發,包括:This article shows how to configure, build, and publish a Xamarin.iOS application for distribution through various different means, including:

IPA 部署IPA Deployment

臨機操作部署和企業 (Enterprise) 部署可讓開發人員建立套件,這些套件可針對測試或向公司內部使用者散發。Ad-Hoc and Enterprise deployments allow developers to create packages that can be distributed for testing or to internal company users. 本文件介紹如何建立可使用 iTunes 同步到 iOS 裝置的 IPA。This document explains how to create an IPA that can be synced to an iOS device using iTunes.

佈建Provisioning

此指南集合涵蓋程式碼簽署及佈建的必要內容 (例如使用屬性清單),以及如何針對應用程式服務佈建您的應用程式。This set of guides covers code signing and provisioning essentials such as working with property lists, and how to provision your app for application services.

無線部署Wireless Deployment

Xcode 9 引進了透過網路部署至 iOS 裝置或 Apple TV 的選項,使您不用在每次想要針對應用程式進行部署及偵錯時,都必須以實體纜線連接您的裝置。Xcode 9 introduced the option of deploying to an iOS device or Apple TV through a network, rather than having to hardwire your devices every time you want to deploy and debug your app. 此功能目前處於預覽狀態。This feature is currently in preview.

TestFlightTestFlight

TestFlight 現在由 Apple 所擁有,是 Xamarin.iOS 應用程式進行 Beta 測試的主要方法。TestFlight is now owned by Apple, and is the primary way to beta test your Xamarin.iOS apps. 本文會引導您完成 TestFlight 流程中的所有步驟:從上傳應用程式到使用 iTunes Connect。This article will guide you through all steps of the TestFlight Process – from uploading your app, to working with iTunes Connect.

在 Xamarin.iOS 中偵錯Debugging in Xamarin.iOS

Visual Studio 和 Visual Studio for Mac IDE 都支援在 iOS 模擬器和 iOS 裝置中為 Xamarin.iOS 進行偵錯。Both the Visual Studio and Visual Studio for Mac IDEs include support for debugging Xamarin.iOS applications both in the iOS simulator and on iOS devices. 本文介紹如何使用偵錯工具,以及如何設定其支援的各種選項。This article shows how to use the debugger as well as how to configure various options it supports.

Touch.UnitTouch.Unit

本文件介紹如何為 Xamarin.iOS 專案建立單元測試。This document describes how to create unit tests for your Xamarin.iOS projects. 用 Xamarin.iOS 進行單元測試,是透過使用 Touch.Unit 架構來完成。該架構包含 iOS 測試執行器和 NUnitLite 架構的修改版本;此版本架構可提供一組熟悉的 API,用於編寫單元測試。Unit testing with Xamarin.iOS is done using the Touch.Unit framework that includes both an iOS test runner as well as a modified version of the NUnitLite framework that provides a familiar set of APIs for writing unit tests.

使用 Instruments 來偵測利用 MarkHeap 的原生流失Using Instruments to Detect Native Leaks using MarkHeap

本文介紹如何在任何 iOS 裝置與任何 Xamarin.iOS 應用程式中使用 Instruments。This article describe how to use Instruments on any iOS device and any Xamarin.iOS application. 也會介紹如何在模擬器中分析應用程式。It also looks at how to profile applications in the simulator.

逐步解說 - 使用 Apple 的 Instrument 工具Walkthrough - Using Apple's Instrument Tool

本文介紹如何使用 Apple 的 Instruments 工具,來診斷透過 Xamarin 建置的 iOS 應用程式記憶體問題。This article walks through how to use Apple’s Instruments tool to diagnose memory issues in an iOS application built with Xamarin. 文中將示範如何啟動 Instruments、拍攝堆積快照、分析記憶體成長。It demonstrates how to launch Instruments, take heap snapshots and analyze memory growth. 也會示範如何使用 Instruments 顯示和鎖定造成記憶體問題的確切程式碼行數。It also shows how to use Instruments to display and pinpoint the exact lines of code that cause the memory issue.

在 iOS 上連結Linking on iOS

說明連結器如何運作以將應用程式套件的大小降至最低,以及如何修改其設定和使用方式。Explains how the linker works to ensure the smallest possible application package, as well as how to modify its settings and usage.

Xamarin.iOS 效能Xamarin.iOS Performance

有許多技巧可增加利用 Xamarin.iOS 建置之應用程式的效能。There are many techniques for increasing the performance of applications built with Xamarin.iOS. 這些技巧可共同大幅減少由 CPU 所執行的工作量,和由應用程式所耗用的記憶體數量。Collectively these techniques can greatly reduce the amount of work being performed by a CPU, and the amount of memory consumed by an application.

mtouchmtouch

針對 mtouch.exe 的附註和資訊。mtouch.exe 為能將您的專案建置為可供 iOS 使用之應用程式的命令列工具。Notes and information on mtouch.exe, the command line tool that builds your project into an application usable by iOS.

iOS 組建機制iOS Build Mechanics

本指南探索如何測定應用程式的時間,以及如何使用可用來針對所有組建組態取得更快速組建的方法。This guide explores how to time your apps and how to use methods that can be employed for quicker builds for all build configurations.