Mac App Store url problem on Mac M1

Hello,

I have an iOS application which has a "rate us" button. This button redirects to "Write review" section on the app's App Store. It is working great on both iPhone and iPad devices. The problem is on MacBook M1 - it is working, but once the App Store app for review is opened, my iOS app crashes :(

UIApplication.shared.open(URL(string: "itms-apps://itunes.apple.com/us/app/app-name/id*****?action=write-review")!)

Any ideas on how it can be fixed? Thanks!

Post not yet marked as solved Up vote post of GeorgiD Down vote post of GeorgiD
2.7k views

Replies

once the App Store app for review is opened, my iOS app crashes :(

Weird.

Does that generate a crash report? If so, please post a copy here. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Here it is:

Hmmm, that crash report has not come across cleanly for reasons I don’t understand. Can you send me a copy of the original .ips file via email? My address is in my signature.

Make sure to reference this thread ’cause I get a lot of email |-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi !

I've exactly the same problem with my app on macOS (M1): app crashes when opening Mac AppStore URL: UIApplication.shared.open(url, options: options)

Here is the trace :

*** Assertion failure in -[UINSUIKitBackgroundingController _updateAppWideBackgroundStateSlammingNotifyingDelegate:], UINSUIKitBackgroundingController.m:382
[General] An uncaught exception was raised
[General] -[UINSUIKitBackgroundingController _updateAppWideBackgroundStateSlammingNotifyingDelegate:]: Called off the main thread.
[General] (
	0   CoreFoundation                      0x000000019d2b9198 __exceptionPreprocess + 240
	1   libobjc.A.dylib                     0x000000019d003e04 objc_exception_throw + 60
	2   Foundation                          0x000000019e1efea8 -[NSCalendarDate initWithCoder:] + 0
	3   UIKitMacHelper                      0x00000001b2b55c14 -[UINSUIKitBackgroundingController _updateAppWideBackgroundStateSlammingNotifyingDelegate:] + 504
	4   UIKitMacHelper                      0x00000001b2b53fe4 -[UINSUIKitBackgroundingController transitionUIAppThroughBackgroundStateIfNecessary] + 144
	5   UIKitMacHelper                      0x00000001b2b277ec -[UINSApplicationLifecycleController transitionAppThroughBackgroundState] + 308
	6   UIKitMacHelper                      0x00000001b2b0d584 -[UINSApplicationDelegate _toggleAppForegroundStateIfAppStoreURL:] + 276-
	7   UIKitMacHelper                      0x00000001b2b0d9bc __54-[UINSApplicationDelegate openURL:options:completion:]_block_invoke_2 + 196
	8   AppKit                              0x00000001a0660dd8 _NSWorkspaceHandleLSOpenResult + 164
	9   LaunchServices                      0x000000019d845f10 _Z24_LSFireCompletionHandlerU13block_pointerFvPK7__LSASNhP9__CFErrorEP5NSURLS7_P12NSDictionaryIP8NSStringP11objc_objectESC_bP7NSError + 200
	10  LaunchServices                      0x000000019d848b80 _ZL28_LSOpenAsyncCommonDispatchedP11objc_objectP7NSArrayIP5NSURLES3_S0_P12NSDictionaryIP8NSStringS0_EPU32objcproto21OS_dispatch_semaphore8NSObjectU13block_pointerFvPK7__LSASNhP9__CFErrorE + 5732
	11  libdispatch.dylib                   0x0000000106f60804 _dispatch_call_block_and_release + 32
	12  libdispatch.dylib                   0x0000000106f623a8 _dispatch_client_callout + 20
	13  libdispatch.dylib                   0x0000000106f6b778 _dispatch_lane_serial_drain + 980
	14  libdispatch.dylib                   0x0000000106f6c814 _dispatch_lane_invoke + 492
	15  libdispatch.dylib                   0x0000000106f7c0c8 _dispatch_workloop_worker_thread + 1232
	16  libsystem_pthread.dylib             0x0000000106aaff84 _pthread_wqthread + 288
	17  libsystem_pthread.dylib             0x0000000106ab7a9c start_wqthread + 8
)

Any clue about it ?

The call is made on the main thread

Thanks for your help

Jeremie

I need a complete Apple crash crash report to offer any meaningful advice here. Please post it, using the instructions Posting a Crash Report (hopefully it’ll come through cleanly this time).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hello Quinn !

I've just sent you the .IPS file via email as you've asked a few messages before mine.

Thanks for your help

Have a good day

Jeremie (Sambot from Jay&Jay)

Thanks for the crash report. The copy you sent me did what I needed it to do.

The immediate cause of this crash is a trap within UIKit on Mac — as used by both iOS Apps on Mac and Mac Catalyst — because it’s expecting to be called on the main thread but has found itself called on a secondary thread. However, looking through the backtrace I can’t see any indicating that your code is causing this problem. Rather, it seems to have happened as the result of Apple code.

Also, it seems that it’s not just your app being affected by this.

Given that above, I think this is a bug in the OS itself and I recommend that you file it as such.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks a lot for your help Quinn Just opened a bug report with bug number: FB10293101 Have a nice day Jeremie

  • Thanks for filing FB10293101.

Add a Comment

Thank you guys!

I temporarily fixed it using this URL:

"itms-apps://apple.com/app/id*********?action=write-review"

  • Thanks for sharing.

Add a Comment

Seeing this crash too. I believe it's been around since the first release of M1 Macs. Confirming also that workaround of using "itms-apps://apple.com/app/id*****" works.