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

Avoid potential compilation errors in app extensions when using CocoaPods #229

Merged
merged 6 commits into from
Feb 5, 2025

Conversation

Jeehut
Copy link
Contributor

@Jeehut Jeehut commented Feb 2, 2025

Fixes #226.

Note that there seems to be no built-in preprocessor macro or flag to check for app extensions, so I have documented how to easily setup one for app extension targets. I followed the naming scheme of Apple's own flags so this feels natural.

I have also added "rounding to milliseconds" to our new duration signal feature to be consistent with the Kotlin SDK.

@Jeehut Jeehut requested a review from winsmith February 2, 2025 09:05
Copy link
Contributor

@winsmith winsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love seeing all this progress

@Jeehut Jeehut force-pushed the feature/app-extensions branch from fe6fba1 to 3b9cf34 Compare February 5, 2025 19:53
@Jeehut
Copy link
Contributor Author

Jeehut commented Feb 5, 2025

@winsmith Our customer reported that the solution did not work as Swift flags do not pass on to packaged added via CocoaPods (and that's the only place this issue happens). So I have reverted the addition of the flag and went for a simple runtime check, which seems to have worked to fix the issue.

In addition to this fix, CocoaPods users have to set APPLICATION_EXTENSION_API_ONLY to NO, see here:
#226 (comment)

@Jeehut Jeehut merged commit 90608c2 into main Feb 5, 2025
6 checks passed
@Jeehut Jeehut deleted the feature/app-extensions branch February 5, 2025 19:59
@Jeehut Jeehut changed the title Avoid potential compilation errors in app extensions with build flag Avoid potential compilation errors in app extensions Feb 5, 2025
@Jeehut Jeehut changed the title Avoid potential compilation errors in app extensions Avoid potential compilation errors in app extensions when using CocoaPods Feb 5, 2025
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

Successfully merging this pull request may close these issues.

Unable to compile in app extension targets
2 participants