问题
Is it possible to have code that executes during the iPhone app installation process - i.e. when it is installed from the app store? I would like to run a method which executes at install time vs when the app first loads.
回答1:
No, this is not possible - the entire installation process is handled by Apple applications. At no point is your app (or any bundled code) executed during the install.
来源:https://stackoverflow.com/questions/4565878/execute-code-during-iphone-app-installation