Access Application Files on iOS Simulator

0
0
Access Application Files on iOS Simulator


For the interval of sample we normally must overview what recordsdata are produced by our software. Generally we wish to add some recordsdata to our app folder for testing. On this text we’ll have the choice to gape how we are able to get hold of admission to and prepare software recordsdata on the iOS simulator.

Collect Path to App Itemizing


To acquire the course to our software itemizing on the simulator, we’ll have the choice so as to add a print remark inner software(_:didFinishLaunchingWithOptions:) formulation in AppDelegate class. This might additionally print the NSHomeDirectory() in Xcode console on app launch.

class AppDelegate: UIResponder, UIApplicationDelegate {

    func software(_ software: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        
        print("Utility itemizing:  (NSHomeDirectory())")
        return factual
    }

}

Open Utility Folder in Finder


First, duplicate the course to the app folder from Xcode console.

Xcode Screenshot


Then launch Finder, click on on on Tear -> Tear to Folder and paste the appliance itemizing course.


You would possibly wish to effectively per likelihood now be in a location to browse the ultimate recordsdata to your software folder.

Xcode Screenshot

Plight up Recordsdata in Paperwork Folder


Recordsdata that your app saves in .documentDirectory will appear contained throughout the Paperwork folder. You would possibly wish to effectively per likelihood effectively per likelihood launch them to look at their contents in any other case you’re going to be in a location so as to add some extra recordsdata for testing.

Xcode Screenshot

Browse Core Recordsdata SQLite Database


In case your app makes exhaust of Core Recordsdata, you’re going to be in a location to hunt out your database .sqlite file inner Library/Utility Toughen. You would possibly wish to effectively per likelihood effectively per likelihood then exhaust any SQLite viewer to browse the contents of your database, as an illustration SQLPro for SQLite.

Xcode Screenshot

LEAVE A REPLY

Please enter your comment!
Please enter your name here