修复bug
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
|
@@ -25,8 +25,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign) BOOL canOpen;
|
||||
///是否刷新了
|
||||
@property (nonatomic,assign) BOOL isLoad;
|
||||
///是否刷新了
|
||||
@property (nonatomic,assign) BOOL isLoad;
|
||||
///房间id,用于分享房间跳转到房间
|
||||
@property (nonatomic, copy) NSString *__nullable roomId;
|
||||
///用户id,用于外部h5跳转到聊天页面
|
||||
|
@@ -327,7 +327,7 @@
|
||||
if (@available(iOS 15.0, *)) {
|
||||
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap demandShopedThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
|
||||
[iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
@kWeakify(self);
|
||||
@@ -406,7 +406,7 @@
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
@@ -425,7 +425,7 @@
|
||||
if(code == 1444){
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
|
@@ -355,7 +355,7 @@
|
||||
if (@available(iOS 15.0, *)) {
|
||||
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap demandShopedThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
|
||||
[iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
@kWeakify(self);
|
||||
@@ -430,7 +430,7 @@
|
||||
[XNDJTDDLoadingTool hideHUDInView:kWindow];
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
@@ -448,7 +448,7 @@
|
||||
if(code == 1444){
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#import "XPMonentsPublishViewController.h"
|
||||
|
||||
@interface XPMonentTopicContainerViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate>
|
||||
@property (nonatomic,strong) JXCategoryTitleView *categoryView;
|
||||
@property (nonatomic,strong) JXCategoryTitleView *pi_categoryView;
|
||||
@property (nonatomic,strong) JXCategoryIndicatorLineView *lineView;
|
||||
@property (nonatomic,strong) JXPagerListRefreshView *pagerContentView;
|
||||
@property (nonatomic,strong) NSArray<NSString *> *titles;
|
||||
@@ -101,7 +101,7 @@
|
||||
}
|
||||
|
||||
- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
|
||||
return self.categoryView;
|
||||
return self.pi_categoryView;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView {
|
||||
@@ -137,27 +137,27 @@
|
||||
self.latestVC.worldId = _worldId;
|
||||
}
|
||||
|
||||
- (JXCategoryTitleView *)categoryView {
|
||||
if (!_categoryView) {
|
||||
_categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 46)];
|
||||
_categoryView.titles = self.titles;
|
||||
_categoryView.backgroundColor = [UIColor whiteColor];
|
||||
_categoryView.delegate = self;
|
||||
_categoryView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
|
||||
_categoryView.titleColor = [DJDKMIMOMColor secondTextColor];
|
||||
_categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:18];
|
||||
_categoryView.titleFont = [UIFont systemFontOfSize:15];
|
||||
_categoryView.titleColorGradientEnabled = YES;
|
||||
_categoryView.titleLabelZoomEnabled = NO;
|
||||
_categoryView.indicators = @[self.lineView];
|
||||
_categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerContentView.listContainerView;
|
||||
_categoryView.averageCellSpacingEnabled = NO;
|
||||
_categoryView.contentEdgeInsetLeft = 20;
|
||||
_categoryView.contentEdgeInsetRight = 20;
|
||||
_categoryView.cellSpacing = 30;
|
||||
- (JXCategoryTitleView *)pi_categoryView {
|
||||
if (!_pi_categoryView) {
|
||||
_pi_categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 46)];
|
||||
_pi_categoryView.titles = self.titles;
|
||||
_pi_categoryView.backgroundColor = [UIColor whiteColor];
|
||||
_pi_categoryView.delegate = self;
|
||||
_pi_categoryView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
|
||||
_pi_categoryView.titleColor = [DJDKMIMOMColor secondTextColor];
|
||||
_pi_categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:18];
|
||||
_pi_categoryView.titleFont = [UIFont systemFontOfSize:15];
|
||||
_pi_categoryView.titleColorGradientEnabled = YES;
|
||||
_pi_categoryView.titleLabelZoomEnabled = NO;
|
||||
_pi_categoryView.indicators = @[self.lineView];
|
||||
_pi_categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerContentView.listContainerView;
|
||||
_pi_categoryView.averageCellSpacingEnabled = NO;
|
||||
_pi_categoryView.contentEdgeInsetLeft = 20;
|
||||
_pi_categoryView.contentEdgeInsetRight = 20;
|
||||
_pi_categoryView.cellSpacing = 30;
|
||||
|
||||
}
|
||||
return _categoryView;
|
||||
return _pi_categoryView;
|
||||
}
|
||||
|
||||
- (JXCategoryIndicatorLineView *)lineView {
|
||||
|
@@ -317,7 +317,7 @@
|
||||
if (@available(iOS 15.0, *)) {
|
||||
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap demandShopedThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
|
||||
[iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
@kWeakify(self);
|
||||
@@ -454,7 +454,7 @@
|
||||
if(code == 1444){
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
@@ -473,7 +473,7 @@
|
||||
- (void)checkReceiptSuccess:(NSString *)transcationId {
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@ static NSString * kUpdateVersionNum = @"kUpdateVersionNum";
|
||||
return;
|
||||
}
|
||||
if ([[AccountInfoStorage instance] getTicket].length > 0) {
|
||||
[[self getView] autoLoginSuccess];
|
||||
return;
|
||||
}
|
||||
[Api requestTicket:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
|
@@ -76,7 +76,7 @@ public class PIIAPRegulate: NSObject {
|
||||
|
||||
|
||||
// 购买某个产品
|
||||
@objc public func demandShopedThing(productId:String, uuid: String) async throws {
|
||||
@objc public func demandCommodityThing(productId:String, uuid: String) async throws {
|
||||
if(ConditionBlock != nil ){
|
||||
ConditionBlock(StoreConditionResult.start,nil)
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class PIIAPRegulate: NSObject {
|
||||
|
||||
switch result {
|
||||
case .success(let verification): // 用户购买完成
|
||||
let transaction = try await verifiedAndFinish(verification)
|
||||
let transaction = try await verifiedAndAccomplish(verification)
|
||||
return transaction
|
||||
case .userCancelled: // 用户取消
|
||||
if(ConditionBlock != nil ){
|
||||
@@ -161,7 +161,7 @@ public class PIIAPRegulate: NSObject {
|
||||
}
|
||||
|
||||
// 校验&完成后传给服务器
|
||||
func verifiedAndFinish(_ verification:VerificationResult<Transaction>) async throws -> Transaction?{
|
||||
func verifiedAndAccomplish(_ verification:VerificationResult<Transaction>) async throws -> Transaction?{
|
||||
//Check whether the transaction is verified. If it isn't,
|
||||
//this function rethrows the verification error.
|
||||
let transaction = try checkVerified(verification)
|
||||
@@ -207,7 +207,7 @@ public class PIIAPRegulate: NSObject {
|
||||
}
|
||||
// 事件完成处理
|
||||
|
||||
@objc public func verifyBusinessFinish(transaction:String) async{
|
||||
@objc public func verifyBusinessAccomplish(transaction:String) async{
|
||||
if(transactionMap[transaction] != nil){
|
||||
await transactionMap[transaction]!.finish()
|
||||
transactionMap.removeValue(forKey: transaction)
|
||||
@@ -234,7 +234,7 @@ public class PIIAPRegulate: NSObject {
|
||||
do {
|
||||
print("iap: updates")
|
||||
print("result:\(result)")
|
||||
try await self.verifiedAndFinish(result)
|
||||
try await self.verifiedAndAccomplish(result)
|
||||
} catch {
|
||||
//StoreKit has a transaction that fails verification. Don't deliver content to the user.
|
||||
print("Transaction failed verification")
|
||||
|
Reference in New Issue
Block a user