0

Before I begin, the question I will ask may be considered 'newbie', however due to the lack of time I need help and cannot find a simple answer through most documentation provided. I have created an iOS application that currently is referencing an offline '*.json' file for its table. I have created a table in DynamoDB offered by AWS which best suits my need. The issue arises from me attempting to link the db into my application, AWS recommend utilising its SDK, or using additional tools, all of which I do not want to add.

Can someone please provide me with a brief description on how I can export a link in the form of a .json file for my db, and with it the security references I require.

Implementing AWS SDK will require me (correct me if I'm wrong) to rewrite my current 'table' manager which extracts information and passes such to various methods. Currently I am using the following method as shown in the example below, I would like to change this to reference the DynamoDB table I have made.

ThingsDataParser *thingsDataParser = [[ThingsDataParser alloc] init];
NSURL *url = [[NSBundle mainBundle] URLForResource:@"Table" withExtension:@"json"];
thingsArray = [thingsDataParser thingsFromJSONFile:url];
Charles
  • 50,943
  • 13
  • 104
  • 142
  • 1
    It's not entirely clear what you're asking, can you clarify more? Also - what have you tried and why do you not want to use the AWS SDK? – tddmonkey Feb 22 '14 at 13:53

1 Answers1

1

Now, if you dont need to use the SDK, you can directly talk to the DynamoDB REST API from your app code. Making HTTP Requests to DynamoDB - Amazon DynamoDB

However, if you use the SDK, it will only simplify your tasks. Did you see this article about using it from iOS and accessing and using DynamoDB - This is very similar to your need. Storing User Preference in Amazon DynamoDB using the Mobile SDKs.

Now, I didnt understand where the json is coming in the picture. One suggested method of handling such needs, is to have a webside service which reads from Dynamo and sends the data to your app (when it asks) in JSON. This method has the advantage that you dont need to keep the AWS keys in your iOS code (which can potentially be reverse engineered and taken out - difficult but possible).

Sony Kadavan
  • 3,982
  • 2
  • 19
  • 26
  • Thank you for your response, what you have mentioned I have already seen, your first link is essentially what I needed help with, however the HTTP request with all credentials differs when writing it within Xcode. The SDK returns an array from the request. I need it to return a .JSON file on request. Simply put I needed this: NSURL *url = [[NSBundle mainBundle] URLForResource:@"Table" withExtension:@"json"]; to be able to read a JSON file from the server instead of the offline table it should use the DynamoDB table. – user3340756 Feb 22 '14 at 15:28
  • I didnt quite understand - Do you want server to return a JSON on a specific URL ? If this is the case, you will have to run your server "which reads from Dynamo and sends the data to your app (when it asks) in JSON". – Sony Kadavan Feb 22 '14 at 16:51
  • Thank you again for your response, if the HTTP GET request can specify and receive a json table, surely we can do the same for an iOS application;s query to the server? – user3340756 Feb 22 '14 at 22:47