Monday, October 24, 2011

iOS Beta Builder : send iOS app build as a link

iOS Beta builder is a great tool for iOS Developers, its create HTML page which has link to install the beta version of application on your device.
http://www.hanchorllc.com/2010/08/24/introducing-ios-beta-builder/

Download Beta Builder


Step 1:
Create a ipa file in XCode4
  1. Go to Product -> Archive.
  2. After the Archive operation completes, go to the Organizer, select your archive,
  3. Select and Share in the "Select the content and options for sharing:" pane set Contents to "iOS App Store Package (.ipa) and Identity to iPhone Distribution (which should match your ad hoc/app store provisioning profile for the project).
Step 2:
Make a HTML page using Beta Builder
  1. Open Beta Builder
  2. Browse your ipa file
  3. All other information will detect automatically
  4. Enter the URL where you will add the HTML
    e.g. if your link will be http://www.myDomain.com/myApp/index.html then enter the http://www.myDomain.com/myApp
Open the link into your device and install the application
Note : Your provisional profile should match with the device.

Wednesday, June 15, 2011

MGTwitterEngine getFollowersIncludingCurrentStatus issue : Twitter API deprecated

I am using Twitter+OAuth+IPhone

This Monday I fount that MGTwitterEngine function which I am using for getting the list of follower with there status i.e getFollowersIncludingCurrentStatus of MGTwitterEngine returns Error 403

this function was working before it

I assume that there may be some limit cross as per twitter developers http://dev.twitter.com/pages/responses_errors

But it still not working after 2 days.

Then I search on internet and after search and discussion with other developer I found that API which I am using has deprecated.

Then I change the API version in MGTwitterEngine

I change in the MGTwitterEngine.m line 40
#define TWITTER_DOMAIN @"twitter.com"
to
#define TWITTER_DOMAIN @"api.twitter.com/1"

then my function working fine as it was working.

Hope this post help people if facing similar issue

Related Discussion
twitter-development-talk link

Friday, March 4, 2011

Hide file or folder on Apple Mac, Show hidden file or folder on Mac

Hi All


Firstly I try to find hidden a file/folder like Window. But not able to find it.

Then it is done my commands in terminal

Open terminal from Application/Utilities

Command for hide a file/folder

setfile -a V FILENAME


Command for unhide a file/folder

setfile -a v FILENAME


Command for show all files hidden/unhidden

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder


Command for show only unhidden files

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder




There is software for managing private files named HIDE FOLDER. You can download free version from http://altomac.com/

Wednesday, November 10, 2010

XML file data as array in Cocoa using XML Parser

Add a xml file in your project

XML File - myxml.xml

<?xml version="1.0" encoding="utf-8" ?>
<data>
<object>
<name>English</name>
<age>24</age>
</object>
<object>
<name>Akram</name>
<age>20</age>
</object>
<object>
<name>John</name>
<age>30</age>
</object>
</data>


Code of file XMLParser.h


#import <UIKit/UIKit.h>
@interface XMLParser : NSObject {
NSMutableString *currentElementValue;
NSMutableArray *records;
NSMutableDictionary *data;
}
-(void)parseDataWithCase;
-(NSMutableArray *)records;
@end



Code of file XMLParser.m


#import "XMLParser.h"
@implementation XMLParser
-(void)parseDataWithCase{
NSString *filePath = @"myxml.xml";
// initializing array to be obtained after parsing
if(records)
[records removeAllObjects];
else
records=[[NSMutableArray alloc] init];

// xml parsing
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:[NSData dataWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:filePath]]];
[parser setDelegate:self];
[parser setShouldResolveExternalEntities:YES];
BOOL success;
success = [parser parse]; // return value not used
[parser release];
}
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError {
}
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict {
}
- (void)parser:(NSXMLParser*)parser foundCharacters:(NSString*)string{
currentElementValue = [[NSString alloc] initWithString:string];
if( [currentElementValue isEqualToString:@"\n"] || [currentElementValue isEqualToString:@"NULL"] || [currentElementValue isEqualToString:@"(null)"] ){
[currentElementValue release];
}

}
- (void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qName{
if ([elementName isEqualToString:@"data"]){
[data removeAllObjects];
} else if ([elementName isEqualToString:@"object"]){
[records addObject:[[data mutableCopy] autorelease]];
[data removeAllObjects];
} else {
if(data){
}else{
data=[[NSMutableDictionary alloc] initWithCapacity:2];
}
[data setObject:currentElementValue forKey:elementName];
[currentElementValue release];
}
}
-(NSMutableArray *)records{
return records;
}
- (void) dealloc {
[records release];
[data release];
[super dealloc];
}
@end



import the XMLParser.h class in your class
Call the function parseDataWithCase for parsing xml
and then call the records it return a array of that xml.



XMLParser *xmlParser = [[XMLParser alloc] init];
[xmlParser parseDataWithCase];
myArray = [xmlParser records];
[xmlParser release];




(
{
name = "Amit";
age = 24;
},
{
name = "Akram";
age = 20;
},
{
name = "John";
age = 30;
},
)


You can customize your parse method as you own need


- (void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qName

Thursday, April 22, 2010

Animated and transparent GIF’s for iPhone usign cocoa

Hi All

Show the animated/gif file in using cocoa in you Iphone application
Use this code

NSURL* firstUrl = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@myfile" ofType:@"gif"]];
UIImageView * firstAnimation = [AnimatedGif getAnimationForGifAtUrl: firstUrl];

NSURL * secondUrl = [NSURL URLWithString:@url of animated image];
UIImageView * secondAnimation = [AnimatedGif getAnimationForGifAtUrl: secondUrl];

[theFirstAnimatedGif addSubview:firstAnimation];
[theSecondAnimatedGif addSubview:secondAnimation];

Use the code and give your comments


Thanks
Amit Battan

Friday, April 2, 2010

You & Me - Dots and Boxes (IPhone Application)

I have launch the next game 'You & Me - Boxes'


Its simple dot and boxes game.
You can play with your friend or device with easy and hard mode.
You can change the number of row and columns.
Just download and enjoy the game.

Free version is coming soon





Click here for our more IPhone Application



Thanks
Amit Battan

You & Me - Tic Tac Toe (Iphone/Ipad Application)

Me and Mandeep did release the you and me 'nought & cross' on the itunes stores.


Its a simple Tic-tac-toe, and alternatively called noughts and crosses, X's and O's, and many other names, is a pencil-and-paper game for two players, O and X, who take turns marking the spaces in a 3×3 grid, usually X going first. The player who succeeds in placing three respective marks in a horizontal, vertical or diagonal row wins the game.

This game has got a very simple and cool design which just remind us of the game which in our childhood we loved to play on paper.



Feature Include
  • Multiple Level
  • Sound functionality
  • 2 Player Mode
  • With Device
  • Customize game result according to level and type of game

Just enjoy the Game ..free version is coming soon

Click here for our more IPhone Application

Thanks
Amit Battan