Just My Life & My Work

Posts tagged ‘ide’

[Xcode][iOS] 清除警告訊息 (Clear Warning Message)

功能需求都已經開發完畢,在等待偉大的QA測試完前,有空的時候就可以來清除警告訊息 (Clear Warning Message)

天吶~從2018年2月開始開發到現在,剛滿一年就累積了230個警告訊息,不過也還好,先前我所開發過有破千的紀錄!不過那是因為接案的性質,我維護過至少有五個工程師陸續經手的案子,裡頭的警告訊息我壓根不想動XD~

現在因為是做自家產品,肯定要做得非常盡善盡美!儘管感覺好像在做繁瑣的雜事,好在還能學到些新技術與工具,讓我有些成就感囉~

警告訊息目前遇到的類型有包含:

  • User-Defined Issue
  • Validate Project Settings
  • Documentation Iusse
  • Deprecations
  • Semantic Issue
  • Value Conversion Issue

猜猜看哪個最難處理?

(繼續閱讀…)

[Xcode] Time Profiler (時間分析器)

我家產品HappyStyle開發到尾聲,需求上的功能已全數完成,接下來的時間可以來優化各個功能。若想要讓使用者體驗 (User Experience)變得更優,那麼勢必要提升App運作的流暢度。

像是在滑內容清單,若能無「卡頓」現象會是優良的體驗,那麼如何來減少卡頓狀況?我們可以利用Xcode內建的工具Time Profiler (時間分析器),顧名思義就是利用它來分析各個方法 (Method)函式 (Function),所執行的時間狀況會在界面上清楚呈現,除了可以觀察自訂的也能探索內建的。

(繼續閱讀…)

[Xcode] 主線程檢查器 (Main Thread Checker)

我所使用的整合開發環境是Xcode,每年更新都會釋出新的功能,來幫助開發人如我者更有效率地工作!2018年Xcode即將邁入第10版,這裡我想要來介紹主線程檢查器 (Main Thread Checker)

回想2012年我還是個初學者的時候,還不知道主線程的重要性,以致於有時候發生不預期的反應,實在摸不著頭緒!基本上要記住,改變畫面的動作要在主線程實現,不然會發生什麼事?有時候有反應,有時候沒反應,這種狀況debug超級困難呢!

[Xcode] 主線程檢查器 (Main Thread Checker)1

好在Xcode已經能從語法分析來得知,哪些程式碼會跑到非主線程,若改變畫面的元件在非主線程操作,Xcode就會有紫色的提示。上圖表示Label一定要在主線程使用 ([UILabel text] must be used from main thread only)。

(繼續閱讀…)

[Xcode] 安裝舊版Xcode

每次更新Xcode版本後,多少會出現一些不預期的狀況,如果時間緊迫的話,建議是先回歸到舊版Xcode來開發。那要如何安裝舊版Xcode?只要透過手動下載,新版和舊版的Xcode還能並存呢~畢竟從App Store下載來的軟體,一更新就無法降回原先的版本。

安裝舊版Xcode.png

Apple Developer軟體下載:Downloads for Apple Developers,要先登入Apple帳號才能進去喔~

剛好有用Cordova開發iOS App的朋友詢問,我在此做個紀錄。通常我會保留前一個版本的Xcode,以防新版Xcode出現問題時,還能轉用舊版Xcode繼續開發。

參考:如何安裝舊版Xcode? 如何在舊版Mac OS

[Xamarin][iOS] 深度了解專案:電話字 (Sample Project: Phoneword)

承接範例專案:電話字 (Sample Project: Phoneword),再來就是解釋它怎麼運作,包含Xamarin介面C#程式碼,還有很重要的是Xamarin.iOS Application的剖析。

Xamarin iOS Application03

  • References – Contains the assemblies required to build and run the application. If we expand the directory, we’ll see references to .NET assemblies such as System , System.Core, and System.Xml , as well as a reference to Xamarin’s Xamarin.iOS assembly.
  • Components – The Components directory houses ready-made features from the Xamarin Components store , a public marketplace for Xamarin code. This is similar to the NuGet Gallery for those familiar with Visual Studio. For more information on Xamarin Components, refer to the Xamarin Components walkthrough .
  • Resources – The Resources folder stores icons, launch images, and other media. Xamarin has a separate guide for Working with Resources that explores the role of this directory further.
  • Main.cs – This contains the main entry point of the application. To start the application, we pass in the name of the main application class, the AppDelegate .
  • AppDelegate.cs – This file contains the main application class and is responsible for creating the Window, building the user interface, and listening to events from the operating system.
  • MainStoryboard.storyboard – The Storyboard contains the visual design of the application’s user interface. Storyboard files open in a graphical editor called the iOS Designer.
  • Phoneword_iOSViewController.cs – The View Controller powers the screen (View) that a user sees and touches. The View Controller is responsible for handling interactions between the user and the View.
  • Phoneword_iOSViewController.designer.cs – The designer.cs is an auto-generated file that serves as the glue between controls in the View and their code representations in the View Controller. Because this is an internal plumbing file, the IDE will overwrite any manual changes and most of the time we can ignore this file. For more information on the relationship between the visual Designer and the backing code, refer to the Introduction to the iOS Designer guide.
  • Info.plist – Info.plist is where we set application properties such as the application name, icons, launch images, and more. This is a powerful file and a thorough introduction to it is available in theWorking with Property Lists guide.
  • Entitlements.plist – The entitlements property list lets us specify application capabilities (also called App Store Technologies) such as iCloud, PassKit, and more. More information on theEntitlements.plist can be found in the Working with Property Lists guide. For a general introduction to entitlements, refer to the Device Provisioning guide.

看起來和Xcode裡的檔案架構很類似呢!學習來格外輕鬆~

(繼續閱讀…)

標籤雲

%d 位部落客按了讚: