Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on iOS13 #18

Open
SameelNawaz opened this issue Aug 15, 2019 · 12 comments
Open

Not working on iOS13 #18

SameelNawaz opened this issue Aug 15, 2019 · 12 comments

Comments

@SameelNawaz
Copy link

I have installed iOS13 public beta and it seems that deep link is not working on it. Works fine on iOS 12.4

@NDrexlAxonom
Copy link

I get the same issue. It will open the app then crash. Here is the error log I get from the crash:

arconfigurator[44136:3990082] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UnityDeeplinksAppController application:openURL:sourceApplication:annotation:]: unrecognized selector sent to instance 0x280b804d0' *** First throw call stack: (0x18f3fc98c 0x18f1250a4 0x18f30043c 0x18f400b80 0x18f402bec 0x1005e5794 0x1005e5648 0x193411f2c 0x193411b24 0x19341e78c 0x1933efd98 0x192a5e29c 0x192a5dd0c 0x192a5ca64 0x192a5dc34 0x192fc8e7c 0x19449643c 0x1944bae50 0x1944a00f8 0x1944bad84 0x18f0ca184 0x18f0a444c 0x1944df540 0x1944df20c 0x1944df734 0x18f37a7e0 0x18f37a738 0x18f379ed0 0x18f37501c 0x18f3748bc 0x1991e0328 0x19340a6d4 0x1004b3470 0x18f1ff460) libc++abi.dylib: terminating with uncaught exception of type NSException

@SameelNawaz
Copy link
Author

@NDrexlAxonom, I did changes as described in this video. It fixed things for us. https://developer.apple.com/videos/play/wwdc2019/717/

@NDrexlAxonom
Copy link

@NDrexlAxonom, I did changes as described in this video. It fixed things for us. https://developer.apple.com/videos/play/wwdc2019/717/

Did you have to change the UnityDeeplinks.mm file to get it to work or follow the AASA steps to get it to work? I am trying to keep it using a custom url scheme as that matches our android app, but if we need to switch we can.

@SameelNawaz
Copy link
Author

@NDrexlAxonom, I did changes as described in this video. It fixed things for us. https://developer.apple.com/videos/play/wwdc2019/717/

Did you have to change the UnityDeeplinks.mm file to get it to work or follow the AASA steps to get it to work? I am trying to keep it using a custom url scheme as that matches our android app, but if we need to switch we can.

the AASA steps. We don't use custom url as it is suggested in the video they are not secure enough.

@pchuri
Copy link

pchuri commented Oct 24, 2019

@FizzerWL
Copy link

Unfortunately Application.deepLinkActivated is not available in 2018.4, which is the Unity version I am using. Does anyone know how to fix the root issue, or of a way to use the workaround presented here in 2018.4?

@pchuri
Copy link

pchuri commented Oct 30, 2019

Unfortunately Application.deepLinkActivated is not available in 2018.4, which is the Unity version I am using. Does anyone know how to fix the root issue, or of a way to use the workaround presented here in 2018.4?

If you're experiencing an iOS crash, you should consider UnityAppController based on your version of Unity. Take a good look at it and implement it by inheriting it.

I modified it as follows.

pchuri@b6f262a

@FizzerWL
Copy link

Hey pchuri, I appreciate the quick reply!

