Compare commits
No commits in common. "3ea379ca11fa9380b76aca95edd5d1761da145df" and "44c5d9045c6591bff8867c1d008299f0046796a2" have entirely different histories.
3ea379ca11
...
44c5d9045c
@ -109,15 +109,12 @@ extension APInAppPurchseVC {
|
||||
// 请求商品列表
|
||||
func fetchIAPs() {
|
||||
// let oldIAPs = await ascAPI.fetchInAppPurchasesList(appId: currentApp!.appId)
|
||||
// https://developer.apple.com/documentation/appstoreconnectapi/get-v2-inapppurchases-_id_
|
||||
|
||||
APClient.iaps(appid: currentApp!.appId)
|
||||
.request(showLoading: true, inView: self.view) { [weak self] result, response, error in
|
||||
guard let err = error else {
|
||||
guard let app = self?.currentApp else { return } //请求过程关闭页面可能导致为空
|
||||
print(result.toJsonString() ?? "")
|
||||
let iapL = IAPList(body:result, app: app)
|
||||
|
||||
self?.iapList = iapL.iapList
|
||||
self?.outlineView.reloadData()
|
||||
self?.updateRowInfo()
|
||||
@ -128,18 +125,6 @@ extension APInAppPurchseVC {
|
||||
}
|
||||
|
||||
func updateRowInfo() {
|
||||
|
||||
// guard let ascKey = InfoCenter.shared.currentASCKey else { return }
|
||||
//
|
||||
// let ascAPI = APASCAPI.init(issuerID: ascKey.issuerID,
|
||||
// privateKeyID: ascKey.privateKeyID,
|
||||
// privateKey: ascKey.privateKey,
|
||||
// showApiRateLimit: false)
|
||||
// Task {
|
||||
// let list = await ascAPI.fetchInAppPurchasesList(appId: currentApp!.appId)
|
||||
// print(list)
|
||||
// }
|
||||
|
||||
// TODO: 接口请求失败
|
||||
return;
|
||||
|
||||
|
||||
@ -188,8 +188,6 @@ extension APUploadIAPListVC {
|
||||
ascAPI.addMessage("开始更新内购本地化版本:\(product.productId)")
|
||||
let localizations = await ascAPI.fetchInAppPurchasesLocalizations(iapId: iap.id)
|
||||
for localization in product.localizations {
|
||||
ascAPI.addMessage("订阅商品已经存在:\(product.productId) ,跳过更新信息...")
|
||||
return;
|
||||
// 如果已经存在本地化语言,则更新
|
||||
if let locale = localizations.filter({ $0.attributes?.locale == localization.locale }).first {
|
||||
// 更新
|
||||
@ -468,10 +466,6 @@ extension APUploadIAPListVC {
|
||||
// 3、查看是否存在订阅商品,不存在就创建,存在就更新
|
||||
let subs = subscriptions.filter({ $0.attributes?.productID == product.productId })
|
||||
if let sub = subs.first {
|
||||
///不做更新
|
||||
ascAPI.addMessage("订阅商品已经存在:\(product.productId) ,跳过更新信息...")
|
||||
return;
|
||||
|
||||
ascAPI.addMessage("订阅商品已经存在:\(product.productId) ,开始更新信息中...")
|
||||
// 0. 审核备注如果原来有值,而新字段无值,则使用原值
|
||||
var product = product
|
||||
|
||||
@ -198,11 +198,11 @@ extension APClient {
|
||||
filter = "fields[inAppPurchase]=referenceName,productId,inAppPurchaseType&filter[canBeSubmitted]=true&limit=500&sort=-referenceName&exists[inAppPurchaseReviewSubmission]=true&"
|
||||
}
|
||||
return "https://appstoreconnect.apple.com/iris/v1/apps/"+appid+"/inAppPurchase?"+filter
|
||||
// return "https://api.appstoreconnect.apple.com/v1/apps/\(appid)/inAppPurchasesV2"
|
||||
case let .iaps(appid):
|
||||
return "https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/"+appid+"/iaps"
|
||||
case let .inAppPurchaseDetail(iapid):
|
||||
return "https://appstoreconnect.apple.com/iris/v2/inAppPurchases/\(iapid)?include=inAppPurchaseLocalizations,content,promotedPurchase,appStoreReviewScreenshot,inAppPurchaseTaxCategoryInfo&limit[inAppPurchaseLocalizations]=200"
|
||||
// return "https://api.appstoreconnect.apple.com/v2/inAppPurchases/\(iapid)"
|
||||
case let .inAppPurchasePrices(iapid):
|
||||
return "https://appstoreconnect.apple.com/iris/v2/inAppPurchases/\(iapid)/prices?include=inAppPurchasePricePoint&filter[territory]=USA"
|
||||
case .ascProvider:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user