Saturday, 13 October 2012

Free To Paid iPhone Application Data Migrations With Custom URL Handlers


Free stores user data in an encrypted SQLite Database. Since we really wanted a way to copy the data file from Free to paid we developed a fairly clever solution: use a registered URL handler as a means of communication between application versions. This is how it works:
  1. A customer downloads  free and enters some unique private data. All information is written to a database in the application’s document directory.
  2. When the 10 record limit is hit free asks them to upgrade. An upgrade button launches to explain the process and allow the user to download the paid version of the product.
  3. Once Strip is purchased and installed, our customer will launch free and click an “Export to free” button. free reads the application database into an NSData object, Base64 encodes it and then Launches a “strip://” URL with the encoded file contents as a URL parameter.
  4. The full version of paid is registered as a handler for “strip://” URLs. The OS launches paid and passed the URL to the handleOpenURL method of the application delegate. It parses and decodes the data and writes the database to the desired location in the new applications Document folder.
  5. Our customer now has access to all the data the originally entered into free!

Project Setup

This tutorial assumes that your project is already configured with two targets, one for your full version, and one for the Lite.
Start by creating a new InfoLite.plist file for your Lite version. We use 2 separate .plist files to ensure that the Full version is the only registered URL handler (we don’t want the Lite version responding to upgrade events itself!). It is easiest to just make a copy of the existing Info.plist file named InfoLite.plist.
Next, Open up the Build preferences for the Lite target. Change the Info.plist File property to read InfoLite.plist. This will ensure that the Lite target includes the proper file.
Now open the Info.plist (used by the Full Version) and register a custom URL handler. This is a straightforward process of adding elements as shown in the following screenshot.
Please note that the URL identifier and URL scheme must be unique for your application — see this stepwise overview of the process for reference.
Finally, the application must include code to perform Base64 encoding itself. This functionality is, unfortunately, not directly accessible in the framework SDK. There are a few options in Cocoa, including using OpenSSL’s libcrypto, but the easiest method is to use the encoding libraries fromGoogle Toolbox for Mac which is conveniently distributed under the Open Source Apache License. Download GTMDefines.h, GTMBase64.h and GTMBase64.m, then add them to your project. The GTM code compiles perfectly on the iPhone and even includes web safe variants that are immediately suitable for use in URLs without percent encoding.

he controller action code will read the data file, encode it and then format a URL with the protocol prefix / URL scheme configured in the previous step.
#import "GTMBase64.h" 
...
NSData *fileData = [NSData dataWithContentsOfFile:@"/path/to/LiteApplication/Documents/file"];
NSString *encodedString = [GTMBase64 stringByWebSafeEncodingData:fileData padded:YES];
NSString *urlString = [NSString stringWithFormat:@"myapp://localhost/importDatabase?%@", encodedString];
NSURL *openURL = [NSURL URLWithString:urlString];
[[UIApplication sharedApplication] openURL:openURL];

The Full Version

The final step is to make your application handle the Open URL event and reverse the encoding process.
Add a handleOpenURL method to the AppDelegate implementation as follows. This will receive the URL, sanity check it, and then parse the query string directly. The resulting binary data is written to the file in the full application’s data directory.
#import "GTMBase64.h" 
...
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    if([@"/importDatabase" isEqual:[url path]]) {
        NSString *query = [url query];
        NSString *importUrlData = [GTMBase64 webSafeDecodeString:query];

        // NOTE: In practice you will want to prompt the user to confirm before you overwrite their files!
        [importUrlData writeToFile:@"/path/to/FullApplication/Documents/file" atomically:YES];
        return YES;
    }
    return NO; 
}

Tuesday, 2 October 2012

use single developement profile in different devices


Use one iPhone development license on different mac.

Step 1: To export your private key and certificate for safe-keeping and for enabling development on multiple systems, open up the Keychain Access Application and select the ‘Keys’ category.
Step 2: Control-Click on the private key associated with your iPhone Development Certificate and click ‘Export Items’ in the menu. The private key is identified by the iPhone Developer: public certificate that is paired with it.
Step 3: Save your key in the Personal Information Exchange (.p12) file format.
Step 4: You will be prompted to create a password which is used when you attempt to import this key on another computer.
Step 5: You can now transfer this .p12 file between systems. Double-click on the .p12 to install it on a system. You will be prompted for the password you entered in Step 4.

Thursday, 16 June 2011

Refund Paid Apps in Android Market


Android Apps – Try before your Buy

