4 Replies Latest reply on Apr 22, 2016 1:04 PM by filemaker@i-absolute.com

    iOS SDK and update version


      Hi all,

      I built a little dashboard for one of mine customer that download data from FileMaker Server and shows the income for every store.


      list.jpg detail.jpg


      This is the third time that I submit the app to the App Review and I have passed all tests every time (actually I'm in Test Flight).


      I have a big problem with the update procedure.


      I changed the version to every update 1.0.1, 1.0.2, 1.0.3 but when I update my solution, the app remains in the previous version.

      Every version is shipped with a series of data in bundle (new records, new or updated tables, new fileds).


      I need to remove completely the app and re-install from the App Store to obtain the new version with the new feature and bug fix.


      Whats wrong?


      In iOS SDK guide there is this notice:


      "If your updated solution file has a versioned file name (example: “MyFile.01.fmp12” and “MyFile.02.fmp12”) the new version of the file will be uploaded to your iOS device, but any local record or local global data changes will remain in the previous version of the solution file within the .ipa file on the device. The iOS App SDK does not provide any automatic way to transfer this data between the two versions contained within the .ipa file."


      Ok, is not my case. Every version is a fresh installation with a new set, new interface features and data in bundle.



      "By default, the first time you launch your app, the solution files for your app are copied to the Documents directory on the iOS device. If you update your app and the alwaysOverwrite option in configFile.txt is set to 0 (zero) or the option is not specified, files are copied to the Documents directory only the first time the app is launched or whenever the app's version string changes."


      If I set: alwaysOverwrite=1, yes, the app replaces the content every time the app is launched, but in this case, the previously downloaded data are deleted.

      What I need to do, to update my app (interface and functions) and use locally data downloaded and shipped with every update?


        • 1. Re: iOS SDK and update version

          The version number in the filename is for your use only and is not required.  Use version number in your filename if you are going to create an update process.  You use update number in filename so the file is not over written.

          If you used only MyApp.fmp12 then when the App store update based on the version number and build number from xcode, it would overwrite your file with it current data. So when you don't want your data over wrote you use MyApp01.fmp12 and then the new version would be MyApp02.fmp12.


          Now to answer your question.


              The version number and build number in xcode is used by the app store.


          When you update your solution you have multiple files because version number being added to the filename.   Since data is not important I would just use same filename.  MyApp.fmp12


          if  you use version number in filename then you need to specify the main database in the config file.  Change from MyApp01.fmp to MyApp02.fmp.   Note the update will install automatically but it will not run until you close the old file.  Again in your case I would not use version number in filename.

          • 2. Re: iOS SDK and update version

            Thank you, schamblee.


            I understand your answer but in my case I used a new name for the application and I set in the configuration file (router) the exact file name to launch.


            The version indicated is that of Xcode (not filename name app).


            My case is: new filename and a new version number in Xcode, but the update process don't overwrite the app.



            • 3. Re: iOS SDK and update version

              You have MyApp01.fmp12 in your solution folder.  Build project then upload to Test Flight.    Make updates to file and xcode.  Remove MyApp01.fmp12 from solution folder and add MyApp02.fmp12 to the solution folder.  Set Main database in configuration file to MyApp02.fmp12.   Rebuild project then upload to test flight.   App will be automatically update but the old file will still be running.   Add a close file button to your solution or double tap the home button and then swipe up. Open the file again and the update file will be running.   You will have two files in the document folder which will be MyApp01.fmp12 and MyApp02.fmp12.  You will need to delete MyApp01.fmp12, if you don't you will end up with old version of your file in the document folder of the App and eat up your storage.   That is the reason I stated if you are not interested in the old data then I would use the same filename so it would over write automatically. 



              In FMGo to delete a file you have to export a zero found count.   You would export 0 records to MyApp01.fmp12, since there is no records in this new file FMGo deletes.


              January 2016 Webinar on FileMaker iOS App SDK | FileMaker Videos for Learning and Solving Problems



              If you decide to do an update and keep your existing data then take a look at yzysoft website.  How to update native iOS App created with FileMaker iOS App SDK? - YZY SOFT

              2 of 2 people found this helpful
              • 4. Re: iOS SDK and update version

                Thank you again.


                I will follow your guide for the next release.