Best way to check if an iPhone app is running for the first time

后端 未结 7 1201
萌比男神i
萌比男神i 2020-11-28 22:19

I want to check if my iPhone app is running for the first time. I can create a file in the documents folder and check that file to see if this is the first time the app is r

7条回答
  •  一整个雨季
    2020-11-28 22:21

    Use NSUserDefaults. If the sharedDefault has a key for your app, its run before. Of course, you'll have to have the app create at least one default entry the first time the app runs.

提交回复
热议问题