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

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @_Petr_, the StoreKitManager will always exist in your scene as long as you have at least one object subscribed to any event. If it isn't in the scene that won't cause any issues. It will just end up with a log to the console saying something like "SendMessage failed: StoreKitManager could not be found". The crash seems to be coming either inside or just after UnitySendMessage fires. The big thing to look for in those cases is that you don't have dangling event handlers. Every event handler added with a += must be removed with a balancing -= or else it will end up dangling and cause a crash when the event fires.
     
  2. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    Thank you!
    I forgot to say: third parameter in UnitySendMessage (which I can see at Xcode when MyApp crashes) called param is NULL.
    Is this correct?
     
  3. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @_Petr_, there should never be any NULL messages sent at all. If you shoot me an email to questions (at) prime31.com I can send you a debug build of the plugin so that we can see every detail including all the parameters sent to each method.
     
  4. ILoveCode

    ILoveCode

    Joined:
    Jul 16, 2013
    Posts:
    3
    Hi,prime31 .I have a question,my game run on the iphone 4s is well,but run on iphone 5s is crashes .They are ios 7.0. i try update Prime31,but i don't know how to update.
     
  5. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    Thank you for help.
    We updated the plugin and the error disappeared.
    If the error ever appear, I'll let you know.
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ilovecode, read your original purchase receipt after the word "IMPORTANT" in all caps for instructions on how to update.
     
  7. Hao-Cher-Hong

    Hao-Cher-Hong

    Joined:
    Dec 15, 2010
    Posts:
    127
    hi prime31,
    I'm using Android SocialNetworking plugin and I cannot successfully logout using FacebookAndroid.logout.
    After calling that function and login again,
    the app still remember the old user logged in.
    If I call post image or some graph requests,
    the plugin post objects using the old user.

    I tried to solved this for couple of days.
    But I get no solution of this.
    After I delete the application data in Android Setting ,
    I can no longer login and post with graph request anymore.
    Also, I cannot get any access token anymore.
    but native composers is still works.
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @hao-cher, that is how Facebook's SDK works. They consider all mobile devices to be single user so they cache login credentials so that users don't have to continuously enter their details.
     
  9. Webjema

    Webjema

    Joined:
    Aug 8, 2012
    Posts:
    13
    Hi guys
    I have a big problem after updating to Unity 4.3.1.
    I updated SocialNetworking to 2013-11-27 and StoreKit to 2013-12-07 versions.
    And they stopped working together.
    If I use SocialNetworking (user FB login functions) before calling StoreKitBinding.requestProductData the products list becomes empty.
    If I do not use SocialNetworking before calling StoreKitBinding.requestProductData everything works fine as earlier (products list is fine).

    One more thing. If I use StoreKit before SocialNetworking (if I try to login to FB AFTER products requesting) runtime error occurs.
    The error is:
    System.String doesn't implement interface System.Collections.IEnumerator
    * Assertion: should not be reached at mini-trampolines.c:183

    It looks like inside plugins.

    Any ideas?
    I already tried to remove and reinstall plugins.
    iOS
     
    Last edited: Dec 20, 2013
  10. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @webjema, it sounds like you running into a deep-seated Mono issue with regard to iterating a Dictionary (long story on that one). What seems to work for almost anyone who runs into the issues is to add the following line anywhere before you start calling any plugin methods:

     
  11. Hao-Cher-Hong

    Hao-Cher-Hong

    Joined:
    Dec 15, 2010
    Posts:
    127
    Sorry, I think I had a bad expression.

    I do I mean is,
    the plugin doesn't behavior correctly now.
    I cannot use graph request successfully now.
    Even if I call the logout and login with any other user,
    the plugin will no longer get access token anymore.
    Also the isSessionValid() is always return false now.

    See the page
    I think I got the same problem like Kromenak got.

    And no solution is found yet.
     
  12. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Hi, I have a question about SKState. It is very neat but I am now in need to setting states via inspector but I was not able to serialize the class so it can show in the inspector. The idea is to set all states in inspector and to be able to change them in sequence..is it possible.
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pretender, you can try marking the class as System.Serializeable but Due to the way the Dictionary is populated dynamically that probably wont work. You could create an enum for each state and then in Start just check the enums value. That would essentially provide a clean way to set the state in the inspector.
     
  14. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    Hello!
    We recently updated iCloud plugin, iOS etcetera and iOS Social Netowrking plugins.
    Now when we build our app with Development Build checked in Unity our app freezes after launching from Xcode.
    In console we see

    2013-12-27 13:37:23.797 MyApp[723:907] listening for Document changes...
    HasKey can only be called from the main thread.
    Constructors and field initializers will be executed from the loading thread when loading a scene.
    Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.

    (Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/PlayerPrefsBindings.cpp Line: 63)

    If we build app with Development Build unchecked, our app runs Ok.
    We see in console following messages:
    - Completed reload, in 0.326 seconds
    2013-12-27 13:50:48.319 MyApp[752:907] listening for Document changes...
    SendMessage: object iCloudManager not found!



    We think that somewhere in iCloud plugin in constructors or field initializers exists something like"
    if (Debug.isDebugBuild)
    {
    PlayerPrefs.HasKey(...)
    }

    Are there any known such issues with iCloud plugin?
    How should we fix this?
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Petr, our code definitely does not ever check PlayerPrefs or the build type. There is only a very small amount of code on the Unity side so you can give it a look yourself to see. You can also confirm by just importing the plugin into an empty Unity project and building.
     
  16. shinichi88

    shinichi88

    Joined:
    May 4, 2011
    Posts:
    80
    @prime31,
    Is your plugin able to send picture to Facebook Apps, and let the FB App handle the posting?

    e.g, you open gallery, choose picture, press the share button and tap Facebook. Then Facebook dialog pop up and let you type message.
    The Title of FB dialog is "Write Post" with picture attached and greyed "Say something about this photo".

    For my case, my app able to screenshot an area of screen, encode to JPG and save in some folder under Application.dataPath,
    now i need to get the picture post to User Facebook.
    I bought the SocialNetworking plugin, looking at combo demo, not sure which is appropriate.
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @shinichi, the plugin exposes the entire Graph API and all of Facebook's dialog system so you can certainly post an image. Note that the posting process in the Facebook SDK is not at all how you describe it. Posting an image is merely a Graph API call where you send the image and message. Any other extra stuff like photo pickers and text editors are up to you to make.
     
  18. ehermite

    ehermite

    Joined:
    Nov 13, 2012
    Posts:
    7
    @prime 31,

    vuforia with plugin Etcetera result black screen with no AR (camera) function...
    May i know whats the problem?
     
  19. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Hi Prime31 !

    Is it possible to fix this errors with "StoreKit_2013-07-31.unitypackage" this package ? if yes then please explain how ?

    and

     
    Last edited: Jan 11, 2014
  20. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    is this suppose to be called on every scene ? or just called on the splash scene and it will show on every following scene ?
    AdBinding.createAdBanner( true );
     
  21. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    Why do i keep on getting this error and the ads never show !

    bannerView:didFailToReceiveAdWithError: The operation couldn’t be completed. Application has iAd Network configuration error
     
  22. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    bannerView:didFailToReceiveAdWithError: The operation couldn’t be completed. Ad was unloaded from this banner
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam, native code has no concept of a scene so you can just call it once. The error Apple is returning is trying to tell you that you didn't properly enable iAd for your app in the developer portal.
     
  24. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I don't think this is my problem and it seems that the Apple iTunes IAP sandbox server is down…but I get the error below when I execute:
    StoreKitBinding.displayStoreWithProductId( "myProductID" )

    error loading product data: Error Domain=SSErrorDomain Code=109 "Cannot connect to iTunes Store" UserInfo=0x16582260 {SSErrorHTTPStatusCodeKey=404, NSLocalizedDescription=Cannot connect to iTunes Store}
     
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tokyo, the error indicates the server is returning a 404 status code (server not found)
     
  26. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    Hmmm developer portal has no way to enable or disable the iAd network, if you meant the itunesconnect App Manager, its already enabled for this app!
    Maybe something else? i didnt quit understand?
     
  27. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
  28. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    Thats exactly what i just said!
    Its already enabled in manage your apps.
    So, what else could cause the problem?

    By the way, exact same setup was used on the previous app, and ads where working just fine.
    Now i have updated your plugin in this new app, and i got all these errors, and ads never showed since.
    I have removed the admanager, removed adadapter and just put a call in the Awake to show the ads, but that still not working!
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam, if you are 100% sure that your bundle ID, provisioning profile and app setup are all correct you will need to contact Apple. There is nothing we can do to assist with what happens on their servers. The plugin can only return the error to Unity that Apple provides to it which clearly states that Apple's servers think the application is not setup correctly: "Application has iAd Network configuration error"
     
  30. samshosho

    samshosho

    Joined:
    Apr 12, 2010
    Posts:
    370
    Yeah i understand that, i thought since this is the first time using the new less manager update of your plugin that i am doing something wrong!
    Alright so other than calling that line, your part is over. Thanks

    I have one more question, in the older plugin, you had to restart the app and destroy the adadapter/manager to not show ads anymore, in case of client purchasing that for example, now with your plugin update, when you call the removeads or clearads, cant remember which one, but something to that. Would it instantly remove ads from the game? Or the client still needs to restart the game, so when its restarted the createAds is not called anymore?
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sam, just use the destroyAdBanner method to remove the ad.
     
  32. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    Thank you. You are right. We found error in our code.

    We encountered situation on last week when we updated iOS Etcetera and our app stopped to run on iOS 5.
    We want to know about such changes when we update plugins.
    Where we can found release notes for your plugins? (we update them through Asset Store from Unity).
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @petr, the Asset Store has a release notes section right under the description of the product.
     
  34. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    Thank you, its useful.
    In release notes for iOS Etcetera we see nothing about breaking compatibility with iOS 5. (if I remember correctly, this break was in 17.2)
    Are there any ways to know about such changes when updating plugin?
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @petr, iOS 5 will work fine. Check the note at the top of the docs page for the one thing you have to do to keep things compatible.
     
  36. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    Thank you, I found it.
     
  37. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    Hi,

    Social Networking Plugin fails during Twitter initialization on Windows Phone 8:

    Exception: Could not load file or assembly 'P31WinPhoneSocialNetworking, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    Why P31WinPhoneSocialNetworking.dll has assembly version 0.0.0.0 while WP8/P31WinPhoneSocialNetworking.dll has version 1.0.0.0?

    Any clues will be very much appreciated!
     
    Last edited: Jan 22, 2014
  38. iguana_02

    iguana_02

    Joined:
    Apr 22, 2011
    Posts:
    211
    Hi @prime31, i have a really strange problem.

    I have an app using Vuforia in different scenes and i got one scene that i use to "grab" a picture from the camera, using etcetera.

    If i go to that scene and try to go back to the previous one without using the promptforphoto, all goes fine, but if i try to take a picture , and try to go back to the main vuforia scene. It crashes...i tried to load another scene without Vuforia and it works but that's not what i need.

    I think that once you get the camera access through the prompt for photo, even if i finished what i'm doing, the plug in still uses the camera, that's why is crashing if i go to a Vuforia scene (which obviously uses the camera as well).

    My question is...Is it possible to deinit the camera prompt? Like it was never used? This will allow me to go back to a Vuforia scene.

    Thanks!
    Ale.
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @iguana, you've got it a bit backwards. When the Etcetera Plugin uses the camera it only uses it while the camera is actively on screen. Vuforia grabs a handle to the camera at app launch and never releases it. I'm pretty sure if you look at the back trace you will see Vuforias code causing an issue.
     
  40. iguana_02

    iguana_02

    Joined:
    Apr 22, 2011
    Posts:
    211
    Ok, that makes sense...in theory i should Deinit and reinit Vuforia before loading the scene....Thanks prime!
     
  41. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @iguana, I am not sure if that will do the trick. The last time I looked at Vuforia (admittedly it was many months ago so it might be different now) they grabbed the camera at app launch and never gave it up.
     
  42. andrej113

    andrej113

    Joined:
    Oct 25, 2011
    Posts:
    30
    Hello Prime,

    I have a problem with gamecenter plugin. I imported the newest version of the plugin and now I'm getting this linker error in Xcode:

    Undefined symbols for architecture armv7:
    "__gameCenterRetrieveScoresForPlayerIds", referenced from:
    RegisterMonoModules() 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)

    I am very new to iOS programming... How can I solve this?
    Thanks
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
  44. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Just wondering. What do these StoreKit calls equate to in Apple's actual Obj-C Store library?

    StoreKitBinding.displayStoreWithProductId()
    StoreKitBinding.requestProductData(()
    StoreKitBinding.purchaseProduct();
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tokyodan,

    display store: SKStoreProductViewController
    request product data: SKProductsRequest
    purchase product: SKMutablePayment
     
  46. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I'm on Unity 4.2.1f4 with the latest updated Prime31 Storekit.

    StoreKitBinding.requestProductData() and StoreKitBinding.purchaseProduct() work fine. They ask me to login to the sandbox and I can successfully log in with my test user account. My IAP info is returned with the call to StoreKitBinding.requestProductData(). And I can purchase it with the call to StoreKitBinding.purchaseProduct().

    To do this test I used the StoreKit Demo files and I just put in my app id when calling StoreKitBinding.displayStoreWithProductId( ):
    StoreKitBinding.displayStoreWithProductId( "47*****56" );

    And I entered my IAP ID like this
    var productIdentifiers = new string[] { "MyIAPid" };
    StoreKitBinding.requestProductData( productIdentifiers );

    But for some reason StoreKitBinding.displayStoreWithProductId() always fails with a 404 error.

    error loading product data: Error Domain=SSErrorDomain Code=109 "Cannot connect to iTunes Store" UserInfo=0xca9b2d0 {SSErrorHTTPStatusCodeKey=404, NSLocalizedDescription=Cannot connect to iTunes Store}

    What could cause in this?
     
    Last edited: Jan 29, 2014
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tokyo, not much I can add to that error. It's a plain old 404 (not found) that is being returned by Apple. It could be a lack of internet connection, sandbox server issues, invalid product ID, product not availab or some other unknown issue.
     
  48. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Ok, Thanks.
     
  49. Yury-Yarmolovich

    Yury-Yarmolovich

    Joined:
    Nov 1, 2013
    Posts:
    2
    Hey, guys! I'm in Unity 4.3.1, using etcetera latest version for iOS. Is it possible to switch between front/face camera in the code?
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @yury, the user can choose the camera they want to use once it is shown but currently it is not exposed to do so via code.
     
Thread Status:
Not open for further replies.