What's the proper and correct way to access files on O365 from iOS - ios

I know that someone mean will probably close this question for being opinion, but the truth is, I'm not after opinion as such, but actual facts about the correct way and how to do this.
I've been searching around for quite a time and I'm still unclear as to what direction to take. It seems there are a billion* libraries that I could use, but I want to know what would be the correct, proper supported method of achieving this.
Essentially, I have a very simple requirement to list and download files from Sites on our Office 365 subscription to an iOS application.
Initially, I looked at the REST interface for Sharepoint and, from a browser, was able to easily perform a GET to our site and receive and receie a response with meta data about the file, for example:
https://mytenantid.sharepoint.com/_api/web/getfilebyserverrelativeurl('/MyFile/Here/Document.txt')
I could also retrieve JSON output instead of XML by specifying an Accept header of application/json using the POSTMAN REST client for Chrome.
So far, so easy. Just the authentication to do outside of the browser and that's it.
Phew!!
I started by looking at Basic authentication, but wasn't sure if this is the right way to do it and even if it would work?
On looking further, it seems that actually, using OAuth might be the way to go. Apparently, you can either do this yourself (no idea how), or use a library (ADAL?) from Microsoft? Unfortunately, this all looks half baked will very little documentation that seems to work. It also requires the use of CocoaPods and workspaces and isn't just a simple library that I can copy to my project and start using (a la SwiftyJSON). There also seems to be a lot of other libraries around too.
I should mention that I'm using Swift, so I've tried converting code from Objective C to Swift (unsuccessfully) too. Apparently I can't use "readWithCallback" with an argument list that the code tells me I should actually use -- even a sample application I downloaded had the same issue.
I've also tried using node.js with a script (not a Web Application) and the documentation and number of libraries available for that is almost worse.
Any assistance to achieve this really simple capability would be hugely appreciated -- it's been driving me nuts.
Many thanks,
D.
*this might be a slight exaggeration.

Office 365 has a RESTful API that you can use any programming language to authentication and integrate in your app.
Here is a simple example for iOS connected app to office 365. The sample shows how to do this in Objective C and SWIFT.
https://github.com/OfficeDev/O365-iOS-Connect
If you want to full iOS samples for office 365 connected apps, Check out this link:
https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples
Enjoy :)

Related

Is it possible to add hyperlinks/deeplinks to images in Apple PassKit?

I'm currently exploring the capabilities of custom passes in Apple Wallet.
One thing I would like to do is enable users to be able to go to my website if they click their gift card's icon.
However, after looking through the documentation - there doesn't seem to be any support for this basic ask.
The closest thing I was able to find was adding URLs to the back of the custom passes. Anyone know of a workaround?
I'm looking for the same thing.
I'm surprised people praise Apple Wallet passes that much, when it's really bad to work with.
Everything is file based, and you have to create a physical zip-file.
Google's approach is much better imho: everything is done via an API, so the pass itself is just a url with a token. Sharing a Google Pass is so much simpler and works everywhere.
Updating a pass is simple; just call the Google Api and everything will be ok. Images and assets are urls. Much much better to work with.
Updating an Apple pass involves fricking Push notifications, it's mind bogglingly complex compared to Google's solution.
Oh well

The restful api function is good to iOS?

i'm a mobile-develop engineer.work on IOS platform,using Xcode.
a few days ago.the man server developer has been changed in our company.he said the popular way of developed is using the template whose name was Restful API,then I was starting know something about the Restful api.
what i knew the thought of the template was the server need only developed the just the one http-interface.they didn't care whatever clients how to requested and how hardly used.
i didn't agree that, example in the page.the requirements is search friends depends on the text which user input on search-bar.
the 1.0 version is just searched the information which key included name.maybe we will send the requestPostDate=xx(which user inputed),filter=name.
the 2.0 version is searched the information which key included name、sex、age or your personal description.but I can't changed the requirements as soon as possible. because i have been wroten filter=name.
what should we did if it should changed in 1.0 versions on AppStore platform.
so what we did is modified the code which filter=name,sex,age. and upload the new library(IPA),then send it to AppStore.hope it's successful during these days.
what i need to say is if we not using restful api.we can be controlled by server.we just tell them we had a key which is xx,the clients didn't care about what the logic of how to search, it easier? and it changed quickly?the client didn't modified any code.maybe we have Web-platform、IOS-platform、android-platform.
i don't know what's the template your company using now.if it's restful api.please tell me how to fix about the questions what i said before?
the problem what i said is the restful api is suitable in IOS platform? maybe is suitable in Web platform,but not suitable in Mobile-developed-platform.
do you agree what i said? if not.give me some point which you think is right please.

