The app should follow the same requirements as standalone software, which is governed by 21 CFR 801.50:
(a) Stand-alone software that is not distributed in packaged form (e.g., when downloaded from a Web site) is deemed to meet the UDI labeling requirements of this subpart if it complies with the requirements of paragraph (b) of this section and conveys the version number in its production identifier.
(b) Regardless of whether it is or is not distributed in packaged form, stand-alone software regulated as a medical device must provide its unique device identifier through either or both of the following:
(1) An easily readable plain-text statement displayed whenever the software is started;
(2) An easily readable plain-text statement displayed through a menu command (e.g., an "About * * *" command).
Presumably the app has a Menu or Settings option for users, in which you can place an About This App (similar to the Help About screen in other software).
As for the new PI for each version/release, the answer is yes. The point of the UDI is to be able to identify the exact product in question. How would else you know which versions were potentially affected by a bug reported by a user? Not all users update their apps every time one is available, so you can't rely on it just being whichever you're offering at the moment.