Post

Replies

Boosts

Views

Activity

Is there a recommended approach to safeguarding against audio recording losses via app crash?
AVAudioRecorder leaves a completely useless chunk of file if a crash happens while recording. I need to be able to recover. I'm thinking of streaming the recording to disk. I know that is possible with AVAudioEngine but I also know that API is a headache that will lead to unexpected crashes unless you're lucky and the person who built it. Does Apple have a recommended strategy for failsafe audio recordings? I'm thinking of chunking recordings using many instances of AVAudioRecorder and then stitching those chunks together.
1
0
233
Oct ’24
Xcode previews fail with JIT error
== PREVIEW UPDATE ERROR: JITError ================================== | NoBuiltTargetDescriptionCouldBeFound | | translationUnit: PreviewTranslationUnit(moduleNamePrefix: "Previews_EmptyFeedRow", sourceIdentifier: file:///Users/bryananderson/Developer/JournalApp/JournalApp/Interface/Feed/EmptyFeedRow.swift -> EmptyFeedRow.swift, parseTree: ParseTree(version: 727, statements: 3, providers: 1), update: nil, changesContextMemoizer: PreviewsPipeline.PreviewTranslationUnit.(unknown context at $34b4b9c4c).ChangesContextMemoizer(parseTree: ParseTree(version: 727, statements: 3, providers: 1), sourceIdentifier: file:///Users/bryananderson/Developer/JournalApp/JournalApp/Interface/Feed/EmptyFeedRow.swift -> EmptyFeedRow.swift, cachedValue: os.OSAllocatedUnfairLock<Swift.Optional<PreviewsModel.ParseTree.PreviewChangesContext>>(__lock: Swift.ManagedBuffer<Swift.Optional<PreviewsModel.ParseTree.PreviewChangesContext>, __C.os_unfair_lock_s>)), registryDeclarationMemoizer: PreviewsPipeline.PreviewTranslationUnit.(unknown context at $34b4b9bec).RegistryDeclarationMemoizer) | | builtTargetDescriptions: | == VERSION INFO: Tools: 16A5171c OS: 24A5264n PID: 906 Model: MacBook Pro Arch: arm64e == ENVIRONMENT: openFiles = [ /Users/bryananderson/Developer/JournalApp/JournalApp/Interface/Feed/EmptyFeedRow.swift ] wantsNewBuildSystem = true newBuildSystemAvailable = true activeScheme = JournalApp activeRunDestination = iPhone 15 Pro variant iphonesimulator arm64 workspaceArena = [x] buildArena = [x] buildableEntries = [ Remember.app ] runMode = JIT Executor == SELECTED RUN DESTINATION: name = iPhone 15 Pro eligible = true sdk = Optional(<DVTSDK:0x13870da30:'iphonesimulator18.0':Simulator - iOS 18.0:<DVTFilePath:0x600001e8c700:'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk'>>) variant = Optional("iphonesimulator") device = Optional(<DVTiPhoneSimulator: 0x32f00d290> { SimDevice: iPhone 15 Pro (CF3C85BC-F559-4437-9072-7F30153B399B, iOS 18.0, Booted) PairedSim: <DVTiPhoneSimulator: 0x33733d150> { SimDevice: Apple Watch Series 9 (45mm) (627CE93E-EB02-4200-BE40-3DCB5C91DB44, watchOS 11.0, Shutdown) } }) == SELECTED RUN DESTINATION: Simulator - iOS 18.0 | iphonesimulator | arm64 | iPhone 15 Pro | Apple Watch Series 9 (45mm) jit enabled: true fallback to dynamic replacement: false
12
5
1.4k
Jun ’24
Best way to share large CoreData model with extensions?
I have a large model. Not just large in complexity but literally there are gigabytes in the average user db. I want to enable saving data to this model from app extensions. However, I do not want to duplicate code or model setup. Is it recommended that I migrate to using a shared group model? How do you migrate existing stores to using shared containers? Or are there better ways to do it? For example, should I create a brand new store that uses a shared container? What are best practices?
1
0
416
Jun ’24
Cannot preview visionOS apps because of Packages that do not support visionOS
https://developer.apple.com/forums/thread/731732 Possibly linked to the above issue The app compiles just fine, but SwiftUI Previews cannot build if there any any packages that lack support for visionOS I made sure that filters were enabled so that the package is only linked to iOS In a project that literally NEVER imports or uses an iOS only package, it fails completely == PREVIEW UPDATE ERROR: SchemeBuildError: Failed to build the scheme ”VisionHelloWorld” 'tracks(withMediaType:)' is unavailable in visionOS Compile LightCompressor.swift (arm64): /Users/bryananderson/Library/Developer/Xcode/DerivedData/VisionHelloWorld-dviwzruidaouzeeafminiifghzfe/SourcePackages/checkouts/LightCompressor_iOS/Sources/LightCompressor/LightCompressor.swift:123:47: error: 'tracks(withMediaType:)' is unavailable in visionOS guard let videoTrack = videoAsset.tracks(withMediaType: AVMediaType.video).first else { ^~~~~~ AVFoundation.AVAsset:17:15: note: 'tracks(withMediaType:)' has been explicitly marked unavailable here open func tracks(withMediaType mediaType: AVMediaType) -> [AVAssetTrack]
2
0
805
Jan ’24
I installed the TestFlight version of my app and apparently that nuked CoreData + CloudKit. Help me understand this
Okay so I have a CloudKit backed CoreData model. I've been building in development for several months. I have a lot of data stored in the app on the development CloudKit. Then I installed the TestFlight version on that device. It is now missing a lot of data that used to be on that device. And it won't sync with my other apps. I assume this is because of the production vs development thing.. But even when I install the app via Xcode, syncing is broken. Its not updating and I'm just getting this error: I'm really worried about this and am totally reliant on CloudKit working. But now such simple thing broke syncing and I'm not sure how to get it back up and running CoreData: debug: CoreData+CloudKit: -[PFCloudKitSerializer applyUpdatedRecords:deletedRecordIDs:toStore:inManagedObjectContext:onlyUpdatingAttributes:andRelationships:madeChanges:error:]_block_invoke(1021): Failed to find matching objectIDs for <CKRecordID: 0x2823541c0; recordName=BFE5B0E0-E4BC-4151-B64F-771AF271DE6C, zoneID=com.apple.coredata.cloudkit.zone:defaultOwner> / <CKRecordID: 0x2823542c0; recordName=B342EDDF-8F2A-4496-B5AB-BEF29AF4018C, zoneID=com.apple.coredata.cloudkit.zone:defaultOwner> in pending relationship: 0x9eebd60aabec84c2 x-coredata://1DE90E1A-C7CF-4963-B10F-60142BFFCFD7/NSCKImportPendingRelationship/p11489
1
0
1.6k
Apr ’23
Xcode 14.0 Beta 5 doesn't allow uploads to AppStoreConnect.. again. Its happens every year on the 5th beta
Unsupported Xcode or SDK Version. Your app was built with a version of Xcode or SDK that is not yet supported for upload to App Store Connect. For more information about supported versions of Xcode and SDK for Testflight or App Store submissions, view the App Store Connect What's New page (https://developer.apple.com/app-store-connect/whats-new/). (ID: 0e108b7e-0cc1-413e-99ad-8b081656a52c) How lovely.
3
1
1.3k
Aug ’22
Did they forget to let us put widgets on the iPad home screen too?
Seems like they might have missed this. . . But you can’t put widgets on an ipad home screen. No functionality has been added to widgets on iPad, except their new look. You can’t drag widgets in with apps the way you would OBVIOUSLY want or expect to be able to do now that iOS can. This is a prime example of why I was actually nervous about iPad and iOS being separated. They’ll just totally develop features for one devices and not do it for the other.
2
0
925
Jun ’20