当我在 Xcode 15 Beta 3 上构建 iOS 项目时,我收到以下构建警告:
Duplicate -rpath '/usr/lib/swift' ignored
Duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
Duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
Run Code Online (Sandbox Code Playgroud)
在 Xcode 14 上我没有得到它们,所以我猜它与新的 Xcode 15 链接器有关。
有谁知道它是否可以/应该修复以及如何修复?
谢谢
我在Stack Overflow上看到过类似的问题,但它们并没有帮助。
我使用Xcode 11和iOS 13 SDK构建了该应用程序。问题是,即使我的应用程序支持iOS 10+,并且只有约50%的iOS 12用户,我都只能在iOS 13+上获得所有这些崩溃。另外,我无法调试或复制它。
从此信息中我推断出该问题必须特定于iOS13。最近有人遇到过同一问题吗?可能的原因,解决方法?
这是Crashlytics的堆栈跟踪:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1c25e1c30 __exceptionPreprocess
1 libobjc.A.dylib 0x1c22fc0c8 objc_exception_throw
2 CoreFoundation 0x1c24d13ac -[NSCache init]
3 UIKitCore 0x1c6b189a8 -[UIView(Internal) _addSubview:positioned:relativeTo:]
4 UIKitCore 0x1c6078bb4 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_2
5 UIKitCore 0x1c6b11f60 +[UIView(Animation) performWithoutAnimation:]
6 UIKitCore 0x1c6078630 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke
7 UIKitCore 0x1c6b1784c +[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:forScene:]
8 UIKitCore 0x1c6078088 -[_UINavigationParallaxTransition animateTransition:]
9 UIKitCore 0x1c606e2b0 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2
10 UIKitCore 0x1c61822f8 +[UIInputResponderController _pinInputViewsForInputResponderController:onBehalfOfResponder:duringBlock:]
11 UIKitCore 0x1c606e238 ___UIViewControllerTransitioningRunCustomTransition_block_invoke.648
12 UIKitCore 0x1c6b11c0c +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:]
13 UIKitCore 0x1c606e088 _UIViewControllerTransitioningRunCustomTransition
14 …Run Code Online (Sandbox Code Playgroud) 我application: didFinishLaunching像这样初始化 Google Cast SDK:
let criteria = GCKDiscoveryCriteria(applicationID: kGCKDefaultMediaReceiverApplicationID)
let options = GCKCastOptions(discoveryCriteria: criteria)
GCKCastContext.setSharedInstanceWith(options)
Run Code Online (Sandbox Code Playgroud)
我尝试将视频内容流式传输到默认媒体接收器并且它有效。
但我需要能够更改kGCKDefaultMediaReceiverApplicationID 为自定义接收器应用程序 ID,以将不同的内容发送到我通过 Google Cast SDK 开发者控制台注册的自定义接收器应用程序。我无法重新启动应用程序来指定不同的应用程序 ID。
有没有什么方法可以在应用程序中的某个时刻在GCKCastContext.setSharedInstanceWith(options)调用后动态地执行此操作?
此方法的调用仅有效一次,我无法更新 GCKDiscoveryCriteria:GCKCastContext.setSharedInstanceWith(options)
我使用“google-cast-sdk-no-bluetooth”,版本:4.5.3
在Android SDK中有一个方法可以动态更改接收器应用程序ID:https://developers.google.com/android/reference/com/google/android/gms/cast/framework/CastContext#public-void- setreceiverapplicationid-字符串-applicationid
不幸的是,我在 iOS SDK 中没有看到类似的东西:(
我唯一发现的是这个(在 GCKSessionManager 内):
/**
* Sets the default session options for the given device category.The session options are passed to
* the GCKDeviceProvider::createSessionForDevice:sessionID:sessionOptions: method when the user
* selects a device from the Cast dialog. For Cast …Run Code Online (Sandbox Code Playgroud) 通过使用Objective C,我使用NSPredicate过滤年份数组,
下面是代码。
yearArray = [yearArray filteredArrayUsingPredicate:[NSPredicate
predicateWithFormat:@"SELF != ''"]];
Run Code Online (Sandbox Code Playgroud)
根据上面的代码,它在 Objective c 中工作正常,我必须在Swift 3中过滤数组,
什么是输入年份数组:-
( Year,"","","",JAN,"","","",FEB,"","","",MAR,"","","",APR,"","","",
MAY,"","","",JUN,"","","",JUL,"","","",AUG,"","","",SEP,"","","",OCT
,"","","", NOV,"","","",DEC,"","","","",WIN,"","","",SPR,"","","",SUM
,"","","",AUT,"","","","",ANN)
Run Code Online (Sandbox Code Playgroud)
需要过滤器输出数组
(Year,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC,WIN,SPR,SUM,AUT,ANN)
Run Code Online (Sandbox Code Playgroud)
请给出如何快速过滤数组的解决方案。