x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Module:SQLiteSupport] What is the path for a .db file?

I have the SQLiteSupport Module compiled and packaged for IOS.

The SQLite function for opening .db files is :

 sqlite3_open(
   const char *filename,   /* Database filename (UTF-8) */
   sqlite3 **ppDb          /* OUT: SQLite db handle */
 );

and my code is:

 sqlite3* db;
 FString DatabaseFilename = FPaths::GameContentDir() + "Game/GameData.db";
 sqlite3_open(TCHAR_TO_UTF8(*DatabaseFilename));


The path works on Mac and PC, but not iOS. I've used relative and absolute paths and nothing works. Is there an example of this module working on iOS?

Product Version: UE 4.10
Tags:
more ▼

asked Dec 02 '15 at 12:30 AM in C++ Programming

avatar image

rt_archimage
1 2 2

avatar image Shadowriver Dec 02 '15 at 12:53 AM

I would check paths if they are correct also logs may hint something (don't know how to read logs from iOS, they probably apper in main log of device like in Android)

If you find need to make iOS specific code you can do this:

 #if PLATFORM_IOS
 
 //iOS code
 
 #else
 
 //For other platfroms
 
 #endif
avatar image rt_archimage Dec 02 '15 at 01:07 AM

The path is correct, as it works in Mac and PC. The log only provides what SQLite reports, which is that the .db file can not be accessed.

I've already tried platform specific code, specifically the function FIOSPlatformFile::ConvertToIOSPath, which does provide a full iOS path, but SQLite is still not able to access it.

I've confirmed that the file does in fact exist using FPaths::FileExists, but none of the following path related function have any success either:

 FPaths::ConvertRelativePathToFull
 FPlatformFileManager::Get().GetPlatformFile().ConvertToAbsolutePathForExternalAppForRead
 FPlatformFileManager::Get().GetPlatformFile().ConvertToAbsolutePathForExternalAppForWrite
(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first
more ▼

answered Jul 20 '17 at 01:41 AM

avatar image

YeHaike
1 4 5

(comments are locked)
10|2000 characters needed characters left

Hope this plugin can help you.

HiSQLite3( SQLite3 For UE4)

more ▼

answered Apr 27 '18 at 01:55 AM

avatar image

YeHaike
1 4 5

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question