Why are my Discord Assets not saving after Upload? - save

I wanted my own Rich Presence but when I uploaded the Large and Small Image Key and pressed save, it didn't save after I switched back to other settings.
Thanks for Answers!

Related

React Native, storing images in users gallery without compression

I am developing an App that verifies images based on their hash. I hash the images using this library "react-native-fetch-blob".
I store all the images taken inside the app, I am trying to allow users to be able to share the original uncompressed image.
Problem: When using React-Native Camera roll or React native Share to save the image to my local gallery, compression is performed which changes the hash of the image if I recalculate it.
What I want to do, is to be able to save the image to the users local gallery without compressing the photo?
Any help would be very appreciated. :)
I have run tests retrieving the photos back into the app (from the user's normal gallery) using React-Native-Image-Picker; However, I believe that also forms some compression on the image. I have also used react-native-fetch-blob to copy the photo from the user photo gallery back into the app.
Can provide code I used to generate the below results if anyone needs that.
Hash Results - from Image Picker
camera roll save
10c30a42ead3636a8fd8cfd1eb6952db9f8bbb97fbbdccf96060b67f27be0766
fileSize: 591635,
React-Native share save image
cf799ba599e65a42905cb25fabc0150286ee923113da2af21ad7bb2a650bb86d
fileSize: 603288
Expected
Hash0802368f14296c4d6750a4fc853cda68de67b8e31adf16f38b0eabb7e8b28d0a
Thanks Again
Solved issue on react-native-camera-roll. Issue was stripping of meta-data on IOS side.
https://github.com/react-native-community/react-native-cameraroll/issues/125

Download .IPA media without physically create a .PLIST file

I have been asked to create a "Download our app" button, with an IOS app in mind. I am using the CMS "Umbraco" and the users should only have to upload the ".IPA"-file. The backend should take care of the rest.
How do I do this nicely? I could of cause create a new .slist file everytime someone presses the download button, but that doesn't really make sense to me. Are there someway of creating a ".PLIST" on the fly? Maybe, without even saving it? Sent through headers maybe?
Looking for ideas :)

How can I protect my files in app's document directory from reading by external tools(iFunbox/iTools etc)

I want to develop an photo protected app. When first launch, it forces user to input an password and every time back to the app, user must input the same password again. User takes photo in my app and I store the photo in app's document directory.
It works well but someone can access content in the app's document through external tools like iFunbox, they can export the photos. So my app is not safe enough. I have considered that I can use ZipArchive to compress photos with an password when save photos and uncompress photos when using want to see the photos, but compressing and uncompressing will cost much time and battery, I think it is not an good idea.
Can someone give me some suggestion? Thanks in advance.
You can use the NSData writeToFile:options:error: with the option NSDataWritingFileProtectionComplete which will write it encrypted. This will only protect the files when the iOS device is locked.
Alternatively you can encrypt the file yourself with CommonCrypto AES and save the key in the keychain.

History saving and retrieving in iphone

I have an application in which a user can upload recorded audio or video or picks an existing from library, pictures clicked or picked. I need that user to be able to view, say the last 50 uploaded items, for which I have made a screen called "Recent Additions" which has a table view which will be populated with those 50 items.
What options do I have?
I think that I have to add a local storage for it... If yes, how?
Can NSUserDefaults can help me?
When the user records/clicks/picks any asset, a URL is generated by system which I also use for uploading. Will the same URL I would need for saving that item in history?
NSUserDefaults won't help you. That's meant for populating text fields and small tasks-- certainly not writing to disk.
To save a video or photo to your the iPhone out of app, you could just use UIActivityViewController and save to camera role after making an NSData instance. That's only if you are supporting iOS 6 and higher, however.
If you could want to save the media to the device's camera roll, you could make an NSData instance, use UIImagePNGRepresentation (if it's an image), make an instance of UIImage with the data, and finally use UIImageWriteToSavedPhotosAlbum.
For in-app writing to disk, check out Apple's docs on NSCoding and NSFileManager.

Upload images to Salesforce through iOS App

I am trying to upload image to Salesforce just like updating Leads or Accounts through my Phonegap iOS app. I can get the image but by googling a bit, I got to know that i have to convert the image into a BLOB.
My query is about two things:
1. How to convert the image into a blob?
2. How to upload that blob to Salesforce?
Thanks in advance
A blob is just a Binary Large OBject, i.e. a lump of binary data. You just want to read the file into memory and use it's content directly. There may be a need to base64 encode it, but I wouldn't have thought so.
There's a Phonegap plugin for downloading binary data on iOS here, you can see how it uses the standard Apple SDK calls for file access, so opening them shouldn't be a problem for you.
The blog would be a field on an object, much like fields on your Accounts and Contacts, I'm not sure how you specify the size, but putting the binary data into the field shouldn't be a problem.
There's an example of using the REST API to upload binary data (to a document) here — I imagine your solution would be similar to this. What Salesforce API are you using for your app? Are you using their Mobile SDK?
You can attach images to Salesforce record on iPhone using Salesforce Mobile app. This requires a little customization - VF page and apex class. Once you have created the VF page for attachment, then you need add this VF page as 'Visualforce Tab' and enable it on Salesforce Mobile Configuration. Steps to add the newly created Visualforce Tab onto Salesforce Mobile Configuration : Setup->Mobile Administration->Salesforce Mobile->Configuration->'Select your Configuration'->Mobile Tab.
Now using this tab on Salesforce app, you can upload images as attachment.

Resources