GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - yutiya/XSStore

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
GameBuyDev.xcodeproj
GameBuyDev.xcodeproj
 
 
GameBuyDev
GameBuyDev
 
 
GameBuyDevTests
GameBuyDevTests
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

XSStore-初学者小试牛刀,IAP


iOS内购

  • 在苹果开发者中心注册App ID(com.xxx.xxx)
  • 在iTunes Connect的My Apps中创建以com.xxx.xxx为App ID的应用
  • 确认开发者账户已经填写完所有的信息(联系人、银行卡等等),位于iTunes Connect的Agreements, Tax, and Banking
  • 在iTunes Connect中,给相应的App设置商品清单,商品ID一般设置为(com.xxx.xxx.productxxx),价格也一并设置了
  • 在iTunes Connect的Users and Roles设置沙盒测试用户

使用

GameBuyDev XSIAP(iOS内购模块所需的所有代码,使用了第三方的网络检测 @nsdictionary)

  •   导入系统框架库StoreKit、SystemConfiguration
    
  •   导入 #import "XSStore.h"
    
  •   购买前调用接口,确认可以支付
    
        [XSStore canPayProduct];
  •   调用购买接口,传递IAP中设置的商品ID,请设置iTunes Connect的IAP
    
    成功和失败 结果均使用 block 回调,回调均在主线程中执行,开发者只需要关注 逻辑处理和UI交互即可,失败代码块中会传递错误代码,在注释中均有提示
        [[XSStore shardXSStore] payProduct:product withSuccess:^{
                NSLog(@"购买完成");
        } withFailed:^(XSPayState payState) {
                NSLog(@"购买失败:%u", payState);
        }];

注意:(重要)

  • 请添加系统框架StoreKit、SystemConfiguration
    
  • 支持所有类型商品购买,请在iTunes Connect中配置商品ID
    
  • 请使用沙盒测试用户进行测试,上面已写出

  • 测试前,请在真机的App store中退出已登录的账户,否则会一直出现购买失败

      有问题,请 Issue 我,谢谢
      如果你想改进这个框架,就 Pull Request
      邮箱: [email protected]
    

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.