How to get metadata with include_media_info? - ios

How to get metadata with include_media_info=true via dropbox core api sdk for iOS?

The official Dropbox iOS Core SDK doesn't currently support include_media_info yet, but it is open source so you can modify it to support it. For example, the SDK uses this method to call the HTTP API:
- (void)loadMetadata:(NSString*)path withParams:(NSDictionary *)params
The documentation for the HTTP endpoint itself can be found here.
I haven't implemented and tested this, but at a glance it seems you'd have to implemented a new metadata method that sets include_media_info in the params that it passes to the above method, or just always sets include_media_info if you know your app always needs it. You'd probably also have to update DBMetadata to returned the media info.

Related

Calling Ajax in an iPhone app

I'm creating an iOS native app version of a web app that uses jQuery to fetch information from its database. Is there a way to make an ajax call in iOS that returns a JSON object?
You're going to want to take a look at NSURLSessionDataTask. This will return JSON as an NSData object . Here is a link to the docs.
If you want to make the request asyncronously, NSURLConnection class here.

Swift - NSURLSession downloading in background?

I'm creating an iOS app by swift that is as same as the AliExpress iOS app.
This App has ability that connect to our site and download all of data from JSON api online.
Now, I wanna download the images of the icons and banner slider from our site by JSON api in main page. But I don't know how i can do it. Do I use queues or background functions like in android? Also, I'm an android developer and i know how i can do this in android. You can guide me by this way ,too. please guide me by sample codes or description of its logic.
Please refer following link for tutorial
http://www.raywenderlich.com/51127/nsurlsession-tutorial
Apple documentation can be found on following link
https://developer.apple.com/library/prerelease/ios/documentation/Foundation/Reference/NSURLSession_class/
Swift example can be found here
http://jamesonquave.com/blog/making-a-post-request-in-swift/
I have also created a demo for the same
https://github.com/Gagan5278/SessionDownload
Let me know if you want more on this.
You have the seed of your answer in the title of your question. You want to create an NSURLSession and add NSURLDownloadTasks to it. That class does all the work for you.
A quick search on Github reveals this repository that claims to offer an async download queue in Swift:
https://github.com/Gurpartap/Cheapjack
(I haven't used that one. You can either build it into your project or look at the code and use it to implement your own download sessions.)
There is also AlamoFire, another swift library that has built-in JSON support.

Quickblox iOS download chat message attachment

I am working with the Quickblox iOS SDK for instant messaging. My app can send and receive pictures and other files as attachments. The documentation on the link below says to use the following method: - [QBContent TDownloadFileWithBlobID:[attachment.ID integerValue] delegate:self]
That method is currently deprecated. I'm using the recommended method +[QBRequest*)downloadFileWithUID:(NSString *)UID ...]
I pass in the Attachment ID as the UID here. That downloads some data, but is not the image data I am expecting. The documentation from that method says to use the blob ID of a QBCBlob object, not the attachment ID. I'm assuming that's why I'm getting invalid data. The docs don't state which ID to use here or how to get it. How do I get that from the attachment, and what is the easiest/best way to download the attachment data?
Documentation: http://quickblox.com/developers/Sample-chat-2.0#Receive_attachment
The right link is http://quickblox.com/developers/SimpleSample-chat_users-ios
This is how download attachments using iOS SDK 2.0
http://quickblox.com/developers/SimpleSample-chat_users-ios#Receive_attachment
Setup a redirect to the previous one

xcode apigee logInUserWithFacebook extra parameter?

I'm using Apigee for my iphone/ipad app.
Like many apps today, mine requires a login via Facebook and Apigee has a function specifically for this in the iOs framework, here's how it's called:
[ApigeeDataClient logInUserWithFacebook:[FBSession activeSession].accessTokenData.accessToken];
As far as my code goes, everything works well up until the above line. I'm receiving the following error.
Response: {"error":"invalid_request","error_description":"missing access token"}
However check out how the function is making the call (from the logs):
Synch outgoing call: 'https://api.usergrid.com/sgfishing/deepseafishing/auth/facebook?ql=fb_access_token=CAADrhKxrQp4BANfZCMuZBdOwUL9nc0H4VzZC1EXVLjABRbcrucTlUgwlKczFinl51GIWyBM5nlZBX1RF84azFAEOfChqN7vgSmvqgwybV8iPU2xjncZB9T5YTdY0pesJkHsSlvOafMhQ6MfIa6qdZCbTYBZCFB2oIPgEnro4runJKcqCy68wZCFQwyIzACVThAC3IEjZADs36hToQxhYZBzAWVhbKlcqJQsroZD'
I would like to bring your attention to this ...facebook?<b>ql=</b>fb_access_token=CAADrh....
I'm not sure why ql= is there, I've checked the definition of logInUserWithFacebook and ql= is nowhere to be found.
Any help would be greatly appreciated.
This is a bug in our iOS SDK. It has been fixed in version 2.0.9 of our SDK (released yesterday).
?ql= is typically used for query language statements see if there is any such code around in your program
This just a tip...may help

How to get unique user ID for HockeyApp?

In the HockeyApp SDK v. 3.5, they have shifted to a new method of user identification. In previous versions of the SDK, there was a callback method - (NSString*)userNameForCrashManager:(BITCrashManager *)crashManager which would set a string which would identify all crash reports sent from the client.
However, in version 3.5 of the SDK, it seems that this is deprecated, and it is preferred that you simply call:
[[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];
This sets a unique ID for the user. But how can I access this identifier? I want to attach it to support emails so that I can search for crash reports the user has submitted.
You can use the following delegate to set the userName:
- (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager
This is documented in the header and help ofBITHockeyManagerDelegate and the replacement is also mentioned in the header and help of BITCrashManagerDelegate documentation.
BITAuthenticator is only used for beta distribution due to the fact that Apple removed the UDID calls from iOS 7. See the documentation and help. It is automatically disabled in App Store builds and without further setup creates anonymous IDs! Please read the mentioned documentation.
I think you are looking for publicInstallationIdentifier. That should return an NSString, unique for each user.
Look at this header file - BITAuthenticator.h .
Also, in the BITHockeyManager, there is a method called configureWithIdentifier: in which you can pass the identifier.

Resources