Near-infrared (NIR) spectroscopy is a non-destructive, efficient and convenient detection technology, with the emergence of portable NIR spectrometers, NIR mobile applications (APPs) come into being. The popularity of intelligent mobile phones provides an impetus to the research and development of NIR APPs, however, the primary functions such as operating the NIR spectrometers and collecting data cannot satisfy NIR users in the field of data processing. Herein, we propose an APP processing NIR data locally at the mobile terminal, by the comprehensive utilization of Principal Component Analysis (PCA) and Cuckoo Search algorithm optimized Support Vector Classifier with radial basis function (RBFSVC) kernel (CS-RBFSVC). 738 NIR samples of four drugs (Cydiodine Buccal Tablets, Sulfasalazine Enteric-coated Tablets, Dexamethasone Acetate Tablets, Vecuronium Bromide for Injection) were used as the validation objects to train and test the data classification model. Firstly, the original data were subjected to dimensional reduction through PCA for the purpose of compressing calculation amount. Secondly, the CS-RBFSVC model was utilized to classify the types of drugs and their manufacturers, moreover, the improved accuracy and efficiency by introducing Cuckoo Search (CS) algorithm into RBFSVC were proven in comparison with the conventional grid optimized RBFSVC (Grid-RBFSVC) and Linear Support Vector Classifier (Linear-SVC). Last but not least, an APP based on the proposed PCA and CS-RBFSVC model is developed and demonstrated to be able to classify the type of drugs with an accuracy of 100%, the accuracies of classifying the drugs’ manufacturers were 100%, 100%, 98.3% and 90.7%, respectively. Conclusively, the proposed PCA and CS-RBFSVC based model can provide a low-consumption, high accuracy and quick strategy for NIR data classification and overcome the limitations of internal storage and operating speed at phone terminals, in conjunction with the portable NIR spectrometer, it is believed to push forward NIR technology into the instant detection and on-site inspection.