Features of the iOS open-source MobileProject: iosmobileproject

Source: Internet
Author: User

Features of the iOS open-source MobileProject: iosmobileproject

I. Introduction to MobileProject

The MobileProject Project is a set of open-source functions built in the MVC model. It is written based on Objective-C and intended to solve repeated development of common functional modules in new projects, the MobileProject is also clearly divided into the construction of projects, and the responsibilities of each module are also clearly defined. The MobileProject also introduces some common third-party plug-ins, macro definitions, and tool help classes; the entire project is constantly being updated and maintained, and the function points are constantly updated; the Code supports Versions later than iOS7;

 

Ii. Project framework content

 

Iii. Functions

 

1: JSPatch hot update function

I believe that JSPatch plug-ins should be a common feature for Project Hot updates. In MobileProject, a hot update effect will be achieved and a helper class will be encapsulated, describes the download and use of hot updates JS files, including the number of downloads, etc;

2: Application of LKDB entity ing Database

In the development process, we often encounter dealing with databases, while LKDB is a good ing entity into database plug-ins, which can easily map entity-needle database columns, it can also perform addition, deletion, modification, and query operations on the entity level, and can also use SQL statements to meet the needs of our normal projects;

3: Use of Baidu Map

In normal projects, maps may be used to display and locate related content. In the MobileProject project, there is an instance for generating the vehicle route of Baidu map, in addition, the effects of the pin and pop-up window are modified. The Code also uses Baidu map to locate and process the location in different languages on the mobile phone; make it Chinese when locating and obtaining the city name, and exclude the incorrect city name due to the language set on the mobile phone;

4: QR code functions

The QR code in the MobileProject is mainly developed based on the plug-in LBXScan. Its Encapsulation has already satisfied the two-dimensional effect we usually see, project instances mainly include scanning and selecting photos from the album, and then reading the QR code above. Of course, LBXScan can also read the bar code function to view its official instance results;

5. photo upload function and progress upload Effect

Photo upload should be a required function module for each APP. Therefore, the MobileProject provides a simple arrangement for it, including selecting a photo, taking a photo, browsing a big image, obtaining the image GPS, image name, Image taking time, correcting and adjusting the image during upload, compressing the image, and displaying the image, the project also has another upload effect, that is, upload with progress. After you select a few photos, each of them will be uploaded in the room and the effect will be calculated accordingly;

6: font Adaptation Model

For more and more iPhone models, different font sizes and la s must be displayed at different screen sizes when only one type is designed, several macros defined in the MobileProject are assumed to be generated using the iPhone 5. These macros can be used to ensure compatibility with the layout under ipone6 + and so on, to solve problems such as the decrease of the screen font;

7. Logging

The log record function should be required for each APP. CocoaLumberjack is used in the project to display log records. Two display pages have been added to the public page to display the recorded content, in the detailed error record, you can also send an email to send the error content to developers. This solves the problem of BUG collection after the project goes online, the MobileProject also sets the record level based on different environments, and also adds a colored font prompt on the console in the project;

8: list blank page display

Sometimes there are related prompts when there is no data in the list or network requests in the project. A blank prompt is also introduced by MobileProject for its function, it can basically meet the usual development requirements;

9: Custom pop-up window

The custom pop-up window UIAlert has different effects after IOS7 and ios8. it is often required to simulate the system's UIAlert style in some projects, in this case, a custom pop-up window is added to simulate the UIAlertView effect of the system and add a pop-up effect with UITextView. Other custom views are created based on the project; there are several instances in this regard;

10: Other functional modules

A: For the encapsulation of the boot page function, you only need to input a set of images to implement the boot page function module.

B: The encapsulation of the advertisement function can also be used to display a set of images. The images are loaded to the server, downloaded, and saved locally;

C: encapsulation of umeng management help class, mainly for some code and page record functions about umeng statistics, and recording results with the runtime Function

D: record the unique identifier of the device. In IOS, the unique identifier of the device cannot be obtained. A plug-in introduced in MobileProject can obtain the FCUUID of the device, the same effect can be achieved;

E: The effect function of provincial/municipal level-3 linkage. It reads and loads provincial/municipal data from the local environment, and can bind the default value and the selected effect;

F: there are also third-party login functions of umeng and third-party sharing functions of umeng.

G: encapsulate the MBProgressHUD extension class and define some common prompts. For details, see the MBProgressHUD + MP class.

H: The CYLTabBarController plug-in is integrated to add four TabBar menus at the bottom of the project, with corresponding unread reminder effects and the use of click events;

I: Integrate the PUSH message function (ThirdMacros. h to modify the corresponding key value). The certificate must also use your own message certificate;

J: added FLEX, Which is enabled in the local test version. FLEX is a set of debugging tools officially released by Flipboard for iOS development. It can work well on simulators and physical devices, developers do not need to connect to LLDB/Xcode or other remote debugging servers to directly view or modify the status of each running App.

K: UITableViewCell countdown function. Because the instance does not have a server interface, the time is based on the local time. The official project time must be obtained from the server;

L: Introduce WebViewJavascriptBridge for H5 interaction and annotate the instances on the official website.

 

Iv. Summary

The above mainly lists some of the encapsulation or instance function modules in the current project, and some other applications are not described in detail here, for example, network application, macro definition, classification extension, and other small help classes, you can download the source code for viewing, and the project is constantly improving, the architecture of the project is also being improved, and the code is constantly optimized;

Source Code address of the project: https://github.com/wujunyang/MobileProject;

If you like it or are helpful, you can click the star. If you have free time, you can complete it together, so that you will keep watching for updates;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.