StoreKit crashes when using certain unicode app names

Originator:sshrpe
Number:rdar://11432592 Date Originated:11-May-2012 10:41 AM
Status:Open Resolved:
Product:iOS SDK Product Version:4.3.2
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:

Setting certain unicode strings (further detail in 'Notes') in the Product Name field in Xcode's build settings can cause apps to crash when using StoreKit. The crash occurs most visibly when calling +[SKPaymentQueue canMakePayments].


Steps to Reproduce:

* Create a new iOS project using any template (see attached sample project).
* Add the StoreKit library to the project.
* Open the Project settings, select the application target, open Build settings.
* Set the product name to a string entirely composed of Cyrillic or Greek characters (such as 'Здоровье').
* In the App Delegate, import the StoreKit header and add "[SKPaymentQueue canMakePayments];" anywhere in the -application:didFinishLaunchingWithOptions: method.
* Build and run the app.


Expected Results:

+canMakePayments returns a boolean indicating whether the user is allowed to make payments.


Actual Results:

App crashes. Crash report attached below.


Regression:

Unknown. 


Notes:

I have attempted to use a variety of unicode-based strings to cause this crash. This crash caused our app 'Здоровье' to be rejected by the app review team, and I have verified using this as the product name causes the crash. Other entirely Cyrillic strings such as 'скЯёЇҚЉє' also cause the crash, as do entirely Greek strings such as 'ἀγγαρεία'. Emoji strings (e.g. '😒😳😥😰😡') seem to cause crashes

Chinese strings (another of our apps is 'ハワイアイ') seem to work correctly.

Adding ASCII strings to the beginning of the unicode string occasionally fixes the problem ('fooЗдоровье' works, but 'foo😒😳😥😰😡' does not).


One workaround we have found is to use an ASCII string as the Product Name and use the unicode string as the bundle display name. This appears to prevent the crash whilst retaining the proper app name on the icon. However, if unicode product names are not supported it would be nice to have a compiler warning informing us of this.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!