Differences between Apple and Google In-App purchases #3895
Replies: 6 comments 17 replies
-
|
@jason68000 Are you using the distriqt ANE for in-app purchases? I've used that for IAPs for iOS and Android, and there aren't many differences across platforms (support for getPurchases is the only thing that comes to mind, but you can check if it's supported on the current platform before calling it, so no harm in it being in all versions). I recently started using it for Amazon too, and it was seamless getting that set up. (If you really needed any behavior changes across platforms, personally I use conditional compilation and compiler constants to create a separate SWF for each platform, so then each SWF knows exactly which platform it should support and you can make code changes in classes that are only compiled in that SWF. For in-app purchases though, I don't think it would really be necessary, since that ANE handles all of the differences under the hood already for you.) For testing on iOS, personally it's quickest for me to make an Ad Hoc build of the app and install it directly onto devices to test purchases. As long as you're using Developer Mode on the iPhone/iPad and use a sandbox account, you can test the purchases locally with an Ad Hoc build (once you've set up provisioning profiles, etc...) You can also use TestFlight instead if you're more familiar with that. |
Beta Was this translation helpful? Give feedback.
-
|
Perfect, thanks guys! Let me digest all of the information here and I'll post out if I have more questions! Actually I do have one quick question. I remember with android I needed to upload a APK file with Billing permissions before I could even create my In-App products. It looks similar in Apple - I've already created my In-App products and I believe they will be available for use/testing after I push my next release? I'm assuming I don't have to use the In-App purchases in my next release as I wouldn't have been able to test with them yet. So I'm assuming they would get approved (along with the approval of my app)? |
Beta Was this translation helpful? Give feedback.
-
|
I'm trying to create a release for apple but it's generating a lot of errors. I'll post them in the next comment so my text doesn't get lost. Hopefully this will be a little easier to fix than all the Android stuff we went through! :-) |
Beta Was this translation helpful? Give feedback.
-
|
Error occurred while packaging the application: ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(cr_parse.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(cw_emit.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(jpegxr_api.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(jpegxr_flags.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(jpegxr_init.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(jpegxr_pixelformat.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(r_parse.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(jpegxr_algo.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(jpegxr_io.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(r_tile_frequency.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(r_strip.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(r_tile_spatial.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(w_emit.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(w_tile_frequency.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(w_strip.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(w_tile_spatial.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: warning: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\lib\aot/lib/libRuntimeHMAOT.arm-air.a(x_strip.o) has version 15.0.0, which is newer than target minimum of 12.0 ld64: error: undefined symbol: OBJC_CLASS$_DTFREUtils
ld64: error: undefined symbol: OBJC_CLASS$_DTExtensionBase
ld64: warning: duplicate symbol: __ZN7runtime24namespaceURIToAPIVersionEPN7avmplus6StringE
Warning: ignoring duplicate symbol: __ZN7runtime24namespaceURIToAPIVersionEPN7avmplus6StringE
Compilation failed while executing : ld64 |
Beta Was this translation helpful? Give feedback.
-
|
Hello! I'm getting closer to finishing all of my In-App purchases functionality. Just a couple of quick questions if anyone had the time! :-) Q) I have the Android functionality working well. I've noticed that the transaction returns a "transactionId" which is a 123 character string. How do I validate this on the server? I'm not after the whole server functionality code just maybe the URL which allows me to validate the actual transactionId with Google. Q) Similar question to the one above but for Apple. I'm looking for the URL to allow me to validate the transactionId returned from Apple In-App purchase. Although I haven't managed to get Apple working correctly... (next question) Q) I almost have In-App purchase working on Apple but I'm receiving "transactionState: transaction:failed" when trying to complete the purchase. Here's what I'm doing and what is happening:
Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey Jason, You might want to explore using a wrapper or shared layer via something like Flutter, React Native, or even a modular native approach if you're using Kotlin/Swift. At AgileTech, we've helped clients build and release hybrid and cross-platform apps with unified in-app purchase logic, especially for use cases like super apps and education/healthcare platforms. One tip: for iOS, testing on live devices requires provisioning profiles and some setup through TestFlight, but once you're past that, it's fairly smooth. Apple's environment is strict, but manageable with a bit of setup automation. Let me know if you're interested in how others handle receipt validation across platforms or sandbox/live switches - happy to share some approaches we've seen work well! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have in-App purchases working nicely with Google Play. I'd like to use Apple's In-App purchases as well. I'm probably not going to worry about the other variants like Amazon or Huawei.
I'm currently looking through all the docs and example code, in order to implements cross-platform on Apple & Android. Does anyone have experience releasing their code for both platforms? I'd like to make it as cross-platform as possible, without doubling-up on code etc...
Are there many programmatic differences between the two platform? Any suggestions for handling the differences in code for each platform?
I've been testing my Android development on live devices, which is not too bad. I'm not sure if I can do this as easy on Apple as I know they lock-down their ecosystem a little tighter than Google.
Jason
Beta Was this translation helpful? Give feedback.
All reactions