9

From the 1st, May 2013 Apple will reject the app which will use uniqueIdentifier. In my app i am using Paypal library and i found that libpaypalmpl.a is using uniqueIdentifier and my app is rejected because of uniqueIdentifier. how to solve this problem?

Yashesh
  • 1,799
  • 1
  • 11
  • 29
  • 1
    Do you know how it looks with libPayPalEC.a? I found 3 occurrences of `uniqueIdentifier` inside the library. – Wojciech Rutkowski May 08 '13 at 18:56
  • Apple approved libPayPalEC.a – Wojciech Rutkowski May 10 '13 at 18:23
  • @WojtekRutkowski have you upload app after 1st May 2013 ? – Yashesh May 11 '13 at 04:24
  • 2
    Yes, the app was uploaded on May 3rd. May 10th accepted. – Wojciech Rutkowski May 11 '13 at 18:12
  • Err, app with the same library uploaded two days after the first one - rejected. I was just lucky with first one! – Wojciech Rutkowski May 14 '13 at 09:13
  • 1
    Wotjek, thanks for clarifying. You should remove the libPayPalEC.a library and just keep the MEC portion. Details: The lib.a was created only to retrieve a device Reference Token which is added with your Express Checkout token to the submission URL. Express Checkout no longer uses this token, so you don't need to include the library. – mettler May 17 '13 at 13:45
  • As WojtekRutkowski mentioned the same problem applies to libPayPalEC.a Tried to submit today (11th May 2013) and got rejected. @Mike (mettler): will you provide a new libPayPalEC.a Library as well? – Joachim May 11 '13 at 11:53
  • Hi Joachim, what was the reason for the rejection? As Wotjek mentioned, Apple is approving apps using libPayPalEC.a, and this library does not use uniqueIdentifier. Also, libPayPalEC.a is just a wrapper around PayPal's Express Checkout APIs, so you could integrate with them directly. – mettler May 13 '13 at 17:00
  • Hi there, the paypal EC uses uniqueIdentifier. Thats reason why my app is also rejected: Lib/PayPal/libPayPalEC.a | grep uniqueIdentifier uniqueIdentifier uniqueIdentifier uniqueIdentifier – Pion May 13 '13 at 19:33
  • I guess Wotjek had some luck - maybe apple didn't activate the automatic check of usage of uniqueIdentifier right after the 1st of may. The checking for using of uniqueIdentifier is done automatically. You get rejected just seconds after upload. – Joachim May 14 '13 at 08:41
  • As @Pion said the use of grep shows that the libPayPalEC.a also uses uniqueIdentifier. – Joachim May 14 '13 at 08:47
  • @Pion Yes, I was just lucky. Two days later I submitted an app with the same libPayPalEC.a and it was rejected because of using uniqueIdentifier. Exactly 3 occurrences inside the lib. – Wojciech Rutkowski May 14 '13 at 09:10
  • @WojtekRutkowski yes, exactly 3 occurrences.. Hope for quick fix. Need to update my app :) – Pion May 14 '13 at 09:48
  • @WojtekRutkowski hi there, here is solution: http://stackoverflow.com/a/16547286/740949 – Pion May 14 '13 at 15:33
  • @Pion if not using the library how do you get the PayPal buttons? Do you use any kind of official resource? I can not find any. No docu where to get even for the new beta API (HTML / Javascript is documented well - but not for mobile). – Joachim May 15 '13 at 12:41
  • I use PHP sdk and display the paypal website in UIWebView, now you dont need to get deviceToken for drt parameter (mobile paypal web page) – Pion May 15 '13 at 19:39
  • This isn't an answer, it's a comment requesting more info. I've converted the entire conversation into comments. Please only add answers if they are an attempt to answer the question. –  May 21 '13 at 13:53

3 Answers3

6

Mike from PayPal here. We're in the process of deprecating the old MPL library. As you point out, it does call [UIDevice uniqueIdentifier].

The PayPal iOS SDK should be safe - other apps are using it, and it does not call [UIDevice uniqueIdentifier]. We'll be maintaining this version going forward and adding new features, so it should be a much nicer experience for your customers.

As you correctly point out, the PayPal iOS SDK is only available to US businesses. We're working on expanding support to non-US countries, and should hopefully have an update soon!


Update: the new iOS SDK (version 2.0.0) without references to uniqueIdentifier is here: https://github.com/paypal/sdk-packages/blob/gh-pages/MPL/PayPalMPL_2-0-0-iPhone_DevelopersPackage.zip

