How to detect Apps first launch in iOS?

前端 未结 7 895
小蘑菇
小蘑菇 2020-12-01 06:11

I would like to display a welcome screen when a user opens my app for the first time. What method is there to check the first launch of an app in Swift?

相关标签:
7条回答
  • 2020-12-01 06:42

    I often found userDefault inaccessible due to some bugs for Apples data protection policy in my app, So I changed my strategy to detect first launch with below

    if ( fileExists( dummyFilePath ) == NO ) {
        createFileAt( dummyFilePath )
        // This is first launch
    }
    
    0 讨论(0)
提交回复
热议问题