When calling NLTagger.requestAssets
with some languages, it hangs indefinitely both in the simulator and a device. This happens consistently for some languages like greek. An example call is NLTagger.requestAssets(for: .greek, tagScheme: .lemma)
. Other languages like french return immediately. I captured some logs from Console and found what looks like the repeated attempts to download the asset. I would expect the call to eventually terminate, either loading the asset or failing with an error.
Hello,
We recommend the error handling described in documentation for requestAssets(for:tagScheme:completionHandler:) i.e. use the completion handler to determine whether your request was successful and keep in mind that the request may not succeed and/or may make take a noteworthy amount of time to complete.
"Use this method to ask the Natural Language framework to load any missing assets for that tag scheme. This method returns immediately but the framework may need time to complete the request. When the framework completes the request, it notifies your app with the completionHandler you provided to the method. In your completion handler, use the result parameter to check whether the tag scheme is now available.
The Natural Language framework may call your completionHandler immediately if it knows the state of the tag scheme’s assets or if it experiences an error."
If you continue to encounter errors in requests that you would expect to succeed or requests that don't fail in a reasonable amount of time then please provide use with details in a bug report using the Feedback Assistant. Console logs are welcome.