Post

Replies

Boosts

Views

Activity

Camera preview is missing while using torch on web view
We have QR-scanner feature implemented on web view (WKWebView). If it's dark we want to light our QR-code using flashlight in iPhone. In general, this feature works, but without flashlight. But have that problems: If we turn on torch then camera preview disappears. If turn off torch then camera preview appears. Do you have any idea why it's so? And how can we sort it out? Thanks
2
0
1.6k
Oct ’23
An error occurred during persistent store migration (CoreData)
I added new model version and select it like default one. Then I added new attribute to existing entity in new model version. To test migration I installed previous version of app and add filled with all data in app. Then I install new changes and it work on simulator. If I move that build to TestFlight and test via real device then I get this error: Fatal error: ###persistentContainer: Failed to load persistent stores:Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={sourceURL=file:///private/var/mobile/Containers/Shared/AppGroup/DBB80C75-1B07-4318-8BA3-3F4FFC14FBD7/AppName.sqlite, reason=Cannot migrate store in-place: near "null": syntax error, destinationURL=file:///private/var/mobile/Containers/Shared/AppGroup/DBB80C75-1B07-4318-8BA3-3F4FFC14FBD7/AppName.sqlite, NSUnderlyingError=0x281958180 {Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={reason=near "null": syntax error, NSSQLiteErrorDomain=1, NSUnderlyingException=near "null": syntax error}}} I need to use CoreData for Widget's target as well. Code is here : final class CoreDataStack {     static let shared = CoreDataStack()     var context: NSManagedObjectContext { persistentContainer.viewContext }     var container: NSPersistentContainer { persistentContainer }     private let containerName = "AppName"     private var persistentContainer: NSPersistentContainer!     // MARK: - Setup     func setup() {         guard let storeURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "app_group")?.appendingPathComponent(containerName + ".sqlite") else {             fatalError("Error finding Model from File Manager")         }         let container = NSPersistentContainer(name: containerName)         let description = NSPersistentStoreDescription(url: storeURL)         description.type = NSSQLiteStoreType         description.shouldMigrateStoreAutomatically = true         description.shouldInferMappingModelAutomatically = true         container.persistentStoreDescriptions = [description]         container.viewContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy         container.viewContext.transactionAuthor = appTransactionAuthorName         container.viewContext.automaticallyMergesChangesFromParent = true         container.loadPersistentStores(completionHandler: { (_, error) in             if let error = error as NSError? {                 let crashlitycService: CrashlitycUseCase = CrashlitycService()                 crashlitycService.record(error: .errorForAnalytic(error), file: #file, function: #function, line: #line)                 fatalError("###\(#function): Failed to load persistent stores:\(error)")             }         })         self.persistentContainer = container     } } iOS 16.2 Xcode 14.1 Similar issues I found here, but without any success: https://stackoverflow.com/questions/58215343/an-error-occurring-during-core-data-persistent-store-migration-in-ios-13 https://stackoverflow.com/questions/51800871/ios-app-crashing-on-launch-screen-due-to-core-data-migration Please help me to figure out how can I do this migration?
1
0
1.9k
Feb ’23
Camera preview is missing while using torch on web view
We have QR-scanner feature implemented on web view (WKWebView). If it's dark we want to light our QR-code using flashlight in iPhone. In general, this feature works, but without flashlight. But have that problems: If we turn on torch then camera preview disappears. If turn off torch then camera preview appears. Do you have any idea why it's so? And how can we sort it out? Thanks
Replies
2
Boosts
0
Views
1.6k
Activity
Oct ’23
Package resolution failed. Couldn't get the list of tags
Can't add any dependency via SPM and always see this error (for example, SnapKit): Clean derived data, reset package caches, resolve package version, restart Xcode - not work. Xcode 12.5.1 and Xcode 13 - not work (this error above) Xcode 12.4 - crash Xcode But I can add dependency via cocoapods. Please help
Replies
1
Boosts
0
Views
5.3k
Activity
Oct ’21
An error occurred during persistent store migration (CoreData)
I added new model version and select it like default one. Then I added new attribute to existing entity in new model version. To test migration I installed previous version of app and add filled with all data in app. Then I install new changes and it work on simulator. If I move that build to TestFlight and test via real device then I get this error: Fatal error: ###persistentContainer: Failed to load persistent stores:Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={sourceURL=file:///private/var/mobile/Containers/Shared/AppGroup/DBB80C75-1B07-4318-8BA3-3F4FFC14FBD7/AppName.sqlite, reason=Cannot migrate store in-place: near "null": syntax error, destinationURL=file:///private/var/mobile/Containers/Shared/AppGroup/DBB80C75-1B07-4318-8BA3-3F4FFC14FBD7/AppName.sqlite, NSUnderlyingError=0x281958180 {Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={reason=near "null": syntax error, NSSQLiteErrorDomain=1, NSUnderlyingException=near "null": syntax error}}} I need to use CoreData for Widget's target as well. Code is here : final class CoreDataStack {     static let shared = CoreDataStack()     var context: NSManagedObjectContext { persistentContainer.viewContext }     var container: NSPersistentContainer { persistentContainer }     private let containerName = "AppName"     private var persistentContainer: NSPersistentContainer!     // MARK: - Setup     func setup() {         guard let storeURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "app_group")?.appendingPathComponent(containerName + ".sqlite") else {             fatalError("Error finding Model from File Manager")         }         let container = NSPersistentContainer(name: containerName)         let description = NSPersistentStoreDescription(url: storeURL)         description.type = NSSQLiteStoreType         description.shouldMigrateStoreAutomatically = true         description.shouldInferMappingModelAutomatically = true         container.persistentStoreDescriptions = [description]         container.viewContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy         container.viewContext.transactionAuthor = appTransactionAuthorName         container.viewContext.automaticallyMergesChangesFromParent = true         container.loadPersistentStores(completionHandler: { (_, error) in             if let error = error as NSError? {                 let crashlitycService: CrashlitycUseCase = CrashlitycService()                 crashlitycService.record(error: .errorForAnalytic(error), file: #file, function: #function, line: #line)                 fatalError("###\(#function): Failed to load persistent stores:\(error)")             }         })         self.persistentContainer = container     } } iOS 16.2 Xcode 14.1 Similar issues I found here, but without any success: https://stackoverflow.com/questions/58215343/an-error-occurring-during-core-data-persistent-store-migration-in-ios-13 https://stackoverflow.com/questions/51800871/ios-app-crashing-on-launch-screen-due-to-core-data-migration Please help me to figure out how can I do this migration?
Replies
1
Boosts
0
Views
1.9k
Activity
Feb ’23
Can iOS VPN app be published from individual account?
I've developed an VPN app using NEVPNManager API (IKEv2 protocol). Can I publish this app in AppStore from my developer account enrolled as an individual?
Replies
1
Boosts
0
Views
832
Activity
Mar ’24