Skip to content

godwinjk/Debugger-iOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debugger-iOS

Database Debugger is a handy tool for iOS applications. When enabled, developers have access to database of application in realtime. No need of exporting the database.

Caution

This project is very unstable and not handled large data and security. That is on the way. Consider it as sample or tutorial.

Set-up

In Mac

Find the latest version of macApp from Releases folder (Debugger_v1.3)

OR

  1. Clone the project
  2. Double click the Debugger.xcodeproj and run it, you can see a mac application called Debugger window.
  3. Stay calm wait for the application to run

In application

Find the latest version of iOS Framework from Releases folder (Debugger_v1.3)

OR

  1. Add the Debugger_lib.xcodeproj inside Swift-lib into working project or build and take framework and link to your project.

For swift project

Inside AppDelegate.swift

import ...
import Debugger_lib

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    ...
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        ...
        DebuggerIos.initWithDefault() // If database is in documents folder
        
        // OR
        
        let dbPath = getDatabasePath() // If database is other than documents folder
        DebuggerIos.initWithPath(dbPaths: dbPaths)
        
        }
     ...
     }

For Objective-C project

In this case you have to add some Bridging-header files to interoperability of swift and obj-c

  1. Create ProjectName-Bridging-header.h file
  2. Find Objective-C Bridging Header key under Build Settings menu/Swift Compiler and add the value as ProjectName/ProjectName-Bridging-header.h
  3. If you don't see that menu, just create a swift file, XCode automatically promt to create a bridging header and will add to the settings menu (easy).

Inside ProjectName-Bridging-header.h

@import Debugger_lib;

Inside AppDelegate.swift

....

@import Debugger_lib;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [DebuggerIos initWithDefault];
    
    // OR 
    
     NSArray *dbPaths = [self getDatabasePath];
    [DebuggerIos initWithPathWithDbPaths:dbPaths];
    ....   
}

@end

Sample Images

Application Listing

Alt text

Database Listing

Alt text

Table listing and details

Alt text

Suggestion

Alt text

Query results (Histories are on the way)

Alt text

Data modification (modified results are on the way)

Alt text

Error handling

Alt text

Thank you

SQLite

Peertalk

SwiftSQLite

Copyright

Do whatever you want. For an extra assurance I have added MIT Licence.

Contact

Contact me via godwinjoseph.k@gmail.com or www.linkedin.com/in/godwin-joseph, if you have any questions or improvements. Or be a contributor :D

About

Simple realtime SQLite viewer/editor for iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •