摘要:iOS/OS 12中的第三方登录中断!
我们有一个适用于多个网站的通用登录.这在Windows,macOS和iOS上的Firefox,Chrome和Safari中运行良好.但是对于iOS 12和macOS 12,似乎cookie不再从auth0登录窗口工作到我们的登录API.
它不仅在Safari中停止工作,而且在iOS 12上也在Chrome和Firefox中停止工作(它仍适用于Mac OS 12上的Chrome).我怀疑这与智能跟踪预防2.0有关,但我很难找到许多技术细节.
我们的登录流程如下:
我在启动时使用以下内容:
services.AddAuthentication(options => {
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
})
.AddCookie(options =>
{
options.Cookie.Path = "/";
options.SlidingExpiration = false;
})
.AddOpenIdConnect("Auth0", options => {
// Set the authority to your Auth0 domain
options.Authority = $"https://{Configuration["Auth0:Domain"]}";
// Configure the Auth0 Client ID and Client Secret
options.ClientId = Configuration["Auth0:ClientId"];
options.ClientSecret = Configuration["Auth0:ClientSecret"];
// Set response type to code
options.ResponseType = "code";
// Configure the scope …Run Code Online (Sandbox Code Playgroud) 由于某些原因,在使用 Xcode 10 beta 时,我无法正确显示 tableview 单元格内集合中的某些项目。在过去的四天里我尝试了我所知道的一切。
我做了一个小项目样本来看看我的问题是什么。
如果有人想在本地运行它,完整的代码在这里: https: //github.com/adrianstanciu24/CollectionViewInsideUITableViewCell
我首先添加一个带有 2 个不同的可调整大小的单元格的表格视图,第一个单元格具有集合视图和标签:
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
tableView.estimatedRowHeight = 44
tableView.rowHeight = UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "collCell") as! CollectionTableViewCell
cell.collectionView.collectionViewLayout.invalidateLayout()
return …Run Code Online (Sandbox Code Playgroud) 我正在尝试为iOS 12测试我的应用程序.我有一个仅适用于iPad的应用程序在Xcode 9下工作正常.当我尝试使用Xcode 10 GM为模拟器编译它时,会出现以下警告:
URGENT: building for iOS Simulator simulator, but linking against dylib (/usr/lib/libstdc++.6.0.9.dylib) built for macOS. Note: This will be an error in the future
Run Code Online (Sandbox Code Playgroud)
它将构建,但在运行时崩溃时会显示以下消息:
dyld: lazy symbol binding failed: can't resolve symbol ___cxa_guard_acquire in /Users/.... /.... xxx.app because dependent dylib #1 could not be loaded.
Run Code Online (Sandbox Code Playgroud)
我没有做任何事情,它发生在第一次尝试.
有任何想法吗?
我有这些错误:
Cocoa.h File Not Found (in GPUImageView.h)
Unknown Type Name: **NSOpenGLContext, CVOpenGLESTextureCacheRef (GPUImageContext)
现在,我试图解决所有这些错误,但最终使事情变得更糟.
我知道OpenGL ES在iOS 12中已被弃用,但据我了解弃用,它应该仍然有效,对吧?
对于错误#1,我不明白MAC OS框架(cocoa.h)在这里做了什么(一些引用没有被#IFDEF MAC_OS语句包围).
至于错误#2,这些类型是在AppKit框架内定义的(也是MAC_OS框架,而不是iOS框架).
我考虑过切换到GPUImage2,但它的工作量很大,因为它不像交换框架那么容易,我会有很多代码要重写.我也看到Brad Larson(这个框架背后的半神)已经开始研究GPUImage3,它将使用Metal而不是OpenGL ES,但它仍在进行中,但它不会是从GPUImage v1到GPUImage的简单交换V3.
我在iOS 11中成功实现了AutoFill存储的用户名和密码建议
.我的登录视图控制器中有两个文本字段,一个用于电子邮件,一个用于密码.内容类型定义如下:

电子邮件/用户名文本字段配置

密码文本字段配置
这曾经在iOS 11中运行得很好,但在将我的开发iPad升级到iOS 12之后,该应用建议用户名字段的电子邮件,并在编辑密码字段时发生以下情况:

在我的创建帐户视图控制器中,我有3个文本字段:电子邮件,密码,重复密码.他们的内容模式设置如下:
minlength:8;minlength:8;编辑电子邮件地址字段时,它会正确建议电子邮件地址.但是,对于密码和重复密码字段,它建议存储密码,而不是建议新密码.
new password,并且创建帐户密码字段设置为password
none为登录和创建帐户字段,以便AutoFill可以尝试自动处理它
知道我需要更改什么,以便存储的用户名和密码建议再次在iOS 12中工作?
谢谢!
根据下面@kralex的要求,这是故事板中登录视图控制器的视图层次结构:

......并在设备上:

我对黑色背景的状态栏中的内容有轻度要求,但是某些屏幕需要白色背景的黑色状态栏内容,因此我在info.plist中将基于View控制器的状态栏外观保持为YES,以采用状态栏。基于视图控制器要求的样式。
我的问题是,每当我从任何视图控制器中显示SFSafariViewController时,默认情况下它将获取黑色状态栏内容和白色背景,即每次状态栏样式均为.default。
我尝试覆盖SFSafariViewController子类中的preferredStatusBarStyle,到目前为止没有外观。
下面是我的代码
import UIKit
import SafariServices
extension SFSafariViewController {
override open var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
}
extension UINavigationController {
open override var preferredStatusBarStyle: UIStatusBarStyle {
return topViewController?.preferredStatusBarStyle ?? .lightContent
}
}
class MyViewController: UIViewController, SFSafariViewControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
self.navigationController?.navigationBar.barTintColor = UIColor.lightGray
}
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
@IBAction func presentSafari(sender: AnyObject) {
let safari = SFSafariViewController(url: URL(string: "https://www.google.com/")!)
safari.delegate = self …Run Code Online (Sandbox Code Playgroud) 我在iOS 12的Safari的iframe中显示的Bootstrap 4.1模态出现问题,所有其他经过测试的浏览器均按预期运行(甚至在iOS 11上也使用Safari)。该问题似乎特定于iOS 12。
我创建了一个最小的示例来演示此问题。前两个按钮的功能似乎与预期的一样,但是后四个按钮可以看到此问题,向下移动时每个按钮的状况都会更糟,当您尝试滚动或聚焦于其中的某个元素时,最后一个按钮会一起消失模态(请参见以下屏幕截图):
我将注意到,我们正在以某种非常规的方式处理此功能,因为与其让iframe的内容滚动,我们还通过message事件处理程序在父级和子级之间传递消息来调整iframe的内容高度和postMessage:https : //developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
这是我怀疑某处发生错误的地方(但尚未能够对其进行跟踪(如前所述)仅在运行版本12的ios设备上是一个问题)。
最近发现,此问题不是iOS 12上的Safari特有的,而是chrome。
下面的代码来自先前的最小示例链接:
父级(/modal-test/index.html):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Title</title>
<link rel="stylesheet" href="./bootstrap.min.css">
<script src="./jquery.min.js"></script>
<script src="./popper.min.js"></script>
<script src="./bootstrap.min.js"></script>
<script>
$(document).ready(function(){
$ifCon = $("#ifCon");
window.addEventListener("message", function(event){
if(event.data.method === "returnWindowSize"){
$ifCon.height(event.data.content);
}
}, false);
});
</script>
<style>
#ifCon {
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
background-color: #F2F2F2;
overflow: hidden;
border-radius:10px;
border:1px solid grey;
margin-left:auto; …Run Code Online (Sandbox Code Playgroud) 我的企业应用程序工作正常,直到iOS 11.昨天,我将其中一个设备更新到iOS 12并测试了该应用程序.它在发布时崩溃了.调试时我发现它在Simulator上工作正常,但在调用main之前就崩溃了.
Incident Identifier: 34B04574-6BD3-4A5F-A352-244841532EAE
CrashReporter Key: 8a642341ed3bb03fe6ac849ed5857efe31b26830
Hardware Model: iPod7,1
Process: MyApp [1822]
Path: /private/var/containers/Bundle/Application/7E7F1946-60D5-4354-B1B6-C981FEE8F82B/MyApp.app/MyApp
Identifier: #########
Version: 18.8 (18.8)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: #########
Date/Time: 2018-09-25 12:33:25.6270 -0400
Launch Time: 2018-09-25 12:33:25.5276 -0400
OS Version: iPhone OS 12.0 (16A366)
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x822bc15100000002
VM Region Info: 0x822bc15100000002 is not in any region. Bytes after previous region: 9379803191291412483
REGION …Run Code Online (Sandbox Code Playgroud) 我正在尝试将 2 个文件发送到我的 Apple Watch 应用。它最初有效,但现在我在控制台中打印了 2 个错误。
WCSession.default.transferFile(fileURL1, metadata: ["name":"first"])
WCSession.default.transferFile(fileURL2, metadata: ["name":"second")
Run Code Online (Sandbox Code Playgroud)
谁在打印错误 - 是我 iPhone 上的测试应用程序吗?
我可以按顺序传输 2 个文件,还是有限制 - 我需要等待第一个传输完成吗?
2018-11-18 11:05:53.010374-0500 SimpleWatchConnectivity[836:23347] [WC] -[WCFileStorage enumerateFileTransferResultsWithBlock:] 无法在路径 /var/mobile/Containers/Data/Application/C07047D9-87F7-4CBD 加载文件数据-AE79-AAE26D93A400/库/应用程序支持/com.apple.watchconnectivity/46CAD076-37A8-4B60-A93E-F0F21F457593/文件传输/D9E589D8-E21B-4A34-9A29-8D6B53E997D5/文件传输结果
该文档使文件看起来像是已排队,因此我不确定导致错误的原因:
/** 系统会将文件入队并在适当的时候将其传输到对应的应用程序。发送应用程序退出后,文件传输将继续。如果文件成功到达,对应的应用程序将在下次启动时收到委托回调。元数据字典只能接受属性列表类型。*/
在 ios12 中,表情符号显示完美,但我更新了 Xcode,在 iOS 13 中,所有表情符号都变成灰色,请帮助我如何解决此问题。
在我写的代码中, //显示弹出窗口
let otherAlert = UIAlertController(title: "Souhaites-tu supprimer cette notification ?", message: "", preferredStyle: UIAlertController.Style.actionSheet)
Run Code Online (Sandbox Code Playgroud)