Phonegap - saving VCard data to contacts on Android and iOS (2019, Phonegap cli-9.0.0, phonegap builder v2) - contacts

All other similar questions are now outdated, so I'm posting this question in the hope that someone has a more modern answer.
My phonegap app has a barcode scanner. It returns correctly with whatever text the QR Code returns with. One of the sample barcodes I tested was a VCard, with full VCard text, starting:
BEGIN:VCARD
VERSION:3.0
FN;CHARSET=UTF-8:A Test
...
I want to take this raw text and parse it as a VCard, saving the contact details to my device's contacts list.
Previously this was possible using cordova-plugin-contacts, but this is now not only deprecated (due to security questions) but also causes the app to crash when using various more modern Android OS's.
Is there another way to do this? I tried saving the data as a .vcf file and then tried to open the file but that doesn't work.

No perfect answer was found. I decided to parse the raw data and use cordova-plugin-contacts even though it is deprecated. I fixed the crashing issue by ensuring a JIT permissions check for READ_CONTACTS.

Related

Scanning QR codes with an AIR app compiled for iOS

Can I really do that with the phone? Perhaps I would have to call any of the native API's, but I am not really sure whether and what is possible. I am pretty sure that the camera is accessible, so at the worst case I could send the picture to the server, decode the QR code on the server, and get the results on the phone, right ?
There's a QR code reading class here: http://www.libspark.org/wiki/QRCodeReader/en and some instructions on how to use it: http://blog.jactionscripters.com/2009/05/23/introduction-of-qr-code-reader-library/
While I've never done it, iOS does support the camera as far as I know so it should work just fine. The code is pretty similar to using a webcam.
And here's a library which claims to be improved: http://www.kasperkamperman.com/blog/flash-qrcode-reader-as3/
If you are working on a iOS (iPhone or iPad) project, i recommend you qr-zbar-ane native extension. You can find download links and sample code at : http://www.nativext.com/ane-by-os/ios/qr-reader-native-extension/

Decompiling iOS Objective-C binaries [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
decompile an app binary to get back to source code
I've got an iPhone/iPad application, what is kinda interesting. It uses a special internal XML format for the stuff it does, but without a device, I can't see how it works. I want to recreate this function for Android phones (freeware and opensource maybe) but for that I would like to see how the reading part works, actually, I would like to know the XML format itself. It is very hard to re-create from scratch (using only the XML files) as they aren't commented and the names aren't telling anything particular about their function.
All I want to see is how the files are read, what specific tags do, etc, so I can write a converter to convert the iOS output files for my same purpose Android app. And yes, I've checked the Market, there's no such application like the one I want to recreate (and is actually almost totally recreated, I only need a converter or a parser for these iOS specific files).
The binary of all apps from the iOS App store, and on the filesystems of stock OS devices, is encrypted.
Try writing the authors of the app very politely, and see if they'll give or offer to sell you source code for the parser in which you're interested.
As noted here, you can get the assembly code, but you'll never be able to get the source code since there are an indefinite number of ways to represent the assembly.

UIGetScreenImage the app is not getting the approval due to this method

HI i am using zxing API into my application and it says that the application cannot be posted to the App Store because it is using private or undocumented APIs:
Private Symbol References
UIGetScreenImage
can somebody help me out as soon as possible
ZXing 1.6, which was released yesterday, has switched to the AV Foundation classes of iOS 4. It's the real-time scanning approach that's allowed by Apple.
Update:
ZXing 1.6 comes with three iPhone projects:
Barcodes is the original iPhone app. It's still using the UIGetScreenImage API.
ZXingWidget is a library that you can include into your own app. It uses the new AV Foundation classes.
ScanTest is a sample app using ZXingWidget
So the way to go is to use the ZXingWidget.
ZXing is displaying the feed from the camera live on the screen, and using UIGetScreenImage to repeatedly capture the resulting image without the user having to do anything. (This is a very nice user experience because the user doesn't have to press a button to take a picture of the barcode; the app just keeps taking pictures over and over until it gets one that works.)
This technique used to be perfectly fine, but Apple has recently changed their policy and banned the use of UIGetScreenImage. In light of Apple's change in policy, your best choice now is to make it so the user has to press a button to photograph the barcode manually.
Since ZXing is open-source, this should be a simple matter of changing a few lines of code to now use [UIImagePickerController takePicture].

Detecting iPhone app version update?

I'd like to determine when new versions of my app are available on the Appstore and display some form of notification to the user when this happens - perhaps a UIAlertView or similar - and wondered whether anybody knew of any pre-designed frameworks for doing this? I found the StoreKit provided by iPhone SDK but it seems to only return application names, not version numbers, so is of no use to me.
Any help greatly appreciated.
Thanks!
I don't think that there is a prefabricated framework for that kind of issue.
At least I couldn't find one when i was dealing with that topic.
What I did was fairly easy (provided that you have access to any kind of webserver where you're able to upload files)
I simply created a text file with two things in it.
1) the version number of the most up to date version available
2) a text that is being displayed to the user (in case his version is out of date)
on startup (actually I do it on every 3th startup and not more than once per day) i download the txt file, read the first line, extract the version, compare it to the current version of the app that is running on the users divice. if the version is out of date i then read the second line out of the text file and display it in an UIAlertView.
I hope I could help
*sam
You could create your own out-of-band data based on RSS, like the Sparkle framework based on Mac. You'd need to maintain that feed yourself of course - any time an update is accepted, you would publish a new article to the feed.
Little late to help original question, but figured might still be useful.
iVersion is an SDK which queries App Store API directly from app.
HockeyKit, Krooshal, CleverStork offer SDK and web service which monitor App Store.

How can I access to the iPhone address book in a web app?

I'm currently developing a web app for my company. In this application, there's a form with input fields containing informations about contacts. I would like to create a button which allows to create a contact in the address book on a click.
Is there anyway to access the address book with JavaScript or other web language ?
For example, on windows and IE we can create an ActiveX object in JavaScript to create contacts in Outlook...
Thanks.
If this turns out to be possible, I'm eating my Mighty Mouse ..
I apologize for the slightly unrelated answer
P.S: to make this answer slightly more related; you could accomplish this by creating a hybrid between a native application and a web app, where the native app will pop-up the address book and then return its data to the web app.
If you create a link that generates a file in the vCard format, the iPhone version of Safari might recognize it as a contact and automatically launch the address book app when they click on the link.
It appears that this would NOT work as of iPhone 2.1 (no vCard support in safari), but it might work in 3.0 - I have seen that people will be able to send vCards via MMS on the iPhone, so maybe they'll work in safari too? I guess you'd just have to try it to find out.