How to display the current project version of my App to the user?

后端 未结 6 1513
遥遥无期
遥遥无期 2020-12-01 13:01

I would like to add the current version into the \"about\" section of my app. As seen in this attached screenshot Apple offers versioning.

How do you display these s

6条回答
  •  囚心锁ツ
    2020-12-01 13:16

      NSString *currentVersion = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleVersion"];
    

    returns me always the same value(initial version) even if i change the version from the project settings but.

      NSString * appVersionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
    

    does the trick.

提交回复
热议问题