How to send image request in CloudSight API in iOS? - ios

I am submitting static image from bundle but I am getting this error:
Here is my code Can anyone notice my problem?

Related

react-native-text-detector worked fine in android but why it always returned false in iOS?

First, I used https://github.com/jeanpan/react-native-camera-roll-picker#readme to get an image from photo library, it returned a uri: ph://11A68DD6-A651-462D-BDAB-68FB853ED141/L0/001
Then, I used https://github.com/zsajjad/react-native-text-detector to get text from that image
It worked fine in android but it always returned false in iOS, and I found the following error in console log
NSURLConnection finished with error - code -1002
For more information, the image control can show that image correctly
Here is my source code : https://github.com/haison8x/react-native-test-ocr
Is there any problem with that URI or with application permission?
Due to the sandbox policy of Apple https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html, your app cannot read the photo in gallery directly, it will encounter the error: NSURLConnection finished with error - code -1002.
Here is my approach:
Use RNFS.copyAssetsFileIOS copy photo to temp file at your app documents
Use react-native-text-detector to analyze that temp file
The full example is pushed to https://github.com/haison8x/react-native-test-ocr

Uploading media to twitter fails

I am using upload media through twitter API
https://upload.twitter.com/1.1/media/upload.json
it’s showing success when uploading image
{“media_id”:1126023933537292288,“media_id_string”:“1126023933537292288”,“size”:108365,“expires_after_secs”:86400,“image”:{“image_type”:“image/jpeg”,“w”:752,“h”:960}}
but
https://upload.twitter.com/1.1/media/upload.json?command=STATUS&media_id=1126023933537292288
giving me
{
“request”: “/1.1/media/upload.json”,
“error”: “Invalid mediaId.”
}
How to solve it?
If the upload didn't return an error message, it should be available to use. As answered here, the STATUS command is only necessary for video uploads.
You should only call STATUS command if FINALIZE response contains processing_info field

Image sharing on pinterest

I am working on image sharing on pinterest and image sharing done only one time and next time error occurs "Request failed: client error (429)". is there any solution for this?

Instragram send like to image show error for app

I have created app on Instagram and got access token and client Id.
My issue is that when I send like to image using API method that is showing me error:
meta = {
code = 400;
"error_message" = "you cannot like this media";
"error_type" = APINotAllowedError;
};
}
So like is not being sent to Image. I can explicitly able to like that image from the Instagram app. So may be the issue is not related to image's privacy. Can anyone help me for this issue?
Thanks in advance
************** Edit **************
After I check I am able to send Like from the API consol of the instagram for same media_id with response 200/OK. But from my app issue is still there.
Can I solve this by changing the APP ID AND APP SECRET ?
Please reply
1 - Double check if you are using correct access token
2 - How much likes did you in a hour? Pay attention to it and respect the limits. Take a look here: http://instagram.com/developer/limits/

Error: Failed to load skin for error: NSURLError Domain

Does anyone know anything about this error: "Error: Failed to load skin for error: NSURLError Domain"
After trying to open a download link in order to reskin an app on an iPad, I get the above error. The interesting/annoying thing about this is that it is not followed by any error code, which is making it difficult to search for in the forums as all of the results that I get include an error code e.g.: "NSURLErrorDomain error -1012"
The re-skinning has worked for another skin, but not for the one I'm working on now.
Any ideas? Any recommendations for diagnostic tests etc.?
NSURLErrorDomain error -1012 is kCFURLErrorUserCancelledAuthentication, meaning that the server issued an authentication challenge that was subsequently rejected. Causes for rejection vary, but could be invalid password supplied, or because the authentication challenge was not handled at all. It's hard to say without seeing the code.
Have resolved this now. Turned out that the URL I was using was simply incorrect.

Resources