How do I test IAP for IOS

Get help using Construct 2

Post » Sun May 03, 2015 2:37 am

Finally got my game on the App Store using the IntelXDK and the CRanberry IAPs.

Sexy Runner: https://itunes.apple.com/us/app/sexy-runner/id954899012
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Mon Jan 04, 2016 12:24 am

hazneliel wrote:Finally got my game on the App Store using the IntelXDK and the CRanberry IAPs.

Sexy Runner: https://itunes.apple.com/us/app/sexy-runner/id954899012


Hey! Just came across your game. COngrats on the successful iOS launch and getting your IAPs to work! Iam using cranberry as well. Just completed the Bank/Tax updations , waiting for Contracts to go into effect before I can test the IAP.

I noticed that you have varying resoltion screenshots for iPhone and iPad. Did you manage to create a single project that supports all resolution? Would really appreciate if you can share your ideas :)

Currently I am having a single resoltuion that looks okay on iPhones but having two ugly black bars in iPad :(
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
60
S
14
G
2
Posts: 427
Reputation: 5,564

Post » Mon Jan 04, 2016 2:42 am

Sure I can share what I have learned.

Yes I use a single project that supports many screen resolutions, its not perfect and sometimes it does not scale right but it works good enought.

This is what I did.

- Set your project to Scale Outer
- Use "Viewport" to place the items relative to the edges
- Once I have some items placed where I want, I place other items relative to that object, so they will be placed right.

Here is a capx file of showing what Im talking about http://www.znelarts.com/cosas/PositionObjects.capx
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Mon Jan 04, 2016 10:09 pm

@hazneliel
Wow! Thanks to the quick response and a sample CAPX! That was really nice of you :)
Are you using any specific Window/Layout size or the ones given in your CAPX will do?


BTW have you been able to get the sound to work in iOS?

I tried the trick/hack to play audio at "End of Touch" event, but its not playing any sound after that. Thanks again for your help.

Also, I was able to successfully test IAP (after Tax/Bank Contract was "In Effect") and Game Center (Enable Sandbox mode in settings->Game Center)
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
60
S
14
G
2
Posts: 427
Reputation: 5,564

Post » Tue Jan 05, 2016 11:08 am

Nice game @hazneliel

@hazneliel and @SamRock

I'm having problems to lock the orientation in the landscape mode when I use the Intel XDK to build a iOS application. Normally I use a code to fix it, but it only works if I build the app using the CLI 5.1. Before that, I used a cranberry plugin that doesn't work anymore. By the way, any of the cranberry plugins didn't work in the CLI 5.1 version (I already downloaded the latest versions). How can you do to fix this orientation problem? Do you use CLI 4.2 or 5.1 to build your games? Did you have success to publish your games with cranberry plugins in the CLI 5.1 version? I really appreciate any suggestion/help to fix this problem.

Thanks in advance
B
74
S
13
G
4
Posts: 1,006
Reputation: 8,060

Post » Wed Jan 06, 2016 12:01 pm

RenatoB wrote:Nice game @hazneliel

@hazneliel and @SamRock

I'm having problems to lock the orientation in the landscape mode when I use the Intel XDK to build a iOS application. Normally I use a code to fix it, but it only works if I build the app using the CLI 5.1. Before that, I used a cranberry plugin that doesn't work anymore. By the way, any of the cranberry plugins didn't work in the CLI 5.1 version (I already downloaded the latest versions). How can you do to fix this orientation problem? Do you use CLI 4.2 or 5.1 to build your games? Did you have success to publish your games with cranberry plugins in the CLI 5.1 version? I really appreciate any suggestion/help to fix this problem.

Thanks in advance


I am using CLI5.1.1 and all cranberry plugins work for perfectly fine for me! The secret is to leave the addition.xml file as it is, unless you adding some extra plugins. I had issues with Google Analytiics so I decided to remove it. Game Plugin, Adcolony, Admob and Chartboost working well.
What plugin have you used?

