Posts

Alamofire installation in XCODE

Image
Alamofire installation in XCODE Follow the steps to install a pod:  1.   Open the terminal   2.   command “cd” and give the path of your project and then press “Enter” key 3. Create a pod file in your project by terminal by command “touch Podfile” and press “Enter”   Note :   (Name should be “pod file”)   4. Then, open “Podfile” by terminal command “open Podfile” and press “Enter” Pod file look like following screenshot :   5. Add this following line into the pod file :            pod ‘Alamofire’ 6. Once you complete this process then come to the terminal again and type command “Pod install” and then press “Enter” Key. Once, you have entered this command, you will find below code in your terminal window. It will install Alamofire in your project. Now, you can use it easily. After that, y...

SQLite Made Easy : Room Persistence Library

Image
Room persistence library introduced at Google I/O 2017 provides an abstraction layer over the SQLite database Room is a new way to create a database in your android apps, it is much similar to OrmLite. It provides enhance security, easy access, easy to setup and quick to get started with new database. All DML(Data Manipulation Language) commands are now annotated except SELECT command which works with @Query. Room takes care of these concerns for you while providing an abstraction layer over SQLite. 1) Database 2) Entity 3) DAO There are three major components in room: Entity represents data for a single table row, constructed an annotated java data object. Each entity is persisted into its own table. DAO (Data Access Object) defines the method that access the database, using annotation to bind SQL to each method. Database is a holder class that uses annotation to define the list of entities and database version. This class content defines  the list of DAOs. ...