Интуит. Разработка приложений для iOS. Лекция 12. Тестирование, публикация и др.

  • Published on
    28-Nov-2014

  • View
    669

  • Download
    2

DESCRIPTION

 

Transcript

  • 1. , iOS 12 gleb34@gmail.com
  • 2.
  • 3. ?
  • 4. ? , , , GPS
  • 5. iOS?
  • 6. iOS? MPMoviePlayerViewController
  • 7. ?
  • 8. ? UIGestureRecognizer
  • 9. https://developer.apple.com
  • 10. developer.apple.com - iOS id
  • 11. developer distribution adhoc distribution appstore push
  • 12. iTunes Connect https://itunesconnect.apple.com
  • 13. itunesconnect.apple.com : , .. , ..
  • 14.
  • 15. https://www.testightapp.com
  • 16. TestFlight email developer.apple.com
  • 17. AppStore
  • 18.
  • 19. Crashlytics Ad Hoc App Store https://www.crashlytics.com
  • 20. App Annie , https://www.appannie.com
  • 21. AppBot http://appbot.co
  • 22. Flurry http://www.urry.com
  • 23. [Flurry startSession:@"2YT83KWNNPGVKJJ4FC"]; NSDictionary *params = @{ @"title" : level.title, @"index" : @(level.index) }; ! [Flurry logEvent:@"start_level" withParameters:params]; pod 'FlurrySDK'
  • 24. in-app purchase
  • 25. in-app purchases consumable non-consumable itunes connect
  • 26. pod 'MKStoreKit' MKStoreKitCongs.plist: if ([MKStoreManager isFeaturePurchased:@"mobi.krugozor.history.hard"]) { ... }
  • 27. [MKStoreManager.sharedManager buyFeature:@"mobi.krugozor.history.hard" onComplete:^(NSString *purchasedFeature, NSData *purchasedReceipt, NSArray *availableDownloads) { // } onCancelled:^{ // }];
  • 28. restore purchases!! [MKStoreManager.sharedManager restorePreviousTransactionsOnComplete:^{ // } onError:^(NSError *error) { // }];
  • 29. . .
  • 30. Flurry Flurry
  • 31.
  • 32. ru.lproj, en.lproj Localizable.strings Storyboard
  • 33. NSString *str = NSLocalizedString(@"Hello, world!", nil); /* Localizable.strings */ ! "Hello, world!" = ", !";
  • 34. /* Main.strings */ "M56-y0-JDf.text" = " !"; "LEK-6m-uDB.text" = "!";
  • 35. Defaults
  • 36. . OAuth http://getsharekit.com ShareKit
  • 37.
  • 38. #import "DefaultSHKConfigurator.h" ! @interface KrugozorSHKConfigurator : DefaultSHKConfigurator ! @end
  • 39. ! @implementation KrugozorSHKConfigurator ! - (NSString*)appName { return @": "; } ! - (NSString*)appURL { return APP_URL; } ! - (NSString*)vkontakteAppId { return @"413781232"; } ! - (NSString*)facebookAppId { return @"123323432342432"; } ! - (NSArray*)facebookWritePermissions { return [NSArray arrayWithObjects:@"publish_actions", @"publish_stream", nil]; }
  • 40. ! - (NSArray *)facebookReadPermissions { return [NSArray arrayWithObjects:@"publish_actions", @"publish_stream", nil]; } ! - (NSString *)twitterSecret { return @"asdsadasdadasdas"; } ! - (NSString *)twitterConsumerKey { return @"asdasdasdasdassdsada"; } ! - (NSString *)twitterCallbackUrl { return @"http://krugozor.mobi"; } ! - (NSArray*)defaultFavoriteURLSharers { return @[@SHKTwitter", @SHKFacebook", @"SHKVkontakte"]; } ! - (NSArray*)defaultFavoriteTextSharers { return @[@"SHKMail",@"SHKTextMessage"]; }
  • 41. ! ! - (NSNumber *)isUsingCocoaPods { return @YES; } ! - (NSNumber *)showActionSheetMoreButton { return @NO; } ! @end
  • 42. NSString *text = [NSString stringWithFormat:@" : iPhone iPad: %@", APP_URL]; SHKItem *item = [SHKItem text:text]; item.title = @""; ! SHKActionSheet *a = [SHKActionSheet actionSheetForItem:item]; [a showFromRect:self.button.frame inView:self.button.superview animated:YES];
  • 43.
  • 44. pod 'ShareKit/Facebook'! pod 'ShareKit/Twitter'! pod 'ShareKit/Vkontakte' @interface SHKVkontakte : SHKSharer @interface SHKFacebook : SHKSharer @interface SHKTwitter : SHKOAuthSharer - (BOOL)authorize; + (BOOL)isServiceAuthorized;
  • 45. self.vkontakte = [[SHKVkontakte alloc] init]; self.twitter = [[SHKTwitter alloc] init]; self.facebook = [[SHKFacebook alloc] init]; ! ! [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(shareKitAuthenticationFinished:) name:SHKAuthDidFinishNotification object:self.vkontakte]; ! [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(shareKitAuthenticationFinished:) name:SHKAuthDidFinishNotification object:self.twitter]; ! [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(shareKitAuthenticationFinished:) name:SHKAuthDidFinishNotification object:self.facebook];
  • 46. - (NSString *)currentToken { if ([[SHKFacebook class] isServiceAuthorized]) return FBSession.activeSession.accessTokenData.accessToken; else if ([[SHKVkontakte class] isServiceAuthorized]) return [NSUserDefaults.standardUserDefaults objectForKey:kSHKVkontakteAccessTokenKey]; else if ([[SHKTwitter class] isServiceAuthorized]) return self.twitter.accessToken.key; else return nil; }
  • 47. UIActivityViewController
  • 48. UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:@[image, @"text"] applicationActivities:nil]; ! ! activity.excludedActivityTypes = @[ UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, UIActivityTypeAirDrop ]; ! ! [activity setCompletionHandler:^(NSString *activityType, BOOL completed) { if (completed) { // } }]; ! [self presentViewController:activity animated:YES completion:nil];
  • 49. @interface InstagramActivity : UIActivity ! @end
  • 50. iCloud NSUbiquitousKeyValueStore UIDocument Core Data http://www.objc.io/issue-10/icloud-core-data http://www.raywenderlich.com/12779/icloud-and-uidocument-beyond-the-basics-part-1
  • 51. NSURL *ubiq = [NSFileManager.defaultManager URLForUbiquityContainerIdentifier:nil]; if (!ubiq) { // iCloud } else { [NSUbiquitousKeyValueStore.defaultStore setString:@"value" forKey:@"key"]; ! [NSUbiquitousKeyValueStore.defaultStore synchronize]; } NSString *v = [NSUbiquitousKeyValueStore.defaultStore stringForKey:@"key"];
  • 52. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(icloudChanged) name:NSUbiquitousKeyValueStoreDidChangeExternallyNotification object:nil]; - (void)icloudChanged { // icloud }
  • 53. http://tvme.ru
  • 54. ! gleb34@gmail.com twitter.com/pilot34

Recommended

View more >