I am using problem with Landscape Orientation lock as well! :( How did you fix it on CLI5?

Infact, I tried your suggestion from one of teh forum topics to add teh XML to Addition file. It didnt work. Plus I am having issues with Audio, were you have to play Sounds? How do I make sound work? :(
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
60
S
14
G
2
Posts: 427
Reputation: 5,564

Post » Wed Jan 06, 2016 2:00 pm

@SamRock

I can't use cranberry plugins with CLI 5.1. I tried several times and of the several ways and I always get an error message when try to build an iOS app/game in the Intel XDK. I tried to use chartboost and revmob, the orientation lock as well. I've problem with the Google Analytics too. I want to use others ads services and I can't. Everything worked before the last Intel XDK updates.

When you say to leave addition.xml as it is, you mean as it is after export it to cordova, with references of the whole plugins, right? But if you are using the CLI 5.1 version you need to leave addition file blank, as I know. Can you give me more information about your app configuration in the Intel XDK?

I tested the orientation lock code that I posted in the forum and it works very for me, but only in CLI 5.1 version. I also tried the broswer action, but it not worked too. I don't know what I've to do anymore to fix it.

I have only one issue with audio in the iOS game: the sound only plays after the player touch the screen.
B
74
S
13
G
4
Posts: 1,006
Reputation: 8,060

Post » Wed Jan 06, 2016 2:12 pm

@RenatoB

Emptying Plugin references from Addition.xml is true only for Android! For some strange reason it doesnt work for iOS. Thats why I had to Cordava export from C2 to a new folder and leave the contents of the Addition.xml as it is. Created a new XDK project.
I only removed Google Analytics and fixed the Product ID for Game plugin (was not required as its Google store, but still the Game Plugin XML is wrong).
You dont need to add anything from Plugin Management screen. This is just like old time. Export from C2 and build as it is. :)

Here is sample of how my addtion.xml looks like. Note I have added your Orientation code as well. But it doesnt work for me.

Code: Select all
<platform name="ios">
    <preference name="Orientation" value="landscape" />
</platform>
<intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-ad-adcolony" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-ad-adcolony" />
<intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-ad-chartboost" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-ad-chartboost" />
<intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-game" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-game">
    <intelxdk:param intelxdk:name="APP_ID" intelxdk:value="635233333330"/>
</intelxdk:plugin>
<intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-payment-iap" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-payment-iap" />
<intelxdk:plugin intelxdk:name="org.apache.cordova.inappbrowser" intelxdk:value="org.apache.cordova.inappbrowser" />


Please help me with teh Orientation and Audio on CLI5 :)
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
60
S
14
G
2
Posts: 427
Reputation: 5,564

Post » Wed Jan 06, 2016 2:26 pm

@SamRock

Thank you for the tips. I'll do some tests, inclusively with the orientation lock code, and return after it to tell you the news (a good ones, I hope so! :) ).
B
74
S
13
G
4
Posts: 1,006
Reputation: 8,060

Post » Wed Jan 06, 2016 3:21 pm

@SamRock

No luck! I got the same error.

My addition file;

Code: Select all
<intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-ad-chartboost" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-ad-chartboost" />
<platform name="ios">
    <preference name="Orientation" value="landscape" />
</platform>

Build log:
** BUILD FAILED **

The following build commands failed:
CompileC build/BS\ Free.build/Release-iphoneos/BS\ Free.build/Objects-normal/armv7/ChartboostPlugin.o BS\ Free/Plugins/cordova-plugin-ad-chartboost/ChartboostPlugin.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/BS\ Free.build/Release-iphoneos/BS\ Free.build/Objects-normal/armv7s/ChartboostPlugin.o BS\ Free/Plugins/cordova-plugin-ad-chartboost/ChartboostPlugin.m normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Error code 65 for command: xcodebuild with args: -xcconfig,.../BS_iOS_Final/platforms/ios/cordova/build-release.xcconfig,-project,BS Free.xcodeproj,ARCHS=armv7 armv7s arm64,-target,BS,-configuration,Release,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=.../BS_iOS_Final/platforms/ios/build/device,SHARED_PRECOMPS_DIR=.../BS_iOS_Final/platforms/ios/build/sharedpch
Command finished with error code 2: .../BS_iOS_Final/platforms/ios/cordova/build --release,--device
ERROR building one of the platforms: Error: .../BS_iOS_Final/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: .../BS_iOS_Final/platforms/ios/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/Developer/cordova/5.1.1/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
B
74
S
13
G
4
Posts: 1,006
Reputation: 8,060

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 23 guests