-
Notifications
You must be signed in to change notification settings - Fork 43
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
Cannot use posthog in an App Extension using Cocoapods #136
Comments
@BillCarsonFr by App Extension (Notification Service) do you mean a Notification Service that extends |
Yes UNNotificationServiceExtension Using: It doesn't compile and rightfully?
|
@BillCarsonFr are you trying to init the SDK on the UNNotificationServiceExtension class? |
Thx for your help |
That's exactly what I did: can you do the very same, zip the folder or send me or just create a testing repo under your user on GitHub and send me the link? Could be related to your env. as well (Xcode, pod, etc). |
|
Ok, now I can reproduce it. I could annotate the method with There's no way to detect if it is an iOS app extension via compile flags (unless you define a custom compiler flag but I cannot do this as an SDK). Workaround is to silence all warnings such as CocoaPods/CocoaPods#4423 but I don't think we should do this. |
Yes I came up with the same conclusion as you. |
Problem Statement
It is not possible to use posthog in an App Extension (Notification Service).
Build Fails here
posthog-ios/PostHog/UIViewController.swift
Line 34 in 109e56b
With:
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered: