• iOS 针对于13.0和暗黑模式出现的适配问题


    1,更新了Xcode11.0之后,在iOS13.0中presentViewController和之前弹出的样式不一样。

    恢复到之前样式的解决方案:(设置VC.modalPresentationStyle)

    viewcontroller *vc = [[viewcontroller alloc]init];

    vc.modalPresentationStyle = UIModalPresentationFullScreen;

     [weakSelf presentViewController:webView animated:YES completion:nil];

    2,友盟崩溃问题

    解决方案:更新最新的友盟SDK

    3,13.0暗黑模式来袭,如何先屏蔽13.0的暗黑模式

    解决方案:info文件中加入

    <key>UIUserInterfaceStyle</key>

    <string>Light</string>

    4,增加了蓝牙一直使用的权限请求

    解决方案:在info.plist里增加

    <key>NSBluetoothAlwaysUsageDescription</key>

    <string>我们想要一直使用您的蓝牙功能来使定位更准确</string> 
     
    5,UITextField的私有KVC- (void)setValue:(nullable id)value forKeyPath:(NSString *)keyPath 会导致崩溃问题(其他的控件KVC可能也会导致崩溃问题,目前还未发现,请谨慎使用)
    例如[_PhonetextField setValue:self.placeholdersColor forKeyPath:@"_placeholderLabel.textColor"];
    解决方案:NSMutableAttributedString *placeholderString = [[NSMutableAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName : self.placeholderColor}]; _textField.attributedPlaceholder = placeholderString;
     
    6,iOS 13.0获取deviceToken方法更改
    之前的获取方式:

    [[[[deviceToken description] stringByReplacingOccurrencesOfString: @"<" withString: @""]

                                     stringByReplacingOccurrencesOfString: @">" withString: @""]

                                    stringByReplacingOccurrencesOfString: @" " withString: @""]

     
    13.0后的获取方式:

    if (![deviceToken isKindOfClass:[NSData class]]) return;

            const unsigned *tokenBytes = [deviceToken bytes];

            NSString *deviceTokens = [NSString stringWithFormat:@"%08x%08x%08x%08x%08x%08x%08x%08x",

                                  ntohl(tokenBytes[0]), ntohl(tokenBytes[1]), ntohl(tokenBytes[2]),

                                  ntohl(tokenBytes[3]), ntohl(tokenBytes[4]), ntohl(tokenBytes[5]),

                                  ntohl(tokenBytes[6]), ntohl(tokenBytes[7])];

        NSLog(@"deviceTokens:_______________%@",deviceTokens);

    7,iOS 13.0暗黑模式运行后发现状态栏变为白色,设置[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault不起作用

    解决方案:首先可能是 info.plist

    <key>UIViewControllerBasedStatusBarAppearance</key>

    <false/>

    false换成true可以设置全局为黑色,但是如果部分界面需要用到白色的状态栏颜色,不能设置全局黑色,那么在最新的iOS13.0新增了状态栏颜色属性UIStatusBarStyleDarkContent

    在需要设置成黑色的控制器中加入iOS 13.0的判断

    -(void)viewWillAppear:(BOOL)animated{

        if (@available(iOS 13.0, *)) {

            [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDarkContent;

        } else {

            [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;

        }

    }

     8,在最新的iOS13.0后苹果强制加入了 Sign in with Apple(苹果登录),如果您的app中包含了其他的三方登录,那么这个苹果登录也需要加进去。

    9,iOS 13.0以后,苹果停止了对UIWebview的维护,将全面替换成WKWebview,app审核时会出现警告,但是可以继续使用,听说有的人因为UIWebView的问题审核被拒了,这个还有待更新。

    10,iOS13.0,Xcode11 项目中使用SJVideoPlayer三方播放器的发生崩溃问题,

    解决方案:替换三方库里面的一个.m文件

    点击SJAVMediaMainPresenter.m.zip下载。(问题及解决方案在下面的链接里面)

     https://github.com/changsanjiang/SJVideoPlayer/issues/153#issuecomment-534364750

    有其他的问题将持续更新!

  • 相关阅读:
    kafka 项目实战
    7.DHCP的相关命令
    3.centos 7执行service iptables save报错问题
    39.NFS(网络文件系统)
    37.Samba 文件共享服务1--配置共享资源
    36.Samba 文件共享服务1--安装及配置参数解释
    35.简单文件传输协议
    34.vsftpd服务程序--虚拟用户模式
    33.vsftpd服务程序--本地用户模式
    32.vsftpd服务程序--匿名开放模式
  • 原文地址:https://www.cnblogs.com/FZP5/p/11671241.html
Copyright © 2020-2023  润新知