Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-6081

iOS: Database.install does not copy the database file only creates a symbolic link

    Details

      Description

      Problem

      While using the Titanium.Database.install on the simulator it is supposed to copy the database file to the /database directory under the application root folder, however it makes only a symbolic link between the file that is under /database and the one that was in /Resources.

      The issue appears only on Simulator.

      Reproducible Steps

      1. Run the sample code with the sample database (db file attached)
      2. Go to the application folder under simulator, the path should look similar: /Users/dawconsdwitservices/Library/Application Support/iPhone Simulator/5.0/Applications/D30F4B39-8A41-4B7F-A271-4EAF69AFDFC9/Library/Application Support/database . Take a look that the myDB.db file which is only a link to the original database file that is under /Resources folder.

      Sample Code

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
       
       
      var label1 = Titanium.UI.createLabel({
      	color:'#999',
      	text:'I am Window 1',
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      var db = Titanium.Database.install('speed.db','myDB');
       
      win1.add(label1);
      win1.open();
      
      

      Associated HelpDesk Ticket

      http://appc.me/c/APP-421442

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              kpomaski Karol Pomaski
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-5150
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration