Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am looking for advice on what the best tool for the job is for sharing a relatively complex data object between two iOS apps on the same device.
I have a real estate investment app that we will call app A which allows the user to input data about a potential investment property and calculate important financial metrics such as ROI. All of the property data is persisted using Core Data in an object we will call Property.
I am developing app B which imports a Property Object from app A and creates a PDF report that the user can send to other investors. The Property object does not need to be persisted in app B, only used temporarily to create the pdf file. I would like the user to be able to open up app A from app B and choose a property, similar to a photo picker.
My initial instinct is to use URL schemes to solve this problem. Is this the best solution for my needs?
There aren't many options and what few there are really require that both apps be developed by the same developer (which appears to be the case here).
The easiest is to used a shared, private, named pasteboard (UIPasteboard) in conjunction with custom URL schemes.
App A can put the data in the pasteboard and then launch app B using its custom URL scheme. Of course both apps must be coded to understand how the data is written to the pasteboard and on the name of the pasteboard. Though the name of the pasteboard could be passed as part of the custom URL.
Once app B generates the PDF, the reverse process can happen. App B can put the PDF into the pasteboard and then launch app A using its custom URL scheme. Then app A can get the PDF from the pasteboard and present it to the user.
Or, if it makes sense, app B can use a UIDocumentInteractionController to let the user choose what to do with the PDF. That is certainly up to your needs.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm new to iOS and have just started leaning it. I want to develop a small app for bus passengers where-in all users in the bus must login using the app.
If user is using the app for 1st time, he must sign up . User must enter all details like Name,Age,Emergency Contact,Address,Source,Destination,Phone number etc.
If user already exist, then login with existing user name and password.
All details must be stored somewhere (not sure) and retrievable format.
Here comes all my question and doubts based on above app requirements :
do i need to follow client-server architecture ?(mobile app being client )
where all user details will be stored ( on mobile or server )
when user tries to login, how check if user already exists or not ?
if any communication protocol to be used for mobile app communication then which will be good considering the performance of app should be fast.
mobiles internet data should be available ?
which database to use to store user details ?
considering all above things i need to design my app.
thanks
I will try to give some points to start from.
1) I think yes (its really depends what you want to achive but if you only want to get/pos resources to/from server, http request should be enough to start from).
2,6) Depends which details.
For simple details which no need in protection NSUserDefaults Sqlite or Core data can fit. (also there are some nice wrappers for them for instance TMcache, you will need to investigate it).
If you need to save private details you will probably need to use keychain.(honestly I would avoid saving important details on the device everything can be hacked so try to limit it).
3) One of the common ways which come to my mind is to check in run time if the user already logged in is by saving login status in NSUserdeFaults and check it in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions. If you need to check Existence of user in your system than probably some server help will be need.
4) Please refer to apple Docummentation NSURLSession should fit.Also AFNetworking is really good library.
Edit:
5) Usually IOS will use Current Internet Connection which is available and more efficient for the system it will start with WIFI then CellularData (Check Reachability for testing availability of internet connection its also included in AFNetworking library) .
-All those questions/answers can be found on stack.Hope I helped.
List of common IOS frameworks
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am trying to follow a few UI/UX best practices when developing a simple "request quote" form for my users.
I basically want them to fill only a few fields at a time as I guide them through it, giving them some feedback or update on cost depending on what they fill. And this is the important part, I only want to upload/save to the backend only once the user finished the whole wizard and clicks on "Complete" in the last panel. I don't want to have partial/unfinished "Quote" objects.
1) I have setup a navigation controller and added a few UIViewControllers with some fields, and I can basically step through them. Adding validation to the fields before jumping to the next field is no problem.
2) I use parse.com as my backend, and I have a "Quote" object, for simplicity's sake, let's say it has the following properties: firstName, lastName, location, date, options, price.
I ask for location and date first > then first and last name > then
options > I then calculate a price and show it to him/her > Then the user
can submit the whole thing to the server.
I looked around, and only found some indication to use a temporary xml file, which I then upload. Other results mainly pertain about http multi part requests, which I don't think relate.
Would core data be the ideal usage here? Any pointers in the right direction would be really appreciated.
Core Data is best used for local persistence of data, what you are doing is just capturing data to post to an REST url. Create an class that holds your data and pass it from view controller a to view controller b, etc. At the end, make the call to parse.com and submit your data. You can either add the logic to communicate to parse in your final view controller or put it a separate class.
If you want the user to be able to come back to the quote, then Core Data would be good to use.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am creating one application. This application have two databases.
Local Database (In the mobile)
Cloud Database
Both databases are automatically syncing.
Through my application when I Browse the page I want to keep that page in my phone. again When I browsing without internet (Offline) I want to access that store files.
My problem is without internet offline browsing (stored web pages) need to access my local database and give the informations.
Eg. I want to search something. if it is internet search cloud database. (Same time store the web page HTML content in the phone). Offline searching want to access the local database. In here it want to use the stored HTML content. But access the local database.
It is possible or not? I am a beginner. Please guide me
You use scripts/code on server to connect to db on the server when you are online. Even if you download and save you 'HTML' file locally, when you load it in UIWebView it is not going to start fetching data from your local sqlite db. (hence all the down votes i guess)
So simply put, what you are asking is not possible.
However, an alternative which may work, subject to your app requirements, is to change your app code to always perform searches on local database and instead of HTML show search results using native UI. As you claim that your local db syncs with the sever automatically, when you are online, after your db is up to date, your search results will fetch fresh, synced up data from local db. Since your search uses local db you'll be getting last synced data when you are offline.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Let's say I release version 1.0 of my app.
Then say I want to completely change the server/database for version 2.0, however, doing so will break my version 1.0's server communications.
Instead of having users wonder why their version 1.0 app server communications stopped working for them, is there a way to let them know that they need to upgrade? In other words, is there a way to send push notifications to users using the old version of an app to let them know they need to upgrade for it to work?
I know Family Feud with Friends for iOS does this, basically because they add new features that wouldnt apply to the older version. This is another example of why you would want to send push notifications from the developer to the user.
Also, is there some a better way to handle changing up the server/database? (Sorry if thats too general of a question). I feel like breaking the server/database for older versions is bad practice.
This is a hypothetical question, so I'm not actually stuck in this situation, I'm just looking for ways to prevent/handle server/database changes in the future.
Thanks!
Typically an app communicates with a server via an API, and doesn't connect directly to the database. Since the API returns data and not the database schema, it is generally immune to database schema changes. If the underlying data structure changes, you may need to update the API, but the input and output should not change for a particular API function.
If your API function returns data using an extendible protocol like JSON, then you can easily return additional data to support new functionality, and prior versions of the app can simply ignore the new data.
If you must make a change to an API function that would break the current functionality, then you simply version the function call. users/get might be your old call and users/get2 might be your new call.
In the rare case where you must force users to update (security vulnerability, perhaps), then it is best to have a way to force an update in place ahead of time.
The first thing our app does is sends its version number to the server. The server can respond that an update is required and provide a link to the update.
Push notifications are not a good way to force updates. They are "best effort" only. Not everyone will get a push notification, especially if they've disabled push notifications in your app. Also, why bother someone who maybe has no intention of ever launching your app again? Let the App Store notify them, or wait until they launch your app, and check then, as described above.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I hava an iPad app where I store data using Core Data (sqlite store).
The app would be sharing the Core Data store between authorized users on a per-app/per store basis; in other words, one shop buys the app, and has several staff members with iPads who want to access the Core Data store on their iPad for that shop. Other shops are have the same requirements, each shop having it's own unique Core Data store on a unique Google Drive, which would hopefully prevent one shop from looking/downloading another shop's data.
is this possible?
can someone please point me to the relevant docs that I need to get started with Google Drive API in my iOS app?
is there a way that the app can synchronize the data between iPads on a per shop basis using Google Drive?
If you want to put the Core Data in shop's Google Drive, there is a potential risk that the shop might accidentally delete or modify the Core Data, but anyway, this can be achieve like this:
In your app, ask for the shop account for appropriate scopes, then store the credential in your service so later when staff members ask for the Core Data, you can delegate the shop account to grant shop's staff permission to access the Core Data. In the staff's Google Drive the file will appear in Shared With Me.
Maybe you should use another account to hold all the Core Data for all the shops, for example your service account. When one shop buys the app, your service creates a Core Data for the shop, then adds permission for only the shop. I suppose you want the Core Data to be readonly, so you can grant the reader permission for the shop. When shop staffs ask for the Core Data, you do the same for them.
Now the shop and staffs can access the Core Data, you will want it to be in specific folder, so it can be synchronised to shop or staff's local devices, in your case, their iPads. You can delegate the shop or staffs account to create a folder for them. Then update or Patch the file's Parent to include the folder Id. The shops and shops' staffs will see the Core Data in the folder you create for them. This action will require a higher scope, say: https://www.googleapis.com/auth/drive.
https://developers.google.com/drive/quickstart-ios
Hope it helps.