1.3.3 VIP修正
This commit is contained in:
parent
4c632a0f61
commit
16343bff6f
Binary file not shown.
@ -56,9 +56,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
MP_NetWorkManager.shared.requestStatusToYouTube()
|
||||
IQKeyboardManager.shared.enable = true
|
||||
IQKeyboardManager.shared.shouldResignOnTouchOutside = true
|
||||
//启用内购项
|
||||
MP_IAPManager.shared.observeVIPStoreKit()
|
||||
MP_IAPManager.shared.getVIPAllProducts()
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window?.backgroundColor = .init(hex: "#161616")
|
||||
//关联faceBook
|
||||
|
||||
@ -116,6 +116,9 @@ class MP_LunchViewController: UIViewController {
|
||||
private func switchAOrBAction() {
|
||||
//首先检测之前是否进入过B面
|
||||
guard UserDefaults.standard.bool(forKey: "MP_Into_B") != true else {
|
||||
//启用内购项
|
||||
MP_IAPManager.shared.observeVIPStoreKit()
|
||||
MP_IAPManager.shared.getVIPAllProducts()
|
||||
loadAds()
|
||||
//更新开关以及响应的数据
|
||||
MP_AnalyticsManager.shared.getOpenStatus(0) { open in
|
||||
@ -153,6 +156,9 @@ class MP_LunchViewController: UIViewController {
|
||||
MP_NetWorkManager.shared.performTaskNetWrokAvailable {
|
||||
[weak self] in
|
||||
guard let self = self else {return}
|
||||
//启用内购项
|
||||
MP_IAPManager.shared.observeVIPStoreKit()
|
||||
MP_IAPManager.shared.getVIPAllProducts()
|
||||
//广告加载
|
||||
loadAds()
|
||||
//进行开关检测
|
||||
|
||||
@ -38,6 +38,8 @@ class MP_IAPManager: NSObject {
|
||||
}
|
||||
///校正内购产品交易情况
|
||||
func observeVIPStoreKit() {
|
||||
//检索本地是否存在旧版交易记录
|
||||
// guard
|
||||
//清理原有的交易信息组
|
||||
transactions.removeAll()
|
||||
//执行交易信息组校正处理
|
||||
@ -89,24 +91,6 @@ class MP_IAPManager: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
// ///执行产品请求
|
||||
// func requestProducts() {
|
||||
// guard MP_NetWorkManager.shared.netWorkStatu == .reachable else {
|
||||
// //无网络
|
||||
// print("无网络状况,无法获得产品")
|
||||
// return
|
||||
// }
|
||||
// //清空可用产品
|
||||
// availableProducts = []
|
||||
// //将产品ID转为Set集合
|
||||
// let setStrings:Set<String> = Set(productIdentifiers)
|
||||
// //初始化产品请求
|
||||
// productsRequest = SKProductsRequest(productIdentifiers: setStrings)
|
||||
// //实现请求代理
|
||||
// productsRequest?.delegate = self
|
||||
// //开始执行请求
|
||||
// productsRequest?.start()
|
||||
// }
|
||||
///对指定产品进行购买
|
||||
func purchaseProduct(with productId:String) {
|
||||
showHUD = true
|
||||
@ -123,7 +107,6 @@ class MP_IAPManager: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///用户重新检索交易
|
||||
func restorePurchases() {
|
||||
MP_HUD.loading()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user