I have the following problem. An application that has a sqlite database. I run the application in xcode, with the simulator. I have the following code to know where I have to put the database.sqlite3 *bd;NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [paths objectAtIndex:0]; NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"bd.sqlite"]; NSLog(@"bd route is ---- %@",dbPath);So I get the path, and copy the sqlite database, so the application works perfectly in xcode. The problem is when I connect my iphone and try to run the application. Because the previous code gives me a route on the iphone, and I try to put the sqlite database there but it does not run, the application is blocked because it cannot find the database, even if I put it there. I don't know if what I am doing is correct or there is another way to do it. I'm going crazy looking for possible solutions on the internet, but none works for me and I've been standing for 3 months trying to run the application on the iphone. Please, some help or advice, I would appreciate it. Many thanks.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have the following problem. An application that has a sqlite database. I run the application in xcode, with the simulator
So I get the path, and copy the sqlite database, so the application
works perfectly in xcode. The problem is when I connect my iphone and
try to run the application. Because the previous code gives me a route
on the iphone, and I try to put the sqlite database there but it does
not run, the application is blocked because it cannot find the database,
even if I put it there. I don't know if what I am doing is correct or
there is another way to do it. I'm going crazy looking for possible
solutions on the internet, but none works for me and I've been standing
for 6 months trying to run the application on the iphone. Please, some
help or advice, I would appreciate it.
Some time ago, someone told me how to do it using iTunes, but it doesn't exist anymore, so ... how can I do it now?
help !!!!!!!!!!!!!!
Many thanks.
Hello everyone. I have the following problem. I have an application that queries a database in sqlite. When I run the app in xcode on my mac I give it the path to the database to make it work. So far so good. But when I want to test this application on a physical device (iPhone 11), I get the error that the application cannot find the database. My question or problem is where I have to store the database on the iPhone so that the application can make the queries. Thank you.
Hello everyone. I have the following problem. I have a view with a map in which I visualize several points (annotation point). My problem is that when I select a point, I don't get any event to check, for example, the name of the annotation point, to then carry out operations.
Tengo un View con un mapa
@IBOutlet weak var Mapa: MKMapView!
I make several queries to a database that returns a series of points (annotation points).
To see which point I select, you would have to launch, once you click on the map, one of these procedures... right?
extension DatosCercanos: MKMapViewDelegate
{
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) {
print("hola")
}
func mapView(_ mapView: MKMapView, didDeselect annotation: MKAnnotation) {
print("hola")
}
func mapView(_ mapView: MKMapView, didSelect annotation: MKAnnotation) {
print("hola")
}
func mapView(_ mapView: MKMapView, didDeselect view:MKAnnotationView)
{
print("hola")
}
As you will see, I have put several procedures to see if any of them work, but none are executed, none jump to the event of pressing an annotation point
What am I doing wrong? I don't understand why the event is not executed.
Some help?
Thank you.