This chapter introduces the importance of designing Internet-of-Things (IoT) applications that deploy blockchain technology. We discuss when we should choose to apply blockchain technology for an IoT and highlight some existing blockchain-based IoT (BIoT) applications. As the IoT devices may have resource-limitations issues, and also prone to attack, we discuss when and how to integrate blockchain in the IoT applications. To this end, we analyze some current challenges of BIoT applications and present some further challenges and recommendations.