Search Unity

SimpleSQL - SQLite integration with Unity3D

Discussion in 'Assets and Asset Store' started by echo17, Jul 12, 2012.

  1. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    It sounds like you don't have the project set to Android, since the Android version of the plugin does not use the sqlite3.dll. Each platform has its own sqlite library, so setting the correct platform before building should clear up the error. You can change the setting in the Unity menu Tools > SimpleSQL > Options. Just select the Android platform, wait a few seconds for Unity to compile the changes, then you should be ready to build.
     
  2. Dago1

    Dago1

    Joined:
    Jan 8, 2015
    Posts:
    4
    Ahh you`re great!! Thank you!
     
  3. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi!

    My game was rejected by Apple. I have quite large database for words and I use SimpleSQL. Do you have any previous experience about this problem with SimpleSQL and iOS? Does SimpleSQL store the database for "wrong" directory or something?

    ...

    We found that your app does not follow the iOS Data Storage Guidelines, which is required per the App Store Review Guidelines.

    In particular, we found that on launch and/or content download, your app stores 6.4MB. To check how much data your app is storing:

    - Install and launch your app
    - Go to Settings > iCloud > Storage & Backup > Manage Storage
    - If necessary, tap "Show all apps"
    - Check your app's storage

    The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., should be backed up by iCloud.

    Temporary files used by your app should only be stored in the /tmp directory; please remember to delete the files stored in this location when the user exits the app.

    Data that can be recreated but must persist for proper functioning of your app - or because customers expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCFURLIsExcludedFromBackupKey attribute.

    For more information, please see Technical Q&A 1719: How do I prevent files from being backed up to iCloud and iTunes?.
     
  4. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    That database does not contain user-created content and is reproducible, so Apple does not allow apps to store it in the "Documents" folder of your app, you should store it in Library/Caches. Then to prevent that data from being deleted by the system automatically (otherwise you have to regenerate it every once in a while), you have to mark it with "do not back up" attribute.

    They give you an example of how to do this here: https://developer.apple.com/library/ios/qa/qa1719/_index.html, but in the form of a method you need to call on every file right after you create it. I'm not sure how you've implemented things, but if you can create an empty file in the right location at the start from applicationDidFinishLaunching (or whatever), before Unity creates the file, you should be able to call:

    Code (csharp):
    1.     BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
    2.                                   forKey: NSURLIsExcludedFromBackupKey error: &error];
    On that file and be alright. Hope that helps, my Obj-C is a bit rusty.
     
    Nadan likes this.
  5. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Interesting. No, I haven't come across this before. Apple seems to get more and more restrictive as time goes on. They also like to push their own services a lot.

    The only storage location that we have access to in Unity across all platforms is the Application.persistentDataPath which on iOS is the documents folder of the app. I don't believe Unity has a way to store data in the /tmp directory for iOS.

    You might need to mess with the xCode project after you build to set the database file using the NSURLIsExcludedFromBackupKey to prevent iCloud backing up the file. I'm not sure how to do this, but there are probably numerous examples either in the Unity forums or found through a search engine.
     
    Nadan likes this.
  6. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Thank you for the tips! I try to figure this out. If I find the solution I will let you know. I guess I won't be the last person having this same problem in the future with iOS.

    I'm relatively new to Objective-C and X-Code, since Unity (and SimpleSQL) has done all the work for me so far, but this is a good opportunity to learn more. And get the game released.
     
  7. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Still lost with this one. Can you tell me where the actual database file is located once the game has been build to x-Code? I browsed through the files but couldn't tell.
     
  8. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I'm not sure where Unity puts it in the xCode project. It may be embedded somehow into an assets file, but I'm really not familiar with that side of the build process. You may need to contact Unity support to get a definitive answer, or post your question on the Unity answers forum.
     
  9. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
  10. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
  11. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Interesting, I'll have to take a look at that. I would imagine the path would be the full path of the database at runtime which would be the persistent data path. So something like:

    Application.persistentDataPath + "/" + nameOfDatabaseFileIncludingExtension

    Where "nameOfDatabaseFileIncludingExtension" is the name of your database file. If you are overriding the file name using SimpleSQLManager, be sure to use that name and not the name from your project.
     
  12. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    I tried:

    Code (csharp):
    1. string WordsDatabase = Application.persistentDataPath + "/words.bytes";
    2. iPhone.SetNoBackupFlag(WordsDatabase);
    It gives me error :

    error CS1519: Unexpected symbol `(' in class, struct, or interface member declaration
    error CS1519: Unexpected symbol `)' in class, struct, or interface member declaration

    Where should I put this line btw? It's now on one of the first scripts the game loads. Is that ok, or should I add it to some of the SimpleSQL files or something?
     
    Last edited: Jan 18, 2015
  13. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Ok I think got it working. At least the errors went away.

    Code (csharp):
    1. void Awake ()
    2. {
    3.      string assetPath = (Application.persistentDataPath + "/words.bytes");
    4.      iPhone.SetNoBackupFlag(assetPath);
    5. }
    So the only question remains before I send new version to Apple and we'll see if it will be approved or not is where to put this Awake? Do you think it matters?
     
  14. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    You'll want to put your code in the Start function of a script. That will ensure that it is called after the file is copied to the documents folder (which happens in the Awake function of the SimpleSQLManager script). It shouldn't matter which script you put the code in, just as long as it is in the Start function somewhere.
     
  15. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Ok thanks. I'll send the game to review and we'll see what Apple says.

    Just an idea, it might be useful to add this as an feature in SimpleSQL. A checkbox or something that would say:

    "Exclude database from iCloud/iTunes backup."
     
  16. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I agree that would be helpful. Unfortunately, all platforms share this manager code, so it may not be feasible. I'll have to look more into that to be sure. If your approval is a success, I'll be sure to add the procedure to the FAQs at least.

    It would be nice if it was possible to check if a file in your documents directory was flagged to be backed up by iCloud or not. That way you could test your changes before sending off to Apple for approval. Debugging using Apple approval will be a very slow process :)
     
  17. desyashasyi

    desyashasyi

    Joined:
    Nov 22, 2012
    Posts:
    73
    Hi Echo,
    I have a question how to remove database store in the game object? Or, how can I set a row/column in the game object. And I need it using playmaker actionThanks.
     
  18. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    84
    Hi echo17,
    can store my database in a server?
     
  19. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    If you are wanting to know how to use SimpleSQL with Playmaker, check out the Extra goodies section on my web page here: http://echo17.com/simplesql.html

    There are examples in the package that show how to use SimpleSQL in various scenarios.
     
  20. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    No, sorry. SimpleSQL is for sqlite storage, so it is local to the device only.
     
  21. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    I think the question was 'can I place my database on a remote disk, on another machine in a (local?) network?' :p
     
  22. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    No, sorry. Out of the box, it can only access the database on the device itself in the Application.persistentDataPath. If you are wanting to run on a PC or Mac, you may be able to modify the source code to store elsewhere. The persistent data path is the only path that is shared on all platforms, mobile and desktop alike, so that is why it is the default location.
     
  23. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    (PC for me) . In summary, it is possible according to the platform ..
     
  24. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
  25. desyashasyi

    desyashasyi

    Joined:
    Nov 22, 2012
    Posts:
    73
    Hi Echo,
    I have no problem to access SQLite database. My problem is how to update a record put in GameObject Table. Playmaker actions provided only for getting the data.
     
  26. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Check out the scene called "SimpleSQL - Commands" that comes with the playmaker actions. This scene shows how to insert, update, and delete records in SimpleSQL.

     
  27. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
  28. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    Hi,

    Just tested quickly IL2CPP export for IOS with simpleSQL project, but DB not work, do you plan to make it compatible ?

    Thanks
     
  29. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Well, quess what? It worked! :) Apple just approved the game.

    Thank you for the help.
     
  30. dafunker

    dafunker

    Joined:
    Oct 15, 2013
    Posts:
    20
    Hello Nadan, I'm also submitting an iOs app just before the 31th January ;-)
    I have followed this thread and the trick with iPhone.SetNoBackupFlag in order to avoid the sqlite database to be managed by iCloud.

    I have a more general question now because I want to avoid an Apple rejection.
    Did you have Warnings in Xcode like these ?
    - A 57x57 app icon is required for iPhone apps targeting releases of iOS prior to 7.0
    - ADBannerContentSizeIdentifier320x50 is deprecated: first deprecated in iOS 4.2
    - ADBannerContentSizeIdentifier480x32 is deprecated: first deprecated in iOS 4.2
    I don't know if the app will be rejected considering these warnings.
     
  31. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I have no idea why IL2CPP would have anything to do with the SimpleSQL database. Can you be more specific on what did not work? Did you get errors, and if so what were they?
     
  32. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    That's great news! Thanks for letting us know it worked.
     
  33. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Yes, that is good news. :)

    Anyway I was doing a little update for the game. Now that App Store must include 64bit support I can't build the game anymore with IL2CPP. As written above there are some issues with IL2CPP. Should this be reported to the Unity developers if they could help? Here is my X-Code error message. I don't understand any of this but maybe this tells something and helps with the issue.

    ....

    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0

    at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0

    at gameOS.Words () [0x00000] in <filename unknown>:0

    at gameOS.PlayerName () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

    at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0

    at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0

    UnityEngine.EventSystems.TouchInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.TouchInputModule:processTouchEvents()

    UnityEngine.EventSystems.EventSystem:Update()

    Replacements.Attribute:CheckParameters(Object, Type)


    (Filename: currently not available on il2cpp Line: -1)


    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0

    at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0

    at gameOS.Words () [0x00000] in <filename unknown>:0

    at gameOS.PlayerName () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

    at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0

    at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0

    UnityEngine.EventSystems.TouchInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.TouchInputModule:processTouchEvents()

    UnityEngine.EventSystems.EventSystem:Update()

    Replacements.Attribute:CheckParameters(Object, Type)


    (Filename: currently not available on il2cpp Line: -1)


    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0

    at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0

    at gameOS.Words () [0x00000] in <filename unknown>:0

    at gameOS.PlayerName () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

    at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0

    at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0

    UnityEngine.EventSystems.TouchInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.TouchInputModule:processTouchEvents()

    UnityEngine.EventSystems.EventSystem:Update()

    Replacements.Attribute:CheckParameters(Object, Type)


    (Filename: currently not available on il2cpp Line: -1)


    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0

    at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0

    at gameOS.Words () [0x00000] in <filename unknown>:0

    at gameOS.PlayerName () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

    at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0

    at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0

    UnityEngine.EventSystems.TouchInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.TouchInputModule:processTouchEvents()

    UnityEngine.EventSystems.EventSystem:Update()

    Replacements.Attribute:CheckParameters(Object, Type)


    (Filename: currently not available on il2cpp Line: -1)


    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0

    at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0

    at gameOS.Words () [0x00000] in <filename unknown>:0

    at gameOS.PlayerName () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

    at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0

    at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0

    UnityEngine.EventSystems.TouchInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.TouchInputModule:processTouchEvents()

    UnityEngine.EventSystems.EventSystem:Update()

    Replacements.Attribute:CheckParameters(Object, Type)


    (Filename: currently not available on il2cpp Line: -1)


    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0

    at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0

    at gameOS.Words () [0x00000] in <filename unknown>:0

    at gameOS.PlayerName () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

    at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0

    at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0

    UnityEngine.EventSystems.TouchInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.TouchInputModule:processTouchEvents()

    UnityEngine.EventSystems.EventSystem:Update()

    Replacements.Attribute:CheckParameters(Object, Type)


    (Filename: currently not available on il2cpp Line: -1)


    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0

    at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0

    at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0

    at gameOS.Words () [0x00000] in <filename unknown>:0

    at gameOS.PlayerName () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0

    at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

    at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0

    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0

    at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0

    UnityEngine.EventSystems.TouchInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.TouchInputModule:processTouchEvents()

    UnityEngine.EventSystems.EventSystem:Update()

    Replacements.Attribute:CheckParameters(Object, Type)


    (Filename: currently not available on il2cpp Line: -1)
     
  34. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi! I think you need to put all the app icons in Xcode in the Images.xcassets. If you have done that you should be ok.

    BTW I noticed that if you check the "CarPlay" icon the game won't go through validation process when the game is build with "Target iOS Version 6.0" that is the minimum now that it's not January anymore and they have new rules. Anyway, I think I have had some of those warning messages you mentioned, but it's not been a problem. I guess you just need to review the game and see what happens. Good luck. :)
     
  35. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    You need to report this in the iOS 64-bit thread (and maybe submit bugreport too with your project) but looks like it's impossible to use SimpleSQL or with the new IL2CPP at the moment

    NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."

    I haven't tried my projects yet but seems all the errors are related to using sqlite.dll
     
  36. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Ok, I reported the issue to the iOS 64-bit thread.
     
  37. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Be sure your project is set to the mac / ios in the SimpleSQL options (Tools > SimpleSQL > Options). If you have it set to the universal (Mac / iOS / PC) version, then it uses a built-in sqlite.dll that might not be compatible with the 64 bit settings. If you have the project set to Mac / iOS then it should use the built-in dll that comes on the apple platforms.

    I'm not sure if this will work or not, but it is just a starting point for figuring out what might be wrong.
     
  38. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    I changed that, but it's not working.

    Code (csharp):
    1. (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)
    2.  
    3.  
    4. NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/os/Posix/LibraryLoader.cpp(16) : Unsupported internal call for IL2CPP:LibraryLoader::LoadDynamicLibrary - "PInvoke is not yet supported on Posix platforms."
    5.  
    6.   at SimpleSQL.RuntimeHelper.ReadToEnd (System.IO.Stream stream) [0x00000] in <filename unknown>:0
    7.  
    8.   at SimpleSQL.SQLite3.Open (System.String filename, IntPtr& db) [0x00000] in <filename unknown>:0
    9.  
    10.   at SimpleSQL.SQLiteConnection..ctor (System.String databasePath) [0x00000] in <filename unknown>:0
    11.  
    12.   at SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath) [0x00000] in <filename unknown>:0
    13.  
    14.   at Mono.Globalization.Unicode.SimpleCollator+Context..ctor (CompareOptions opt, System.Byte* alwaysMatchFlags, System.Byte* neverMatchFlags, System.Byte* buffer1, System.Byte* buffer2, System.Byte* prev1, Boolean quickCheckPossible) [0x00000] in <filename unknown>:0
    15.  
    16.   at SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization) [0x00000] in <filename unknown>:0
    17.  
    18.   at SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps) [0x00000] in <filename unknown>:0
    19.  
    20.   at SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args) [0x00000] in <filename unknown>:0
    21.  
    22.   at gameOS.Words () [0x00000] in <filename unknown>:0
    23.  
    24.   at gameOS.PlayerName () [0x00000] in <filename unknown>:0
    25.  
    26.   at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <filename unknown>:0
    27.  
    28.   at StarShip.set_Firepower (Single value) [0x00000] in <filename unknown>:0
    29.  
    30.   at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0
    31.  
    32.   at UnityEngine.Animation+Enumerator.MoveNext () [0x00000] in <filename unknown>:0
    33.  
    34.   at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
    35.  
    36.   at UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
    37.  
    38.   at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <filename unknown>:0
    39.  
    40.   at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0
    41.  
    42.   at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <filename unknown>:0
    43.  
    44.   at UnityEngine.UI.Selectable.Select () [0x00000] in <filename unknown>:0
    45.  
    46.   at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0
    47.  
    48.   at heiluntaII.Main () [0x00000] in <filename unknown>:0
    49.  
    50.   at heiluntaII.Main () [0x00000] in <filename unknown>:0
    51.  
    52.   at System.Array.InternalArray__IndexOf[Entry] () [0x00000] in <filename unknown>:0
    53.  
    54.   at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] () [0x00000] in <filename unknown>:0
    55.  
    56.   at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0
    57.  
    58.   at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0
    59.  
    60.   at UnityEngine.EventSystems.TouchInputModule.Process () [0x00000] in <filename unknown>:0
    61.  
    62.   at StarShip.set_Firepower (Single value) [0x00000] in <filename unknown>:0
    63.  
    64.   at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0
    65.  
    66.   at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0
    67.  
    68. Replacements.Attribute:CheckParameters(Object, Type)
    69.  
    70. UnityEngine.Debug:Internal_LogException(Exception, Object)
    71.  
    72. UnityEngine.Debug:LogException(Exception)
    73.  
    74. UnityEngine.EventSystems.ExecuteEvents:Execute()
    75.  
    76. UnityEngine.EventSystems.TouchInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
    77.  
    78. UnityEngine.EventSystems.TouchInputModule:ProcessTouchEvents()
    79.  
    80. UnityEngine.EventSystems.TouchInputModule:Process()
    81.  
    82. StarShip:set_Firepower(Single)
    83.  
    84. UnityEngine.EventSystems.EventSystem:Update()
    85.  
    86. Replacements.Attribute:CheckParameters(Object, Type)
    87.  
    88.  
    89. (Filename: currently not available on il2cpp Line: -1)
     
  39. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    In the iOS 64-bit thread Joskym recommended:

    http://forum.unity3d.com/threads/4-6-ios-64-bit-beta.290551/page-9#post-1948758

    It seems that the source code is in zip file? Not sure how to do this.
     
  40. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
  41. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
  42. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Unity has fixed the il2cpp bug in their latest release 4.6.3. You can now build with SimpleSQL using il2cpp.

    Note that there is still a bug in 4.6.3 Free version of Unity that says you can't use your own splash screen. Have a look at this link for a workaround: http://forum.unity3d.com/threads/4-6-2p2-free-version-ios-crash.297722/

    There are also a ton of other bugs in Unity when building for il2cpp, so use with caution. Have a look at this thread for more information: http://forum.unity3d.com/threads/4-6-ios-64-bit-beta.290551/
     
  43. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Hi
    im using play maker 1.7.7.2 and when i importing SimpleSQL_Playmaker_Actions_Examples then it give me ERR pleases help

    Assets/PlayMaker/Actions/SimpleSQL/SimpleSQL_TableData.cs(11,27): error CS0246: The type or namespace name `SimpleDataTable' could not be found. Are you missing a using directive or an assembly reference?
    Assets/PlayMaker/Actions/SimpleSQL/SimpleSQL_TableData.cs(33,34): error CS0246: The type or namespace name `SimpleDataRow' could not be found. Are you missing a using directive or an assembly reference?
     
    Last edited: Feb 25, 2015
  44. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Please see the answer here: http://www.echo17.com/forum/index.php?topic=1773.msg2925#msg2925
     
  45. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Have you tested SimpleSQL with Unity 5. With Android platform I get this error, on iOS the same game works fine.

    Code (csharp):
    1.  
    2. DllNotFoundException: sqlite3
    3. SimpleSQL.SQLiteConnection..ctor (System.String databasePath)
    4. SimpleSQL.SimpleSQLManager.CreateConnection (System.String documentsPath)
    5. SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization)
    6. SimpleSQL.SimpleSQLManager.CreateCommand (System.String cmdText, System.Object[] ps)
    7. SimpleSQL.SimpleSQLManager.QueryGeneric (System.String query, System.Object[] args)
     
  46. narf03

    narf03

    Joined:
    Aug 11, 2014
    Posts:
    223
    I am having the same issue with Unity5 too, dll not found

    DllNotFoundException: Assets/Dlls/sqlite3.dll
    SimpleSQL.SQLiteConnection..ctor (System.String databasePath)
    SimpleSQL.SQLiteConnection_WithSystemData..ctor (System.String databasePath)
    SimpleSQLManager_WithSystemData.CreateConnection (System.String documentsPath) (at Assets/Scripts/SimpleSQLManager_WithSystemData.cs:10)
    SimpleSQL.SimpleSQLManager.Initialize (Boolean forceReinitialization)
    SimpleSQLManager_WithSystemData.Query (System.String query, System.Object[] args) (at Assets/Scripts/SimpleSQLManager_WithSystemData.cs:29)
    GameManager.OnGUI () (at Assets/Scripts/GameManager.cs:170)
     
  47. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Make sure you switch the platform to Android by going to the Unity menu "Tools > SimpleSQL > Options". Android uses a different sqlite library than iOS or desktops.

    Also, for the error in the editor, be sure you are using the latest version of SimpSQL. See this FAQ for more information: http://www.echo17.com/forum/index.php?topic=257.msg2938#msg2938
     
    Last edited: Mar 4, 2015
  48. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    The Options are set to Android, just tested it also with iOS. So I updated the SimpleSQL from Asset Store. In the Source folder it showed:

    SimpleSQL Library 1.5
    SimpleSQL Library 1.6

    So I deleted the whole SimpleSQL folder and imported it again from asset store. Now the Source folder contains only the latest:

    SimpleSQL Library 1.6

    But I'm still gettin the DllNotFoundException: sqlite3 error in editor.

    The link you provided me said:

    Q: Why am I getting the error when using Unity 5?

    Please upgrade to the latest version of SimpleSQL (1.6.0+) to eliminate this error in Unity 5.

    So I'm not sure if I updated the SimpleSQL correctly.
     
  49. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    One thing I forgot to post in the FAQ:

    After you download the new version, go to the Unity menu "Tools > SimpleSQL > Options". Select a different platform than the one you current have set (it doesn't matter which one). Wait for the spinning wheel in Unity to stop, then switch back to your original platform. Wait for the spinning wheel to stop again. This will extract the new runtime that fixes the issue.

    Though this probably won't fix your issue if you switched to iOS, then switched back to Android already. I'll try to take a look at this in the next few days. In the meantime, feel free to poke around the source code if you need a faster solution.
     
  50. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    SimpleSQL 1.6.1 is available on the Asset Store: http://u3d.as/387 This update fixes 64 bit editor errors in Unity 5. I'm still looking into the Android issue, so thank you for your patience!