Posts

Post marked as solved
3 Replies
0 Views
Thanks to 'sbooth' on StackOverflow for the answer, I was missing .baseAddress on the mData: argument: var floats: [Float] = ... // this comes from somewhere else try floats.withUnsafeMutableBufferPointer { bytes in let audioBuffer = AudioBuffer(mNumberChannels: 1, mDataByteSize: UInt32(bytes.count * MemoryLayout<Float>.size), mData: bytes.baseAddress) var bufferList = AudioBufferList(mNumberBuffers: 1, mBuffers: audioBuffer) let outputAudioBuffer = AVAudioPCMBuffer(pcmFormat: buffer.format, bufferListNoCopy: &bufferList)! try self.renderedAudioFile?.write(from: outputAudioBuffer) }
Post marked as solved
3 Replies
0 Views
Unfortunately that doesn't work either: Cannot convert value of type 'UnsafeBufferPointer<Float>' to expected argument type 'UnsafeMutableRawPointer?' (where bytes is passed in to the AudioBuffer constructor.)
Post not yet marked as solved
52 Replies
0 Views
Spotlight indexing hasn't stopped on my M1 machine for almost a month and a half, it's using something like 70% of two or three cores, continuously. Originally I thought it was the 11.6 update that did it but now I'm pretty sure it's this bug. I reported it in FB9639588 and linked back here. Still no movement on the bug.
Post not yet marked as solved
8 Replies
0 Views
For others having this problem a simple way to delete that key from Xcode's preferences plist without deleting the whole thing or hand-editing is to use PlistBuddy: /usr/libexec/PlistBuddy -c "Delete :IDESourceControlKnownSSHHostsDefaultsKey" ~/Library/Preferences/com.apple.dt.Xcode.plist
Post not yet marked as solved
8 Replies
0 Views
It seems like I have this problem—everything had been fine until I rebooted after updating to Big Sur 11.2.1 this morning—but the supplied solution doesn't fix it. After rebooting should I first git fetch in one of my repos (which has the side-effect of adding the ssh key to the ssh agent, visible when I ssh-add -l) or not?
Post marked as solved
1 Replies
0 Views
I've fixed it—the problem was my materials .contents were CALayers, and if you do that .flattenedClone() does nothing. Setting my contents to a UIImage and then calling .flattenedClone() does decrease my draw call count and gets me ~60fps.
Post not yet marked as solved
6 Replies
0 Views
No, nothing aside from the withNormalizedOffset trick alluded to above. Dupe rdar://25650889 (it has a sample project attached.)
Post marked as solved
3 Replies
0 Views
For future reference; the above *used* to work in Xcode 8/iOS 10, now we've found this works in Xcode 9/iOS 11:func testExample() { let result = app.naviagationBars["My Favourites"].firstMatch.waitForExistence(timeout: 10) XCTAssert(result) }Spot the difference*!(* "staticTexts" is no longer allowed. I've updated the radar, I don't know if this counts as a regression or not.)
Post not yet marked as solved
5 Replies
0 Views
Getting this too (including another assertion failure in this log output, maybe it's relevant):2017-10-05 14:46:18.837773+0200 FlashlightUITests-Runner[980:1157829] Running tests... 2017-10-05 14:46:19.828570+0200 FlashlightUITests-Runner[980:1157829] Continuing to run tests in the background with task ID 1 Test Suite 'All tests' started at 2017-10-05 14:46:19.912 Test Suite 'FlashlightUITests.xctest' started at 2017-10-05 14:46:19.913 Test Suite 'DashboardUITests' started at 2017-10-05 14:46:19.913 Test Case '-[FlashlightUITests.DashboardUITests testDashboardDisplaysValuesFromXXXXXXXX]' started. t = 0.00s Start Test at 2017-10-05 14:46:19.914 t = 0.17s Set Up t = 0.19s Open com.xxxxxxxx.Flashlight t = 0.34s Launch com.xxxxxxxx.Flashlight writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/z9/6hbzfm7s5jv4k6cl6k06zmbm0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/3355435a13029f4f09b0f386081f976e/2452e1bfb283cbebaf53dd2b36a8cd6a60ed516e/ManifestCache.plist t = 5.67s Wait for com.xxxxxxxx.Flashlight to idle t = 6.06s Unable to monitor animations t = 6.06s Unable to monitor event loop t = 7.10s Tap "gettingStartedButton" Button t = 7.10s Wait for com.xxxxxxxx.Flashlight to idle t = 7.28s Assertion Failure: &lt;unknown&gt;:0: com.xxxxxxxx.Flashlight crashed in &lt;external symbol&gt; 2017-10-05 14:46:27.414729+0200 FlashlightUITests-Runner[980:1157829] *** Assertion failure in -[XCActivityRecord _synchronized_ensureValid], /Library/Caches/com.apple.xbs/Sources/XCTest_iOS/XCTest-13201/Sources/XCTestFramework/Activities/XCActivityRecord.m:354 t = 7.50s Tear Down t = 7.51s Assertion Failure: &lt;unknown&gt;:0: failed: caught "NSInternalInconsistencyException", "Activity cannot be used after its scope has completed." ( 0 CoreFoundation 0x0000000183662ff8 &lt;redacted&gt; + 148 1 libobjc.A.dylib 0x00000001820c4538 objc_exception_throw + 56 2 CoreFoundation 0x0000000183662eb4 &lt;redacted&gt; + 0 3 Foundation 0x00000001840fb760 &lt;redacted&gt; + 112 4 XCTest 0x000000010015049c -[XCActivityRecord _synchronized_ensureValid] + 160 5 XCTest 0x000000010014ff14 -[XCActivityRecord _synchronized_addAttachment:] + 44 6 XCTest 0x00000001001500c8 -[XCActivityRecord addAttachment:] + 44 7 XCTest 0x000000010013d050 -[XCActivityRecord(UITesting) attachAutomaticScreenshot] + 248 8 XCTest 0x0000000100157050 __67-[XCUIApplicationProcess waitForQuiescenceIncludingAnimationsIdle:]_block_invoke + 96 9 XCTest 0x000000010018e258 -[XCTContext _runActivityNamed:type:block:] + 204 10 XCTest 0x0000000100156fdc -[XCUIApplicationProcess waitForQuiescenceIncludingAnimationsIdle:] + 176 11 XCTest 0x00000001001a69ec __63-[XCUIElement(XCUIElementEventSynthesis) _dispatchEvent:block:]_block_invoke + 64 12 XCTest 0x000000010018e258 -[XCTContext _runActivityNamed:type:block:] + 204 13 XCTest 0x00000001001a692c -[XCUIElement(XCUIElementEventSynthesis) _dispatchEvent:block:] + 272 14 XCTest 0x00000001001a8544 -[XCUIElement(XCUIElementTouchEvents) tap] + 124 15 FlashlightUITests 0x0000000102271028 _T0So10XCTestCaseC17FlashlightUITestsE15connectXXXXXXXXySo15XCUIApplicationC3app_Sb6isFaketF + 404 16 FlashlightUITests 0x000000010227244c _T0So10XCTestCaseC17FlashlightUITestsE15connectXXXXXXXXySo15XCUIApplicationC3app_Sb6isFaketFTo + 92 17 FlashlightUITests 0x000000010226d8dc _T017FlashlightUITests09DashboardB0C04testC26DisplaysValuesFromXXXXXXXXyyF + 224 18 FlashlightUITests 0x000000010226e134 _T017FlashlightUITests09DashboardB0C04testC26DisplaysValuesFromXXXXXXXXyyFTo + 40 19 CoreFoundation 0x0000000183668e80 &lt;redacted&gt; + 144 20 CoreFoundation 0x000000018355e2c4 &lt;redacted&gt; + 292 21 XCTest 0x00000001001440a8 __24-[XCTestCase invokeTest]_block_invoke.275 + 48 22 XCTest 0x0000000100190f08 -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] + 56 23 XCTest 0x0000000100143e58 __24-[XCTestCase invokeTest]_block_invoke + 680 24 XCTest 0x0000000100189780 -[XCUITestContext performInScope:] + 208 25 XCTest 0x0000000100143ba0 -[XCTestCase invokeTest] + 136 26 XCTest 0x0000000100144c78 __26-[XCTestCase performTest:]_block_invoke.382 + 48 27 XCTest 0x000000010018e778 +[XCTContext runInContextForTestCase:block:] + 164 28 XCTest 0x0000000100144674 -[XCTestCase performTest:] + 596 29 XCTest 0x0000000100140868 __27-[XCTestSuite performTest:]_block_invoke + 288 30 XCTest 0x0000000100140290 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 44 31 XCTest 0x00000001001404a0 -[XCTestSuite performTest:] + 236 32 XCTest 0x0000000100140868 __27-[XCTestSuite performTest:]_block_invoke + 288 33 XCTest 0x0000000100140290 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 44 34 XCTest 0x00000001001404a0 -[XCTestSuite performTest:] + 236 35 XCTest 0x0000000100140868 __27-[XCTestSuite performTest:]_block_invoke + 288 36 XCTest 0x0000000100140290 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 44 37 XCTest 0x00000001001404a0 -[XCTestSuite performTest:] + 236 38 XCTest 0x0000000100197f5c __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 44 39 XCTest 0x00000001001533e8 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 420 40 XCTest 0x0000000100197dd8 -[XCTTestRunSession runTestsAndReturnError:] + 292 41 XCTest 0x000000010012fed0 -[XCTestDriver runTestsAndReturnError:] + 312 42 XCTest 0x000000010018d920 _XCTestMain + 620 43 CoreFoundation 0x000000018361130c &lt;redacted&gt; + 20 44 CoreFoundation 0x0000000183610b28 &lt;redacted&gt; + 288 45 CoreFoundation 0x000000018360e998 &lt;redacted&gt; + 728 46 CoreFoundation 0x000000018353eda4 CFRunLoopRunSpecific + 424 47 GraphicsServices 0x0000000184fa9074 GSEventRunModal + 100 48 UIKit 0x00000001897f9c9c UIApplicationMain + 208 49 FlashlightUITests-Runner 0x0000000100080430 FlashlightUITests-Runner + 33840 50 libdyld.dylib 0x000000018254d59c &lt;redacted&gt; + 4
Post marked as solved
3 Replies
0 Views
Well, I've just knocked up a fresh, simple project and it seems that asserting the text of a title in a nav bar simply doesn't work. Vis, this: func testExample() { let result = app.navigationBars.staticTexts["My Favourites"].firstMatch.waitForExistence(timeout: 10) XCTAssert(result) }... fails. wat? Has anybody else seen this behaviour? Am I doing something boneheaded?
Post marked as solved
3 Replies
0 Views
Radar'd as 34708605(Also see rdar://34708531 in which XCUITest craps out with an assertion error on an SFSafariViewController before even getting to the point of dismissing it.)