There are four ways of distributing your app, but what’s the difference? When I started learning iOS development, the only one I’ve used is the App Store so that I can have my own project downloadable by the public (and the interviewer). Not until I started working in a company that requires internal testing did I get the chance to try out with the other three. Here I’ll tell you what’s the main differences between them.
This one allows you to install all devices that have been registered in your provision profile. You’ll need to:
Parsing your JSON into
Data , and then Decode it to your
class model is what we often do in our iOS development life. However, without the aid of unit testing, you’d be either repetitively running your simulator to chase the print log, checking whether you’ve decoded correctly, or opening a blank project/playground, refilling metadata to strike the API. Programmers hate to do repetitive work, and here’s where unit testing comes to the rescue. We can test it locally with a JSON file, fast and dedicated to a specific model.
In this article, I will use the iTunes API to show you how I decode JSON data to models step by step. …
A Class diagram is a simplified version of UML(Unified Modeling Language) that helps us get the blueprint of our software project. With the help of a Class diagram, we can easily understand how each component relates to each other, enabling us to modify our software to a more maintainable place. For instance, we’d always want to avoid the dependency chain so that our classes can be changed easily.
Let’s learn the Class diagram directly from one of the most common design patters — Delegate Pattern with a UITableView example.
Universal link 間單說就是開啟 URL，iOS 系統會先去看看該網域有沒有與其相關的 App 存在，如果有，就開 App；沒有的話，就開 Safari。
Universal link 可以在 Safari、App 內網頁(
SFSafariViewController)、記事本被觸發。在相機使用 QRCode 或者是系統內建 NFC 也可以透過 Safari 觸發。
From time to time, operation team wants to change their content in real-time instead of waiting for new versions of iOS App updated. The two most common ways to fulfill their requirement are Remote Config and WKWebView. Cohering with the title, I’m only going to focus on WKWebView and demonstrate how we implement it.
Let’s start from the very basic: showing a web content. Not much to explain.😗
We can debug our iOS projects with the aid of Safari. Open Safari and press ⌘+, to open Preference, under the Advanced tab, check “Show Develop menu in menu bar”.
Push notification is taking advantage of the iOS system to gain user engagements with our app. Even though it may seem easy from the users’ perspective, there is a lot for developers under the hood. Here I am going to implement the most common features used in practice.
Note: Pusher is also a great tool but it only supports .p12; PushNotification supports both .p8 and .p12.
Starting with a simple Weather App that listed four cities, I am expecting while I ask Siri to tell me the weather of the city, Siri can directly tell me the weather without opening the app. Furthermore, as I tap on the window in Siri, it shall bring me to the desired city with its weather information. Here I am going to go through the process of adding a custom Siri Shortcut.
網路測試會切成 web api 死活測試 跟 Parsing 測試。web api 死活測試可以把前端後端的職責切得很明確。
Note: 教學文使用純 get url 沒有帶 headers，github 上的範例專案有附 headers。post 可以在掌握概念之後可以自行練習 :)
我傾向把測試的功能分類好，所以就先拉出一個 APITests 吧！