Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Prime31 Unity Plugins Officially Live! [CLOSED]

Discussion in 'iOS and tvOS' started by prime31, Aug 27, 2010.

Thread Status:
Not open for further replies.
  1. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    Okay, just got the gamecenter updated plugin...
    Should i still have the Xcode closed while making a new build ?
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam always. If Xcode isn't closed all kinds of issues can crop up.
     
  3. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    the menu items look different under prime ,, still it won't do the postscript ,, is there something that i need to do different than before (just having the Xcode project closed and making a replace build)?
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam run the "Update menu scripts" and "Update iOS build system" items to get the latest version and clear out the old ones.
     
  5. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    Okay, i had to update few things from prime menu , so it does the postscript building ,,, but i don't see store kit ,, but anyway , i build and i get this error ...


    //
    // EAGLViewAdditions.h
    // EtceteraTest
    //
    // Created by Mike on 10/3/10.
    // Copyright 2010 Prime31 Studios. All rights reserved.
    //

    #import <Foundation/Foundation.h>


    @interface UIView(Additions)

    + (UIView*)sharedEAGLView;

    - (UIImage*)imageFromEAGLView;

    - (UIImage*)snapshotEAGLView;

    @end
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam, that is a very, very old version of the Etcetera Plugin. You will need to delete the Editor/Etcetera folder and reimport a newer version.
     
  7. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    okay ,, i will redownload ,, i hope that i still have the download link
     
  8. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    Okay, i had to update all plugins, now i get few errors in Unity (4 errors)


    Assets/plugins/StoreKit/StoreKitEventListener.cs(12,33): error CS0123: A method or delegate `StoreKitEventListener.purchaseSuccessful(string, string, int)' parameters do not match delegate `System.Action<StoreKitTransaction>(StoreKitTransaction)' parameters


    Assets/plugins/StoreKit/StoreKitEventListener.cs(12,33): error CS0428: Cannot convert method group `purchaseSuccessful' to non-delegate type `System.Action<StoreKitTransaction>'. Consider using parentheses to invoke the method



    Assets/plugins/StoreKit/StoreKitEventListener.cs(28,33): error CS0123: A method or delegate `StoreKitEventListener.purchaseSuccessful(string, string, int)' parameters do not match delegate `System.Action<StoreKitTransaction>(StoreKitTransaction)' parameters



    Assets/plugins/StoreKit/StoreKitEventListener.cs(28,33): error CS0428: Cannot convert method group `purchaseSuccessful' to non-delegate type `System.Action<StoreKitTransaction>'. Consider using parentheses to invoke the method
     
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam, you have to update your event handlers to match the new signature.
     
  10. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    can you tell me how this new method is called with multiple product identifiers ...

    requestProductData( string[] productIdentifiers )

    StoreKitBinding.requestProductData( "XXXXXX.XXXXX.XXXXXX" );

    should i put the product identifiers each in between []?
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam, it's just a standard string array. See the demo scene or Unitys docs for examples.
     
  12. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    okay, i had to update all plugins for everything to work.
    All good now, except few warnings about the zip.cs, unzip.cs and archive or something ...
     
  13. aptusmobile

    aptusmobile

    Joined:
    Jan 4, 2012
    Posts:
    13
    I have a question about access to the photo picker/camera. I'm adding one of my functions to EtceteraManager.imagePickerChoseImage and in that function I check if the image path passed in is null or not. If it's not null, I assign the path to a local variable and everything after that works fine. However, if they click the cancel button when the "take photo / choose existing photo / cancel" menu comes up, shouldn't I receive null for that parameter? So far I'm not sure how to detect when they click the cancel button. I have a few variables of mine that need to be reset in the event that they click cancel, so if you could let me know how to do this, I'd appreciate it.

    Eric Adem
    Aptus Mobile
     
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @aptus, I believe the imagePickerCancelled event is what you are looking for.
     
  15. aptusmobile

    aptusmobile

    Joined:
    Jan 4, 2012
    Posts:
    13
    Thanks, that worked perfectly.
     
  16. Risine

    Risine

    Joined:
    Dec 10, 2009
    Posts:
    154
    Hi there,

    just asked some times ago about this bug but completely forgot it .. until it appeared back yesterday :
    Sometimes when I'm posting a message on facebook, the description message says :
    "Connecting to the iTunes Store." below my caption text.
    What can be wrong?

    Example:
    PLAYERX now has a global score of 5 points in WoA. <- link to the itunes store.
    Help me restore ...
    Connecting to the iTunes Store.
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @risine, you will have to send a bug report over the Facebook to get an answer for that. The details get filled in on their servers.
     
  18. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    With storekit, is requestProductData() only supposed to be successful when 'debug build' is selected in unity build settings (assuming we're in sandbox)? Just want to confirm I'm experiencing normal behavior.
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @jtown, those Unity settings have nothing at all to do with your Xcode project. They affect only Unity.
     
  20. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    EDIT: to clarify, I mean "Development Build" checkbox in File>Build Settings. /edit

    I've gone back and forth twice now and that's the only thing I've changed. When development build is unchecked:



    response to requestProductData()
    Code (csharp):
    1. StoreKit: invalid productIdentifier: IAPname
    2. total productsReceived: 0
    response to trying to purchase
    Code (csharp):
    1. products have not yet been received so you cannot purchase yet
    2. purchase failed with error: products have not yet been received. Did you call requestProductData and wait for a return event?
    Works completely fine if development build is checked. Receive products fine and purchases go through.
     
    Last edited: Apr 7, 2012
  21. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Weird. That was the behavior on my 3GS with a test account logged in. On my 4S/iPad3 with Development Build unchecked and my actual iTunes account logged in, it gets the productIds fine.
     
    Last edited: Apr 7, 2012
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Jtown, welcome to the fun of in app purchases! I found that deleting the app from the device and rebooting the device that is misbehaving often helps with getting the product data to properly return.
     
  23. spartan

    spartan

    Joined:
    Mar 10, 2010
    Posts:
    174
    @prime31 what's the difference of the prime31 iCloud plugin of the Unity Asset store and your home page plugin? The unity asset store is $55 and your home page $75.
    Also I would like to know if it will work with Unity 3.4.2, because I'm not working with Unity 3.5

    Thanks!
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @spartan, they are identical. The Asset Store one is on discount for Asset Store Madness right now. It will work on 3.4 though the prefabs will need to be recreated due to 3.5 not being backwards compatible. They are very simple being just an empty GameObject with one script on it.
     
  25. spartan

    spartan

    Joined:
    Mar 10, 2010
    Posts:
    174
    @prime31 thanks! I'll buy it.
     
  26. maddymanu

    maddymanu

    Joined:
    Apr 9, 2012
    Posts:
    12
    Hey prime31,

    I just bought the Game Center Turn Based Multiplayer plugin. I got to set up everything besides two things :

    First, in the GC Multiplayer menu, even if there is one player in the lobby, i can still play the game.
    Secondly, if one clicks on a friend's game invite, it opens the game's Menu (Scene 0), how do i open the Multiplayer game scene(scene 2)?
     
    Last edited: Apr 9, 2012
  27. jbtxwd

    jbtxwd

    Joined:
    May 26, 2010
    Posts:
    19
    Hey prime31,
    i have got the same issue with JTown

    products have not yet been received so you cannot purchase yet purchase failed with error: products have not yet been received. Did you call requestProductData and wait for a return event?

    i use unity3.5 pro,xcode4.3.1
    StoreKit_2012-03-29
    I test my iphone ios4.2.1 and ipad ios5.1
    it has the same issue
    i can not get any productdata

    thanks!
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @maddy, I'm not really sure I understand what you are asking. Can you be more specific?


    @jbtx, are you calling requestProductData? Until you call that method there are no products to purchase. Also, you can only purchase the products that are returned as those are the only ones Apple has setup in their system. The things to check for if you are getting no products back are that your bundle ID is correct, your provisioning profile is correct, you are only using test users and you log out of the Store before testing and that you only test in a non-jailbroken device.
     
  29. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    Hi! I just upgraded to Unity3d 3.5 and the problem is that the Xcode project is "wiped clean" every time I compile- there are no folders for etcetera/adwhirl/etc - how do I fix this?
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @yuri, choose Append when you build. Also ensure you have the latest version of the plugin if you are using Xcode 4.3+ so that you have the new build system.
     
  31. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    Hi! Thank you for your prompt response- I've googled this but to no avail- where is this mysterious "append" checkbox in Unity?
     
  32. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @yuri, it's not a checkbox. It is a prompt that Unity shows anytime you build when there is already an Xcode project from a previous build. It should ask you to Append or Replace.
     
  33. herbert6

    herbert6

    Joined:
    Apr 4, 2011
    Posts:
    5
    Hey, I'm having a big problem with the Etcetera Plugin. Not a bug, but a limitation. My application got rejected in Apple Store basically because i cant position the views of promptForPhoto function. The idea is that the user press a button in the app and it shows the promptForPhoto function. But it is showed in the top left corner while the button is in the bottom right corner. For some reason the Apple Store doesn't like that and rejected the app. So how can i resolve this without modifying my interface layout? (is a client specified layout, so a can't change)
     
  34. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @herbert, see the setPopoverPoint method for positioning popovers
     
  35. herbert6

    herbert6

    Joined:
    Apr 4, 2011
    Posts:
    5
    Thanks! Works perfectly ... as always.
     
  36. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    Thanks! that solved that! however now I have a new problem (after updating to Unity 3.5 and a Mac OS 10.7.3)


    Uploaded with ImageShack.us

    there was a similar thread a while back where you said it had something to do with a python script/permissions- I looked at the Editor folder permissions and they are all set to read/write for everyone

    btw we got adWhirl very recently so it's strange
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @yuri, Xcode 4.3+ requires a new build system. Make sure you have the latest version of the plugin which contains the new build system.
     
  38. cosmin007

    cosmin007

    Joined:
    May 13, 2011
    Posts:
    30
    Hi Prime[31] team, i've just integrated StoreKit plugin, and i've noticed some strange behaviour: on some devices it's working properly (can connect to iTunes, can make iapps ), and on other devices i cannot connect to iTunes (in console i receive this: StoreKit: error: Cannot connect to iTunes Store and it's not showing me the iTunes log-in pop-up )


    Thank you
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @cosmin, we have no control over the details of connecting to the iTunes store. If you follow all the instructions in the documentation and you still cant connect then you will need to contact Apple.
     
  40. nolver

    nolver

    Joined:
    Mar 14, 2011
    Posts:
    2
    hi,

    I've been hitting the following 8 linking errors when building my project with the StoreKit pluggin.

    I tried all the solutions proposed in this thread for similar problems, with no luck. Now I'm running out of things to try ;)

    This are the errors I'm getting in XCode:

    More about the project:
    • Popup indicating the post build action finished after building on Unity does appear.
    • It's a huge project (1gb of source assets).
    • Unity 3.4 (but tried with Unity 3.5 with same results).
    • Is being developed mainly in Windows machines.
    • XCode 4.3.2 on Lion 10.7.3.

    Editor.Log (filtered by 'prime31')
    Things I tried:
    • Imported StoreKit in a blank project and was able to compile and deploy successfully.
    • Removed most of warnings from script code.
    • Changed from Unity 3.4 to 3.5 but nothing apparently changed.
    • Removed a few errors from scenes that were revealed by the Editor.log
    • Export the whole project to a unity package and then reimport it in a empty Unity project.

    I'm gonna try now to isolate the problem, by starting in a blank project with StoreKit working and compiling ok, and then start including chunks of assets from the project until it stops compiling. That is going to be really hard, since this is a huge project.

    Any hint you could provide will be much appreciate.

    regards.
     
    Last edited: Apr 10, 2012
  41. 60days

    60days

    Joined:
    Jan 27, 2012
    Posts:
    23
    Just a note in case anyone else has issues with the same problem:

    When using the email screenshot feature of etcetera I was getting a partial screenshot (the top section was fine, the rest was black) inconsistently. Sometimes the shot would work fine. I noticed it was worse under load, and eventually figured out it was related to the maximum time allowed between frames in the project time settings. I had this set to 1 second, but bumping it to 5 allowed full shots to be taken.

    I havent researched it, but I suspect the maximum time could be set programmatically for the duration of the screenshot coroutine. Hopefully this helps someone in the future.
     
  42. maddymanu

    maddymanu

    Joined:
    Apr 9, 2012
    Posts:
    12
    Prime31,

    Hey, my problem is that regarding the turn based multiplayer game center plugin.
    Its that....whenever a user accepts the invitation from another player, the invitation does'nt open the game scene, it opens the main menu of the game.
    That's the only thing i can't figure out. :(
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @nolver, thee errors indicate that the methods don't exist which is almost always due to the post process scripts not running. You said that the popup appeared which indicates that the script did run though. Do you have the target set to the device (not simulator)? There are two other issues with your setup that I have seen in the past. Switching between Windows and Mac often causes file permission issues and SVN is notorious for killing file permissions and flags.
     
  44. JoeyPepperoni

    JoeyPepperoni

    Joined:
    Dec 15, 2011
    Posts:
    7
    Hi Prime31,

    Any word on when you will support AppCircle clips in the Flurry plugin?
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Joey, Clips is not a public SDK so we will not be supporting it until it is publicly released.
     
  46. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Hey @Prime31, I'm implementing your StoreKit plugin, but noticed that the purchaseFailed and purchaseCanceled events don't return a Transaction object, just an error string. Is there a way to add in the transaction object or even the product identifier that failed/was cancelled? According to the Apple docs, the transaction observer does get the transaction object even if the state is set to failed, but it would be useful to at least get the product identifier back when a failure occurs. For now, I can definitely workaround by making the assumption that only one product will be "pending" purchase at a time, but it would be a useful enhancement for the future. Thanks!
     
  47. maddymanu

    maddymanu

    Joined:
    Apr 9, 2012
    Posts:
    12
    Prime31,

    Hey, my problem is that regarding the turn based multiplayer game center plugin.
    Its that....whenever a user accepts the invitation from another player, the invitation does'nt open the game scene, it opens the main menu of the game. Is it because its the sandbox environment?
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @getluky, by virtue of the way Apple does IAP you can only have one transaction in progress at a time. We will look into adding some more info into the return but you should be able to work around it quite easily.


    @maddy, iOS native code has no concept of Unity scenes. It is up to you to change the scene on the Unity side.
     
  49. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Hey Prime,

    I was just wondering with your iCloud plugin do you know is it possible to save/load the progress of a Free/Lite version of a game/app and load up the player's progress in the Full/HD version, so that they don't have to start all over if they want to purchase the Full/HD version of the game? Thank you.
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @absurd, you will need to check Apple's docs to be certain but if your container is the same between apps the document store will be able to be accessed and I not at all sure about prefs.
     
Thread Status:
Not open for further replies.