Oauth library for iOS (in particular Yelp)

I want to add Yelp search into my application.
To do this I need to use Yelps Oauth authentication. This sounded easy as I've made some server applications before.
However, I keep getting an INVALID_SIGNATURE with the code I have created to make and retrieve data from a constructed URL.
I have checked the signature output by my app and it is exactly the same as the one they provide at http://api.yelp.com (I've even checked the two strings (before the hashing) at http://www.textdiff.com and they said they were the same)
It seems I hit a dead end and cannot get around this error.
Can anyone point me in the right direction with why my signature might not work
and/or
Can someone point me to a good iOS Oauth tutorial and library (any library I have found has poor documentation on how to use it)
Thanks

Making a firefox/chrome extension from 0

i have a website, its to exchange links, files... to say it quickly it's my 'version' of twitter+megaupload,
Well, users add links all the time and so on, but i would like user be able to syinch his bookmarks from the browser to the ones he has at his profile of mywebsite,
Where should i look into?
Basically i need to be able to:
- Acces bookmarks file (1)
- being able to send the urls to my service ( 2 )
- maybe adding the login feature (in the future)
I was google'ing about this for ages few weeks a go and i kind of give up, because i'm ok with PHP and JS, but with this plugin languages i'm very lost. So i decided posting here, wich always brings positive answers
(1) - > I don't even know where to start
(2) -> i was thinking to have a website.com/auto_import_no_confirm.php?url=[URL] and put it in a for each.
how many different languages and extension files do i have to work with? I really need any kind of tip with point (1)
feel like?
-edit-
Just found This -> https://developer.mozilla.org/En/Code_snippets/Bookmarks
wich really looks like i need, but where do i place this code?
thanks!
Might not be a bad question, but there are too many subtopics raised to answer that. (And there is too much tagspam as well. Break up your question into PHP- and Javascript-specific tasks, when you have devised the general application scheme.)
But to get started, download similar Firefox extensions (.xpi) and unzip them to inspect the general structure. You'll find examplary code for bookmark handling and invoking remote APIs pretty quickly. And basically you only need Javascript for the extension itself. (It sounds like your extension does not need much UI.)
And there are many tutorials on designing Firefox addons: http://roachfiend.com/archives/2004/12/08/how-to-create-firefox-extensions/ or http://www.google.com/search?q=firefox+develop+an+xpi
The good news first, you won't need much more than javascript if you just want to access bookmarks and send them to a server, neither on firefox nor on chrome.
But still you'll have to make yourself familiar with the apis of the browsers and learn how to develop extensions.
However, both Mozilla and Google provide all necessary information on their developer sites.
For Chrome, this is a good place to start, you'll find the api for bookmark access here.
The Corresponding site for Firefox can be found here, with information on bookmark access here.

Is there a Delphi implementation of Google Data APIs?

Google offers various libraries for interfacing with the Google Data APIs. Currently these do not include Delphi (Win32) support.
Has anyone done any work on a Delphi interface to Google Data, or the underlying Atom/AtomPub protocols?
There is an open issue with Google suggesting that they create one.
Thanks for your suggestion.
This probably isn't likely to happen anytime in the near future, as we need to
concentrate our available resources in other areas.
However, GData is based upon standard XML and HTTP requests, so work on a Delphi
client library can certainly be done outside Google. I'll leave this issue open so
others can vote for it, and perhaps someone in the community can pick this up.
So you can vote it up.

Resources