diff --git a/YuMi/Assets.xcassets/AppIcon.appiconset/1024 2.png b/YuMi/Assets.xcassets/AppIcon.appiconset/1024 2.png index 5abb040d..3742de4e 100644 Binary files a/YuMi/Assets.xcassets/AppIcon.appiconset/1024 2.png and b/YuMi/Assets.xcassets/AppIcon.appiconset/1024 2.png differ diff --git a/YuMi/Config/ClientConfig.h b/YuMi/Config/ClientConfig.h index a3f50797..a3536a92 100644 --- a/YuMi/Config/ClientConfig.h +++ b/YuMi/Config/ClientConfig.h @@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN ///开箱子 大于等级 展示 @property (nonatomic, assign) NSInteger openCandyTreeLimitLevel; @property (nonatomic,assign) BOOL canOpen; +@property(nonatomic,assign) BOOL isTF; ///是否刷新了 @property (nonatomic,assign) BOOL isLoad; ///房间id,用于分享房间跳转到房间 diff --git a/YuMi/Config/ClientConfig.m b/YuMi/Config/ClientConfig.m index 04b723fc..7c01c6d2 100644 --- a/YuMi/Config/ClientConfig.m +++ b/YuMi/Config/ClientConfig.m @@ -35,7 +35,12 @@ }); return config; } - +-(BOOL)isTestFlight{ + NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; + NSString *receiptURLString = [receiptURL path]; + BOOL isTestFlight = ([receiptURLString containsString:@"sandboxReceipt"] || [receiptURLString containsString:@"_MASReceipt/receipt"]); + return isTestFlight; +} - (void)clientInit { self.canOpen = YES; @@ -110,6 +115,11 @@ timer = nil; } } - +- (BOOL)isTF{ + if(!_isTF){ + _isTF = [self isTestFlight]; + } + return _isTF; +} @end diff --git a/YuMi/Global/YUMIMacroUitls.h b/YuMi/Global/YUMIMacroUitls.h index 6afd38ff..ccea6232 100644 --- a/YuMi/Global/YUMIMacroUitls.h +++ b/YuMi/Global/YUMIMacroUitls.h @@ -52,7 +52,8 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns #define PI_App_Version @"1.0.3" ///渠道 #define PI_App_Source @"appstore" -//#define PI_App_Source @"pi_tf" +#define PI_Test_Flight @"TestFlight" + ///正式环境 #define API_HOST_URL @"https://api.hfighting.com" //#define API_HOST_URL @"https://api.molistar.xyz" diff --git a/YuMi/Info.plist b/YuMi/Info.plist index f2c5266d..a8ddfd7f 100644 --- a/YuMi/Info.plist +++ b/YuMi/Info.plist @@ -54,7 +54,7 @@ CFBundleVersion - 2 + 4 FacebookAppID 1266232494209868 FacebookClientToken diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayCell.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayCell.m index b11b2bc8..b8af0046 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayCell.m +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayCell.m @@ -38,6 +38,7 @@ [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.equalTo(self.contentView); make.leading.equalTo(self.iconView.mas_trailing).mas_offset(10); + make.trailing.equalTo(self.selectBtn.mas_leading).mas_offset(-kGetScaleWidth(10)); }]; [self.selectBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.width.height.mas_equalTo(20); @@ -70,6 +71,7 @@ _titleView = [UILabel new]; _titleView.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold]; _titleView.textColor = UIColorFromRGB(0x1F1B4F); + _titleView.adjustsFontSizeToFitWidth = YES; } return _titleView; } diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m index 5c5281e0..e1e31630 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m @@ -103,7 +103,7 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ XPNobleCenterPayCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPNobleCenterPayCell class]) forIndexPath:indexPath]; cell.isChoose = indexPath.row == self.path.row; - cell.iconImage = indexPath.row == 0 ? kImage( @"exchange_gold_icon") : kImage(@"mine_noble_center_apple"); + cell.iconImage = indexPath.row == 0 ? kImage( @"exchange_gold_icon") : kImage(@"noble_open_btn"); NSString *num = [NSString stringWithFormat:@"(%@%@)",self.diamonds,YMLocalizedString(@"XPNobleCenterPayView1")]; NSString *text = indexPath.row == 0 ? [NSString stringWithFormat:@"%@%@",self.listData[indexPath.row],num] : self.listData[indexPath.row]; @@ -117,7 +117,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ self.path = indexPath; self.type = indexPath.row == 0 ? NobleCenterPayType_diamond : NobleCenterPayType_Apple; - self.diamondNumView.text = indexPath.row == 0 ? [NSString stringWithFormat:@"%.0f",_money.floatValue * 1000] : [NSString stringWithFormat:@"%.2f",_money.floatValue]; + self.diamondNumView.text = indexPath.row == 0 ? [NSString stringWithFormat:@"%.0f",_money.floatValue * 1000] : [NSString stringWithFormat:@"$%.2f",_money.floatValue]; self.diamondNumTitle.text = indexPath.row == 0 ? YMLocalizedString(@"XPNobleCenterPayView1"):@""; [self.tableView reloadData]; } @@ -201,10 +201,10 @@ - (NSArray *)listData{ if(!_listData){ #ifdef DEBUG - _listData = @[YMLocalizedString(@"XPNobleCenterPayView2"),@"Apple Pay"]; + _listData = @[YMLocalizedString(@"XPNobleCenterPayView2"),YMLocalizedString(@"XPNobleCenterWindow0")]; #else if(isEnterprise == YES){ - _listData = @[YMLocalizedString(@"XPNobleCenterPayView2"),@"Apple Pay"]; + _listData = @[YMLocalizedString(@"XPNobleCenterPayView2"),YMLocalizedString(@"XPNobleCenterWindow0")]; }else{ _listData = @[YMLocalizedString(@"XPNobleCenterPayView2")]; } diff --git a/YuMi/Tools/YYUtility/YYUtility+App.m b/YuMi/Tools/YYUtility/YYUtility+App.m index 7c5ac467..ef13d1e0 100644 --- a/YuMi/Tools/YYUtility/YYUtility+App.m +++ b/YuMi/Tools/YYUtility/YYUtility+App.m @@ -9,6 +9,7 @@ #import "YYUtility.h" #import //为判断网络制式的主要文件 #import //添加获取客户端运营商 支持 +#import "ClientConfig.h" @@ -33,8 +34,18 @@ } + (NSString *)appName { +#ifdef DEBUG + NSString *isProduction = [[NSUserDefaults standardUserDefaults]valueForKey:@"kIsProductionEnvironment"]; + if([isProduction isEqualToString:@"YES"]){ + return @"youmi"; + } + return @"molistar"; + +#else + return @"youmi"; +#endif + - return @"molistar"; @@ -110,27 +121,11 @@ static NSString *_from = nil; + (NSString *)getAppSource{ if (_from == nil) { - NSString *path = [[NSBundle mainBundle] pathForResource:@"sourceid.dat" ofType:nil]; - - NSError *error; - NSString *from = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error]; - - // 去除换行及空格 - if (from) { - from = [self removeSpaceAndNewline:from]; - } - // 如果读到有值且不为0 - if (!error - && ![from isEqualToString:@"0"] - && ![from isEqualToString:@""]) { - _from = from; - } else { if (isEnterprise == NO) { - _from = @"molistar_enterprise"; // 企业包 + _from = @"molistar_enterprise"; // 企业包 }else { - _from = PI_App_Source; //appstore App Store包 + _from = [ClientConfig shareConfig].isTF == YES ? PI_Test_Flight : PI_App_Source; // Test_Flight包或appstore App Store包 } - } } return _from;