AWS Mobile without the SDK - ios

Is it possible to use the AWS mobile services (Cognito, Analytics, etc) without linking all the SDK in an Xcode project?
Background:
* While I am not new to AWS nor mobile programming, the following case is challenging:
We are shipping a mobile "framework" (not app) that uses our AWS for some parts (Authentication, logs).
And, as the AWS SDK has to be linked in the app project itself, this will require us asking all the clients (developers) to download and link it in their own projects.
What is used in the framework is just one request for authentication and one for logging (success/failure, disconnection), so no need for all the SDK.
I wonder if there is a possibility to request AWS services without linking against the SDK?
I know it's possible to put then under an umbrella SDK, or do some cherry picking from their git repository, but both of these seem like overkill.
As the request itself is a simple URL with Get/Post, is there a possibility (or tutorial) on constructing the request manually via NSURLConnexion/NSURLSession, etc?
Thank you

Talking to the AWS APIs is actually not that hard. The main difficulty is signing your http requests, and that's not nearly as bad as it sounds. Which leaves xml parsing accounting for most of the unpleasantness.
I've done it in go. The most informative part is probably the signing tests.

Indeed, it is possible. You will have to code calls to AWS at the REST level. Everything you need is in the documentation of AWS.
For instance, if you needed to execute actions on EC2, here's what you'd have to code:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#structure-of-a-get-request

You can call the HTTP APIs directly. Since the AWS Mobile SDK for iOS and Android are open source, you can look at them directly. Find the AWS Mobile SDK for iOS Source on Github, and the AWS Mobile SDK for Android on Github. Since you mentioned you need authentication request on iOS I am guessing you're looking for the Cognito Identity in AWSCore source.

Related

AWS Cognito iOS: How to replace / upgrade from AWS MobileHubHelper generated code?

I am developing an iOS application with user authentication via a AWS Cognito user pool (with email/password authentication).
The initial Xcode project and source code was generated by the AWS MobileHub code generator (that is no longer available).
It contained the AWSMobileHubHelper framework, an AWSMobileClient, and a few view controllers and storyboards related to authentication (like SignInViewController, UserPoolForgotPasswordViewController etc.)
(Since then, I moved to using the Serverless framework, so I no longer rely on the MobileHub "managing" my AWS resources - but the code structure of the Xcode project for the authentication parts is still the same.)
Now, it seems that MobileHubHelper is no longer maintained (the Podfile referencing older AWS SDK versions - although "deprecated" is not explicitly mentioned).
Also, the code generator has been removed from the MobileHub console.
Now, there are multiple "auth"-related repositories / SDKs, like
AWSCognitoAuth
AWSAuthCore
AWSAuthUI
AWSUserPoolsSignIn
I'm lost.
I want to be able to modify the UI, and keep the option to add Facebook or Google authentication at a later date.
The steps described in the Cognito User Pools tutorial differs significantly from the ones in the "Mobile App Development" tutorial - and both don't really match the structure of my (generated) code.
The CognitoYourUserPoolsSample and CognitoAuthSample are different again.
What do I need to do to upgrade my authentication code and UI from the AWSMobileHubHelper-generated code to the latest AWS SDKs?
Second issue: I used AWSUserFileManager from MobileHubHelper to upload user files - what do I use now?

How to reflect web app hosted on EC2 (AWS) on mobile app (iOS)

So my current task at the company I'm interning with is to create a mobile version (iOS) of a web app written using Flask, HTML & CSS that currently exists and is being hosted on AWS's EC2. Assume I'm a complete noob at AWS and only just learned that EC2 is a cloud computing service.
Essentially, I just want to be able to reflect what's currently on EC2 over to a mobile app in a secure fashion. I guess I'm just trying to avoid rebuilding something in Swift that's already been done. For those familiar with WebView in Xcode, I tried to use that to reflect the web page, but it didn't work (I assume because our web app on EC2 requires login credentials when you open it in a browser?).
I thought that maybe using AWS's SDK for iOS would net me some luck, so I installed cocoapods and setup a pod, but don't know how or which of these AWS services will help me achieve what I'm trying to do (from reading the documentation, it seems like their purpose is for building an app, not necessarily just projecting a webpage with data already in it).
For some more information, some key features that I think would be useful for our clients that would be using the app are:
The ability to persist data on the app when their device is offline
Some sort of temporary logins for the users. This app wouldn't be distributed through the app store; it would probably just have to be locally downloaded onto certain clients' devices
Lastly, I saw this post come up before creating this one: Does REST API for mobile apps hosted on https protocol web app will be slow? and I noticed that the asker of this question said "Lets say I have built a mobile app running on Android and iOS platform and REST API's for these apps lie under https based web application." This possibly sounds like something that could be helpful, and if anyone could explain what s/he meant by REST API's and what they are, I would be very grateful.
Any advice on how to proceed from here, using anything, would be much appreciated. Thanks!

What is the most efficient way to create end-points for an Amazon SNS service?

I am using Amazon SNS Service for an iOS application that needs push notifications.
I have figured most of the things, except for the part where I have to register my device tokens.
This is where Amazon talks about it. It can be done manually or with the help of createPlatformEndpoint API which they obviously recommend for bulk uploads. My question is how we can directly register tokens from devices that will install the app later on. The documentation talks about a proxy server which I would want to avoid as of now. Isn't there a direct way of doing this, like where I can directly call a method and push the device token received in the application to my SNS Platform?
This, is a possible duplicate except that it is in reference to Android.
The AWS Mobile SDKs support accessing SNS directly from the mobile device. If you're interested in seeing code demonstrating this on iOS, we included some as a sample we prepared for re:Invent 2013 called Mobile Photo Share.
The important thing to note when accessing SNS directly from the mobile device is that you'll want to restrict the credentials delivered to the device to only those services and resources you'll need to access. You can accomplish this via web identity federation or a token vending machine with appropriately restricted policy.
If you want to learn more about the Mobile Photo Share app, we had two talks at re:Invent about the app and its architecture. The video and slides for those talks are available here:
Building Cloud-Backed Mobile Apps
Integrating Social Login Into Mobile Apps

connect_login URL for dropbox

As per Dropbox REST APIs documentation, the login process has to go through OAUTH Urls like https://api.dropbox.com/1/oauth/request_token. But dropbox's iOS SDK makes a call to https://www.dropbox.com/1/connect_login which is not documented anywhere. I want to use REST APIs in my application, but I want to display same authentication screen as done by dropbox SDK.
Did anyone face this problem? Does anyone know what dropbox says about using undocumented APIs like connect_login?
The latest word from Dropbox on /connect_login is:
That's a special endpoint for the iOS SDK, because of the specific requirements for App Store approval. You should use the official SDKs as provided, and we'll provide updates for these over time.
(taken from https://forums.dropbox.com/topic.php?id=104267)

How to use EndPoints to generate API library in Objective-C in Google App Engine

I used google app engine as my backend server. I watched the google I/O video, and it said it can generate the IOS api library in EndPoints by command line. But I couldn't find the way to do that, and there is no information about it on the Internet. Is there anyone who uses google app engine as their IOS app backend and could answer my question?
Working with GAE, there is no way to generate an API "in objective-c". Google app engine infrastructure supports Java and python, so you need to write your API in one of these languages to deploy it in GAE cloud.
Then, in your iOS application, you will need to communicate with the APIs you just deployed in GAE, this can be done with a so called client library. Here is an example of a client library for Objective-C.
Cloud Endpoints is still under Trusted Tester program.
You can sign up here:
http://endpoints-trusted-tester.appspot.com/
UPDATE Official docs on generating iOS client libs can be found here:
Python
Java

Resources