Check if iOS app is live in app store

前端 未结 6 1258
迷失自我
迷失自我 2020-12-28 19:23

Is it possible somehow to code like below in iOS app ?

if(app is live in app store)
{
   //Do something
}
else
{
  //Do other thing
}

I wan

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-28 19:59

    Swift

    func isAppStoreBuild() -> Bool {
    
        if NSBundle.mainBundle().appStoreReceiptURL != nil {
            if let _ = NSData(contentsOfURL: NSBundle.mainBundle().appStoreReceiptURL!) {
                return true
            }
        }
        return false
    }
    

提交回复
热议问题