cancel
Showing results for 
Search instead for 
Did you mean: 

Branding Agentry client - pre built database

former_member220966
Participant
0 Kudos

Hi experts,

We are implementing SAP Work Mgr. 6.2 on iOS on SMP SP07 and are quite close to our go-live date :-). Due to extremely large volume of data in the backend system, we are seeing sub-par initial sync performance and we are working on optimizing the backend query performance already.

I read that there is a way to brand the Agentry iOS client with a pre-built database so that some of the data is not downloaded to the device again during an initial sync. If this is indeed possible, this will save about 4-5 mins off the initial sync and this will be HUGE win for our client.

I have been doing some research on this and am slightly unclear on the approach. 

http://scn.sap.com/thread/3629872 - the last response in this thread seems to suggest that there is an option export the db(after disabling the encryption option in the Agentry editor) and use that to build a client with a "pre-built database"

http://scn.sap.com/thread/3644890 - a few responses in this thread seem to suggest that this is not possible

Questions:

1) Is it possible to using branding and build an Agentry Work Mgr. iOS client with a pre-built database?

2) If yes, is it true that the data included as part of this db will NOT be downloaded to the device during an initial sync as it is already on the device, thereby saving time?

3) Is it possible to include master data AND application data(defitions, rules etc.) into this db file?

4) Is there any document/blog on how to accomplish this? If not, I would really appreciate if you guys could guide us on this.

Any help would be really appreciated!

Cheers,

Abhinav

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Abhinav,

In answer to your questions.  This of course assumes you are creating a branded client from the Agentry Client Framework.

1) Yes, it is possible to build an iOS client with a pre-built database.

2) Yes, common data should not be updated but it will depend on your configuration as it is treated as a user change.   You should be able to test this by logging in as your user to build the database and then changing users to a different user to see what will download.  Of course as data changes DT/CT updates will also come down.

3) Yes the database will include CT/DT data and application definitions along with the user data for the user that created it.

4) High level steps

  1. Make sure database is unencrypted
  2. Export the database.  Will create the Agentry.db in the Documents folder.
  3. Connect the device to iTunes and copy the db off
  4. Add the file to your XCode project (named Agentry-iPad.db or Agentry-iPhone.db)
  5. Compile to ipa
  6. Load and test

Good luck!

--Bill

former_member220966
Participant
0 Kudos

Bill,

Thank you for your response, I am going to give this a shot tomorrow.

Quick question on step 2:

I have an application with the "encrypted DB" option unchecked under application security in the Agentry editor -> will deploy that to SMP. When you say "export the database" do you mean I need to export it from the iOS device(after completing a sync with this app), or from ATE on my windows machine? I also have a Mac with the X Code simulator.

The fact that it will create the db in the documents folder seems to suggest that you want me to do this on my windows machine, either via ATE or via WPF client?

I will come back to this thread if I have any further questions!

Cheers,

Abhinav

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Abhinav,

No you need to do it from the device.  Do not do it from the ARE on Windows.  iOS Applications have an internal Documents directory that can be accessed from iTunes when the device is connected to copy files to / from the application directory.

After a full sync on the iOS device, go to the about screen and you should see an option for Export DB if the database is unencrypted.

--Bill

former_member220966
Participant
0 Kudos

Bill,

I have been trying to work on this, we have made some progress but I am stuck at a strange point(to me this seems more like a generic iOS/Apple issue as opposed to being an Agentry issue).

Issue - I don't see the branded Agentry client(even tried the standard Work Mgr. app on the App Store) under File Sharing when I connect my device to iTunes

Please check this thread - , initially I was able to see the Work Mgr. app under File Sharing in iTunes.

But I am unable to see the app under "File Sharing" now, here is what I did:

1) Able to see "Export DB" option after an initial sync

2) After exporting db, I do see it in the "Documents" section within the app(this is what is referenced under "File Sharing")

3) When I connect my device to the iTunes, I don't see any version of the Work Mgr. client under "File Sharing" (also tried the standard version on App Store to eliminate the possibility of an MDM solution blocking this. Tried it on my personal iPhone as well as on my personal Mac to rule out all possibilities).

