Was really excited to find Warren Moore's sample project using Metal and Swift, but when I try to run it on my device (5s, 8.2, XCode 6.2), I get an error saying that the Info.plist [...] specifies device capability requirements, which are not met by Davis's iPhone.
As far as I can tell, the only relevant Keys in the plist are:
Required device capabilities: armv7, metal
Application requires iPhone environment: YES
I have to assume that armv7 means armv7 or later, in which case, the 5s should qualify. And anyway at WWDC they kept saying it would work on A7, which was introduced on the 5s.
What I've tried:
I removed the requirements (felt like a bad idea), after which I get fatal error: unexpectedly found nil while unwrapping an Optional value. A little digging around shows that MTLCreateSystemDefaultDevice() is returning nil.
This lead me to a similar question where the solution was to update iOS, but both Xcode and iOS are up to date.
Related
On iOS 16 beta, the following code is crashing:
AVSpeechSynthesisVoice(language: "en-US")!
with the following error code:
Fatal error: Unexpectedly found nil while unwrapping an Optional value
It worked fine before and I'm not seeing any API change.
Does anyone know what could be going on?
I believe you are experiencing this in the simulator, but not on actual devices - correct? The reason is that for iOS 16, the devices in the Xcode simulator do not come with any built-in voices, whereas they always used to.
As a result, AVSpeechSynthesisVoice.speechVoices() returns [], and AVSpeechSynthesisVoice(language: "en-US") returns nil.
To solve this, simply download one or more voices to the simulated device you are compiling to. To do that, on the device go to Settings > Accessibility > Spoken Content > Voices > English, select a voice, and download it.
It seems like Apple missed to add voice libraries to iOS 16 betas. Below code returns nil.
AVSpeechSynthesisVoice.speechVoices()
Which should return the list of available voices. I filed a bug, you should also.
Since my latest update of Xcode, I get repeatedly the following log in my Coredata based app:
[logging] flag(s) 0x00000020 are reserved for VFS use and do not affect behaviour when passed to sqlite3_open_v2
Is this simply log noise or is it in any way relevant to me?
Update:
This happens under Xcode 13.2.1 on an iPhone with iOS 15.4. It does not happen on a Simulator with iOS 15.2.
I'm pretty sure this is something you can ignore, that will probably be fixed when iOS 15.4 is out of beta.
According to the SQLite file-open flag documentation,
Flag value 0x00000020 is SQLITE_OPEN_AUTOPROXY, for what that's worth
This flag is one of several flags that "...have historically been ignored by sqlite3_open_v2()", however...
"...future versions of SQLite might change so that an error is raised if any of the disallowed bits are passed into sqlite3_open_v2()"
What this seems to say is that the flag has no effect and hasn't had one for a while, so it doesn't matter if Core Data is using it internally. The message probably means that iOS 15.4 has a newer version of SQLite which has started to print warnings about it but hasn't started causing errors yet.
I'd expect this to be fixed when 15.4 is released, and in the meantime I encourage you to file a bug with Apple just in case.
Recently updated to iOS 12.1 (from 12.0), Xcode 10.1 (from 10.0) and seeing a flood of error messages in the Xcode console when debugging on my physical device like the following:
[NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x28051d700, domain=1, instance=1>
I get a couple of these logs every couple seconds, the only thing that changes is the hex value for the CTServiceDescriptor. There have been no code changes so I have to assume its related to the iOS or Xcode updates.
As far as I can tell it doesn't appear to have any performance impact, the app is operating as expected and my phone is working (its even updating its signal strength!). I've been unable to find anything helpful/relevant across Stack Overflow, Google, or the Apple Developer forums though I made a similar post to the latter that I'll link here once the post is approved.
Any suggestions/insight into how I could troubleshoot this further or resolve would be greatly appreciated. Thanks!
It seems to be a side-effect of calling [CTTelephonyNetworkInfo new]; under newer versions of iOS and can be safely ignored, I think. I'm not sure there's anything app developers can do to fix this, it appears to be a side-effect that signalStrength inside CTTelephonyNetworkInfo is hidden from public apps in recent versions of iOS (9+). This is nothing new, but it's noisier about the permissions error here under iOS 12.1 (maybe other versions?).
CTTelephonyNetworkInfo appears to be a hastily-revised API, for public use at least: For example, it had bugs in v12 when returning carrier info that was fixed in v12.1. why do serviceSubscriberCellularProviders return nil? (in iOS 12)
I'm also reminded of the extraneous permissions errors that appear frequently in macOS console logs - https://eclecticlight.co/2016/09/23/sierras-console-promising-but-incomplete/ - or the Xcode 8 bug where in an early beta the Simulator was extremely noisy. Sometimes the internal chatter slips out to an external release, and there's not much anyone outside Apple can do about it...
Background
I have a fairly detailed (around 2000 lines of swift code) automation framework built with Xcode 7.3 and Swift for our iOS app.
Up till a recent point, I was able to use lldb to build my framework i.e
insert breakpoint and run code up till that point
use po XCUIApplication().debugDescription and expr bla bla to build the logic
repeat
Problem
Pretty much all of a sudden, I now encounter the following error whenever running anything inside lldb's console:
(lldb) po XCUIApplication()
error: <EXPR>:2:1: error: 'XCUIApplication' is only available on iOS 9.0 or newer
XCUIApplication()
^
<EXPR>:2:1: note: add 'if #available' version check
XCUIApplication()
^
<EXPR>:2:1: note: add #available attribute to enclosing instance method
XCUIApplication()
^
<EXPR>:2:1: note: add #available attribute to enclosing extension
XCUIApplication()
^
<EXPR>:10:9: warning: initialization of variable '$__lldb_error_result' was never used; consider replacing with assignment to '_' or removing it
var $__lldb_error_result = __lldb_tmp_error
~~~~^~~~~~~~~~~~~~~~~~~~
Notes
Googling and research has not gotten me anywhere significant.
The one relevant thread I found was in the fastlane project. Unlike that comment, mine is a UI Test target.
Also, the test target's "iOS Deployment Target" is set to iOS 9.2 (in case that helps).
To the extent I remember, I haven't changed anything significantly in recent times.
My device is (and has always been) iOS 9+.
What could be going wrong?
Update 20 May 2016
Some exploration based on the answer below: https://stackoverflow.com/a/37335950/682912
The issue happens only on real devices. Simulators do not face this problem.
On real device (iPhone 6S+, iOS 9.2.1), I did a full reset of Content and Settings. This did not fix the issue.
This is a bug in the debug agent installed on your device. These are bound to the iOS version, so it probably happened when you upgraded your device. Anyway, please file a bug with http://bugreporter.apple.com.
If I'm right about the problem, it should only happen when debugging to the device, not on the simulator. That might allow you a temporary workaround till the bug gets fixed.
Double check your .xcconfig with your test target or any other means that may set your IPHONEOS_DEPLOYMENT_TARGET to lower than 9.0.
Since UITest is only available on iOS9.0 or later, change IPHONEOS_DEPLOYMENT_TARGET to 9.0+ should fix the issue.
I've been getting reports of my app crashing on load in iOS 6. It's built with the iOS 8 SDK and works fine on 7 & 8.
I've just managed to get hold of an iOS 6 device to test and it does in fact crash on launch with the error:
dyld: Symbol not found: _UITransitionContextFromViewControllerKey
Referenced from:
/var/mobile/Applications/895BC1B3-A362-42C9-8560-5CF40A682A10/myapp.app/MyApp
Expected in: /System/Library/Frameworks/UIKit.framework/UIKit in
/var/mobile/Applications/895BC1B3-A362-42C9-8560-5CF40A682A10/myapp.app/MyApp
I understand that dyld is a linker problem, but have no idea where to start with this.
I've unlinked and re-added UIKit, but still doesn't work.
Thanks
This is because UITransitionContextFromViewControllerKey doesn't exist until iOS 7. Working around this probably isn't worth the effort--it means dropping all usage of UIViewControllerContextTransitioning, as the protocol is new in iOS 7, or creating a separate code path for iOS 6. If that's what you want, look into weak-linking UIKit, although this may result in slow startup.
Look like your using UIViewControllerContextTransitioning. It's available only on iOS 7+.
See this question for more details Restore pre-iOS7 UINavigationController pushViewController animation