mettler
  • 131
  • 2
  • thanks for reply. But is there any alternate solution for that? – Yashesh May 09 '13 at 04:57
  • 3
    Deprecating a library, when the new one does not support outside of US and APIs that were supported in the past are not available (Preapproval) is a shame. How such a big company allow itself to do that? – Ronen Morecki May 09 '13 at 17:16
  • 2
    Can you release an update to the MPL library that removes uniqueIdentifier so we can submit our apps please? – Paludis May 10 '13 at 05:45
  • 2
    Sorry for the frustration - yes, we'll release an update that removes uniqueIdentifier. We should have it available in the next few days, and I'll post here when it's available. Thanks for bearing with us! – mettler May 10 '13 at 15:21
  • 2
    The new iOS SDK is here: https://github.com/paypal/sdk-packages/blob/gh-pages/MPL/PayPalMPL_2-0-0-iPhone_DevelopersPackage.zip Sorry for the frustration, and let me know if you have any more questions/issues! – mettler May 11 '13 at 05:55
  • Thanks for fixing the old API. Were were quite shocked PayPal would drop support for the rest of the world. I guess we can reverse our plans to migrate away now. – William Denniss May 13 '13 at 01:29
  • @mettler i have check the new MPL library but it also contains the uniqueIdentifier . I have used strings libPayPalMPL.a | grep uniqueIdentifier to check that.. Can you please check that again ? – Yashesh May 13 '13 at 04:41
  • @mettler: Is there any updates for PayPal Express Checkout process(libPayPalEC.a) because this also contains uniqueIdentifier method.So my app also got rejected in app store.Is there any temporary solution for this issue since I am in a urgency to submit my app within this week.Thank you. – NSUserDefault May 15 '13 at 09:53
  • The updated library (libPayPalMPL.a) does not support architecture armv6, only armv7. I understand that for our binary to support iPhone3G, we must include armv6 support in our build. The only reason this currently fails is because of the library.. – talkol May 28 '13 at 11:20
3

The problem is not how the objects in the library are referenced, it's the static library itself that is causing the trouble. It contains a call to uniqueIdentifier on UIDevice or at least a method that has the same name. Linking against this library will get the app rejected by apple as of May 1st. A new version of the library is needed.

RBetjes
  • 51
  • 1
0

Hence the third party library is using the uniqueIdentifier, you cannot do anything.

It's a popular library, so they will release an update soon, hope so. Wait till then, or remove the library and implement your own way for doing this.

Edit:

I read the documents of Paypal. Possibly there is one method that can have the uniqueIdentifier:

PayPalPaymentViewController *paymentViewController = [[PayPalPaymentViewController alloc] initWithClientId:@"YOUR_CLIENT_ID" receiverEmail:@"YOUR_PAYPAL_EMAIL_ADDRESS" payerId:aPayerId payment:payment delegate:self];

In which the payerId can have the value of your device's unique Id. If you added like so: change it to either an emailId or nil.

Please check Paypal SDK Documentation

Midhun MP
  • 103,496
  • 31
  • 153
  • 200
  • Just to prevent any confusion: This question is about the old, deprecated Mobile Payments Library (MPL). The documentation you found is for the new PayPal iOS SDK, which is intended to replace it. – Josh Bleecher Snyder May 08 '13 at 18:47
  • 1
    @JoshBleecherSnyder Since new PayPal iOS SDK is not fully available for non-US the question is relevant. – Wojciech Rutkowski May 08 '13 at 18:51
  • @WojtekRutkowski understood. I just wanted to make sure we were clear about which library was being used -- there's been a bit of confusion over that (including on my part). – Josh Bleecher Snyder May 08 '13 at 18:55
  • What if the third party library does not plan to be updated, @Midhun? The following site seems to indicate one could modify their files directly: [uniqueIdentifier Calls](http://www.doubleencore.com/2013/06/tutorial-finding-calls-to-uniqueidentifier-in-your-ios-app/) – JRoss Jul 16 '13 at 07:45
  • @JRoss: If they don't update the framework, you can't use it further. Because of the deprecated method – Midhun MP Jul 16 '13 at 08:18
  • So, you believe disassembling/editing a third party static library (.a file) that includes "uniqueIdentifier" is impossible @MidhunMP? I have a StackOverflow post on this topic here: [3rd Party Library Causes Apple To Reject Binary](http://stackoverflow.com/questions/17635612/xcode-3rd-party-library-uses-uniqueidentifier-causing-apple-to-reject-binary) However, I was hopeful after reading the blog post I linked above, that there may be a way I could fix the file (i.e. substituting a method call with the same number of characters)... – JRoss Jul 16 '13 at 16:16
  • @JRoss:Wish you all success, if you done that successfully please add a comment here :) (Because I'm still believing that it is not possible) – Midhun MP Jul 17 '13 at 05:29