Say you have found an interesting app in Google’s Android Market that you are quite willing to buy but as the app price is a bit on the expensive side, you would like to use the app and test the various features before loosening your purse strings.
Google doesn’t offer “try before you buy” apps but there’s an easy workaround that will help you test any paid app before buying it – you buy an app from the Android market, use it for about 10-12 minutes and then refund the app. The app will be uninstalled from your mobile phone and your account won’t be charged.

How to Refund an Android App

It take a few easy steps to refund an app to the Android Market:
 SC20110523-123852  
Step 1: Visit the Google Android Market, either on your desktop or your mobile phone, and buy any of the 'paid' apps.
Step 2: The app is now installed on your mobile phone. Launch the app and you can test it for the next 10-12 minutes.
Step 3. Go back to the Android Market app on your mobile phone and under "My Apps," tap the app name that you are trying to refund. Hit the "Refund" button and the app will automatically uninstall from your mobile phone.
Step 4. Once the App has been uninstalled, it may ask you to specify a reason for removing the app. You can check "I'd rather not say" here and the app amount will be refunded. You’ll also get an email from Google saying:
You have uninstalled the application from your phone. We have cancelled your order and you have not been charged.
The refund process is quite easy and 10 minutes are often enough for you to get a good idea about an app. I tried this with at least two different paid apps and the whole thing worked without a hitch. There are however two things regarding Google’s refund policy that you should know:
1. You only have 15 minutes to return an app to the Android Market from the time of download after which the “refund” option will disappear from the app.
2. You can return an app only once; if you refund an app and purchase it again, you won’t be able to refund it to the Android Market.

Thursday, 9 June 2011

Popup SMS Pro(Android Application)


Popup SMS Pro... is the version with lots of more features ....if you want you can try the Popup SMS and if you feel you require the pro version then go for it the major difference are as follows.
Full feature list for Popup SMS pro:
- Convenient popup window on incoming message
- Quickly reply, delete, forward, call or close the message
-Customize notifications including sound, vibrate pattern, LED color (if available).
-Also customize notifications for individual contacts
-Setup notification reminders (repeating notifications if you miss the first one)
-Optional privacy mode to hide sender name and message contents
Plus......
1. Customized User Interface, that is themes, you can change the button color and Popup Border Color. Check the screen shots for the themes you can make for yourself. Match the theme with your handset and enjoy the app.
2. The color picker gives you million color choices to create your theme. Check out the screen shot. You just have select the colors and test the theme and done. Cool!!!!!
3. Post to Facebook is one of the cool features, which is integrated in this pro version, if you want to just have the single feature in one app than you can use Social texts application here. but the Popup SMS pro with this feature makes it more convenient way to post your SMS to Facebook, no more SMS charges to send your post to Facebook or no hassles to copy paste the text to update your Facebook status, just a single click and update the status...
4. The post to Facebook has a edit box which lets you edit the message before sending it, you can add your tag line or anything to the text before updating it to Facebook.
5. Quick reply can let you reply the SMS immediately from the Popup SMS Pro.
6. Facebook Login & Logout option... so not to worry if you need change the Facebook Login.
7. Many More coming soon.....Provide your inputs by mailing us or by commenting.......Giving us low rating will not help us to improve the features, so please avoid that....


                                         




Wednesday, 25 May 2011

error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

Description:
This error indicates you're using a string resource with %s in it. See how to use it here under 'Formatting strings'. In general, instead of:

Hello, %s! You have %d new messages.
Should be:
Hello, %1$s! You have %2$d new messages.

Popup SMS(Android Application)

Popup SMS brings you cool UI, fast and convenient SMS experience. Popup SMS provides a convenient popup dialog when a message is received that allows you to quickly read and reply or forward or call to messages. Quickly read and reply or forward or call to SMS messages from a convenient popup window. It also provides in-depth customization of message notifications including contact specific sound, vibrate and LED settings. Popup SMS is a tiny application, which is receiving SMS messages as a notification with popup. Have a useful experience with Message Popup. Similar to the SMS Popup app - but is faster, looks better, and is a pleasure to use.

Full feature list:
- Convenient popup window on incoming message
- Quickly reply, delete, forward, call or close the message
-Customize notifications including sound, vibrate pattern, LED color (if available).
-Also customize notifications for individual contacts
-Setup notification reminders (repeating notifications if you miss the first one)
-Optional privacy mode to hide sender name and message contents
Developed by :
- Mitul Nakum
- Sanjay Patel
- Pravin Dodia