4) Tried it on my iPhone as well and I don't see the Work Mgr. app under File Sharing(was working before as I mentioned in the other thread)

I feel like we are very close. Have you seen this before? I will continue to do some research on this, but figured I reach out to you as well. Thank you for your support!

Cheers,

Abhinav

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I have seen it on occasion.  Personally I use another application to access my iOS device to get the files off.  I suggested the iTunes approach since that was free.  You can also use other tools, iExplorer for example is what I use, to see the application structures and copy out the file from the Documents location.  There is a trial version if you wanted to see if that worked.

--Bill

former_member220966
Participant
0 Kudos

Bill,

iExplorer worked, thank you for that suggestion!

I exported the Agentry.db file(was about 110 MB), I right clicked in my X Code project and chose "Add files to project" and selected Agentry.db. I compiled the project and ran a sync in the X Code simulator.

For the first sync, it performed a complete initial sync. The application URL that was hardcoded in the branding.plist was for a different application. I changed the application URL to the one that was uploaded to SMP with the DB unencrypted, my hunch was that the may be the application URL needs to be the same(even though all applications connect to the same backend).

I compiled the project again, reset the client in the simulator. It is still updating the master data and the application definitions. Please see below screenshot:

Questions:

Is resetting the client in the simulator causing it to perform a complete sync again? I had to reset the client as the server URL had changed(changed it in the branding.plist file).

After, importing the Agentry.db file does not seem to be having any impact on the initial sync performance. Is there another way to add the Agentry.db file to the X Code project?

My understanding is that resetting the client should not have an impact as the Agenytry.db is now part of the container. Is there a better way to test it on the simulator?

Thank you for all your help thus far, I really appreciate it.

Cheers,

Abhinav

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you reset the client it will blank out the database and start from scratch.  I think you just want to install the client (with the pre-built database) and run it.  When you login as the new user it will do a user change and I would expect it to sync deltas with the server.

I will try to test but and fairly short on time the next few days.

--Bill

former_member220966
Participant
0 Kudos

Bill,

Quick update - I had the app with the pre-built DB uploaded to the Mobile Iron app store to try it out on an actual device. I installed the client and initiated a sync using the same user with which I had "exported the DB". I see the same behavior as in the simulator, it is fetching all master data again + application definitions again.

I am not sure if below details help, but here they are anyways:

- Size of original branded Agentry client ipa WITHOUT Agentry.db = 13 MB

- Size of Agentry.db = 110 MB

- Size of Agentry.db when we zip it on a Mac = 12 MB

- Size of new branded Agentry client ipa WITH Agentry.db = 25 MB(12 MB more than the original)

- Size of application WITH prebuilt DB after installation on iPad = 143MB

- Size of application WITHOUT prebuilt DB after installation on iPad = 35 MB

Bottomline - Agentry.db did get successfully packaged as part of the ipa. I am not sure why master data AND application definitions are being downloaded again after the Agentry.db is part of the ipa.

Have you seen this before? I am not sure if I am doing something wrong?

Cheers,

Abhinav

former_member220966
Participant
0 Kudos

UPDATE: When I installed the application with pre-built DB on the device and connect the device via iExplorer, we don't see the Agentry.db under the proper path: Application Support-> Database -> Agentry. db.

We tried the following:

- Install app on device hooked to a computer with iExplorer

- Manually create Application Support -> Database and manually import Agentry.db at this path

- Sync the client and it works fine!!

So, the issue gets narrowed to, when we package the db as part of the X Code project, how do we ensure that it gets created under the right path?

Hopefully, this is enough insight for us to resolve this issue!

Cheers,

Abhinav

Answers (1)

Answers (1)

former_member220966
Participant
0 Kudos

Bill,

It finally worked! I had to rename the Agentry.db file to Agentry-iPad.db in the X Code project.

I was able to successfully include the db as part of the iOS client. We are running some tests with user change scenarios(if we change the user, it just performs a delta sync - which is ok).

This combined with optimizing backend query performance will shave off at least 8-9 mins off the initial sync, which is going to be HUGE!

Thank you for all your help as always, I appreciate it! This seems to be a good topic for a quick blog(in case there does not exist one already).

Cheers,

Abhinav