In our iPhone app , we offer email templates populated with DB. also user can create their own templates.
Say for example , i have my own templates created over 500 entries to use
here i need to know the possibility on the below things since my client asks me.
If i want to to send my templates stored into my DB to myfriend who uses the same application.( So my friend does not have to create the templets on his own , he can use mine)
Can that user be able to load those template details ( DB information ) into his app? (like posting the db contents to server and the same content can be loaded into his app using link)
I think it cant be done but i would like to know opinions and views to convey this to my superior.
Thanks a lot
This could help: How do I associate file types with an iPhone application?
Okay, well.. It's possible to do what you are trying to do.
You would need to
Serialize the data that's stored in the DB
Figure out a way to send this data to the server/as an attachment in an email over to your friend.
So from that point of view,
Doing the first is pretty simple. If its all just string content, you can serialize it into an XML/JSON. There are a lot of ways out there that converts objects into strings or bytes to send them over the network anywhere you please.
The second needs support from the server. You would need a server that can identify the applications from one another. ie. yours from that of your friend's. It should then be made to handle the serialized content you are planning to send over and then figure out a way to send it to the friend. maybe a push notification? You could possibly look at Urban Airship or some such offering for doing this incase you dont have an existing server.
Or, you can cut yourself all the work and see if your workflow can fit into this
http://www.raywenderlich.com/1980/how-to-import-and-export-app-data-via-email-in-your-ios-app
Related
I'm developing an app that's pretty simple, and the important part of it is the content, which consists of lots of info that has been gathered over many years. I want to format it in a nice way to show to the user.
When the user downloads the app and first loads it, it goes to the server to get the whole database into the phone. Then, he can see the important items, and sort/filter through them. To avoid somebody taking my database, I'll use a SSL connection. I know if they want they could use the app to see every piece of content one by one, but there's nothing to do about that.
The thing is: I have the data in the cloud (mine). I can securely download it using an SSL connection (any other ideas to secure the transfer?). When I get it here, I'll save it in a db (Core Data is the obvious choice).
How can I secure the data in the internal database, so if the app is hacked, someone cannot access the db? I would put it in the keychain but it's a rather large db for that and it's not that important. (It's not sensible info, just info I don't want anybody to get massively.)
The other thing I could do is to never store anything in the device and have the user always making calls to the cloud, but I think this would be too time consuming. And just give him the option to save their favorite picks to the device. But that's too time consuming and there is the sync issue.
This is a reference I looked up about a similar issue, without the part I'm asking answered:
How to encrypt iPhone upload and download of info?
Basically, the only choice is to use SqlCipher. Of course, you have to port it to iPhone yourself (unless someone else has posted a port since last I looked). But it's not an insurmountable task.
Of course, even with SqlCipher you have the challenge of storing the key somehow. There's no really secure way to do this -- you have to use some form of "security by obscurity".
Why not just have some private key info stored in the code, and then when you want to download the database just have it query the server with the key? That way you wan't need to worry about SSL or encryption in the downloading part. In regards to storing it I agree with Hot Licks, SqlCipher appears to be the best and only option. However watch out for encryption, as you will have to declare it to apple and get all kinds of export permits (http://stackoverflow.com/questions/2135081/does-my-application-contain-encryption).
Hope this helps,
Jonathan
I am sending a request back to the server I am communicating with, the gist of this request will have a bunch of different parameters, like user ID, request number etc.
One of the more important parts of the request is a segment of XML that im hoping to create based of a few user selections in my interface.
Then at the end i will wrap this all up and send it off to the server...
However at the moment I have no idea how to form an segment xml, I have been reading this but im not sure how it relates to what I would like to do.
any help, example code, example tutorials or anything would be really helpful.
A plist is just xml with a strict dtd; and you can use NSPropertyListSerialization to create one to send back to the server from an NSArray/NSDictionary, very easily.
I am recently making an app which needs to exchange messages between different iOS devices.I decide to use mail to do with the data transfer.And I read a tutorial by Ray( http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app )
.It tells a way to handle this thing.But my situation is that the data I want to transfer are all stored in the sqlite.I think it's better to convert these data into NSString and than send them.But I have no idea of how to define custom UTI which will specify the specific type,like .myapp which will be sent to the receiver,and how to user can open it and import data in the app.Because I use iOS5,so I can't even follow the steps in the tutorial.By now,i can send email to users with the data,but not with the .myapp attachment.So , can anyone give any advice on how to get the data into .myapp file and how the receiver will get data and import it in the app,specially for iOS5?Great thanks.
I successfully made this work via Email by simply constructing a text file in CSV format (comma separated values) to be attached to the email message. I registered the .csv with my app, added an import handler, and now one can then open the file on the other iOS device running the same app.
However, I found this approach rather clumsy and not very user friendly. Have you considered using the Dropbox API instead? Even better, use the new iCloud interface right built right into the SDK. That seems so much more convenient from the user's perspective.
Another approach could be to send the data to a webservice which informs the receiver by notification (Apple Push Service Notification). Your data is then stored on a central system and can be loaded by the app as soon as the receiver gets the notification and opens the app.
I would like to create a service that parses data from a feed and then sends notifications to subscribed units.
And I'm note sure how to approach this problem. Would be thankful for any advice.
If you're going to be sending less than 1,000,000 push messages per month (greater than that amount you would have to pay), I'd look into UrbanAirship . They have something called a feed feature that does this:
Urban Airship has a feature where we
will monitor an RSS or Atom feed and
send a push notification when a new
entry is published. We allow you to
set up a template to extract items
from the feed to dynamically generate
push notifications with content from
the new entry. You can easily set this
up from the interface at
https://go.urbanairship.com/ , but
this API allows you to
programmatically create them.
So, that might work for you. Or, you can look into setting up your own server that runs a script, parsing your feeds. Then you can use Easy APNs to send the messages yourself. I'm using it and it works perfectly for my needs. For me the learning cure was steep because I'd never done anything besides Obj-C, but it ended up being quite easy to learn.
I have a Core Data-based app that keeps records of purchase receipts, and I'd like to know if I can send one specific record (i.e., one row from the SQLite table) from one phone to another via email or whatever. I'd like to have a button that says "send a copy of this receipt to so-and-so" that would email the record that could then be imported. These are very small records that have less than 20 rows.
I know that this has been asked before (Core Data Store Sharing between iPhone Apps), but I'm wondering if anyone who has actually implemented this could share an approach.
Thanks!
If the length of the record you wish to send is no more than 95 Kb, then you may take advantage of GameKit and export/import it using a P2P connection. I do this in one of my apps using Bluetooth as the underlying connection. Otherwise, large records may be handled by a bonjour client/server implementation. Again, this is commonly done when synchronizing data with a desktop application.
In this case, by far the easiest approach is to write a serialization/deserialization method for your entity. I would suggest using a plist with an application-specific extension. You can then load the plist in your recipient and deserialize into the client's managed object context.