iPad Catelog Application - iphone

I want to create an Ipad/iPhone app that will act as a catalog to allow users to select items and send request to the company to process
User Downloads the App
Login into the app
Downloads the available Categories and Items ( Text details and 2 size of images)
Should be able to browse offline
While sending the request for the items needs to be online but can select the options offline.
Should be able to upload an image/design to the order list and add remarks.
My Main question is - Can we download data from the server like images and cache in locally into the local database and directory ?

Yes. You can save whatever info you want into a local sandboxed, file system. http://developer.apple.com/library/mac/ipad/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html
It looks like the PhoneGap Framework will also allow local storage. See http://en.wikipedia.org/wiki/PhoneGap

Related

Huawei Mobile Services PUSH message cannot reach China users

I am a US HUAWEI developer, I have integrated Huawei Mobile Services Push Kit, I can send and receive Push messages on phones outside of China, however I cannot send to nor receive from phones inside China (Huawei or non-Huawei phones with HMS Core). I set my data storage in Germany, is there any reason why my Push messages cannot reach inside China? What should I do to make it work for phones inside China? Thank you.
Your question is
I cannot send to nor receive from phones inside China
"inside China" means
mobile phones physically located in Chinaļ¼Œbut I could not send to or
receive from phones located in China
You need to change a data storage location. Some development services provided by AppGallery Connect require you to select data storage locations for your project. These data storage locations determine the infrastructure used by AppGallery Connect to provide the services for your project. In addition, relevant data of your project will be stored on and processed by servers at these locations. You currently selected Germany. If your app will provide services in the Chinese mainland, select China as the data storage location.
1. Data Storage Location Distribution
AppGallery Connect provides the following locations for you to choose from:
China, Germany, Russia, Singapore
2. Setting a Data Storage Location: Going to Project Setting > Convention for Settings
Sign in to AppGallery Connect and select My projects.
Select the project for which you want to set the data storage location from the project list.
Go to Project Setting > Convention, click Set next to Data storage location under Project, and select a data storage location in the displayed dialog box.
3. Changing a Data Storage Location
A. Changing the Data Storage Location in AppGallery Connect
If no app has been released in the project and you have not subscribed to any paid plan related to the data storage location, you can change the data storage location in AppGallery Connect. The procedure is as follows:
Sign in to AppGallery Connect and select My projects.
Find your project from the project list and click the app for which you need to change the data storage location on the project card.
Go to Project Setting > Convention and click Modify next to Data storage location under Project.
Confirm information in the displayed Information dialog box, select the operation items, and click Agree and Continue. To cancel the modification, click Cancel.
In the displayed dialog box, set a new data storage location and click OK.
Note 1: After the data storage location is changed, the enabled services cannot be used. To use these services, you need to enable them again.
Note 2: The interval for changing the data storage location cannot be less than 1 hour. Otherwise, the system displays a message indicating that the change is too frequent and you need to try again later.
B. Changing the Data Storage Location by Submitting a Ticket: If an app has been released in the project or you have subscribed to a paid plan related to the data storage location, you cannot change the data storage location in AppGallery Connect. To change the data storage location in this case, you need to submit a ticket. Huawei will get back to you in 1 to 2 working days. The procedure is as follows:
Go to Project Setting > Convention and click Modify next to Data storage location under Project.
A dialog box is displayed, indicating the reason why the modification is not supported and prompting you to submit a ticket for processing. Confirm and select the operation items, and click Create work order.
On the Submit ticket online page, click AppGallery Connect.
In the dialog box that is displayed, select the service for which you need to change the data storage location.
Configure required information and click Submit.
Notice:
If you have enabled HUAWEI Push Kit, the following dialog box is displayed, prompting you to disable it and then change the data storage location. For details, please refer to Enabling Services. Do not enable HUAWEI Push Kit again before confirming that the data storage location is successfully changed.
For more information, see docs.

Serve file with google cloud storage, google compute engine and external website

