Search Unity

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. Default117

    Default117

    Joined:
    Mar 13, 2011
    Posts:
    134
    Yeah i thought so =/
    I'm going to have to figure out a way to do delegates in UnityScript, otherwise we'll have to rewrite a portion of the code in C#.
    Sorry about hijacking this thread, but i appreciate the help.
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Default, delegates work the same in JS vs C#. For a tutorial on events and delegates in general check this out:
     
  3. Default117

    Default117

    Joined:
    Mar 13, 2011
    Posts:
    134
    Thank you very much!
     
  4. Morre

    Morre

    Joined:
    Feb 28, 2011
    Posts:
    22
    Prime31, I've made a number of tests now, and it doesn't seem that the retries are working properly.

    Test case:
    1. Click "Buy" button on a non-managed IAB item (as we can always restore managed items with a restore call).
    2. After the request gets sent but before confirmation is received, pull the network cable. In my case, this is ~ 0.5 seconds.
    3. Your purchase will have failed on the device but your credit card will still get billed.
    4. Reconnect network cable.
    5. Attempt to keep the app running to let market notify the app that the item has been bought. This never happens.

    Can somebody confirm this, and perhaps suggest steps to avoid the user ending up in this situation (for example when there's no coverage on the subway or such).
     
  5. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Heya,

    I am trying to build my product for multiple platforms (iOS, Mac, and Web). But, I can't seem to get rid of these errors from Etcetera. Obviously, I don't need the plugins, but I can't figure out where the errors are coming from, since I have tried to delete the prefabs from my scene. Whenever I build for the web, I get these errors.... what am I missing?

    Assets/Plugins/Etcetera/testSupport/EtceteraGUIManagerTwo.cs: error CS9193: The name 'iPhoneKeyboard' does not exist in the current context.

    Thanks,
    Gigiwoo
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Morre, there is an Android forum and prime31 thread which is a more appropriate place for this so others can find it in the future. Googles docs state that they will retry the confirmation in the event of a network issue. If that is not occurring send over the logcat logs and I'll be able to confirm and it may require opening a bug with Google.

    @gigi, you can safely delet the entire testSupport folder. It just has the demo scenes.
     
  7. JohannChristoph

    JohannChristoph

    Joined:
    Jun 21, 2009
    Posts:
    141
    As far as to what I found out (after three days of countless hours of testing, headaches and desperation) the weird behavior of the mail composer occurs when the accelerometer hasn't had chance yet to say what orientation the device currently has. This is when the iPad just lays on the table. The Screen.orientation is always saying: FaceUp, in this case. Then the mail composer doesn't know what's up and does all kinds of weird things (also in the EtceteraTestScene).
    I luckily know that I want my App to start in Portrait. So I switch the Screen.orientation to anything and a frame later to Portrait (when the app starts).
    I haven't had this problem with Xcode3.x. Or at least I didn't realize it.
    Or maybe I went crazy meanwhile and my post makes no sense at all.

    But one more question.
    I use only the the mail composer and manage the screen orientation myself in Javascript. Do I actually need the two prefabs (EtceteraEventListener, and EtceteraManager) in my scene?
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Johann, you never need the *EventListener prefabs. They are just to illustrate how to listen to the events. The *Manager prefabs are always required though.
     
  9. pinkGrendel

    pinkGrendel

    Joined:
    Oct 27, 2011
    Posts:
    3
    @Prime31 thank you for doing this update. Greatly appreciate.
     
  10. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Thanks! That did the trick.

    Gigiwoo
     
  11. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Heya,

    I have questions about the Google Analytics (GA) plugin for everyone. These are generic GA questions and not specific to Prime31 (should post in a separate thread?).

    1) It's mixing the event tracking in with my normal web site. At first, this seemed okay, but it's becoming very difficult to separate out my web traffic and my app events. I can't easily tell what's what. Anyone have suggestions?

    2) Each event is treated like a 'new visit' on the site. So, it looks like the average stay time is like 10 seconds (there's about 5 minute between each actual event that a user sends from the game). Is there a way to make it easier to see that a person is still in the app?

    Gigiwoo.
     
  12. Morre

    Morre

    Joined:
    Feb 28, 2011
    Posts:
    22
    Prime31, I know you asked me to switch to another thread for further support, but I figured this might as well go here: I just wanted to point out that the error was indeed that we weren't handling belated purchase successes correctly on our side. I think perhaps you should clarify that one should *always* be listening to and properly handling any purchase events, but anyway, thanks. It seems to be working fine now.
     
  13. bm

    bm

    Joined:
    Sep 15, 2009
    Posts:
    8
    If someone has problem with orientation in NativeToolkit, you can get the solution here http://goo.gl/cGGVT just add this code to your ViewController
     
  14. oliverdb

    oliverdb

    Joined:
    Jan 30, 2010
    Posts:
    165
    EDIT:

    Forget about it... Something was lost due to stripping... bah



    Hey Prime31

    I am calling the android billing plugin but I do not get a purchaseSucceededEvent when using the IABAndroid.testPurchaseProduct();


    logcat output below...
    Code (csharp):
    1.  
    2. I/AudioHardwareQSD(   67): AUDIO_START: start kernel pcm_out driver.
    3. W/AudioFlinger(   67): write blocked for 213 msecs, 46 delayed writes, thread 0x15408
    4. D/Finsky  (  570): [1] PendingNotificationsService.setMarketAlarm: Setting alarm for account=itunes@watagame.com, duration=120000
    5. I/Prime31-BS( 4119): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
    6. I/Prime31-RS( 4119): responseCodeReceived: RESULT_OK
    7. I/Prime31 ( 4119): android.test.purchased: RESULT_OK
    8. I/Prime31 ( 4119): purchase was successfully sent to server
    9.  
    10. D/Finsky  (  570): [1] MarketBillingService.sendResponseCode: Sending response RESULT_OK for request 6580908105611417048 to com.watagame.ShakyShops.
    11. I/Prime31-BS( 4119): handleCommand() action: com.android.vending.billing.PURCHASE_STATE_CHANGED
    12. E/Prime31-SEC( 4119): Signature verification failed.
    13. W/Prime31-SEC( 4119): signature does not match data.
    14. I/Prime31-BS( 4119): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
    15.  
    16. ...
    17.  
    18.  
    19.  
     
    Last edited: Nov 3, 2011
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @oliver, I am seeing a signature verification failure in there. Be sure to sign your apk with a non-debug keystore in order to be able to communicate with the Market.
     
  16. Morre

    Morre

    Joined:
    Feb 28, 2011
    Posts:
    22
    Prime31, using the StoreKit plugin, it seems I'm getting the Login apple popup as soon as I request the product data / check canMakePayments. It then proceeds to give me successful purchases as if I had performed a manual restore transactions, but I'm not asking it to restore transactions. Is it somehow automatically restoring transactions and making the user log in as soon as the store is initialized? This is not how stores normally behave on iOS - in particular, not how they behave in other projects I've been involved in.

    Mind you, this could still be an error on our side, but I've searched the entire project for any calls to restoreCompletedTransactions and removed them, to no avail.
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Moore, the plugin will never under any circumstances run any code at all without you explicitly calling a method. Double check your code for any stray restoreTransactions calls.
     
  18. Morre

    Morre

    Joined:
    Feb 28, 2011
    Posts:
    22
    Prime31, I've checked the code again, and also put logging in StoreKitBinding.restoreCompletedTransactions. The fact is, restore is not getting called at all. Nonetheless, as soon as I initialize the store (with StoreKitBinding.requestProductData), an apple login popup appears. If I log in with this popup, it'll give me a successful purchase for any products I had bought (as if via a restore call).

    EDIT: I've tried this on another device, and it seems to only be happening on one specific iPad where I've used a test user (but it still happens even after logging out, closing appstore, uninstalling my app, and rebooting the iPad). I suspect it's nonetheless a bug with test users, so I think I might assume that the store works as intended.
     
    Last edited: Nov 3, 2011
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Morre, I have never seen that behavior before and I can't reproduce it on any of my devices. Can you comment out the body of the restoreTransactions method then retry your test?
     
  20. Morre

    Morre

    Joined:
    Feb 28, 2011
    Posts:
    22
    Just to be clear, I assume you mean the restoreCompletedTransactions method, and not restoreTransactions? I just tried it, but as expected (I had already put logging in there to check if it was being run), it had no effect. It still tries to log me in as soon as I initialize the store.

    EDIT: I can confirm this happening on at least one other device, but this device has also been used with test users. No idea how it'd behave in non-sandbox.
     
    Last edited: Nov 4, 2011
  21. ZroeX

    ZroeX

    Joined:
    Oct 20, 2010
    Posts:
    10
    hay guys.

    I have some problem with NativeToolkitPlugin
    I just add the sence and try to building to my iphone.
    From Unity to Xcode is OK,but from Xcode to my iphone ...:(



    I have added all .h and.mm files
    So...have any ideas?

    (P.S.Xcode:3.2.5 SDK:4.2 Unity:3.3.0f4)
     
    Last edited: Nov 4, 2011
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Morre, it sounds like you have an Apple bug in there. I can't find any reason a prompt would be show by iOS without you explicitely asking for it.


    @Zroe, the plugin requires Unity 3.4 or higher
     
  23. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    How long does it take to receive a link to download the plugin once you've purchased it?
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @DreamEnder, it will be sent to the email address you have on file with PayPal within moments of the payment clearing. Be sure to check your SPAM folder as the receipts end up there on occasion.
     
  25. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    I've received the receipts but no links to download.
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @DreamEnder, the receipt includes a link to download it in the email body.
     
  27. Senor Beer

    Senor Beer

    Joined:
    Jul 13, 2011
    Posts:
    13
    Hey Prime,

    Got a bit of an issue using the GameCenter plugin with achievements. I can report achievements and have them show up correctly in game center, that's all fine, the problem is when I go back into the achievements screen. The achievements I unlock will still come up as locked. However when I go into the gamecenter app, note the change and come back to the app, they've been updated. Is this because of the length of time it takes for GameCenter to update or because the information is cached?

    What's even stranger is when I leave and terminate the app, re-start it and attempt to retrieve the achievements with the delegate:

    GameCenterManager.achievementsLoaded

    only the completed achievements will be loaded.

    In both cases, I'm calling "GameCenterBinding.getAchievements();" and "GameCenterBinding.retrieveAchievementMetadata();" so in theory there shouldn't be any problems.

    Any ideas?
     
    Last edited: Nov 9, 2011
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Senor, it sounds like GameCenter is caching some info (which it has a habit of doing especially in the sandbox). There isn't much that can be done about it though asking Apple for a clear cache method in a bug report sure can't hurt.
     
  29. TegTap

    TegTap

    Joined:
    Sep 27, 2011
    Posts:
    21
    @Prime31, I recently integrated your Mobclix plugin into my latest android app, but I'm not able to get an ad banner to show up. Here's what I've done:

    * Set up a Mobclix account and registered my (unpublished) app
    * Added the MobclixAndroidBanner and MobclixAndroidManager prefabs to my scene
    * Put the Application ID from Mobclix in the Manifest.xml file (Application ID from Mobclix is in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    * Created the AndroidManifest file via the Prime31 editor command
    * Watched the logcat output, and I keep getting the following output about every minute or so:
    D/Prime31 (15882): onFailedLoad. errorString: -503: Advertisement is not available at this time
    D/Prime31 (15882): onFailedLoad. errorString: -503: Advertisement is not available at this time
    D/Prime31 (15882): onFailedLoad. errorString: -503: Advertisement is not available at this time

    Does this mean that the only problem is Moblix is not pushing ads to my app?

    If I had set up things incorrectly either on the plugin side or on the Mobclix side, would I be seeing more errors than the above error? The above error is the only one I'm getting.

    Is there a way to get Mobclix to send a test ad for my unpublished app so I can determine if Mobclix has been integrated properly before publishing my app?

    Thanks in advance for your help.
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @TegTap, it looks like you are setup properly. The error "Advertisement is not available at this time" indicates there is currently no fill for the request. Make sure you enable some ad vendors in the Mobclix portal. You can also turn on/off test ads in their web portal.
     
  31. TegTap

    TegTap

    Joined:
    Sep 27, 2011
    Posts:
    21
    @Prime31 - Well that's kind of embarrassing. I totally missed the Mobclix page where you sign up for and enable ad vendors. Now that I've actually enabled some vendors, It's all working perfectly and my app is up and running in the Android Market! Thanks for the speedy reply (as always), and thanks for another great plugin!
     
  32. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @TegTap, glad to hear you are getting some ads!
     
  33. Axel-F

    Axel-F

    Joined:
    Mar 20, 2009
    Posts:
    224
    The sandbox leaderboards seems to work again. Good to know it was no bug in our code.
     
  34. sameer-mirza

    sameer-mirza

    Joined:
    Nov 14, 2011
    Posts:
    36
    Hello Prime31,

    I have been trying to use the PlayHaven plugin and the Social Networking plugin together in our game but I seem to be getting "Redefinition..." errors. Things seem to work just fine in an empty project but when I add the plugins to our game it starts to give "redefinition of enum" errors in SBJsonBase.h

    Any tips to fix this?

    - Sameer
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Sameer, I am on my mobile right now so I can't confirm but I believe both Facebook and Playhaven rely on SBJSON. If you just delete the SBJSON files from one of the plugins it should clear up the errors.
     
  36. sameer-mirza

    sameer-mirza

    Joined:
    Nov 14, 2011
    Posts:
    36
    Thanks a bunch for the quick reply! and yes that was it!

    Cheers.
     
  37. gamer101

    gamer101

    Joined:
    Aug 9, 2011
    Posts:
    21
    Hey prime31,

    I integrated your game center code in my game i got it working got reply from sandbox while testing. Everything is followed double checked submitted my game to apple.

    Its live now accepts game center id but i can't submit scores, can't see any of the players in gamecenter.

    Please help!
     
  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @gamer101, what error are you getting? Did you make sure to submit a Release build (the Release scheme in Xcode, not the Debug scheme) of your game?
     
  39. gamer101

    gamer101

    Joined:
    Aug 9, 2011
    Posts:
    21
    When i tested it in development mode, score where uploading fine. I received the popup as well!

    I just did the "build" option. Apple approved my game as well. But when i go in game center it doesn't submit my score!

    My apple ID is also welcomed at the begening but can't submit scores!
     
    Last edited: Nov 17, 2011
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @gamer101, you should always submit release builds to the App Store. Debug builds will try to contact the sandbox servers. Do you have a log of the error returned when reporting the score fails? That will let you know exactly what the issue is.
     
  41. gamer101

    gamer101

    Joined:
    Aug 9, 2011
    Posts:
    21
    You mean i should do "build for archiving"?
    It just shows no players.

    In the mean time i will get the logs for you.
    Thanks.
     
  42. gamer101

    gamer101

    Joined:
    Aug 9, 2011
    Posts:
    21
    Never mind got it to work!

    Thanks for the kind response!
     
  43. android_dev

    android_dev

    Joined:
    Jul 9, 2011
    Posts:
    19
    @Prime31: the "movie textures" plugin is only available as a package with the ar plugin, right?
    Is it possible to display movies with an alpha channel?
     
  44. Topsa

    Topsa

    Joined:
    Nov 21, 2011
    Posts:
    2
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @android, I don't believe any of the iOS supported video formats support an alpha channel so it would not be possible.
     
  46. pong

    pong

    Joined:
    Nov 22, 2011
    Posts:
    10
    i try the function FacebookBinding.isLoggedIn() it'a always return false;
    i have debug log in FacebookManager.mm also it's [_facebook isSessionValid] is null

    is it i missing sth?

    other question is i use FacebookBinding.login() / loginWithRequestedPermissions() it will leave the app and open facebook app
    can it be make a dialog to ask for login?

    thx
     
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pong, I can't reproduce what you are seeing with not staying logged in. After returning from the Facebook app isLoggedIn returns true forever until logging out. Is the demo scene doing that for you as well?

    Facebook has deprecated all authorization besides single sign on so forcing an in app dialog is risky in case they turn it off.
     
  48. pong

    pong

    Joined:
    Nov 22, 2011
    Posts:
    10
    if use login() , it will switch my app to facebook app to login , it wont back to my app until i leave the facebook app and click my app ???

    it cant be like showDialog() to display the login page?

    after i login the facebook app , and back to my app , isLoggedIn() is still returning false to me , is it have to set sth first?

    i have set the url at xcode already

    thx
     
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pong, it appears that you didn't delete your app from your device between tests. The Info.plist URL scheme won't take affect unless you delete the app from your device each time between tests until it works the first time. After that you no longer need to delete it between tests.
     
  50. pong

    pong

    Joined:
    Nov 22, 2011
    Posts:
    10
    Thanks for your reply.
    Actually i delete my app everytime before i build a new one. The situation i am in is that, when i call login(), it redirects me to facebook app, and after login in the facebook app, it doesnt bring me back to my app. Is it normal?
     
Thread Status:
Not open for further replies.