Parse Returns Unauthorized Error - ios

I downloaded the Parse starter project for Swift, filled out the Parse.setApplicationId() method so it contained the App Id and the Master Key to the app I deployed through heroku, and when I ran it, I got the following errors:
2016-06-01 18:19:02.063 ParseStarterProject[66355:25475020] [Error]: unauthorized (Code: 100, Version: 1.7.5)
2016-06-01 18:19:02.064 ParseStarterProject[66355:25475023] [Error]: Failed to run command eventually with error: Error Domain=Parse Code=100 "unauthorized" UserInfo={code=100, originalError=Error Domain=NSURLErrorDomain Code=-1011 "(null)", temporary=0, error=unauthorized, NSLocalizedDescription=unauthorized}

You should use this code :
let configuration = ParseClientConfiguration {
$0.applicationId = kParseApplicationID
$0.clientKey = kParseClientKey
$0.server = kParseServerURL
$0.localDatastoreEnabled = true
}
Parse.initializeWithConfiguration(configuration)

Related

SwiftShield error when try to obfuscate code

I am trying to obfuscate my project using SwiftShield, but i am getting below error even if i try on SwiftShield demo project.
error response (Request Failed): error: unknown argument:
'-use-frontend-parseable-output' Error: Error
Domain=com.rockbruno.swiftshield Code=0 "error response (Request
Failed): error: unknown argument: '-use-frontend-parseable-output'"
UserInfo={NSLocalizedDescription=error response (Request Failed):
error: unknown argument: '-use-frontend-parseable-output'} make: ***
[swiftshield] Error 1
Please helps me how to resolve it, i am wondering that it is very popular library even if no any tutorial or any more answers found on google about it.
Thanks.

ImagePicker: Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"

I'm new to this but, I'm getting this error at the Image Picker and I'm stuck:
Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"
PHPhotoLibrary.requestAuthorization gives me "authorized", so it seems no permission problem and I have the asset .Album being returned, but I can't load the images...

MPMusicPlayerController fails to play from Apple Music

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.

Apple MusicKit Authorization errors with iOS 12 update

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

DropBox ios SDK error: (403) Parameter not found: oauth_token

I use DropBox iOS SDK to synchronise update files of my application and load Metadata. I have an Error when i execute the project that is:
Error loading metadata: Error Domain=dropbox.com Code=403 "The
operation couldn’t be completed. (dropbox.com error 403.)"
UserInfo=0x8a845d0 {path=/, error=Parameter not found: oauth_token}
error making request to /1/metadata/sandbox - (403) Parameter not
found: oauth_token
How can i install and enable oauth extension ?

Resources