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 6 years ago.
Improve this question
I'm an iOS developer with experience in C/Obj-C and Swift. I currently finished a weather app that displays current and forecasted weather, with the ability to alert you when certain weather conditions change. This is done using the background fetch feature in iOS, which periodically refreshes weather data in the background to see if your criteria has been met, then sends you a local notification.
Problem: the background fetch only happens at the command of the OS. You have no control and I'd like to be able to check more often to alert customers sooner when the weather is changing. I'm fully aware that the solution is implementing my own server with a program that checks remotely say every minute, then sends a push notification to the customers phone.
My current implementation on the iPhone is:
User creates alert with custom criteria (example: tell me when the wind at city X goes above 10mph)
App downloads weather from web XML api
App parses weather data into custom weather objects
App compares weather data to users custom alert
App alerts user if criteria was met
What I want to do:
Send the alert that the user created to a server and store it
Have the server do all the work of downloading/analyzing if the criteria was met for each stored alert
Send a push notification to the users who had criteria met
Question 1: What would this overall implementation on a server look like?
Question 2: What language would each part of the implementation be written in? Currently I have everything working in Swift but I'm gonna go out on a limb and say that won't work on a Linux server
Maybe you could store your criteria on the client and use a web API to fetch the weather. This could eliminate your dependency on the OS and give you time to study up on building a server.
Related
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 2 years ago.
Improve this question
I am currently developing an app with Flutter, which is similar in principle to the app "Celebrate". In this app I need to be able to store certain data on the server permanently without the user having to register. How can this be realised?
Example:
the user starts the app and creates an album
the user deletes the app
the user reinstalls the app
the previously created album is still there
I have thought about two possible variants. Which variant is the one I should prefer?
when the user starts the app, I store unique device information in the database on the server. So I always know to which device the corresponding data can be assigned. Does Apple even allow me to retrieve and store device information? Would this be a good solution?
I see that Firebase offers "Anonymous auth". Does that happen to do exactly what I need? In "Celebrate" it is so that even if you reinstall the app, the data will probably still be retrieved. So there is nothing stored locally. Could the developers of Celebrate use this or similar methods?
Thank you for a competent answer!
Getting a unique device ID seems more accurate solution for what you want. Firebase Anonymous Auth will not work if the user uninstall the app.
You could use device_info plugin developed by the Flutter team.
In your pubspec.yaml file add this:
dependencies:
device_info: ^0.4.2+6 // or latest stable version when you see this
To get the data (and ID) of each platform:
// iOS
IosDeviceInfo iosDeviceInfo = await deviceInfo.iosInfo;
iosDeviceInfo.identifierForVendor; // unique ID on iOS
// Android
AndroidDeviceInfo androidDeviceInfo = await deviceInfo.androidInfo;
androidDeviceInfo.androidId; // unique ID on Android
Since iOS vendor identifier can change on app reinstallation or other event, we need to keep it in the keychain with flutter_secure_storage. You could simple check if the key exists or not. If it exists then it's a reinstallation, if doesn't, it's first time. And clearly, set the vendor id on first time.
I see that Firebase offers "Anonymous auth". Does that happen to do exactly what I need?
While anonymous authentication would allow the user to get started without typing credentials, and you can still make them the "owner" of their own content, it will lose all knowledge of the user when you either sign them out or when they uninstall the app.
As #sqew commented, the scenario you describe is actually against Apple's guidelines, so even if it's technically possible it might not be the best choice.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am making an App where on the first screen i have login and register buttons. When i click on register it will ask for user finger prints and then user details. From here I want to store finger prints and user details in database.
And when he clicks on login. Its will open biometric scanner if finger prints matches the database finger prints he will move forward..
Is there any way is it possible to store finger prints in database. If so please give some reference links that guide me towards my goal..
Thanks in Advance
You can not access the fingerprints directly. This is restricted by Apple on purpose (privacy protection). So you will not be able to store them in your database neither.
Touch ID
Your app can now use Touch ID to authenticate a user before accessing some or all content in your app. Fingerprint data is protected and never accessed by iOS or other apps. [...]
Source: iOS 8 for Developers by Apple
Authentication is still possible using the API, but that will only return values like Authenticated and Not Authenticated, with no information about the fingerprint itself.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am new in iOS programming and I want to handle push notification to received it as a notification then i want to save it to database and display in table view how can I do that I try to handler it but I failed to do that can any one suggest any solution for that.
another problem i have log in page I want when program start check database if find accounts log in with the user in ns user default i made the method that return the number of the accounts all I need to make condition if account ==0 goto login page else open on tab bar menu
In Parse.com Docs navigate to cache. This is your answer. I'm assuming you know how to retrieve Parse data via a PFObject and Display it to a table already. It's the same, but instead from cache.
I try to explain as best as I can (and simplify a bit).
I have an iOS app, asking the user 5 questions, 1 to 5 in this order. The questions are inside the app and the answers are then sent to a server via AF networking. It all works well.
I want to develop a web site with these same questions so somebody can choose which questions to be asked and in which order, for example 2, 5 and 3 only and in this specific order. Of course it will vary with each user. I then need to send this information back to the app and I want it after that to be Internet independent. I mean the questions and order are sent to the app (downloading or uploading) but then the user doesn't need Internet anymore to answer the questions (if there is no Internet to upload answers to server, the answers are automatically already saved in my app).
This surely must be possible but I don't see how exactly.
Do I need to have the questions in my app (as now) or having them on the web site would be enough?
How do I tell iOS to do something from my web site?
...
I am not after a precise tutorial, just some ideas thrown together to get me started, please.
Thanks a lot in advance for your thoughts.
Do I need to have the questions in my app (as now) or having them on the web site would be enough?
It's a good idea to have them in the app, so if the app is first opened with no internet connection it will still be usable. Each time the app is opened it should try to get new data from the web service and update its internal store.
How do I tell iOS to do something from my web site?
Generally, you don't. The app checks at appropriate times (like each launch).
Based on your comment below, the app should ask the user for his details and that is the trigger to connect to the server and obtain the active questions and order information. This can then be stored locally and the question interface can be presented to the user. Note, you could also return the number of days that should be recorded from the server...
On the next launch, you check for the existence of stored active questions and order information, and if you have some you go direct to the question interface.
The user should be presented with an option to upload the results (at the appropriate time), and you should have a setting somewhere to clear everything (just to remove the data, but also if the user needs to 'login' with different details for a new test session - so the app will check with the server again).
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to create iPhone app which is in background then it will track record of all app which user opens.
i.e when my app is in background and user opens music,safari,photo app
then i want record like, music,safari,photo.
can we write names in file ?
This cannot be done. Apple is very restrictive when it comes to things like this.
The way I understand it is this:
Apple limits the API to your app (you can't affect other apps or the OS in any major way-this stop malicious behaviour)
Your app is 'sandboxed' meaning it's on it's own, it can't see if Safari has any pages open, or monitor what game you just exited out of or anything like that. Your app is in effect, isolated.
You can write anything to a file, just getting what you want to write (in this case) is not possible
tl;dr. No, your app is in it's own little 'sandbox' it can't monitor anything but itself, Apple doesn't allow it nor do they provide any programming library to do so.