Post

Replies

Boosts

Views

Activity

Question on manual Core Data migration by the code
Hi, I currently experiment migration by the code. Just for understand what happened under the hood. It's OK for attributes. But not for relationships. Here is my code: let property = NSPropertyMapping() property.name = "list" property.valueExpression = NSExpression(format: """ FUNCTION($manager, "destinationInstancesForEntityMappingNamed:sourceInstances:" , "ItemV1ToItemV2", $source.list) """) item.relationshipMappings = [property] Thank you for your help 😁
1
0
524
Aug ’20
Use `AVSpeechSynthesizer` with `MPRemoteCommandCenter`
Hi, I need to use AVSpeechSynthesizer to read a text to my user. User will control reading with AirPods, so I need to use MPRemoteCommandCenter. For now, I need to prepare my audio files using AVSpeechSynthesizer.write(_:toBufferCallback:) the create a playlist and read it using AVQueuePlayer. It works. But preparing audio files take time. I prefer to use AVSpeechSynthesizer.speak(_:) directly in background mode, and activate it via MPRemoteCommandCenter commands. Is this possible? Or perhaps any workaround? Thank you!
1
0
1k
Feb ’21