Post

Replies

Boosts

Views

Activity

Comment on How to load mp3 on Library Folder and play it.
I keep trying to find out the root of the problem. I read API on FileManager and find out FileManager.default.fileExists method. FileManager.default.fileExists(atPath: storedURL.absoluteString) And, I put the API after saveDataFile on above code and check the existence of the stored file on Library Directory. The result was false. So, data.write(to: url, options: .atomic ) did not return error but write may be failed... I'm checking if my usage on fileExists method is correct or not though..
Jul ’21
Comment on How to load mp3 on Library Folder and play it.
Ohhh, Audio has been played also on my environment! Thank you so much for your answer and more sophisticated code! Now I have realized the scope problem on asynchronous feature thanks to you. Your reply helped me a lot. And on "You have no need to copy the sound file each time onTapGesture", I've gotten that you mean. I will modify that later. Again, thank you so much!
Jul ’21
Comment on How to change thread or reference of NotificationCenter's handler when observing value change
Thank you for your help and making code sample. Maybe my information was not enough.. My code above was the code that be narrowed down to the problem area and focus on problem. Original code has other more codes and long and needs internal notification mechanism... Actually my original code does not have " generateNotification() call" and "generateNotification()"itself. generateNotification() exists as delegate method in original code. NotificationBasedCompletion class receive delegate event and because delegate needs to notify that it receive delegate event to the method that have notification center. So, I think that notification center needs to be used... Sorry for not providing enough info and thank you so much for your help :-)
Jul ’21
Comment on How to read a local value correctly both in Combine's sink scope and in the scope that Combine's sink was defined?
Hello, Mr. Claude31. Thank you for checking the post. That helps me. Answer is yes. localNum(defined in func childSink()) is increasing. So, localNum(in receiveValue) should be same value with localNum(defined in func childSink()). However not increasing at all. I expect localNum(in receiveValue) has same value as localNum(in func ChildSink()). Does that answer your question..? Best regards,
Aug ’21