The framework connects to the AppStore on your app’s behalf to securely process payments from users, prompting them to authorize payment.
StoreKit manages transactions for In-App Purchases.
In-App Purchase used to collect payment for additional features and content.
Read:
Top iOS Interview Questions And Answers for Beginners
Top 5 Simple iOS Interview Questions And Answers
Most Important iPhone interview Questions and Answers
Top iOS interview Questions And Answers Collection
2.How to compare two NSDate values in Objective C ?
Answer:
Here's an example using the NSDate method, compare:
It explains an easy way to compare two dates.
NSDate *currentDate = [NSDate date];
NSDate * currentDate = [NSDate dateWithString:@”Next Date”];
NSComparisonResult ResultDate = [currentDate compare : currentDate];
if (ResultDate == NSOrderedAscending)
{
NSLog(@”ResultDate is in the future”);
}
else if (ResultDate == NSOrderDescending)
{
NSLog(@”ResultDate is in the past”);
}
else
{
NSLog(@”Both dates are the same”);
}
Read:
Top 5 Frequently Asked iOS Interview Questions And Answers.
Top Interview Questions And Answers in Objective C
3.How to calculate number of days between two NSDates in Objective C ?
Answer:
+ (NSInteger)NumberOfDaysBetweenDate:(NSDate*)fromDateTime andDate:(NSDate*)toDateTime
{
NSDate *fromDate;
NSDate *toDate;
NSCalendar *calendar = [NSCalendar currentCalendar];
[calendar rangeOfUnit:NSCalendarUnitDay startDate:&fromDate interval:NULL forDate:fromDateTime];
[calendar rangeOfUnit:NSCalendarUnitDay startDate:&toDate interval:NULL forDate:toDateTime];
NSDateComponents *differenceResult = [calendar components:NSCalendarUnitDay
fromDate:fromDate toDate:toDate options:0];
return [differenceResult day];
}
Read:
Most Important iPhone interview Questions and Answers
4.What is Metal in iOS?
Answer:
Apple introduced a latest API for GPU-accelerated 3D graphics in iOS 8,which is called as Metal.
Is Metal Similar to OpenGLS?
Yes,it is a low-level API that interacts with 3D graphics hardware.Metal is not cross platform but OpenGL ES is cross platform.
Metal is much more efficient with Apple hardware, providing much improved speed and low overhead compared to using OpenGL ES.
Read:
iOS Interview Questions And Answers Part11
iOS Interview Questions And Answers Part12
iOS Interview Questions And Answers Part13
5.What are the features of Game Kit Framework?
Answer:
Let’s point out some features of Gamekit framework:
It offers Game Center functionalities.
Game Center provides a centralized service that connects players to each other.
Users connect to Game Center and interact with other players through an alias.
Players can set status messages as well as mark other players as friends.
Multiplayer Functionality:
It allows your game to create network matches that connect players through Game Center.
Players can invite their friends or be connected to anonymous players.
Most importantly, players can receive invitations to join a match even when your game is not running.
Your game is running on each device and the instances of your game exchange match and voice data with each other.
Turn-Based Gaming :
It offers store-and-forward network match infrastructure where the match is played
out over a series of discrete turns. This kind of match can be played without requiring all of the players
to be connected to Game Center simultaneously.
Leaderboards :
It allows your game to store and fetch player scores from Game Center.
Achievements :
It provides the ability to track a player’s accomplishments in your game.
Challenges :
It allows a player to challenge other players to complete an achievement or to beat a
leaderboard score.
Note:
Game Center is available on iOS and OS X.
Read:
Core Data Interview Questions and Answers