I'm trying to play songs from Apple Music and it is failing with the following logs:
2019-09-26 00:15:57.790999+0200 [1886:463973] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
2019-09-26 00:15:57.791129+0200 [1886:463973] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
2019-09-26 00:15:57.792655+0200 [1886:464074] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
2019-09-26 00:15:57.792770+0200 [1886:464074] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
2019-09-26 00:15:57.794124+0200 [1886:464074] SSAccountStore: Unable to get the local account. error = Error Domain=SSErrorDomain Code=100 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}
2019-09-26 00:15:59.670842+0200 [1886:463973] [SDKPlayback] -[MPMusicPlayerController prependQueueDescriptor] completed id=applicationMusicPlayer error: Error Domain=MPCPlayerRequestErrorDomain Code=1 "No commands provided." UserInfo={NSDebugDescription=No commands provided.}
2019-09-26 00:15:59.671051+0200 [1886:463973] [SDKPlayback] -[MPMusicPlayerController prepareToPlay] completed id=applicationMusicPlayer error: Error Domain=MPMusicPlayerControllerErrorDomain Code=1 "prepareToPlay without a queue" UserInfo={NSDebugDescription=prepareToPlay without a queue}
2019-09-26 00:15:59.681627+0200 [1886:464074] [MediaRemote] MRC <MPCPlayerPath: route=<MPAVEndpointRoute: 0x282930a80 name=iPhone uid=LOCAL> origin=Nastasia's iPhone-1280262988 bundleID=com.apple.MediaPlayer.RemotePlayerService playerID=MPMusicPlayerApplicationController>: Undo optimistic state [failed] command=Play error=Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1)" UserInfo={NSDebugDescription=Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1), MPCPlayerErrorKeyMediaRemoteCommandHandlerStatus=1}
2019-09-26 00:15:59.681787+0200 [1886:464074] [SDKPlayback] -[MPMusicPlayerController play] completed id=applicationMusicPlayer error: Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0" UserInfo={NSDebugDescription=Failed to send command 0, NSUnderlyingError=0x281319230 {Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1)" UserInfo={NSDebugDescription=Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1), MPCPlayerErrorKeyMediaRemoteCommandHandlerStatus=1}}}
2019-09-26 00:16:03.596320+0200 [1886:464071] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
2019-09-26 00:16:03.596374+0200 [1886:464071] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
2019-09-26 00:16:03.597965+0200 1886:464051] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
2019-09-26 00:16:03.598079+0200 [1886:464051] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
2019-09-26 00:16:03.599416+0200 [1886:464074] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
2019-09-26 00:16:03.599456+0200 [1886:464074] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
2019-09-26 00:16:03.599542+0200 [1886:464074] SSAccountStore: Unable to get the local account. error = Error Domain=SSErrorDomain Code=100 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}
I also tried the official sample code project from Apple called Adding-Content-to-Apple-Music, and got similar results:
2019-09-25 23:20:37.268162+0200 [1738:432623] [RemoteControl] userIdentityForMediaRemoteOptions -❗️No user identity data. Using active account.
2019-09-25 23:20:37.333703+0200 [1738:432751] [SDKPlayback] -[MPMusicPlayerController prepareToPlayWithCompletionHandler:] completed id=applicationMusicPlayer error: Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 122" UserInfo={NSDebugDescription=Failed to send command 122, NSUnderlyingError=0x282eacff0 {Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 122 (MRMediaRemoteCommandHandlerStatus = 2)" UserInfo={NSDebugDescription=Failed to send command 122 (MRMediaRemoteCommandHandlerStatus = 2), MPCPlayerErrorKeyMediaRemoteCommandHandlerStatus=2}}}
2019-09-25 23:20:37.333721+0200 [1738:432562] [SDKPlayback] -[MPMusicPlayerController prepareToPlay] completed id=applicationMusicPlayer error: Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 122" UserInfo={NSDebugDescription=Failed to send command 122, NSUnderlyingError=0x282eacff0 {Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 122 (MRMediaRemoteCommandHandlerStatus = 2)" UserInfo={NSDebugDescription=Failed to send command 122 (MRMediaRemoteCommandHandlerStatus = 2), MPCPlayerErrorKeyMediaRemoteCommandHandlerStatus=2}}}
2019-09-25 23:20:37.337138+0200 [1738:432546] [MediaRemote] MRC <MPCPlayerPath: route=<MPAVEndpointRoute: 0x281498a80 name=iPhone uid=LOCAL> origin=Nastasia's iPhone-1280262988 bundleID=com.apple.MediaPlayer.RemotePlayerService playerID=MPMusicPlayerApplicationController>: Undo optimistic state [failed] command=Play error=Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1)" UserInfo={NSDebugDescription=Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1), MPCPlayerErrorKeyMediaRemoteCommandHandlerStatus=1}
2019-09-25 23:20:37.337529+0200 [1738:432562] [SDKPlayback] -[MPMusicPlayerController play] completed id=applicationMusicPlayer error: Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0" UserInfo={NSDebugDescription=Failed to send command 0, NSUnderlyingError=0x282ead260 {Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1)" UserInfo={NSDebugDescription=Failed to send command 0 (MRMediaRemoteCommandHandlerStatus = 1), MPCPlayerErrorKeyMediaRemoteCommandHandlerStatus=1}}}
2019-09-25 23:20:37.342424+0200 [1738:432623] [Middleware] INVALIDATE: 0x2813842d0: Invalidated before returning a response. Re-requesting items.
2019-09-25 23:20:38.144321+0200 [1738:432323] [SDKPlayback] Failed validators id=applicationMusicPlayer: {(
play
)}
2019-09-25 23:20:38.944291+0200 [1738:432323] [SDKPlayback] Failed to get a valid response. Resetting expectations id=applicationMusicPlayer
The issue is sometimes randomly fixed by playing around with apps, going to Apple Music app, playing something there, killing it, coming back, and so on...
If someone has experienced similar issues then please let me know how to fix it.
Happens on iOS 12 & 13, iPhone 6s and iPhone 11, Apple Music account is in 3 months trial currently. All the music capabilities are present, being able to successfully get the developer token and music user token, both work fine with Apple Music API requests.
Seems like one of the reasons can be that I use musicPlayerController.prepend() function instead of setQueue(). Unfortunately, I was forced to use prepend() because of music player limitations.
Here is a short description of what my app needs to do:
The user starts playing a list of songs.
During the playback the app fetches a new list of songs from backend every 5-10 seconds and sets it as the new song queue. That means it is quite dynamic by means of what plays next.
Now when it comes to setting a new queue during playback, setQueue() is really bad at it. If I just call setQueue() then nothing will happen, the old queue will stay. However, if I call play() or prepareToPlay() after setQueue() then current playback will be stopped and the first song of the new queue will start playing. That's not what I want, I need to change the queue "behind the scenes" so that when the user hits "skip to next" in the app or iOS lock screen, then the new songs are playing. That's why I used prepend() - it works just fine, the current playback is not interrupted. The alternative - calling perform() on applicationQueuePlayer crashes with message "it takes too long" - deleting the old queue of 30 songs manually item-by-item is not that optimal, I guess.
So currently I see only one option - manually store a state which will tell if this is the first run or not. If yes, then call setQueue(), otherwise call prepend(). There is also no way to get the current queue to check myself if it is empty or not.
And regarding play() - it comes out to be not as simple function, as it seems. As I already mentioned above, play() triggers the new queue playback if I ever called setQueue() before. It was bringing me more problems because when I was calling setQueue() without play(), it was not doing anything, however each time I pressed pause/play - the player was jumping to the next song thanks to the earlier "silent" setQueue(). I had to implement another workaround of calling player.currentPlaybackRate = 1 instead of player.play(), which doesn't look nice. It would be great, if all this was somehow documented.
Related
I have a workable CoreData app (local storage).
I would like to make it workable with iCloudKit.
After migrating from NSPersistentContainer to NSPersistentCloudKitContainer (CoreDataStack.swift, line 21), I was hoping I can achieve success in the following testing.
Launch the app
Write a CoreData record for the first time.
Hopefully the data will then quietly sync to iCloud from device.
Delete the app
Install and launch the app again
Hopefully the old data before uninstall will quietly sync from iCloud to device.
Able read the old data before uninstall
However, I get stuck in step 2. After several attempts, I am still getting the following iCloud related error.
Here's the complete error log.
CoreData: debug: CoreData+CloudKit: -[PFCloudKitOptionsValidator validateOptions:andStoreOptions:error:](36): Validating options: <NSCloudKitMirroringDelegateOptions: 0x600001c0d050> containerIdentifier:iCloud.com.yocto.xxx databaseScope:Private ckAssetThresholdBytes:<null> operationMemoryThresholdBytes:<null> useEncryptedStorage:NO useDeviceToDeviceEncryption:NO automaticallyDownloadFileBackedFutures:NO automaticallyScheduleImportAndExportOperations:YES skipCloudKitSetup:NO preserveLegacyRecordMetadataBehavior:NO useDaemon:YES apsConnectionMachServiceName:<null> containerProvider:<PFCloudKitContainerProvider: 0x600002c08770> storeMonitorProvider:<PFCloudKitStoreMonitorProvider: 0x600002c08730> metricsClient:<PFCloudKitMetricsClient: 0x600002c087d0> metadataPurger:<PFCloudKitMetadataPurger: 0x600002c08790> scheduler:<null> notificationListener:<null> containerOptions:<null> defaultOperationConfiguration:<null> progressProvider:<NSPersistentCloudKitContainer: 0x600003b00b00> test_useLegacySavePolicy:YES archivingUtilities:<PFCloudKitArchivingUtilities: 0x600002c08800>
storeOptions: {
NSInferMappingModelAutomaticallyOption = 1;
NSMigratePersistentStoresAutomaticallyOption = 1;
NSPersistentCloudKitContainerOptionsKey = "<NSPersistentCloudKitContainerOptions: 0x60000204f0f0>";
NSPersistentHistoryTrackingKey = 1;
NSPersistentStoreMirroringOptionsKey = {
NSPersistentStoreMirroringDelegateOptionKey = "<NSCloudKitMirroringDelegate: 0x600001504a90>";
};
}
CoreData: debug: CoreData+CloudKit: -[NSCloudKitMirroringDelegate observeChangesForStore:inPersistentStoreCoordinator:](385): <NSCloudKitMirroringDelegate: 0x600001504a90>: Observing store: <NSSQLCore: 0x131e151a0> (URL: file:///Users/yccheok/Library/Developer/CoreSimulator/Devices/F1F59F93-1800-4D43-AAE7-FD942D440B10/data/Containers/Data/Application/54000F75-F12A-4FF2-A2A1-545ACE41A367/Library/Application%20Support/xxx.sqlite)
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _setUpCloudKitIntegration](530): <NSCloudKitMirroringDelegate: 0x600001504a90>: Successfully enqueued setup request.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest](2928): <NSCloudKitMirroringDelegate: 0x600001504a90>: Checking for pending requests.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(2941): <NSCloudKitMirroringDelegate: 0x600001504a90>: Executing: <NSCloudKitMirroringDelegateSetupRequest: 0x600003b51180> 428D83F5-B1E4-4BC6-B411-A9D0583983F0
success write Optional("title 0"), Optional("body 0")
2022-04-10 21:40:58.519262+0800 xxx[2918:70575] [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1106): <NSCloudKitMirroringDelegate: 0x600001504a90>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x131e151a0> (URL: file:///Users/yccheok/Library/Developer/CoreSimulator/Devices/F1F59F93-1800-4D43-AAE7-FD942D440B10/data/Containers/Data/Application/54000F75-F12A-4FF2-A2A1-545ACE41A367/Library/Application%20Support/xxx.sqlite)
<CKError 0x6000020516e0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2; container ID = "iCloud.com.yocto.xxx"; partial errors: {
com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600002051b60: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 94EEBD82778D22EC; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2>
}>
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1106): <NSCloudKitMirroringDelegate: 0x600001504a90>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x131e151a0> (URL: file:///Users/yccheok/Library/Developer/CoreSimulator/Devices/F1F59F93-1800-4D43-AAE7-FD942D440B10/data/Containers/Data/Application/54000F75-F12A-4FF2-A2A1-545ACE41A367/Library/Application%20Support/xxx.sqlite)
<CKError 0x6000020516e0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2; container ID = "iCloud.com.yocto.xxx"; partial errors: {
com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600002051b60: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 94EEBD82778D22EC; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2>
}>
2022-04-10 21:40:58.519485+0800 xxx[2918:70575] [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2115): <NSCloudKitMirroringDelegate: 0x600001504a90> - Attempting recovery from error: <CKError 0x6000020516e0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2; container ID = "iCloud.com.yocto.xxx"; partial errors: {
com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600002051b60: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 94EEBD82778D22EC; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2>
}>
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2115): <NSCloudKitMirroringDelegate: 0x600001504a90> - Attempting recovery from error: <CKError 0x6000020516e0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2; container ID = "iCloud.com.yocto.xxx"; partial errors: {
com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600002051b60: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 94EEBD82778D22EC; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2>
}>
2022-04-10 21:40:58.528209+0800 xxx[2918:70575] [error] error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:]_block_invoke(2464): <NSCloudKitMirroringDelegate: 0x600001504a90>: Found unknown error as part of a partial failure: <CKError 0x600002051b60: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 94EEBD82778D22EC; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2; container ID = "iCloud.com.yocto.xxx">
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:]_block_invoke(2464): <NSCloudKitMirroringDelegate: 0x600001504a90>: Found unknown error as part of a partial failure: <CKError 0x600002051b60: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 94EEBD82778D22EC; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2; container ID = "iCloud.com.yocto.xxx">
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _finishedRequest:withResult:](2959): Finished request: <NSCloudKitMirroringDelegateSetupRequest: 0x600003b51180> 428D83F5-B1E4-4BC6-B411-A9D0583983F0 with result: <NSCloudKitMirroringResult: 0x600002e6db00> success: 0 madeChanges: 0 error: <CKError 0x6000020516e0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2; container ID = "iCloud.com.yocto.xxx"; partial errors: {
com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600002051b60: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 94EEBD82778D22EC; uuid = 340ED591-A422-4E70-8BC1-EC300A8C34C2>
}>
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest](2928): <NSCloudKitMirroringDelegate: 0x600001504a90>: Checking for pending requests.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(2944): <NSCloudKitMirroringDelegate: 0x600001504a90>: No more requests to execute.
The following error draws my attention
Invalid bundle ID for container
I step-by-step the check, to ensure I have done the thing correctly.
Xcode Target Settings
My app Bundle identifier is com.yocto.xxx
My iCloud container is iCloud.com.yocto.xxx
iCloudKit Console
I can see the container iCloud.com.yocto.xxx is created in iCloudKit console.
I am still do not see my own app schema yet. It is a simple entity called Todo with two columns - https://github.com/yccheok/xxx/blob/main/xxx/xxx.xcdatamodeld/xxx.xcdatamodel/contents
Sandbox tester account
I created a sandbox tester account from App Store Connect/ Users and Access.
I then use the sandbox tester account, to login from web to https://www.icloud.com/. Login doesn't have any issues.
Login to Simulator
Login to simulator doesn't have any issue
Minimal reproducible example
Here's the Xcode I use for this testing
https://github.com/yccheok/xxx
What went wrong in between, which causes me to keep getting Invalid bundle ID for container? What other steps could I try?
This is how I solve the issue.
I was referring to this answer - CloudKit - "Invalid bundle ID for container"
What I did wrong was
I deleted my app id from https://developer.apple.com/account/resources/identifiers/list
I rerun the app via Xcode, and expecting the app id will be created automatically. But it doesn't. The app id will not be automatically created even if I run the app from Xcode.
So, what I did right was:
I create a new project with a new app id, and using a new iCloud container id too.
I launch the app for the first time.
From https://developer.apple.com/account/resources/identifiers/list, I click on the app id as shown in the following screenshot.
I untick and tick the checkbox for iCloud, click Save button in the top right.
Now, I can observe the data is being saved to iCloud. I have verified by uninstalling the app, installing the app and performing read. There isn't any issue of reading the old data.
I'm trying to download a language translation model from Google MLKit. I can download the model successfully on the main iOS app, but when I try to download it on the keyboard extension app, I receive an error: "A server with the specified hostname could not be found."
testKeyboard[43687:3987699] [] networkd_settings_read_from_file Sandbox is preventing this process from reading networkd settings file at "/Library/Preferences/com.apple.networkd.plist", please add an exception.
testKeyboard[43542:3979636] [discovery] [d 6BF0C0BD-3B78-43CD-A23F-26023D59A4F3] <PKHost:0x283acc400> Failed discovery: Error Domain=PlugInKit Code=4 "Connection invalid" UserInfo={NSLocalizedDescription=Connection invalid}.
testKeyboard[43542:3979636] [xpc] XPC error sending request to pkd: Connection invalid
testKeyboard[43542:3979662] [] nw_resolver_can_use_dns_xpc_block_invoke Sandbox does not allow access to com.apple.dnssd.service
testKeyboard[43542:3979662] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:9 Err:-1 Errno:1 Operation not permitted
testKeyboard[43542:3979662] [connection] nw_resolver_create_dns_service_locked [C1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
testKeyboard[43542:3979662] Task <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1> HTTP load failed, 0/0 bytes (error code: -1003 [10:-72000])
testKeyboard[43542:3979662] Task <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x2821c14a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDownloadTask <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://redirector.gvt1.com/edgedl/translate/offline/v5/high/r24/en_es.zip, NSErrorFailingURLKey=https://redirector.gvt1.com/edgedl/translate/offline/v5/high/r24/en_es.zip, _kCFStreamErrorDomainKey=10}
error downloading Optional(Error Domain=com.google.mlkit Code=2 "Failed to download the model from the server." UserInfo={NSLocalizedDescription=Failed to download the model from the server.})
I'm using the same code to download the model according to Google's "Translate Text with MLKit on iOS" documentation in the KeyboardViewController's viewDidLoad() function:
let options = TranslatorOptions(sourceLanguage: .english, targetLanguage: .spanish)
self.translator = Translator.translator(options: options)
let conditions = ModelDownloadConditions(allowsCellularAccess: true, allowsBackgroundDownloading: true )
self.translator!.downloadModelIfNeeded(with: conditions) { error in
guard error == nil else {
print("error downloading", error)
return
}
print("Model downloaded successfully")
}
My Info.plist settings are such:
"RequestsOpenAccess" as 1
"App Transport Security Settings" > "Allow Arbitrary Loads" as YES
I don't understand what is going on here. Why am I able to download the ML Kit language model on the main app, but not on the keyboard extension? Any help appreciated.
The issue is with your project's Sandbox settings. Go to your project page / Signing & Capabilities / App Sandbox (Xcode 13.2) and then enable Outgoing Connections (Client) which will allow your app to make http calls.
After I executed 'xattr -cr path/to/your.app' command ,app got installed in simulator. but its crashing in the real device.
crash report:
error: Error Domain=BKSProcessErrorDomain Code=1
"Unable to bootstrap process with bundleID com.aq.FOGVERSION2"
UserInfo={
NSLocalizedDescription=Unable to bootstrap process with bundleID com.aq.FOGVERSION2,
BKSProcessExitReason=0,
NSLocalizedFailureReason=Failed to start job,
NSUnderlyingError=0x282299320
{Error Domain=NSPOSIXErrorDomain Code=3
"No such process"
UserInfo={NSLocalizedFailureReason=The process failed to exec, NSLocalizedRecoverySuggestion=Consult /var/log/com.apple.xpc.launchd/launchd.log
for more information, NSLocalizedDescription=Unable to get valid task name port right for pid 2019}},
`BSErrorCodeDescription`=bootstrap-failed}
can you help me to fix it?
I'm using the Apple MusicKit in my app. I had the authorization setup correctly and everything was working fine for a long time. Recently since the update to iOS 12 I'm seeing these errors
2018-12-02 19:16:46.511567-0500 Project2[30649:3022463] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
2018-12-02 19:16:46.512835-0500 Project2[30649:3022463] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
2018-12-02 19:16:46.518199-0500 Project2[30649:3022586] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
2018-12-02 19:16:46.518407-0500 Project2[30649:3022586] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
2018-12-02 19:16:46.524685-0500 Project2[30649:3022586] SSAccountStore: Unable to get the local account. error = Error Domain=SSErrorDomain Code=100 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}
Is anyone else facing the same issue? Is there some change that I'm supposed to make? Or redo the token? I see this asked on the apple developers forum with no response https://forums.developer.apple.com/thread/105635
When I do UI test with Jenkins,it failed with Error Domain=com.apple.platform.iphoneos Code=-1 "Could not locate installed application".
The detail log is :
Details: Install claimed to have succeeded, but application could not be found on device. bundleId = com.apple.test.iOS-3DTouchUITests-Runner
Object: <DVTiOSDevice: 0x7faafda80610>
Method: -installForMobileInstallWithSession:error:
Thread: <NSThread: 0x7faafd086dd0>{number = 9, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2017-01-19 19:35:38.382 xcodebuild[59624:934106] Error Domain=com.apple.platform.iphoneos Code=-1 "Could not locate installed application" UserInfo={NSLocalizedDescription=Could not locate installed application, NSLocalizedRecoverySuggestion=Install claimed to have succeeded, but application could not be found on device. bundleId = com.apple.test.iOS-3DTouchUITests-Runner}
2017-01-19 19:35:38.382 xcodebuild[59624:934106] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
Testing failed:
Test target iOS-3DTouchUITests encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **
But when I do the ui test directly with Xcode, everything is OK.
Anyone can help me with this ?