I want to develop an app, which will store information (text) locally on the phone.
I'm new to iOS development and wanted to find out if there's any internal DB system that is recommended to use to store data or if there's some other solution like AsyncStorage used in conjunction with React Native...
Sorry if the question is a bit general, but I could not make it more specific due to the lack of information I have.
You can use Realm for React Native to store data.
It's easy to start ORM database which can be used on Android/iOS.
Related
i implemented a chat app in swift using firebase real time db, there user can send images, emojis and Text.Now i have a requirement of export chat or get the conversation's backup with media and text as per whatsApp.help me to solving it out.
While Firebase offers a backup for the Realtime Database, this doesn't fit your needs here, since you'll want a per-user export of the data.
Since this is specific to your application, you will have to code it yourself, just like the good folks at WhatsApp have probably done. It should be a matter of iterating over all data sources for the user, getting the data through the relevant API (that you're already using to display that data), and then writing to a local file). You can do this either client-side in your Swift code, or server-side on a server you already may have, or using Cloud Functions.
If you're looking for some inspiration for the latter, there is a sample repository that shows how to clean up a user's data, based on a set of wipe-out rules. You'll need to significantly modify this example though, so I'm not convinced this will be less work than rolling your own from scratch.
As a preface: I want to do this as a learning exercise. I'm not trying to produce a commercially viable app.
What are the layers/abstractions of an iOS application that is connected to a custom, self hosted backend? What technologies are needed to build this stack?
This post has helped my understanding a bit. I'm currently using Firebase as my backend but have found its NoSQL structure wrong for my app. The data I'm storing is relational, so I think an SQL database storing JSON would work better. The data is modeling Vehicles shared between Users.
From my research, the Realm Platform looks like a good choice. Am I understanding the technologies correctly here? Does this sentence make sense?
General functionality:
Sign Up and Login of users
Upload/download vehicle data
Some server side logic
Pushing data updates to users in real time
So would the stack look like the following?
User Front End: iOS app written in Swift
Database: Realm Database (SQL)
Server: Realm Object Server
I'm really looking for an overview of the general architecture. I don't know anything about that, so I'm sure I have failed to provide many details that are necessary for a thorough answer.
I apologize if this question is redundant; most answers I've seen for similar questions typically end with "just use AWS, Firebase, etc".
Thanks!
For a start you want to build your own backend and you should create your own API's that your IOS application will connect to. in short this is called REST api
https://www.sitepoint.com/developers-rest-api/
you will need to use many more technologies more than just a server like Apache
once you create your backend API you will need to connect it to the IOS app which can be done using NSURLSession builtin framework form Apple or Alamofire which is based on NSURLSession but its easer to use if you are learning
you will need to learn how to do an http/https request to understand how the request is made
check this
https://medium.com/#MuraliKathir/build-a-simple-api-search-with-alamofire-and-swiftyjson-80286e833315
Now to Realm. Realm is a local database that will be inside of your IOS app which helps you save data downloaded online or even user generated
https://realm.io/docs/swift/latest/#queries
Pretty straight forward question i think. I have created a web app in meteor and its using mongoDB storage. I have UI to update the data in the backend through the web app.
The question then becomes, I have designed an iOS app that i would really love for it to read the data being served to the web app from the mongoDB. As it stands, the app takes a url to a JSON file that i update regularly and serializes it accordingly. I want to pass on the tasks of updating the backend but exposing company employees to the potential mess of JSON backend, where missing/deleting a bracket / brace causes the app to break is out of the question.
My question is, since the meteor web app stores data as JSON documents, is there a way i can access the same JSON from the iOS app? It would really help because then, the person updating the backend only deals with UI, not code. I know this is a pretty broad question, but any pointers would be fantastic. Links, tutorials, frameworks to learn... anything. I've been googling around but can't seem to find anything solid.
Thanks!
You'll want to look into using one of the many iOS based DDP clients, like this one. With these libraries you can connect native iOS apps to the backend of any deployed Meteor app.
As far as I understand, you are looking for a way to get/update the data of your meteor server from the IOS app.
To do that, you can expose an API, like a REST one. Basically, your IOS app will call your Meteor server via HTTP and send/receive JSON data. Like that, you can get your collections, update, add, delete their items as well. There is a lot of literature around REST.
I used a very old one that I do not recommend because it is not maintained anymore, I will put the link anyway Old Rest API.
I invite you to have a look at atmosphere, the meteor package library: Atmosphere. I did a quick search on it and I found this package that looks promising: Simple Rest.
Have a look at the packages on Atmosphere, you can use 'rest' as keyword and pick the one that fits your needs. I am especially thinking of security ;).
I want to make an iOS Scocial Network, almost like Facebook. But I only do it to test my Objective C programming skills so it wont be massive like Facebook (though it will have all features that Facebook has).
What I want to ask is:
Can I only use my Objective C knowledge to build my front-end app and use Parse Services (Parse.com) to build my back-end? Or I need some tools, knowledge etc...?
Again, I do not make a very very big iOS Social Network app like Facebook but I do a smaller one that has all features Facebook has.
Any advice would be appreciated.
Yes, you can use Objective-C to create the app and use Parse.com to host your data. You can use the Parse SDK to allow the app to easily access the backend data. It will work well (depending on how well you design the Parse data storage) and you won't need to write any (or much) backend code.
parse.com/tutorials actually has a couple tutorials that would be very helpful in creating your social app. It may even be exactly what you are wanting.
Parse is the way to go. You might want to check out Helios and Stackmob as well. They do the same thing as parse. However, I like Parse much better because of it's documentation.
Happy learning.
I just starting to play around with iOS and web services. I'm writing a test app (My Books Collection) where a user should be able to register, login and then add books (Name, Author, Price, Edition, etc) and all the data should be stored in a database server. What options do I have to achieve this functionality?
I have programming experience but I'm very new to iOS and web services. Thank you!
Best practice is to have a web application mediator. We use php to handle queries from ios app and manages db. We use a light weight xml for ios - php communication and also add encryption sometimes. You can also add data compression to keep data usage low.