我正在尝试按照此处描述的技术将应用内购买添加到我的应用中:
我通过itunes connect添加了一个产品,其ID设置如下:
com.mycompany.myapp.myproduct1
Run Code Online (Sandbox Code Playgroud)
bundle id(在p-list和app store中指定)设置如下:
com.mycompany.myapp
Run Code Online (Sandbox Code Playgroud)
我正在使用教程IAHelper中的助手类来处理购买功能(相关代码如下所示).它还有一个子类,主要用于将应用内产品的ID添加到IAHelper的产品ID数组中.
为了测试代码,我创建了一个标有"show products"的按钮,它调用了这个方法:
- (IBAction) showProducts {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(productsLoaded:) name:kProductsLoadedNotification object:nil];
Reachability *reach = [Reachability reachabilityForInternetConnection];
NetworkStatus netStatus = [reach currentReachabilityStatus];
if (netStatus == NotReachable) {
NSLog(@"No internet connection!");
} else {
if ([InAppMyAppAPHelper sharedHelper].products == nil) {
// here's where it calls the helper class method to request the products
[[InAppMyAppAPHelper sharedHelper] requestProducts];
self.hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];
_hud.labelText = @"Loading vocabulary...";
[self performSelector:@selector(timeout:) withObject:nil afterDelay:30.0];
} …Run Code Online (Sandbox Code Playgroud) 我在iOS反应本机应用程序中处理oauth请求.我想添加一个自定义回调网址,以便我可以返回到应用程序.据说我通过修改info.plist文件来做到这一点,除非它无处可寻.我的项目文件夹在任何地方都不包含此文件,我不完全确定npm是否在运行时生成它.
这个档案到底在哪里?
对于上下文,我不使用Xcode.我只是使用sublime来编辑运行终端的文件info.plist.
编辑:我也在使用Expo在手机上查看此类应用程序.