2017-02-06 5 views
0

gdx-pay를 사용하여 앱에 IAP를 추가하려고합니다. Android에서 잘 작동하지만 테스트 구매시 앱이 다운됩니다. iTunes Connect에서 Sandbox를 성공적으로 설정 했으므로 구매 관리자가 적어도 성공적으로 연결되어있는 것으로 보입니다. 그러나 나는 디버깅을 시작하는 방법을 모르기 때문에 앱 충돌에 대한 스택 추적을 얻지 못한다. 가능한 한 많은 장소에 로그를 추가했으며 일부 읽기 전용 파일로 제한되었습니다.iOS에서 구매를 시도 할 때 Gdx-pay가 충돌 함

[GdxPay/AppleIOS] Products successfully received! 
[GdxPay/AppleIOS] Purchase observer successfully installed! 
2017-02-06 18:27:01.475036 Snowfall[478:80137] [info] PAYMENTINFO: Handling Install 
[GdxPay/AppleIOS] There are 0 unfinished transactions. Try to finish... 
[GdxPay/AppleIOS] Products successfully received! 
[GdxPay/AppleIOS] Purchase observer successfully installed! 
2017-02-06 18:27:01.719032 Snowfall[478:80137] [info] PAYMENTINFO: Handling Install 
[GdxPay/AppleIOS] There are 0 unfinished transactions. Try to finish... 
2017-02-06 18:28:02.054620 Snowfall[478:80137] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction 
2017-02-06 18:28:02.054790 Snowfall[478:80137] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction 
[GdxPay/AppleIOS] Purchasing product char2 ... 

Process finished with exit code -1 

'처리 완료'는 앱이 종료 이유도 확실하지 및 스택 트레이스가 없습니다 : 내가 IAP를 구입하려고 할 때이 흐름이 어떻게되는지입니다. Mac OS에서 IntelliJ를 사용하고 있습니다. 간단한 시작 질문은 IntelliJ에서 더 나은 스택 추적을 사용하려면 어떻게해야합니까? 그리고 약간 더 복잡합니다. 여기서 무슨 일이 일어나고 있습니까?

LibGDX 버전 1.9.5

roboVM 버전 2.3.0

GDX-유료 버전 여기 0.10.3

는 관련 아이폰 OS 코드입니다. 다른 모든 gdx 지불 코드는 주로 Github의 copy-paste이며 Android와 잘 작동합니다.

는 시작 :

public class Snowfall extends IOSApplication.Delegate { 
JumpV6 game; 
@Override 
protected IOSApplication createApplication() { 
    IOSApplicationConfiguration config = new IOSApplicationConfiguration(); 
    config.orientationLandscape = true; 
    config.orientationPortrait = false; 
    game = new JumpV6(); 
    game.setAppStore(APPSTORE_APPLE); 
    return new IOSApplication(game, config); 
} 

@Override 
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) { 
    super.didFinishLaunching(application, launchOptions); 
    game.setPlatformResolver(new IOSResolver(game)); 
    return true; 
} 


public static void main(String[] argv) { 
    NSAutoreleasePool pool = new NSAutoreleasePool(); 
    UIApplication.main(argv, null, Snowfall.class); 
    pool.close(); 
}} 

확인자 :

public class IOSResolver extends PlatformResolver { 

String appleKey = "......"; //omitted 

public IOSResolver(JumpV6 myGame) { 
    super(); 

    PurchaseManagerConfig config = myGame.purchaseManagerConfig; 
    config.addStoreParam(PurchaseManagerConfig.STORE_NAME_IOS_APPLE,appleKey); 
    initializeIAP(null, myGame.purchaseObserver, config); 
    installIAP(); 
}} 

이를 통해 작업 잠시 후 당신에게

답변

0

감사, 내가하기 위해 스택에 포스트이었다 수행하는 데 필요한 모든 것 내가 뭘 잘못하고 있는지 보아라. Resolver 클래스는 인터넷에서 어딘가에 복사하여 붙여 넣었으며 실제로 각 라인의 작업을 실제로 통과 한 적이 없다는 것을 깨달았습니다. 나는 installIAP()이 거기에있을 필요가 없다고 생각하여 주석 처리했다. 작업 확인자 :

public class IOSResolver extends PlatformResolver { 
    String appleKey = "......"; //omitted 
    public IOSResolver(JumpV6 myGame) { 
     super(); 
     PurchaseManagerConfig config = myGame.purchaseManagerConfig; 
     config.addStoreParam(PurchaseManagerConfig.STORE_NAME_IOS_APPLE,appleKey); 
     initializeIAP(null, myGame.purchaseObserver, config); 
     //installIAP(); 
    } 
} 

+0

나는이 정확한 문제가 있습니다. 당신의 경우'initializeIAP()'와'installIAP()'가 한 것을 상세히 설명 할 수 있습니까? 새로운 GdxPay sdks에서는'PurchaseSystem.install (observer, config)'만 호출 할 수있는 옵션이 있습니다. – WeirdElfB0y