I got a question regarding a upload, edit and serve setup.
I have a setup where my shopify website lets users upload images to a google cloud bucket with javascript. When the file is uploaded to the bucket it's send to a compute engine which edits the files and the file is then uploaded to another bucket. All this is done.
But now I want to serve the file to the user on my shopify website. I can't figure out a way to do this. Is it even possible with my current setup? My problem is how to identify the user-session which uploaded the file, so that I can serve the file back to that person.
I hope someone has knowledge about this and is willing to help. Thanks!
Every person that logs into a Shopify store gets a customer ID. You can use this for your uploads. Ensure images get manipulated with that ID in mind. Now, use an App Proxy that sends the same customer ID to your App. Your App can then use this ID to find the image previously uploaded, and you can return it to the shop. A very common pattern of Shopify use.
As for getting the customer ID, one way is to dump it using Liquid since you have {{ customer.id }} or you can sniff it out of the cookies Shopify stores for a user session. It exists, but you'll have to dig for it, I forget its exact code.

Swift 4 & Firebase: onDisconnectRemoveValue fired when app go background

One of my company's app's requirements is a tracking system, where a user can track other nearby users when using our app. So there is a map and user's location (coordinates) will be updating to Firebase so other users can see on their map.
The most important thing is that we don't want sign out/offline users' location data on Firebase (because we want users only to be able to see online nearby users) so I use Firebase's onDisconnectRemoveValue() method to automatically remove disconnected users' data. The method worked great. BUT, if the app goes to the background (or screen is turned off), onDisconnectRemoveValue is fired too, so the data will be deleted (I don't want it to be deleted).
I searched the Internet, found this SO post.
This method is designed that way, I think I cannot do anything about it.
So my question is: If I want to remove a data on Firebase if the user is disconnected (loss internet connection OR app closed/killed), how can I do that?
Additional info: because I want users can updating their location to Firebase even if the App go to the background or device screen is off so I cannot check the connection at the client (can check, but when connection loss detected, cannot send remove data request to Firebase).

iOS app - users updating wait time

I am building an iPhone app in which users (or employees) will be able to go to restaurants and update/give an estimate of the waiting time at that location. To do something like this, would it be most efficient to use an XML webpage and parse the data that is currently there and update that value with the user's input then reload the XML database? Obviously any user should be able to update the site so it needs to be done from a web-server.
Also, if anyone knows of a similar example for this, that would be spectacular!
Thanks for your help,
you can take a textfield in which you can fill the value and then send it onto the web server through XML or JSON web service and the other users can see the update from the web service.

iPhone: cached profile images from the web - how to find out that remote image changed?

I'm loading profile pictures from Facebook, cache them on disk and load them into cells of a UITableView.
Now I'm wondering, how I can find out when someone has changed his/her profile picture on Facebook that I have to load the new image from the web instead of using the one cached disk.
The url of the image is always the same. Is there a lightweight way of doing this without downloading the image and comparing it to the local file?
The user profile is available at https://graph.facebook.com//picture. That URL never changes.
When a request is made to that URL, it redirects to a URL unique to each image. If your download library properly implements caching and header checking, you will get back a 302 and know that the content hasn't changed.
ASIHTTPRequest is one such library. It can be configured to download the profile picture, store it on disk, and then only query to see if the image has changed, without downloading the whole image.
If you store user profile picture local, get the profile "updated_time" http://developers.facebook.com/docs/reference/api/user/
If it's value changed, update the profile picture. You don't need to "cron" this task, or check every time when user connected - subscribe this field to Real-time Updates API.
From my checking, the facebook profile url will change whenever the user changes his profile image. You can check it yourself, but there is no documentation for it. Use it with your own risk:)
Use Facebook Real-time Updates: http://developers.facebook.com/docs/reference/api/realtime/
This is not trivial to implement but could be really useful. When I have the time, I plan to do something like this: set up a server that receives callbacks. When receiving the callback, capture the time the item was updated. Then I'd also establish an endpoint that any client could access, passing any entity ID's it wanted, and it'd return the most recent update time. This could be XML or JSON. Thus, you'd have to do two things. 1) Initially, add your list of watched entities to my server. 2) To check for updates, make a single call with a list of entity ID's and get back a list of when the ID's were most recently updated, and refresh your cache as appropriate.
It'd be great if I could make such a thing publicly available, huh? :-)