I tried plugging in your UnityDeeplinks.mm file, re-building and clicking on a universal link in Safari, but I still get a crash :(

-> applicationWillResignActive()
-> applicationDidEnterBackground()
2019-10-29 21:25:12.457276-0700 warlight[466:65233] Can't end BackgroundTask: no background task exists with identifier 5 (0x5), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
-> applicationWillEnterForeground()
2019-10-29 21:25:16.705536-0700 warlight[466:65233] -[GUL_UnityDeeplinksAppController-D4A111C5-B3CC-457B-B2AC-61A9BCA95525 application:continueUserActivity:restorationHandler:]: unrecognized selector sent to instance 0x282f2c2c0
2019-10-29 21:25:16.706281-0700 warlight[466:65492] [] nw_read_request_report [C31] Receive failed with error "Software caused connection abort"
2019-10-29 21:25:16.713390-0700 warlight[466:65492] [] nw_read_request_report [C28] Receive failed with error "Software caused connection abort"
2019-10-29 21:25:16.722191-0700 warlight[466:65492] [] nw_read_request_report [C14] Receive failed with error "Software caused connection abort"
2019-10-29 21:25:16.737963-0700 warlight[466:65233] Uncaught exception: NSInvalidArgumentException: -[GUL_UnityDeeplinksAppController-D4A111C5-B3CC-457B-B2AC-61A9BCA95525 application:continueUserActivity:restorationHandler:]: unrecognized selector sent to instance 0x282f2c2c0
(
	0   CoreFoundation                      0x0000000188d4c9a0 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 1227168
	1   libobjc.A.dylib                     0x0000000188a750a4 objc_exception_throw + 56
	2   CoreFoundation                      0x0000000188c5043c DA838E75-6B30-360E-9661-C4800A7E1BF6 + 193596
	3   CoreFoundation                      0x0000000188d50b80 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 1244032
	4   CoreFoundation                      0x0000000188d52bec _CF_forwarding_prep_0 + 92
	5   warlight                            0x0000000102c083a8 -[UnityDeeplinksAppController application:continueUserActivity:restorationHandler:] + 248
	6   warlight                            0x0000000102ca1eb8 -[GULAppDelegateSwizzler application:continueUserActivity:restorationHandler:] + 324
	7   UIKitCore                           0x000000018cd5555c 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 10401116
	8   UIKitCore                           0x000000018d07904c 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13693004
	9   UIKitCore                           0x000000018d079cd0 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13696208
	10  UIKitCore                           0x000000018c77f498 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4281496
	11  UIKitCore                           0x000000018c77f814 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4282388
	12  UIKitCore                           0x000000018cd55214 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 10400276
	13  UIKitCore                           0x000000018d078fec 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13692908
	14  UIKitCore                           0x000000018d079a38 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13695544
	15  libdispatch.dylib                   0x0000000188a19610 3A5DB4E0-BC24-375D-897E-51E6CF7D6304 + 374288
	16  libdispatch.dylib                   0x0000000188a1a184 3A5DB4E0-BC24-375D-897E-51E6CF7D6304 + 377220
	17  libdispatch.dylib                   0x00000001889cc1d0 3A5DB4E0-BC24-375D-897E-51E6CF7D6304 + 57808
	18  CoreFoundation                      0x0000000188cca3c4 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 693188
	19  CoreFoundation                      0x0000000188cc53b8 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 672696
	20  CoreFoundation                      0x0000000188cc48bc CFRunLoopRunSpecific + 464
	21  GraphicsServices                    0x0000000192b30328 GSEventRunModal + 104
	22  UIKitCore                           0x000000018cd5a6d4 UIApplicationMain + 1936
	23  warlight                            0x00000001029b5900 main + 160
	24  libdyld.dylib                       0x0000000188b4f460 E1637502-BFCB-3BBC-B3E1-CCF78617E0E4 + 5216
)
(lldb) 

@pchuri
Copy link

pchuri commented Oct 30, 2019

Hey pchuri, I appreciate the quick reply!

I tried plugging in your UnityDeeplinks.mm file, re-building and clicking on a universal link in Safari, but I still get a crash :(

-> applicationWillResignActive()
-> applicationDidEnterBackground()
2019-10-29 21:25:12.457276-0700 warlight[466:65233] Can't end BackgroundTask: no background task exists with identifier 5 (0x5), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
-> applicationWillEnterForeground()
2019-10-29 21:25:16.705536-0700 warlight[466:65233] -[GUL_UnityDeeplinksAppController-D4A111C5-B3CC-457B-B2AC-61A9BCA95525 application:continueUserActivity:restorationHandler:]: unrecognized selector sent to instance 0x282f2c2c0
2019-10-29 21:25:16.706281-0700 warlight[466:65492] [] nw_read_request_report [C31] Receive failed with error "Software caused connection abort"
2019-10-29 21:25:16.713390-0700 warlight[466:65492] [] nw_read_request_report [C28] Receive failed with error "Software caused connection abort"
2019-10-29 21:25:16.722191-0700 warlight[466:65492] [] nw_read_request_report [C14] Receive failed with error "Software caused connection abort"
2019-10-29 21:25:16.737963-0700 warlight[466:65233] Uncaught exception: NSInvalidArgumentException: -[GUL_UnityDeeplinksAppController-D4A111C5-B3CC-457B-B2AC-61A9BCA95525 application:continueUserActivity:restorationHandler:]: unrecognized selector sent to instance 0x282f2c2c0
(
	0   CoreFoundation                      0x0000000188d4c9a0 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 1227168
	1   libobjc.A.dylib                     0x0000000188a750a4 objc_exception_throw + 56
	2   CoreFoundation                      0x0000000188c5043c DA838E75-6B30-360E-9661-C4800A7E1BF6 + 193596
	3   CoreFoundation                      0x0000000188d50b80 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 1244032
	4   CoreFoundation                      0x0000000188d52bec _CF_forwarding_prep_0 + 92
	5   warlight                            0x0000000102c083a8 -[UnityDeeplinksAppController application:continueUserActivity:restorationHandler:] + 248
	6   warlight                            0x0000000102ca1eb8 -[GULAppDelegateSwizzler application:continueUserActivity:restorationHandler:] + 324
	7   UIKitCore                           0x000000018cd5555c 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 10401116
	8   UIKitCore                           0x000000018d07904c 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13693004
	9   UIKitCore                           0x000000018d079cd0 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13696208
	10  UIKitCore                           0x000000018c77f498 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4281496
	11  UIKitCore                           0x000000018c77f814 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 4282388
	12  UIKitCore                           0x000000018cd55214 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 10400276
	13  UIKitCore                           0x000000018d078fec 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13692908
	14  UIKitCore                           0x000000018d079a38 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 13695544
	15  libdispatch.dylib                   0x0000000188a19610 3A5DB4E0-BC24-375D-897E-51E6CF7D6304 + 374288
	16  libdispatch.dylib                   0x0000000188a1a184 3A5DB4E0-BC24-375D-897E-51E6CF7D6304 + 377220
	17  libdispatch.dylib                   0x00000001889cc1d0 3A5DB4E0-BC24-375D-897E-51E6CF7D6304 + 57808
	18  CoreFoundation                      0x0000000188cca3c4 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 693188
	19  CoreFoundation                      0x0000000188cc53b8 DA838E75-6B30-360E-9661-C4800A7E1BF6 + 672696
	20  CoreFoundation                      0x0000000188cc48bc CFRunLoopRunSpecific + 464
	21  GraphicsServices                    0x0000000192b30328 GSEventRunModal + 104
	22  UIKitCore                           0x000000018cd5a6d4 UIApplicationMain + 1936
	23  warlight                            0x00000001029b5900 main + 160
	24  libdyld.dylib                       0x0000000188b4f460 E1637502-BFCB-3BBC-B3E1-CCF78617E0E4 + 5216
)
(lldb) 

I tested it with Unity 2019.2 and xcode 10.2 and it worked fine. You will need to modify the code for your version.

@FizzerWL
Copy link

Apologies for my noobiness, but can you clarify what part I would need to modify for my version? I'm using Unity 2018.411f1 and XCode 11.1.

I read through UnityDeeplinks.mm and nothing jumps out to me at being version-specific, but I'm not an Objective-C programmer.

Thank you so much for the help, I've been stuck on this for days now :(

@pchuri
Copy link

pchuri commented Oct 30, 2019

Apologies for my noobiness, but can you clarify what part I would need to modify for my version? I'm using Unity 2018.411f1 and XCode 11.1.

I read through UnityDeeplinks.mm and nothing jumps out to me at being version-specific, but I'm not an Objective-C programmer.

Thank you so much for the help, I've been stuck on this for days now :(

UnityDeeplinks is a subclass of UnityAppController. UnityAppController is implemented differently depending on the version of Unity. So you should check it directly in Xcode.
I don't have Unity 2018.4 installed so it will be hard for me to check.

@FizzerWL
Copy link

I have figured out the solution to this. The root issue has to do with the deprecated function application:openURL:sourceApplication:annotation being removed, either by Unity or by Apple. This was the old function for iOS < 9.0. The original UnityDeeplinks.mm routed the calls from the new function through the old deprecated one. If I remove the calls to the old function everything works!

Thank you very much for all the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants