[問題] 程式內安裝程式?
大家好,
剛剛無意間在iOS6的iPad 臉書程式發現這個
http://ppt.cc/E~H0
就是程式內開啟AppStore上另一支APP的下載界面(不用跳離開原來的程式),
想請問這是怎麼做到的?(給關鍵字就行了...其餘我在自行查詢)
我用 In app download app, In App install app....等關鍵字去查,
查到的都不是我要的...有些是破解,有些是In House APP...
感恩了~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.127.156.72
推
01/13 03:39, , 1F
01/13 03:39, 1F
推
01/13 07:59, , 2F
01/13 07:59, 2F
→
01/13 13:40, , 3F
01/13 13:40, 3F
→
01/13 14:50, , 4F
01/13 14:50, 4F
推
01/14 10:43, , 5F
01/14 10:43, 5F
→
01/14 21:43, , 6F
01/14 21:43, 6F
太感謝kokuyoku大大了,分享一下心得:
ViewController.h
#import <StoreKit/StoreKit.h>
@interface ViewController : UIViewController<SKStoreProductViewControllerDelegate>{
//View Controller要加上SKStoreProductViewControlleDelegate
}
-(IBAction)CallProduct:(UIButton *)sender;
ViewController.m
#import "ViewController.h"
-(IBAction)CallProduct:(UIButton *)sender{
SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init];
storeViewController.delegate = self;
NSDictionary *parameters =
@{SKStoreProductParameterITunesItemIdentifier:
[NSNumber numberWithInteger:應用程式的Apple ID為一串數字]};
[storeViewController loadProductWithParameters:parameters
completionBlock:^(BOOL result, NSError *error) {
if (result)
[self presentViewController:storeViewController
animated:YES
completion:nil];
}];
}
-(void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
{
[viewController dismissViewControllerAnimated:YES completion:nil];
}
※ 編輯: benjenq 來自: 59.127.156.72 (01/15 03:22)
推
01/17 01:58, , 7F
01/17 01:58, 7F