1.广告权限提示,需要在viewDidLoad调用授权,不然弹不出来。
Guideline 2.1 - Information Needed

We’re looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 15.0.1.

Since you indicated in App Store Connect that you collect data in order to track the user, we need to confirm that App Tracking Transparency has been correctly implemented.

Next Steps

Please explain where we can find the App Tracking Transparency permission request in your app. The request should appear before any data is collected that could be used to track the user.

If your app does not track users, please update your app privacy information in App Store Connect. You must have the Account Holder or Admin role to update app privacy information.

If you’ve implemented App Tracking Transparency but the permission request is not appearing on devices running the latest OS, please review the available documentation and confirm App Tracking Transparency has been correctly implemented.

Resources

  • Tracking is linking data collected from your app with third-party data for advertising purposes, or sharing the collected data with a data broker. Learn more about tracking.
  • See Frequently Asked Questions about the new requirements for apps that track users.
  • Review developer documentation for App Tracking Transparency.
    if (@available(iOS 15, *)) {
    [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
    }];
    }
    这个新加的 到viewDidLoad里面去调用
    2.后台持续定位就是不使用定位时第一安装也弹出定位授权提示框。
    指南 2.5.4 - 性能 - 软件要求

您的应用在 Info.plist 文件的 UIBackgroundModes 键中声明支持位置,但没有任何需要持久位置的功能。在 Info.plist 文件的 UIBackgroundModes 键中声明支持位置的应用程序必须具有需要持久位置的功能。

后续步骤

要解决此问题,请修改您的应用以包含需要在应用处于后台时持续使用实时位置更新的功能。

如果您的应用不需要持续实时位置更新,请从 UIBackgroundModes 键中删除“位置”设置。如果您的应用功能不需要持续实时位置更新,您可能希望使用显着变化位置服务或区域监控位置服务。

资源

有关更多信息,请查看启动显着变化位置服务和监控地理区域。
解决方案:去除持续定位配置只保留使用期间定位或增加后台持续定位的页面。
3.UICollectionReusableView不注册UICollectionElementKindSectionFooter,foot复用UICollectionElementKindSectionHeader闪退。

- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{if (indexPath.row == 0 && [kind isEqualToString:UICollectionElementKindSectionHeader]){if (self.collectionHeadView){return self.collectionHeadView;}UICollectionReusableView *headView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeaderwithReuseIdentifier:@"collectionHeadView" forIndexPath:indexPath];self.collectionHeadView = headView;
//        UIView *footViewPanel = [[UIView alloc] initWithFrame:CGRectMake(0, 0, FULL_WIDTH, 105)];
//        footViewPanel.backgroundColor = [UIColor clearColor];[headView addSubview:self.selectTypeHeadView];return headView;}else{if (self.lineFootView){return self.lineFootView;}UICollectionReusableView *lineFootView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeaderwithReuseIdentifier:@"lineFootView" forIndexPath:indexPath];self.lineFootView = lineFootView;UIView *lineFootViewPanel = [[UIView alloc] initWithFrame:CGRectMake(0, 0, FULL_WIDTH, BG_1PX)];lineFootViewPanel.backgroundColor = [UIColor clearColor];[lineFootView addSubview:lineFootViewPanel];return lineFootView;}
}

解决方案注册UICollectionElementKindSectionFooter,使用正确的UICollectionElementKindSectionFooter。

- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{if (indexPath.row == 0 && [kind isEqualToString:UICollectionElementKindSectionHeader]){if (self.collectionHeadView){return self.collectionHeadView;}UICollectionReusableView *headView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeaderwithReuseIdentifier:@"collectionHeadView" forIndexPath:indexPath];self.collectionHeadView = headView;
//        UIView *footViewPanel = [[UIView alloc] initWithFrame:CGRectMake(0, 0, FULL_WIDTH, 105)];
//        footViewPanel.backgroundColor = [UIColor clearColor];[headView addSubview:self.selectTypeHeadView];return headView;}else{if (self.lineFootView){return self.lineFootView;}UICollectionReusableView *lineFootView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooterwithReuseIdentifier:@"lineFootView" forIndexPath:indexPath];self.lineFootView = lineFootView;UIView *lineFootViewPanel = [[UIView alloc] initWithFrame:CGRectMake(0, 0, FULL_WIDTH, BG_1PX)];lineFootViewPanel.backgroundColor = [UIColor clearColor];[lineFootView addSubview:lineFootViewPanel];return lineFootView;}
}
[_collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"lineFootView"];

闪退日志:

2021-11-11 13:40:13.711962+0800 光予露家长端[55011:3110902] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the view returned from -collectionView:viewForSupplementaryElementOfKind:atIndexPath: does not match the element kind it is being used for. When asked for a view of element kind 'UICollectionElementKindSectionFooter' the data source dequeued a view registered for the element kind 'UICollectionElementKindSectionHeader'.'
*** First throw call stack:
(0x181d5b05c 0x19a275f54 0x18361c99c 0x184326c6c 0x184393844 0x1842e73c4 0x1842f9c6c 0x185a53280 0x185a45aa8 0x185a5a0b0 0x185a63174 0x184308d90 0x1842d8940 0x1842ddc68 0x181d7d030 0x181d8dcf0 0x181cc7ff8 0x181ccd804 0x181ce13c8 0x19d4f238c 0x184687060 0x184404b8c 0x10544d8d0 0x106699a24)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the view returned from -collectionView:viewForSupplementaryElementOfKind:atIndexPath: does not match the element kind it is being used for. When asked for a view of element kind 'UICollectionElementKindSectionFooter' the data source dequeued a view registered for the element kind 'UICollectionElementKindSectionHeader'.'
terminating with uncaught exception of type NSException

5.UIView不生成对象设置颜色闪退。

有问题的代码:

- (instancetype)initWithFrame:(CGRect)frame underlineColor:(UIColor *)underlineColor TitleArr:(NSMutableArray *)titleArr textColor:(UIColor *)textColor selectTextColor:(UIColor *)selectTextColor
{self.backgroundColor = [UIColor clearColor];self = [super initWithFrame:frame];if (self){[self initSubPanelWithTitleArr:titleArr underlineColor:underlineColor textColor:textColor selectTextColor:selectTextColor];}return self;
}

修改后的代码:

- (instancetype)initWithFrame:(CGRect)frame underlineColor:(UIColor *)underlineColor TitleArr:(NSMutableArray *)titleArr textColor:(UIColor *)textColor selectTextColor:(UIColor *)selectTextColor
{self = [super initWithFrame:frame];if (self){[self initSubPanelWithTitleArr:titleArr underlineColor:underlineColor textColor:textColor selectTextColor:selectTextColor];self.backgroundColor = [UIColor clearColor];}return self;
}

闪退日志:

2021-11-11 13:36:59.511303+0800 光予露家长端[54977:3108685] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIView is missing its initial trait collection populated during initialization. This is a serious bug, likely caused by accessing properties or methods on the view before calling a UIView initializer. View: <BGCommonScrollToolPanel: 0x1070592e0; frame = (0 0; 0 0); transform = [0, 0, 0, 0, 0, 0]; anchorPoint = (0, 0); alpha = 0; opaque = NO; layer = (null)>'
*** First throw call stack:
(0x181d5b05c 0x19a275f54 0x18361cb04 0x1853fbf54 0x1842d35f0 0x1845fca9c 0x10545b95c 0x105336b44 0x18431fbdc 0x185227b30 0x1842e0008 0x18457f814 0x1844c5608 0x18441b334 0x1842e963c 0x1842f9c6c 0x185a53280 0x185a45aa8 0x185a5a0b0 0x185a63174 0x185a45210 0x181d03570 0x181cd2854 0x181ccd8ec 0x181ce13c8 0x19d4f238c 0x184687060 0x184404b8c 0x1053518d0 0x106655a24)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIView is missing its initial trait collection populated during initialization. This is a serious bug, likely caused by accessing properties or methods on the view before calling a UIView initializer. View: <BGCommonScrollToolPanel: 0x1070592e0; frame = (0 0; 0 0); transform = [0, 0, 0, 0, 0, 0]; anchorPoint = (0, 0); alpha = 0; opaque = NO; layer = (null)>'

6.iOS 15 的 UITableView section header多22像素问题
iOS 15 的 UITableView又新增了一个新属性:sectionHeaderTopPadding 会给每一个section header 增加一个默认高度,当我们 使用 UITableViewStylePlain 初始化 UITableView的时候,就会发现,系统给section header增高了22像素。
解决办法:

if (@available(iOS 15.0, *)) {tableView.sectionHeaderTopPadding = 0;
}

7.The file “xxx.entitlements” could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target “xxxxxx” and build configuration “debug” is correct and that the file exists on disk. (in target “xxxxxx”)

解决方法:
1、百度很多教程都是说证书配合问题,只需要在capability中的推送开关, 关闭然后在打开就好了;

但是我遇到的问题中,修改了项目名和类名后,在capability中的推送的扩展Push Notifications不见了,在点击 +Capability 按钮去添加Push Notifications模块时,居然双击添加后,居然添加不上,不知道是不是Xcode(version - 11.3.1)的问题,最终自己通过下面的方法解决问题。

2、打开项目,选择target中对应的项目target, 选择 Build Setting,在搜索中输入 enti 简写,然后找到 Signing 下的 Code Signing Entitlements 中的xxx/xxx.entitlements 修改成你app的名称,如:xxx/app名称.entitlements, 重新编译就可以了;或者你直接删掉 Signing 下的 Code Signing Entitlements 中的xxx/xxx.entitlements,然后重新编译也可以。

