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

Help setting up Prime31's StoreKit Plugin

Discussion in 'iOS and tvOS' started by jingato, Jan 20, 2011.

  1. RefinedGames

    RefinedGames

    Joined:
    Jul 14, 2011
    Posts:
    28
    Jerotas, i believe your bundle id cannot have a wild card... It must be a specific app id. Have you set this up also? This i learned from the full walkthrough on Prime's site.
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Yes, I don't have the wildcard. I already had that fine, because I got that working when I set up Leaderboards and Achievements to work last month.
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Awesome, my products are now recognized :)

    It turns out we had to complete the contracts on iTunes Connect...I thought that only needed to be done for the final version, but no.
     
  4. Michael_83

    Michael_83

    Joined:
    Feb 4, 2011
    Posts:
    15
    Hi Prime31,

    What is the "system requirements" for Your StorKit plugin?
    Is it possible to use SDK 4.2 and xcode 3.2.5 with latest version of StorKit (1.3, Oktober 04, 2012)?

    I have Mac OS 10.6.8, Unity 3.5.6 PRO (iOS PRO)

    I always get "EXC_BAD_ACCESS"…when I clicked the "Get Can Make Payments" button for exemple...


    From xcode:
    --------------------------------------------
    Code (csharp):
    1. Program received signal:  “EXC_BAD_ACCESS”.
    2. warning: check_safe_call: could not restore current frame
    3.  
    4. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Can't find dlopen function, so it is not possible to load shared libraries.)
    5. (gdb)
    --------------------------------------------

    sorry, I am newbie om this…

    Thax!

    And… Nice post…!
     
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ Michael, we are fully up to date with our plugins so you will need to get your dev tools up to date as well and build with Xcode 4.5 and iOS 6.
     
  6. rudolfwm

    rudolfwm

    Joined:
    Apr 17, 2009
    Posts:
    11
    Hey Prime31

    Im having issues with the store kit.

    Im using debug build, have the products and new test users setup, I do a request product info, then try to buy a product. Before running: I have logged myself out from the app store.

    But once I make the purchase I choose existing apple-id and use the test account info...just at that point I get a crash:

    012-10-09 23:51:45.135 XXXXX [4125:907] StoreKit: in the process of purchasing
    -> applicationWillResignActive()
    -> applicationDidBecomeActive()

    using ios6, xcode 4.5

    any ideas?

    also, when I try to cancel at the point of the buying dialog, it also crashes. Is there something I need to do when returning?

    thanks!
     
  7. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @rodolf, please provide a full stack trace. The information you have provided isn't sufficient to even guess what could be happening. Does the demo scene exhibit the same behavior? Checking that is a good indicator if the issue is with your code or the plugins.
     
  8. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    Prime31,

    I have just purchased the StoreKit Plugin,
    I can Get the Product Data -> Purchase Random Product -> Get Saved Transactions (Locally).
    Then, I delete my app and run again, Get Saved Transactions return nothing as expected,
    But When I Restore Completed Transaction, it return message of "paymentQueueRestoreCompletedTransactionsFinished
    restoreTransactionsFinished", Get Saved Transactions still return nothing.

    My Product is Consumable.
     
    Last edited: Nov 28, 2012
  9. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    418
    I don't think you can Restore consumable products, they are supposed to be consumed once. Restore transactions is for stuff the users will need again when they use a different device, like levels, characters, etc..
     
  10. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    Hope someone can help me out here:

    I'm trying to create a restore purchase button on IAP page using storekit. This is an addition
    to my app already on the store with IAP. But Apple has requested a restore purchase on my
    latest update. I've done the following but it seems to not work properly because when I delete
    the app from the device and re-install it doesn't list the previous transactions. It seems to only
    record local transactions but I'm trying to get a transaction history from itunes. I'd really
    appreciate any help here. I've looked everywhere and have been at it for almost 2 days now.
    Thx for any tips!


    if( GUI.Button( new Rect(w3 - rrx, h3, sizex,sizey ), restore,custombutton ) )
    {
    StoreKitBinding.restoreCompletedTransactions();//ADDED
    List<StoreKitTransaction> transactionList = StoreKitBinding.getAllSavedTransactions();
    foreach( var t in transactionList )
    {

    if( t.productIdentifier == "com.whatever.iap1" )
    {
    PlayerPrefs.SetString("iap1", "purchased");

    }
    if( t.productIdentifier == "com.whatever.iap2" )
    {
    PlayerPrefs.SetString("iap2", "purchased");

    }
    if( t.productIdentifier == "com.whatever.iap3" )
    {
    PlayerPrefs.SetString("iap3", "purchased");

    }
    print("T: " + t.productIdentifier);
    }
    }
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @madpoet, you are assuming that restoreCompletedTransactions returns immediately which it absolutely does not. It takes time to restore transactions and each restored transaction will fire the productPurchasedEvent.
     
  12. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    Ahh!
    Thx so much!
    P
     
  13. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    I am getting transactions but they reset when I delete app on device and reinstall. I am using
    store kit plugin 2012_08_17 with Unity3.5.

    void OnGUI()
    {
    if( GUI.Button( new Rect(w3 - rrx, h3, sizex,sizey ), restore,custombutton ) )
    {
    StoreKitBinding.restoreCompletedTransactions();
    Invoke("gettrans",15);
    }
    }

    void gettrans()
    {
    List<StoreKitTransaction> transactionList = StoreKitBinding.getAllSavedTransactions();
    foreach( var t in transactionList )
    {


    if( t.productIdentifier == "com.whatever.iap1" )
    {
    print("unlock the steg");
    PlayerPrefs.SetString("iap1", "purchased");

    }
    if( t.productIdentifier == "com.whatever.iap2" )
    {
    print("unlock the tricera");
    PlayerPrefs.SetString("iap2", "purchased");
    break;
    }
    if( t.productIdentifier == "com.whatever.iap3" )
    {
    print("unlock the trex");
    PlayerPrefs.SetString("iap3", "purchased");

    }
    print("T: " + t.productIdentifier);

    }

    }
     
  14. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    So now I tried fresh project of Unity 4 with fresh import of the March 18 2013 store kit plugin and built to Xcode 4.4.1 I just changed the product ID
    for testing and voila:
    3 Wonderful mach o Link errors. The first one below:

    Undefined symbols for architecture armv7:
    "_SKStoreProductParameterITunesItemIdentifier", referenced from:
    -[StoreKitManager displayStoreWithProductId:] in libStoreKit.a(StoreKitManager.o)
    "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
    objc-class-ref in libStoreKit.a(StoreKitManager.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    What am I missing?
    I'm going bananas I tell you.
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @madpoet, your dev tools are really, really old. Apple is on Xcode 4.6.2 already. You need to update your dev tools to clear that up.
     
  16. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    Okee Doke!!!
    I hope that solves it!

    Thx for the quickie reply.
    P
     
  17. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    That fixed my mach link errors. Great!
    But now with the new store kit update - Have the product identifiers setup changed?
    The product Id I've used previously now come up invalid in Xcode console.

    I'm using the same Id as follows:
    var productIdentifiers = new string[] { "com.companyname.theappname.iap1" };
     
  18. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    My Bad!
    Bundle version not set to current version. For anyone with product ID's not showing up w/storekit,make
    sure the bundle version in Unity-Playersettings is proper.

    P
     
  19. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Hi
    I currently have storekit set up successfully, being able to purchase items on button clicks etc....

    Where I'm stuck now is that underneath each item, I want to display the local (currency) price for that item.

    I was trying "bagPricesText[1].text = _products[1].price; in Start()" but this doesn't work (game crashes).

    I'm suspecting it's because "StoreKitManager.productListReceivedEvent += allProducts =>" hasn't had a chance to complete?

    Any advice here would be appreciated.


    EDIT: Resolved. Don't ask. LOL (involves the Inspector if you must know, and that's all im saying lol)
     
    Last edited: Apr 30, 2013
  20. Zero_Zagarth

    Zero_Zagarth

    Joined:
    Sep 6, 2012
    Posts:
    2
    Hi @prime31
    We're making a car project and we bought the StoreKit plugin for the buys of our project. The problem here is, how can I integrate it to the project? How can I open the store? How can I add my items to the store list?

    Basically i need to understand how to use the plugin, because the videos and the documentation have very little information. Can you help us with that problem?

    Thank you so much!
     
  21. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Hi Prime,

    I've purchased the StoreKit plugin and I'm encountering linker problems while building the XCode project. I've followed the instructions that were provided on the plugin documentation site. I've also checked that the StoreKit framework is added to the XCode projects (from the Build Phases section). My current setup is Unity3D 4.1.2f1 and XCode 4.6. Target iOS is 5.0. This is the error log;

    Undefined symbols for architecture armv7:
    "_SKStoreProductParameterITunesItemIdentifier", referenced from:
    -[StoreKitManager displayStoreWithProductId:] in libStoreKit.a(StoreKitManager.o)
    "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
    objc-class-ref in libStoreKit.a(StoreKitManager.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    EDIT - Updated XCode to the latest version and it works!

    Thanks,
    Clayton
     
    Last edited: Jun 2, 2013
  22. G_Koko

    G_Koko

    Joined:
    Aug 25, 2012
    Posts:
    30
    Hi Prime31, I'm trying to implement the StoreKitBinding.restoreCompletedTransactions() event and would like to know if I need to call the StoreKitManager.purchaseSuccessfulEvent at the same time, because I'm just calling the StoreKitBinding.restoreCompletedTransactions() event and after typing my iTunes password nothing is happening. Thanks in advance for your response.
     
  23. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    Code (csharp):
    1.  void Start() {
    2.  
    3.  
    4.  
    5.  
    6. StoreKitManager.restoreTransactionsFinishedEvent += Finished;
    7. StoreKitManager.restoreTransactionsFailedEvent += restoreTransactionsFailed;
    8. }
    9.  
    10.     void OnGUI()
    11.     {
    12.  
    13.             if( GUI.Button( new Rect(Screen.width * .45f, Screen.height*.8f, sizex,sizey ), restore,custombutton ) ){
    14.              StoreKitBinding.restoreCompletedTransactions();
    15.              }
    16.     }
    17.  
    18. void Finished() {  
    19. Application.LoadLevel("selection2");
    20. }
    21.  
    22. void restoreTransactionsFailed (string error) {
    23.     print("failed?????????????");
    24. Application.LoadLevel(Application.loadedLevel);
    25. }
     
  24. G_Koko

    G_Koko

    Joined:
    Aug 25, 2012
    Posts:
    30

    Hi madpoet0204, thanks for your response, however, on the documentation says that the purchaseSuccessfulEvent will be fired for each restored transaction and I believe that the restoreTransactionsFinishedEvent is triggered only once and I can´t get the restored transactions. For this reason I'm wondering if I need to call the purchaseSuccessfulEvent or the restoreCompletedTransactions() does it automatically, because I need to get all the previous transactions to update the game. Thanks again!
     
  25. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    666
    Hi everyone
    i need help about Purchase test in Sandbox environment

    i test with demo scene from Prime31 Store Kit compile to xcode and test on real device (Iphone5)

    after i calling requestProductData i see all of my IAP
    and then i press Random Purchase it's show me a Confirm Buy dialog
    and ask me to login with Test User. i follow this step by step

    $IMG_3980.PNG

    after that i got a message in Xcode say:

    "Purchase fail Cannot connect to itune store"

    and i alway get a pop up like this

    $IMG_3979.PNG
     
  26. _developer_

    _developer_

    Joined:
    Sep 18, 2013
    Posts:
    3
    Hi! I update Unity to 4.2.1 and update prime[31] tools. Now i have error: "StoreKit: invalid productIdentifier: cp1". And delegate for StoreKitManager.productListReceivedEvent (List<StoreKitProduct> products) products list is empty. Before update it working.


    Sorry. I delete app from device and reinstall and it worked!
     
    Last edited: Sep 18, 2013
  27. blindgoat

    blindgoat

    Joined:
    Oct 24, 2012
    Posts:
    31
    @Prime31 -

    We've had purchases working for a long time and I don't believe any of this code has changed although that's probably wrong.

    Here's the scenario:

    Purchases come back from Apple's server and go through the productPurchaseAwaitingConfirmationEvent and the StoreKitTransaction is empty. We are calling ToString() and everything is empty. Here are the relevant logs:

    2013-10-24 19:39:30.969 GameNameGoesHere[12756:907] StoreKit: in the process of purchasing
    -> applicationWillResignActive()
    -> applicationDidBecomeActive()
    2013-10-24 19:39:56.806 TunnelTown[12756:907] are we on iOS 6? lets check. respondsToDownloads: YES
    *** productPurchaseAwaitingConfirmationEvent: <StoreKitTransaction> ID: , quantity: 0, transactionIdentifier:
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    StoreKitControl:productPurchaseAwaitingConfirmationEvent(StoreKitTransaction) (at /Users/admin/Desktop/Trunk/Unity_Project/Assets/Scripts/Controllers/StoreKitControl.cs:138)
    StoreKitManager:productPurchaseAwaitingConfirmation(String) (at /Users/admin/Desktop/Trunk/Unity_Project/Assets/Plugins/StoreKit/StoreKitManager.cs:53)

    So when we send this to our servers, and attempt to verify it with apple, it fails because the id is blank, transactionIdentifier is blank, and the receipt is blank.

    Here's where it gets crazy... When I close the app and come back in, we check for any that are in progress and try to complete them and they work this time! Ever heard of this?

    We are using the latest StoreKit update from 2013-10-04, according to the Prime[31] Plugin Manager. We are using a valid iTunesConnect test user. We signed out of the iTunes store in Settings and then signed in during the purchase attempt. We deleted the app and put on a new version. We've tried on iOS 6 and 7. :S

    Thanks!
     
    Last edited: Oct 25, 2013
  28. Giango

    Giango

    Joined:
    Nov 20, 2013
    Posts:
    1
    Hi, I have some problems when archiving the build in xcode. I am currently running xcode 5.0.2, Unity 4.3 and all prime31 plugins are freshly updated.

    Undefined symbols for architecture armv7:
    "UnityPause(bool)", referenced from:
    -[StoreKitManager displayStoreWithProductId:] in libStoreKit.a(StoreKitManager.o)
    ___45-[StoreKitManager displayStoreWithProductId:]_block_invoke in libStoreKit.a(StoreKitManager.o)
    ___50-[StoreKitManager productViewControllerDidFinish:]_block_invoke in libStoreKit.a(StoreKitManager.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Does anyone else similar issues? Thanks!
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @giango, Unity 4.3 had some changes that breaks linkage with our plugin. An update is currently in review by the Asset Store team and should be released any day now.
     
  30. MarkOxenham

    MarkOxenham

    Joined:
    Sep 13, 2012
    Posts:
    3
    Hey Prime,

    Recently picked up StoreKit and am having some trouble getting it into our existing project when building for iOS

    Our Setup:
    Unity 4.3.0f4
    Xcode 5.0.2 (5A3005)
    iPad 2 running iOS 4.3.5 (8L1)
    StoreKit - cant find the exact version, but Plugin Manager downloaded a new version that had been uploaded between yesterday 27/11/13 and today 28/11/13.

    Flurry (using the SDK downloaded from Flurry 4.3.0) and a third party library that we had set up and was working fine prior to installing the plugin

    Problem:
    Every time that we added the StoreKit we got the following build errors:
    Undefined symbols for architecture armv7:
    "_kSecValueData", referenced from:
    -[FlurryKeychainWrapper setData:forKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    -[FlurryKeychainWrapper updateValueData:forKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecReturnData", referenced from:
    -[FlurryKeychainWrapper dataForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecMatchLimitOne", referenced from:
    -[FlurryKeychainWrapper dataForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecMatchLimit", referenced from:
    -[FlurryKeychainWrapper dataForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_SecItemCopyMatching", referenced from:
    -[FlurryKeychainWrapper dataForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecClass", referenced from:
    -[FlurryKeychainWrapper setupSearchForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecClassGenericPassword", referenced from:
    -[FlurryKeychainWrapper setupSearchForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecAttrService", referenced from:
    -[FlurryKeychainWrapper setupSearchForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecAttrGeneric", referenced from:
    -[FlurryKeychainWrapper setupSearchForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecAttrAccount", referenced from:
    -[FlurryKeychainWrapper setupSearchForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecAttrAccessible", referenced from:
    -[FlurryKeychainWrapper setData:forKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_SecItemAdd", referenced from:
    -[FlurryKeychainWrapper setData:forKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_SecItemDelete", referenced from:
    -[FlurryKeychainWrapper removeObjectForKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_SecItemUpdate", referenced from:
    -[FlurryKeychainWrapper updateValueData:forKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    "_kSecAttrAccessibleWhenUnlocked", referenced from:
    -[FlurryKeychainWrapper setData:forKey:] in libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    For symbols from the Flurry SDK, obviously the post-process setup had a bit of a conflict.


    So I tried to manually fix it, adding in the Security.framework (suggested here)

    This resulted in the build complaining about many duplicate symbols such as:
    duplicate symbol _MAX_ERRORS in:
    /Users/markoxenham/Builds/DefaultUnity/Libraries/libFlurry.a(libFlurry.a-armv7-master.o)
    /Users/markoxenham/Builds/DefaultUnity/Libraries/libFlurry_4.3.0.a(libFlurry.a-armv7-master.o)
    removing -Objc from the Linker Flags as described here fixed this problem

    Which finally got the build to work on device.. but requires two manual changes to the build every time we do a fresh/replace build.

    Is there a better way to set this up? We didnt have these issues with our Flurry build until adding in the StoreKit Plugin. We also dont have any sort of PostProcessing Script for our Flurry library, so I am not sure what step the setup for Flurry is missing, Perhaps it is jus that the StoreKit postprocessing removes the security.framework and sets the -Objc flag?


    Here is the output from the Unity Editor Log:
    Code (csharp):
    1.  
    2. downloading unitypackage to: /var/folders/4k/85pm0q0n6694l9r518df43qr0000gn/T/MenuItem.unitypackage
    3. UnityEngine.Debug:Log(Object)
    4. Prime31Editor.MenuItem:updateMenuScripts()
    5.  
    6. executing prime[31] post processor...
    7.  
    8. prime[31] post processor completed Xcode integreation for plugins: Prime31Shared, StoreKit
    9.  
    And this is from the Console.app Editor Log filtered for "prime31":
    Code (csharp):
    1.  
    2. *** b63109dd27fb049938f4a15e7e928715 replaces c57bb7e4c2b224b948c2bc7a3136a742 at path assets/editor/prime31shared
    3. *** a83288dd50fae4eb781008b39ff3d15f replaces 6f8e2f54a8a3d438996583c2e285c552 at path assets/editor/prime31
    4. Updating Assets/Editor/Prime31 - GUID: a83288dd50fae4eb781008b39ff3d15f...
    5. Updating Assets/Editor/Prime31Shared - GUID: b63109dd27fb049938f4a15e7e928715...
    6. Updating Assets/Editor/Prime31Shared/P31Unity.h - GUID: 1919fd2515fba4fbd9cd937310415145...
    7. Updating Assets/Editor/Prime31Shared/config.plist - GUID: 332a95bbc3c9d477d99d783265b96d66...
    8. Updating Assets/Editor/Prime31Shared/P31SharedTools.h - GUID: 5461ed9c810f44bc5a3e489064632ac5...
    9. Updating Assets/Editor/Prime31Shared/libP31SharedTools.a - GUID: 9fdc41b5d3cb649d7b8dbf99d5b6db41...
    10. Updating Assets/Editor/Prime31/P31PostProcessor.pyc - GUID: b3f0517edbca24859a67eac2cc4a72ba...
    11. Updating Assets/Editor/Prime31Shared/P31Unity.mm - GUID: e44a3b7a1d060436d9a6307994bc000e...
    12. Updating Assets/Editor/Prime31/Prime31MenuItem.dll - GUID: c5017a1f74eef47fcacb718aeabd2960...
    13. -----------Compute hash for Assets/Editor/Prime31/Prime31MenuItem.dll.
    14. Non platform assembly: /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll (this message is harmless)
    15. Loading /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll into Unity Child Domain
    16. Prime31Editor.MenuItem:updateMenuScripts()
    17. Updating Assets/Editor/Prime31/P31PostProcessor.pyc - GUID: b3f0517edbca24859a67eac2cc4a72ba...
    18. Updating Assets/Editor/Prime31/Prime31MenuItem.dll - GUID: c5017a1f74eef47fcacb718aeabd2960...
    19. Non platform assembly: /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll (this message is harmless)
    20. Loading /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll into Unity Child Domain
    21. -----------Compute hash for Assets/Editor/Prime31/Prime31MenuItem.dll.
    22. Updating Assets/Editor/Prime31Shared/P31Unity.h - GUID: 1919fd2515fba4fbd9cd937310415145...
    23. Updating Assets/Editor/Prime31Shared/config.plist - GUID: 332a95bbc3c9d477d99d783265b96d66...
    24. Updating Assets/Editor/Prime31Shared/P31SharedTools.h - GUID: 5461ed9c810f44bc5a3e489064632ac5...
    25. Updating Assets/Editor/Prime31Shared/libP31SharedTools.a - GUID: 9fdc41b5d3cb649d7b8dbf99d5b6db41...
    26. Updating Assets/Editor/Prime31/P31PostProcessor.pyc - GUID: b3f0517edbca24859a67eac2cc4a72ba...
    27. Updating Assets/Editor/Prime31Shared/P31Unity.mm - GUID: e44a3b7a1d060436d9a6307994bc000e...
    28. Updating Assets/Editor/Prime31/Prime31MenuItem.dll - GUID: c5017a1f74eef47fcacb718aeabd2960...
    29. -----------Compute hash for Assets/Editor/Prime31/Prime31MenuItem.dll.
    30. Non platform assembly: /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll (this message is harmless)
    31. Loading /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll into Unity Child Domain
    32. Non platform assembly: /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll (this message is harmless)
    33. Loading /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll into Unity Child Domain
    34. Prime31Editor.MenuItem:onPostProcessBuildPlayer(BuildTarget, String)
    35. prime[31] post processor completed Xcode integreation for plugins: Prime31Shared, StoreKit
    36. Prime31Editor.MenuItem:onPostProcessBuildPlayer(BuildTarget, String)
    37. Non platform assembly: /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll (this message is harmless)
    38. Loading /Users/markoxenham/Projects/storekittest/Assets/Editor/Prime31/Prime31MenuItem.dll into Unity Child Domain
    39.  
    Advice and help would be great! :)
     
    Last edited: Nov 28, 2013
  31. MarkOxenham

    MarkOxenham

    Joined:
    Sep 13, 2012
    Posts:
    3
    Looking further into this I found this over at StackOverflow:
    "You can't use NSJSONSerialization on devices running older than iOS 5.0"

    Does this mean that StoreKit is only supported for iOS 5.0+ and that to get it to work on iOS 4 we need to install our own third party JSON kit?

    -Sorry for the double post!


    Edit:
    Having gotten my hands on a secondary testing device, can confirm that the simple project with just StoreKit in works fine on iOS 6.
     
    Last edited: Nov 28, 2013
  32. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    107
    I have the same issue with xcode:

    Undefined symbols for architecture armv7:
    "UnityPause(bool)", referenced from:
    -[StoreKitManager displayStoreWithProductId:] in libStoreKit.a(StoreKitManager.o)
    ___45-[StoreKitManager displayStoreWithProductId:]_block_invoke in libStoreKit.a(StoreKitManager.o)
    ___50-[StoreKitManager productViewControllerDidFinish:]_block_invoke in libStoreKit.a(StoreKitManager.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I updated plugin today but nothing happens. When i create in unity 4.3 new project with prime31 store kit plugin- everything works correct. But my old project with your plugin getting errors. Please help.
     
  33. kromenak

    kromenak

    Joined:
    Feb 9, 2011
    Posts:
    266
    Hey Prime,

    I'm also having that UnityPause linker error related to StoreKit after upgrading my project from 4.2.2 to 4.3. Just wanted to check in and see if you've been able to release a fix for that issue in the latest StoreKit plugin release. I didn't see anything on your release notes page about it, so I wanted to double check. Unfortunately, I can't upgrade my projects to 4.3 until this linker error is fixed.

    Thanks!
     
  34. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @krom, delete all files and update to the latest version of the plugin. The Unity 4.3 compatible version has been available for several months now.
     
  35. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Hi !
    I'm trying to build ios project from Windows ... and having this error

    Have you tested project export from windows with storekit?
     
  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Artyom, in the future please do not SPAM multiple support outlets. This is the 3rd post I have found from you about this all from the last 5 minutes. Our post build system will not work on Windows and there are no plans to rewrite a Windows version of it at this time. It has many dependencies that are part of OS X by default and since you have to build on OS X anyway it doesn't make much sense to invest the time in building and maintaining another post build system.
     
  37. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Will do until I'll find the solution.

    It makes enough sense to ask 3 question about DIFFERENT aspects of exporting xcode project from windows process. :)

    Thanks for answers and have a nice day ...
     
  38. NagarajVasu

    NagarajVasu

    Joined:
    Jun 5, 2013
    Posts:
    26
    Hey prime[31],


    I already brought package prime[31] for whole like StoreKit and gamecenter...I'm new to unity I need to do In-app purchase for unity android game.So pls help me for doing this process...can I implement In-app purchase with use of StoreKit package for unity android?

    thanks in advance...




    thanks,

    Nagaraj. S
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @nagaraj, StoreKit is an iOS native code plugin and will work only on iOS. If you need to do IAP on Android you would need to purchase our Andrpid In App Billing Plugin.
     
  40. xikky

    xikky

    Joined:
    Dec 11, 2012
    Posts:
    47
    Hi Prime, trying to set up the plugin with no success. I googled a lot about the setup and followed this walkthrough but I still cannot make it work. I'm positive that my code is right as I copied most of it from StoreKitGUIManager and StoreKitEventListener. I'm not very much familiar with iOS Dev console and the alike pages/consoles and I'm thinking I have something wrong in my configurations. This is what I did so far:

    1. Went to Certificates, Identifiers Profiles and created an app ID as follows:

    $Storekit1.png

    2. Created a New Provisioning Profile as shown below. Then I downloaded it, and while iphone (4s) is connected to mac (virtual machine, I'm a windows user .. for now), in Xcode->Organizer, under my phone->Provisioning Profiles added the downloaded PP.

    $Storekit2.png

    3. I updated my Xcode settings. In the project's target's info tab I set the right Bundle Identifier (com.example.gamename) Custom iOS Targets Properties settings:

    $Storekit3.png

    4. Then I set Code Signing Identity's Profision Profile (A) to the recently downloaded one, and selected my developer certificate for all Code Signing Identities (B)

    $Storekit5.png

    My only concern here that my distribution certificate's prefix is the same as my App ID's prefix, while my developer certificate is different. Should this raise a flag?

    5. I created a new App in iTunes Connect console from Manage your apps menu item.

    $Storekit7.png

    The app ID is a 9 digit number. Should I be using this somewhere else? I don't recon I used it anywhere, unlike the bundle identifier! And is the current game version state as it should be? I didn't upload any binaries yet.

    6. I created a number of IAPs from Manager your apps -> Manage In App Purchases. All IAPs created are marked as Ready to Submit.

    In my Version Details page, under In App Purchases section I have this message:

    In-App Purchases cannot be added to this version because it has already been submitted for review. To manage your In-App Purchases, go back to the App Summary page and click on the Manage In-App Purchases button.

    Does this mean I have to wait until my app is reviewed? I don't remember uploading any binaries ... I'm definitely missing something here :(

    When building and running the game, 0 products are received on productListReceivedEvent. I'm also calling restoringCompletedTransactions first time the game is launched, but neither restoreTransactionsFailedEvent is fired and nor is restoreTransactionsFinishedEvents .. even after waiting for 5 minutes. I'm logged off iTunes Connect and I'm receiving no errors. Also canMakePayments is returning true.

    This is my first time working with IAPs and I never launched an app on App Store yet. I might be leaving out something obvious. Any suggestions on what I am doing wrong?
     
    Last edited: Apr 6, 2014
  41. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Your distribution settings won't matter for this particular step so you can ignore that for now. The setup looks OK except for two things: 1. You do not mention logging out of the Store and using a test user setup in iTunes Connect (which is required for testing). 2. You will not be able to test if your app is waiting for review.
     
  42. xikky

    xikky

    Joined:
    Dec 11, 2012
    Posts:
    47
    Thanks for your reply prime. I heard about test users, but I must have skipped it, thanks for pointing that out. Not sure about the review thing though. Is my app being reviewed at the moment? Status says "Waiting for upload", is there anything else I need to do so that apple can start reviewing the app?
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    "Waiting for upload" and "Waiting for review" are two distinct statuses. Your app will be either "Waiting for review" or "In review" if Apple is in their review process.
     
  44. xikky

    xikky

    Joined:
    Dec 11, 2012
    Posts:
    47
    OK thanks prime, my app is now "Waiting for review". I'm waiting for submission to finish, IAP still don't work at the moment. I don't understand why I had to upload my not yet finished game under a distributor provision and identity rather than developer. I hoped I could launch the game as 'test mode'
     
  45. Ranier

    Ranier

    Joined:
    Nov 28, 2013
    Posts:
    3
    Hi @prime31 ! I'm using the Storekit plugin from you guys. Everything works great, except for one thing.

    We have it setup where autoConfirmTransactions is disabled so we can send the transaction to our servers. When player makes a purchase and the productPurchaseAwaitingConfirmationEvent has been triggered, the player can either close the app or turn Wifi off so that StoreKitBinding.finishPendingTransaction will not get called.

    I saved all the previous transactions in a local file so that when app restarts, I can still call finishPendingTransaction but at that point it has no effect. Even calling the finishPendingTransactions (without params) does nothing and logs "there are no pending transactions to finish".

    Is there anyway to reload all the pending transactions for StoreKit plugin to get all references to SKPaymentTransaction to finish? Apple docs point to calling the following in didFinishLaunchingWithOptions:

    Code (CSharp):
    1. - (BOOL)application:(UIApplication *)application
    2. didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    3. {
    4.     /* ... */
    5.     [[SKPaymentQueue defaultQueue] addTransactionObserver:observer];
    6. }
    Is this something the plugin is already doing right now?
     
  46. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Rainer, the plugin adds the observer once you request you product data. There is no such thing as reloading transactions. Apple puts them in the queue whenever they decide it's appropriate and you cannot finish a transaction that is not in the queue.
     
  47. Ranier

    Ranier

    Joined:
    Nov 28, 2013
    Posts:
    3
    If that's the case, then is there a way I can fix an account that got stuck in "You've already purchased this in-app purchase but it hasn't been downloaded."

    It happened on all my products that did not finish the transaction. I can still purchase the other products without any problems. I tried signing out of the App Store and reinstalling the app but still no luck.

    Maybe someone else in the thread experienced this problem before. Any help would be appreciated.
     
  48. Ranier

    Ranier

    Joined:
    Nov 28, 2013
    Posts:
    3
    If anyone might get into this situation as well while testing IAP, just restart the phone. After that, you shouldn't get the message above anymore. iOS might have cached an internal state for that product that will only get reset after phone restart.

    Nothing to do with StoreKit plugin really. Anyway, good work on your plugin guys!
     
    Last edited: Jun 4, 2014
  49. boxesgames

    boxesgames

    Joined:
    Oct 29, 2013
    Posts:
    2
    Undefined symbols for architecture armv7:
    "_SKStoreProductParameterAffiliateToken", referenced from:
    -[StoreKitManager displayStoreWithProductId:affiliateToken:] in libStoreKit.a(StoreKitManager.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    xcode 5.1.1
    storekit 2014.12
    please help
     
  50. NickSergeev

    NickSergeev

    Joined:
    Dec 19, 2012
    Posts:
    15
    Hi Guys, thanks for your great plugin!

    We have a setup with different types of purchases - both with downloadable content and without it - so we have autoConfirmTransactions = false, we manually finishing transactions by calling StoreKitBinding.finishPendingTransaction in following cases:
    1) when purchaseSuccessfulEvent callback gets called - in case if purchase has no downloadable content;
    2) when productPurchaseAwaitingConfirmationEvent callback gets called - in case if purchase has no downloadable content (otherwise we have stucked transactions left in a queue);
    3) when paymentQueueUpdatedDownloadsEvent callback gets fired and download status is Finished;

    A few questions:
    1) are these places (described above) correct to call StoreKitBinding.finishPendingTransaction ?
    2) do we also have to call StoreKitBinding.finishPendingTransaction when restoreTransactionsFailedEvent, purchaseFailedEvent and purchaseCancelledEvent are called? If yes - where we can get transaction identifier? We only get error strings in these callbacks
    3) productPurchaseAwaitingConfirmationEvent is often being called after application gets back to active state (or being restarted) - and if we have downloadable content we're unable to finish transaction at this point, and seems like this leads to a new apple id password request from user - is that a correct behavior?

    Thanks!
     
    Last edited: Feb 24, 2015