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

Xamarin IOS app can't loading GUI/crashing when Service Extension added. #353

Open
1 task done
gyb001 opened this issue Dec 19, 2022 · 5 comments
Open
1 task done
Assignees

Comments

@gyb001
Copy link

gyb001 commented Dec 19, 2022

How can we help?

Hello.
I have a strange problem.
Push notification working fine for a half year, now i would like add OneSignalNotificationServiceExtension.
I read the tutorial much, check everithing twice.

What happen:
-Build in release mode push testflight
-Click app
-IOS project / AppDelegate started (LOG)
-Shared project / App started (LOG)
-OneSignal.Default.Initialize run whitout exception (LOG)
setAppId(id) called with appId: HideMyOnesignalId
setAppId(id) finished, checking if launchOptions has been set before proceeding
setAppId(id) successful and launchOptions are set, initializing OneSignal

-MainPage setted with my LoadPage (LOG)

What i see:
Iphone 13 testflight: App crasch before "LoadPage" is appearing (I dont have log)
MacMini (M1) testflight: App icon bouncing, show small point under the icon, nothing appear.

Log first page said Entitlements problem, but i think everithing is ok.
App group exist in apple developer portal. i'm able to distribute app to appstore

Any tipp?
Onesignal XamarinSDK 4.3.0
Latest Xamarin, VS / Vs preview.
if i unload the extension project app is runing and can receive push notification
Debug mode is ok, (I cant test psuh, but app is working)

Full log: (started with force kill app)
https://controlc.com/c1c768d2

Some code:
https://pastebin.com/55hbMNa9

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gyb001
Copy link
Author

gyb001 commented Dec 20, 2022

Update.
Its linker problem. Whitout linking work fine.
What shoud i add to additional argument? (Linkskip)

Its not help:
--linkskip=MyApp.iOS --linkskip=OneSignalSDK --linkskip=OneSignalNotificationServiceExtension

@gyb001
Copy link
Author

gyb001 commented Dec 21, 2022

I can use full link mode with older version.

@brismithers
Copy link
Contributor

Hi @gyb001 apologies for the delay. Looking at your log, it looks like this is the uncaught exception that is causing the crash:

System.Exception: Please call CachedImageRenderer.Init method in a platform specific project to use FFImageLoading!

By chance did you make other changes beyond adding the NotificationServiceExtension?

@brismithers brismithers self-assigned this Jan 9, 2023
@gyb001
Copy link
Author

gyb001 commented Jan 9, 2023

WOW, I cant recignise this exception ín log.
No I cant change anything.
If extension is loaded app crashed.
If extension is unloaded app runing fine.
(Latest nuget version)

@brismithers
Copy link
Contributor

@gyb001 that exception is happening twice in the log, once at 22:18:49.600584+0100 and once at 22:37:43.215034+0100. It might be worth checking out.

I understand what you are saying regarding the app crashing only when the extension has been loaded as part of the app. In an effort to try to isolate the problem, can you try adding a NotificationServiceExtension via the instructions here, however skip steps 5.5, 5.6, and 5.7. In other words, do not add the OneSignalSDK.Xamarin library and supporting code to the NotificationServiceExtension. If your app still crashes this points to a broader setup, or maybe a signing-type issue.

Thanks!

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

2 participants