iOS15适配问题:viewForSupplementaryElementOfKind表头和表尾复用闪退,UITableView section header多22像素等问题相关推荐

  1. 广义表的表头和表尾是什么?

    广义表((a,b),c,d)表头和表尾分别是什么? 亲们,大部分同学碰到广义表就痛不欲生,其实我想说的是:世上那么多一点都不懂广义表的人都活得那么开心,你还有啥过不过去的. 请看我的公式: (1)表头 ...

  2. 广义表((a,b),c,d)表头和表尾分别是什么?

    广义表((a,b),c,d)表头和表尾分别是什么? 当广义表LS非空时,称第一个元素为LS的表头:称广义表LS中除去表头后其余元素组成的广义表为LS的表尾.例如,广义表(a, (b))的表头是单元素a ...

  3. 打印设置自定义表尾_教大家Excel2013表格中如何打印固定的表头和表尾

    近日有关于Excel2013表格中如何打印固定的表头和表尾的问题受到了很多网友们的关注,大多数网友都想要知道Excel2013表格中如何打印固定的表头和表尾的具体情况,那么关于到Excel2013表格 ...

  4. 广义表的定义,特性,及表头和表尾怎么看?

    广义表的定义 广义表简称表,它是线性表的推广.一个广义表是n(n≥0)个元素的一个序列,若n=0时则称为空表.设ai为广义表的第i个元素,则广义表GL的一般表示与线性表相同: GL=(a1,a2,-, ...

  5. 打印设置自定义表尾_打印excel工作表时,如何把表头和表尾一起打印到每一页上?-excle怎样设置表尾打印...

    打印excel表格,怎么设置使每页都有表头和表尾 一.表头设置 1.点击excle工具栏的"页面布局"选项,选择"打印"按钮,进行页面设置: 2.点击" ...

  6. JSP表格模板升级(4)-- 表头和表尾固定的表格模板

    上文<JSP表格模板升级(3)--可变列数的表格模板>已经完成了一个功能几近完善的表格模板,直接可以用于大部分二维表格的显示需求.本文中我们将改变表格底层的实现,将table标签替换为更加 ...

  7. 打印设置自定义表尾_Excel2013打印时怎么固定表头及表尾让打印后的每页都可以看得到...

    Excel2013打印时怎么固定表头及表尾让打印后的每页都可以看得到 时间:2013-10-25   作者:snow   来源:互联网 在打印表格的过程中,想必大家会遇到这样的问题,就是当表格特别大时 ...

  8. Excel2013打印时怎么固定表头及表尾让打印后的每页都可以看得到

    在打印表格的过程中,想必大家会遇到这样的问题,就是当表格特别大时,而且只有首页有表头,其他页都没有,这样就算打印出来也不利于查看,因为并不是每一页都有表头.有什么方法可以将表头固定起来,在打印之后每页 ...

  9. h5 每页打印固定表头以及表尾 解决表头过长打印分页表头不固定问题

    该解决方法不一定每个都适用 在此做个记录 由于需要的固定表头过长 所以分页时表头就不会固定 h5打印固定表头应该是有个高度限制 html代码 由于我是用的vue框架 所以就不说明{{}}之类的意思了 ...

最新文章

  1. netapp学习(十三)---Snapshot基础知识(上)
  2. 【EventBus】发布-订阅模式 ( Android 中使用 发布-订阅模式 进行通信 )
  3. 如何测量接收机到卫星的距离
  4. SEO三种职位类型:编辑型SEO、技术型SEO、营销型SEO详解
  5. client高性能组件化框架React简单介绍、特点、环境搭建及经常使用语法
  6. 响应式设计的真正挑战:RSS
  7. 机器学习 | 梯度下降原理及Python实现
  8. 5.过滤器作为模板——模板匹配、Matlab模板匹配实战_2
  9. 裁员消息满天飞,我们整理了一份真实名单
  10. 基于JAVA+SpringBoot+Mybatis+MYSQL的足球联赛管理系统
  11. 微信机器人开发SDK使用教程--删除朋友圈
  12. 继承ActionSupport类
  13. lnmp一键安装包 安装php-fpm,为LNMP一键安装包下PHP编译安装fileinfo扩展
  14. java等额本息、等额本金计算 记录一下
  15. 垃圾分类催生创业公司
  16. 反双曲余弦函数之C#设计笔记(五)
  17. QTableWidget 合并单元格
  18. 利用VScode 编写C51/stm32代码
  19. 河北pc104计算机,便携PC104军用全加固计算机 ZHK-RC212
  20. 使用Typora设置图片自动上传至gitee仓库

热门文章

  1. 8位测试大神给测试开发者的一剂强心剂!走近一次测试开发大会···
  2. 山东专利申请需要准备的材料有哪些
  3. python怎么输出字符串中特定位置的字符?
  4. 秋月之谋:5.19黄金原油冲高回落,价格修正开始
  5. RTMP流媒体协议互联网直播/点播平台EasyDSS如何使用 ReverseProxy 中断 flv 流达到自动停播的效果?
  6. 牛客竞赛语法入门班顺序结构习题(重现赛)
  7. c语言中的头文件string.h的作用,C语言常用头文件及库函数——string.h
  8. Verilog语法规则
  9. 易企秀上传图片不成功!提示非法图片,问题解决!
  10. 从“微生物组”到“微生物群系”: microbiome 译名变化背后应是研究思路与手段的彻底变革...