I get a huge delay before splash screen gets visible (15 seconds on iPad). During this delay, screen just appears black.
I reduced this delay a little bit by removing unused cocos2dx modules.
I did debug the entire loading process and it seems that delay is due to the initialization of IAP plugin (SDKBOX) inspite of calling the initialization later in main menu.
How do I fix this and are there other ways to reduce this delay?
EDIT:
Unfortunately, my code was initializing the SDKBOX in the splash screen. How can I reduce the initialization time of SDKBOX plugin? Can I use AsyncTaskPool to init SDKBOX plugin? Where can I find implementation examples of AsyncTaskPool (C++ version)?
But how do I prevent IAP to initialize before splash screen? By the time flow reaches to the code where I want IAP to be initialized, its already initialized.
It would also be helpful if you can give me general tips on reducing this delay. This issue is not specific to IOS devices, android version faces the same issue. On Motorola X1, I get a delay of around 10 seconds.
Because IAP needs to verify with Google/Apple server to get the product data in user’s country, it will take a long time. Usually game will grey out the store items while the IAP is not ready.