The extension has a set memory limit, which is much less than that of an app.
Why can you not do the iteration in the app when it first launches rather than the extension? (the extension is not part of the app, it is separate from it but data from the iteration process can be shared via the filesystem for example).
Also an extension doesn't simply run for 30 seconds, it will run until the completion handler is called, if the handler is not called within 30 seconds then the system will call the handler for you. If you have to do the iteration within the extension, you will need to delay calling the completion handler until the iterations have completed. If that takes longer than 30 seconds, then that's another good reason why you need to look at doing this in the app rather than the extension.
You say the iteration is part of the initialization process, hence its a one time operation, why therefore cannot it be performed by the app (I use the term app to not include the extension) the first time the app runs, and then the results of that made available to the extension?
Topic:
App & System Services
SubTopic:
Notifications
Tags: