Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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. nshack31

    nshack31

    Joined:
    Nov 4, 2011
    Posts:
    96
    thanks, so if i used AdMobBinding.createBanner( AdMobBannerType.iPhone_320x50, 0, 1 ); instead this should place the banner at the bottom of the device? thanks
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @nshack, iOS starts at the top so a y value of 1 will be 1 pixel from the top. To put the banner at the bottom you want a y value of 320 - 50 (assuming you are in landscape).
     
  3. XxPleYxX

    XxPleYxX

    Joined:
    Jul 26, 2011
    Posts:
    41
    Im using the latest MediaPlayer release (5-5-2012) and im using the test scene included in the package. This is the problem in MediaPlayerManager.mm:

    Code (csharp):
    1. // do the export
    2.     [exporter exportAsynchronouslyWithCompletionHandler:
    3.     ^{
    4.         NSString *response = @"";
    5.         if( [[NSFileManager defaultManager] fileExistsAtPath:exportFile] )
    6.             response = exportFile;
    7.        
    8.         UnitySendMessage( "MediaPlayerManager", "exportedFileFromLibrary", response.UTF8String );
    9.     }];
    Always return empty string and the URL is like this:

    Code (csharp):
    1. ipod-library://item/item.mp3?id=-xxxxxxxxxxx
    When checks fileExistsAtPath in xcode the path is:

    Code (csharp):
    1. /var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/Documents/someExportedSong.mp3
    I have not changed anything in the package so dont pass the www class, what´s happening?
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @xxpley, if you get back an empty string that means the file was not exportable or is protected by DRM. We have an update going out that adds some more detail to the errors and makes the isPlayable flag take more data into consideration.
     
  5. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    HI! This was probably already asked, but in StoreKit, how do I detect when the "confirm in-App purchase" window appears and disappears? I want to have an Etceterabinding activity view before and after but not during- is this possible?
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @yuri, once you call purchaseProduct it is 100% in Apples hands until either the failed or succeeded event fires.
     
  7. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    Thanks! Your answers are always swift! <1min in this case was amazing :)
     
  8. fgielow

    fgielow

    Joined:
    Jan 3, 2012
    Posts:
    122
    Hello!

    We are considering developing an iOS multiplayer game and, hence, considering algo the buying of Prime31's gamecenter and multiplayer plugin.
    However, we would like to know how tests can be performed on such games before having them submitted to the apple store.

    Is there any way? What is the common practice regarding this?
    Could I simply compile and transfer my app to different devices for testing? I do not know wether apple needs my app to be published in order for it to access gamecenter APIs.


    Thanks in advance.
     
    Last edited: May 8, 2012
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @fgielow, Apple of course has test servers that you would be using during development.
     
    Last edited: May 8, 2012
  10. XxPleYxX

    XxPleYxX

    Joined:
    Jul 26, 2011
    Posts:
    41
    It is impossible that is protected because it is my own music without DRM, and the attribute "hasProtectedContent" returns FALSE and the attribute "isExportable" returns TRUE.

    I have not changed anything in the package, I have simply created a new project and imported the package. The export works fine?
     
  11. ridil

    ridil

    Joined:
    Apr 24, 2012
    Posts:
    31
    Is it possible to support pre iOS 5.0 devices while still having the GameCenter plugin support game center on iOS 5.0+ devices (the game center plugin mentions it requires iOS 5.0+)

    Thanks,
    Ridil
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ridil, the plugin only requires that you set your Base SDK to iOS 5+. You can set your deployment target to whatever you want.
     
  13. ridil

    ridil

    Joined:
    Apr 24, 2012
    Posts:
    31
    I set the deployment target to 4.2, the Base SDK to 5.0 and the Architectures / Valid Architectures to "armv6 armv7". The app runs fine on a 5.0+ device but crashes at startup on pre 5.0 devices. The app ran fine on both before implementing the game center plugin. Any ideas?

    Thanks,
    Ridil
     
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ridil, it seems to work fine for us on devices back to 3.1.3 (tested on an iPod Touch 2G and an iPad 1). What is the actual crash that you are getting? Did you change GameKit.framework from it's default of being weak linked by any chance?
     
  15. ridil

    ridil

    Joined:
    Apr 24, 2012
    Posts:
    31
    Gamekit.framework is set to Optional under Build Phases > Link Binary With Libraries (my XCode version is 4.2).

    What happens is it loads the splash screen and then sits on a solid black screen indefinitely. The xcode organizer logs a crash report which has the following:

    Hardware Model: iPad2,1
    Process: mygame [2997]
    Path: /var/mobile/Applications/myappid/mygame.app/mygame
    Identifier: mygame
    Version: ??? (???)
    Code Type: ARM (Native)
    Parent Process: launchd [1]

    Date/Time: 2012-05-08 19:49:48.932 -0400
    OS Version: iPhone OS 4.3.3 (8J2)
    Report Version: 104

    Exception Type: EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x00000001, 0xe7ffdefe
    Crashed Thread: 0

    Dyld Error Message:
    Symbol not found: _OBJC_CLASS_$_UIDocument
    Referenced from: /var/mobile/Applications/myappid/mygame.app/mygame
    Expected in: /System/Library/Frameworks/UIKit.framework/UIKit
    in /var/mobile/Applications/myappid/mygame.app/mygame
    Dyld Version: 191.3


    - Ridil
     
  16. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Ridil, no reference to UIDocument exists in all of the GameCenter source. Your issue lies elsewhere.
     
  17. bigcheese_

    bigcheese_

    Joined:
    Sep 6, 2011
    Posts:
    31
    Using the grapgRquests to access some custom graph api calls, I 'm trying to retrieve the userId by
    "Facebook.instance.graphRequest("/me?fields=id", completionHandler);"
    But I keep getting a "FileNotFoundException"! Is there something wrong with my code?! or is it not the way to retrieve a user's ID ?!
     
  18. XxPleYxX

    XxPleYxX

    Joined:
    Jul 26, 2011
    Posts:
    41
  19. teamcobby

    teamcobby

    Joined:
    Jan 18, 2012
    Posts:
    15
    Hi Prime31,

    I just upgrade my project to Unity3.5.1f2 with Xcode 4.3.1. It seems that the iAd, tapjoy and store kit scripts are not executed. Before the upgrade, when a project is build, there will be popup saying iAd, tapjoy and store kit integration success. But now, there is no pop up. Please help!


    Undefined symbols for architecture armv6:
    "__iAdShowInterstitial", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__iAdDestroyAdBanner", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__storeKitValidateReceipt", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__tapjoyActionComplete", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__storeKitPurchaseProduct", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__iAdInitializeInterstitial", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__storeKitGetAllSavedTransactions", referenced from:
     
  20. mattbenic

    mattbenic

    Joined:
    Nov 24, 2010
    Posts:
    38
    Hi Prime31,
    I'm using the StoreKit plugin, and trying to use receipt validation but running into a hitch. I understand from previous posts that ideally server based validation should be used but this is just for a small extra layer of safety on restoring saved purchases of consumables in a fringe case. It may well be replaced with server validation at some stage.

    Anyway, the receiptValidationSuccessful and receiptValidationFailed events don't provide any information as to which receipt was validated, so I'm attempting to use validateReceiptRawResponse and then parse the response. Unfortunately at the point where the native plugin calls back to Unity, I'm getting an EXC_BAD_ACCESS. I've removed any code from the delegate to confirm my delegate code isn't the problem and the crash is still happening, so I'm pretty certain it's happening in the plugin itself. This is further supported by the crash appearing to be in an inline call to VariantValue::VariantValue(char const*, unsigned long).

    Part of the stack follows:
    I'm just getting commented bytecode, so nothing really valuable to pass on there.

    In this case, as a test of validateReceiptRawResponse, I'm just passing the receipt received directly from the transaction immediately after a purchase (pointless in release, but like I say just a test). Essentially:
    Code (csharp):
    1.  
    2. // In setup
    3. StoreKitManager.purchaseSuccessful += StoreKitPurchaseSuccessful;
    4. StoreKitManager.receiptValidationRawResponseReceived += StoreKitValidationResponded;
    5.  
    6.  
    7. // Actual methods
    8. private void StoreKitPurchaseSuccessful( StoreKitTransaction transaction )
    9. {
    10.     StoreKitBinding.validateReceipt(transaction.base64EncodedTransactionReceipt, itunesSandbox);
    11. }
    12.  
    13. private void StoreKitValidationResponded(string rawResponse)
    14. {
    15.     // Empty method, crash still occurs!
    16. }
    17.  

    Do you have any suggestions as to what might be wrong here? Am I just using this all wrong?
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @big, see the demo scene for a full example of getting the user id from the "me" request.


    @xxpleyxx, are you saying that just passing in a file ending in "mov" fixes the issue for you? That doesn't require any code chanes in te plugin. You can pass in any file name you want.


    @cobby, be sure to get the updated versions of the plugins you are using. We had to make a totally new build system for Xcode 4.2 and all plugins require an update to work with it.


    @matt, your code looks fine to me. The error actually seems to be coming from within Unitys code based on the stack trace. I have never seen a crash occur in those particular methods (UnitySendMessage) and I can't think of any reason why it would. I will see if I can reproduce the issue on our test devices.
     
  22. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Hello Prime31,

    We are using ios storekit. We're now testing in app purchasing however with a jailbroken device we're getting an error. The debugger says the product identifier is invalid. If we use a non-jailbroken phone it all works.

    How can we fix this?
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @eric, jailbroken devices do not work with Apples StoreKit or GameCenter sandbox servers.
     
  24. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Thanks!
     
  25. XxPleYxX

    XxPleYxX

    Joined:
    Jul 26, 2011
    Posts:
    41
    Prime31 only change the extension on my code doesn´t work because WWW class say unknown file type. Like i say I have solved the problem in my project exporting as .mov and then renaming to .mp3 (with NSFileManager move). The same for test scene.
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @xxpleyxx, you can pass in a name of "file.mov" then simply rename it in the exportedFileFromLibraryEvent:

    File.Move( originalFile, newFile );
     
  27. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Greetings @Prime31

    I'm using GameCenter plugin. I have this issue with reportScoreFailed event. I've made some minor changes to GUIManager in example scene, so I can test various features as I need them. Now I'm testing offline record posts attempts. Whether you are or not connected to a network, reportScoreFinished event is fired, but, as it should, no leaderboard score is submitted to sandbox server when it's offline. I have no own code for this scene except for a few Debug.Log made in a copy of your original GUIManager in order to test individual features.

    Thanks in advance.
     
    Last edited: May 9, 2012
  28. teamcobby

    teamcobby

    Joined:
    Jan 18, 2012
    Posts:
    15
    @Prime 31,

    Where can I download all the latest plugins?
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, look back through this thread for tons of info on scores not showing up. It comes up very often and is entirely normal.


    @team, your original download link will always get you the latest version of the plugin.
     
  30. dylanmalone

    dylanmalone

    Joined:
    May 11, 2012
    Posts:
    2
    @Prime31 - Thanks for LiveTexture plugin, it's almost just what I need for the iOS video playback project I'm working on (integrated with Qualcomm Vuforia). Couple questions:

    The documentation says to use a movie format supported by iOS, and no higher resolution than necessary for performance reasons. Do some codecs seem to perform a little better than others? I'm having trouble with dropped frames and trying lots of different encodings to see if I can eke a little more performance out of it.

    The audio is badly out of sync with the video using the beta audio playback support. Are there some combinations where this problem tends to be less serious (very low resolution, or certain audio codec maybe?). Any advice to keep the audio more closely synced?

    Finally, the most serious problem of all... I can't seem to get the video to play back as intended. For example, my 480x272 .mp4 file (mpeg-4 encoded) is rendering in Unity at that size and shape, but the video is stretched and missing the bottom third or so of the image. (in other words, if it wasn't vertically stretched by about 33% or so, it would be perfect, it's stretching the video texture, but not the playback frame so to speak). Thanks.

    It might be nice to include a dead-simple 2d plane playback of a 480p video as a demo scene, with the "ideal" encoding for performance, just so I know what worked best in your internal testing. Thanks again.
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dylan, you will need to try out different formats to see what works best. It's hard to say for sure if size of the video has anything to do with the specific codec used as well. From our informat tests, H.264 seemed to be the fastest but don't take that as gospel. The smaller the video file and the less memory and CPU your Unity scene is taking up the better the audio will be. Its just a matter of resource consumption. The video decoding is pretty CPU hungry and when you throw in audio decoding as well all while running a full Unity game resources get scarce.

    What we do when integrating the video texture to get the UV's perfect is to add 2 sliders to the scene: one for UVx and the other for UVy. This lets you dial it in live while the texture is playing.
     
  32. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Greetings Prime31

    My problem is not that. I already had the non-showing scores problem, but it's a matter of sandbox server lags, or something like that. My actual issue is when I report a score while offline. It is logged as successfully reported, but, as it should, it does not report the score, because I have no connection at all, and when I have connection again, the score reported previously, while offline, won't repost because it's supposed to be successfully reported. When user authenticates, I always get the message "retrying send of 0 failed scores", even when I authenticate while offline, but already authenticated in Game Center app. However I'll have a review to this thread, but I'll thank you for giving a check for this matter.

    Thanks in advance.
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, scores are only auto retired in the event of a failure. If the succeeded event fires than of course the plugin will assume the post succeeded. If you are getting successful score posts that never show up you will need to open a bug report with Apple. There is no way for us to see what is happening in their code or on their servers.
     
  34. dylanmalone

    dylanmalone

    Joined:
    May 11, 2012
    Posts:
    2
    Forgive me for being dense. Could you post a code snippet or at least spell this out a little more for me? I'm new to Unity and don't understand which object has the UVx and UVy properties, or a good approach to setting them at runtime. In a few weeks I'll probably laugh at this question, but as elegant as Unity is, there's still a lot to learn.
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dylan, the Material class holds the uv offsets.

    yourMaterial.mainTextureScale = new Vector2( .03, .2 )
     
  36. teamcobby

    teamcobby

    Joined:
    Jan 18, 2012
    Posts:
    15
    @prime31, I downloaded all the update. Now have a problem with the tapjoy plugin. I couldn't find tapjoy sdk 8.1.6 anymore. It's only has download link to 8.2.0.
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @cobby, 8.2 will work just fine.
     
  38. Bwohaha

    Bwohaha

    Joined:
    Nov 17, 2011
    Posts:
    4
    Thanks for the advice. Unfortunately, this seems to contradict my recent observations.
    I have NativeToolKit plugin installed in a separate project without any SVN control. And it has the same problem: at some moment it just stopped using post process scripts and now I have to add everything manually. I did chmod, but it didn't help. The whole thing seems very unstable and unpredictable to me.
    If you have any idea why it stopped working, I would love to know it.
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bwohaha, NativeTookit support was dropped many months ago. It is using a very old version of our build system that is almost definitely not compatible with the current Unity or iOS SDKs.
     
  40. Bwohaha

    Bwohaha

    Joined:
    Nov 17, 2011
    Posts:
    4
    I understand that it was dropped. But my question is not about the plugin itself, but about the mysterious ways the post builder script works.

    I have Storekit and GameCenter plugins. I have problems with their post builder scripts as well(although there you've said it was because of SVN). I don't think that postBuilder in NativeToolKit is that different from those from other plugins, so I believe that the same would happen if I hadn't had SVN control on Storekit/Gamecenter post builder scripts.

    This problem makes my work very unstable and a pain to deal with, so I was wondering if you have any more advice on how to stablize it... As I've said, the postbuilder script in Native Tool Kit was working, but now it doesn't. It is not under SVN control. Any idea why and how to deal with it?
     
  41. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bwohaha, if you are having trouble with a non-NativeToolkit build script ensure you have the latest version of the plugin and I it still doesn't build refer to the General section of the docs (http://prime31.com/unity/docs) and post the log output.
     
  42. Bwohaha

    Bwohaha

    Joined:
    Nov 17, 2011
    Posts:
    4
    Ok. Thank you for your time.
     
  43. devGuillaume

    devGuillaume

    Joined:
    Feb 10, 2012
    Posts:
    23
    @Prime31: This is a long shot but here it goes. We've integrated the OpenFeint plugin in our game and plan on adding IAP through your StoreKit plugin. Posts by developer Tyler LaGrange on OpenFeint forums worry us about possible conflicts:
    OpenFeint support is somehow scarce and there's little chance that they'll spend any time trying to solve this, so I was wondering if you had anything to say about it (clues, ideas, opinions, possible fixes, anything! :)). Options on our end are to try your StoreKit plugin and hope for the best but if we come across this issue, we don't know how much investigation would lead to a fix on either end. Or we could look for another StoreKit plugin (don't know if there are any), or make our own, but if the problem comes from the OpenFeint plugin, it won't help at all.

    Thank you for reading this far and for the great and fast support!

    Another suggestion that may not be new: there are specific threads for your plugins, but not for all of them. Might be a good idea to divide things so people don't have to go through 100+ pages when looking for existing answers?
     
  44. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dev, it sounds like you might just want to try using OF and see of it causes any issues. Our StoreKit code has been in production for a long time in a lot of games/apps and it is quite lean and battle tested. I can't think of anything on our end that would cause a conflict.
     
  45. chabala

    chabala

    Joined:
    Apr 30, 2012
    Posts:
    19
    I am currently working on a project for a client that can't be brought up to the latest version of unity and I am getting linker error's for the AR plugin in xCode.

    Undefined symbols for architecture armv7:
    "__arUnpauseVideoTexturePlayback", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arStartCameraCapture", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arSetExposureMode", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arPauseVideoTexturePlayback", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arStopCameraCapture", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arStartVideoTexturePlayback", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arSetFocusMode", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arStopVideoTexturePlayback", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    "__arIsCaptureAvailable", referenced from:
    __Z19RegisterMonoModulesv in RegisterMonoModules.o
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    When building in unity I get the finder pop-up that says that I have successfully setup AR Unity plugin:
    "AR Unity support successfully integrated!"

    Is there a solution for this problem?
     
  46. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @chabala, by the looks of the error the files did not get copied to your Xcode project though you said the Finder popup showed which usually means it did. What do you see in the Xcode project pane's AR group? Are the files there?
     
  47. chabala

    chabala

    Joined:
    Apr 30, 2012
    Posts:
    19
    When I opened the folder it was blank. How can I add the files after the fact?
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @chabala, it sounds to me like you updated to the latest version of the plugin before removing the old files. delete all the associated files and reimport the latest version and it should clear things up.
     
  49. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Greetings Prime31

    About the failed record reports, and connections as well... Does the plugin support automatic resending when it detects Internet connections, or should I deal with it by myself?
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, if you are referring to GameCenter then the answer is that it will resend scores that fail but not achievements.
     
Thread Status:
Not open for further replies.