Journal of Jilin University (Information Science Edition) ›› 2021, Vol. 39 ›› Issue (1): 106-113.

Previous Articles     Next Articles

Research and Implementation of iOS Programming Based on Runtime Mechanism

HU Kuna,b, TE Rigena,b   

  1. a. Data Center; b. Key Laboratory of Satellite Remote Sensing Application Technology of Jilin Province, Changguang Satellite Technology Company Limited, Changchun 130000, China
  • Received:2020-05-21 Online:2021-03-19 Published:2021-03-22

Abstract: In the process of iOS application development, due to the insufficient functions of the system's own methods, some business requirements can not be effectively realized. In order to solve this problem, the main API interface usage of the Runtime library is studied and the available interfaces are found. The message forwarding mechanism of Runtime is studied to prove that the essence of the function call is the transmission of messages. And through actual cases, it proves that the application of Runtime can solve the problems caused by the lack of system methods. Therefore, it can dynamically add or modify member variables and member methods of the system's own classes through the Runtime library. And finally it is proved that the use of Runtime library can solve the problem of insufficient functions of the system, which can provide reference for iOS developers.

Key words: iOS system, runtime mechanism, function call, dynamic modification

CLC Number: 

  • TP311. 5