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

warning: no rule to process file 'macos/Pods/PostHog/PostHog/Resources/PrivacyInfo.xcprivacy' of type 'text.xml' for architecture 'arm64' (in target 'PostHog' from project 'Pods') #137

Closed
stephane-archer opened this issue May 20, 2024 · 24 comments · Fixed by PostHog/posthog-flutter#105 or #138

Comments

@stephane-archer
Copy link

Bug Description

$ flutter build macos
warning: no rule to process file 'macos/Pods/PostHog/PostHog/Resources/PrivacyInfo.xcprivacy' of type 'text.xml' for architecture 'arm64' (in target 'PostHog' from project 'Pods')
  posthog_flutter: ^4.0.0
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.5 23F79 darwin-x64, locale en-GB)
    • Flutter version 3.22.0 on channel stable at /Users/fractale/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (11 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/fractale/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.5 23F79 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 124.0.6367.208

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Debug info

No response

@stephane-archer stephane-archer added the bug Something isn't working label May 20, 2024
@stephane-archer
Copy link
Author

Is this warning normal? How can I fix it?

@Twixes
Copy link

Twixes commented May 20, 2024

Hi @stephane-archer! This is the repo of the PostHog service, but the problems looks like a client library one. Are you perhaps using https://github.com/PostHog/posthog-flutter?

@timgl timgl transferred this issue from PostHog/posthog May 20, 2024
@stephane-archer
Copy link
Author

@Twixes you are right, thank you @timgl for transferring the issue

@marandaneto
Copy link
Member

@stephane-archer thanks for raising this issue, PostHog/posthog-flutter#105 should fix it

@stephane-archer
Copy link
Author

@marandaneto Thank you for fixing the issue :)
PS: a quick and dirty version of posthog.capture for posthot-flutter for Windows would be just great.

@marandaneto
Copy link
Member

marandaneto commented May 21, 2024

Found a few similar issues
firebase/firebase-ios-sdk#12511
airbnb/lottie-ios#2297
But we don't add the file under the Sources folder so the fix isn't the same, its just a warning anyway, I will merge my PR and wait for your feedback
Edit: released as https://pub.dev/packages/posthog_flutter/versions/4.5.0 (make sure to clean your podfile lock and pods)

@stephane-archer
Copy link
Author

> posthog_flutter 4.5.0 (was 4.4.1)
trash macos/Pods/ macos/Podfile.lock
warning: no rule to process file '/Users/fractale/CommercialProjects/video_proxy_generator/macos/Pods/PostHog/PostHog/Resources/PrivacyInfo.xcprivacy' of type 'text.xml' for architecture 'arm64' (in target 'PostHog' from project 'Pods')
warning: no rule to process file '/Users/fractale/CommercialProjects/video_proxy_generator/macos/Pods/PostHog/PostHog/Resources/PrivacyInfo.xcprivacy' of type 'text.xml' for architecture 'x86_64' (in target 'PostHog' from project 'Pods')

the problem doesn't seem to be solved

@stephane-archer
Copy link
Author

@marandaneto please re-open this issue

@marandaneto marandaneto reopened this May 21, 2024
@marandaneto
Copy link
Member

I am not entirely sure what causing this, maybe it's a macOS issue since it's not the case for iOS? ideas? everything seems to be configured correctly (based on official docs).

@stephane-archer
Copy link
Author

@marandaneto I have no idea. Do you have access to MacOS? I'm not sure how I can help you with this. Maybe you should open an issue on Flutter Git Hub? Their testing on MacOS is not always the best, the issue might not be on your side.

@marandaneto
Copy link
Member

@marandaneto I have no idea. Do you have access to MacOS? I'm not sure how I can help you with this. Maybe you should open an issue on Flutter Git Hub? Their testing on MacOS is not always the best, the issue might not be on your side.

Yes, I do have a macOS and I can see the warnings on CI as well, will check if the warning appears without Flutter as well. , will give it another try later this week, as I mentioned, it is a warning and the build succeeded, so not a blocker for now I guess, thanks for testing it.

@stephane-archer
Copy link
Author

@marandaneto I'm glad you can reproduce the issue.

a warning is usually not created for no reason and makes the user wonder if they have configured Posthog correctly. It also makes the package look less professional, firebase is a joke when you compile your app and you see the number of warnings they create. You wonder if they know what they are doing.

So, it is not a deal breaker but I would not consider this as useless.

@marandaneto
Copy link
Member

@marandaneto I'm glad you can reproduce the issue.

a warning is usually not created for no reason and makes the user wonder if they have configured Posthog correctly. It also makes the package look less professional, firebase is a joke when you compile your app and you see the number of warnings they create. You wonder if they know what they are doing.

So, it is not a deal breaker but I would not consider this as useless.

Totally agree :)

I also see that on our iOS build (iOS native SDK, no flutter):

- NOTE  | xcodebuild:  warning: no rule to process file 'PostHog/PostHog/Resources/PrivacyInfo.xcprivacy' of type 'text.xml' for architecture 'arm64' (in target 'PostHog' from project 'Pods')
- NOTE  | xcodebuild:  warning: no rule to process file 'PostHog/PostHog/Resources/PrivacyInfo.xcprivacy' of type 'text.xml' for architecture 'x86_64' (in target 'PostHog' from project 'Pods')
- NOTE  | [watchOS] xcodebuild:  warning: no rule to process file 'PostHog/PostHog/Resources/PrivacyInfo.xcprivacy' of type 'text.xml' for architecture 'i386' (in target 'PostHog' from project 'Pods')

So if there's something on our end, it's not on the Flutter SDK wrapper

@marandaneto marandaneto transferred this issue from PostHog/posthog-flutter May 21, 2024
@marandaneto marandaneto added Build warning and removed bug Something isn't working labels May 21, 2024
@marandaneto
Copy link
Member

I also get this warning when running https://github.com/PostHog/posthog-ios/tree/main/PostHogExampleWithPods

Screenshot 2024-05-21 at 15 13 03

But if I generate a privacy report:

Screenshot 2024-05-21 at 15 13 33

Everything is working correctly, it might be something with Pods or Xcode, but I don't see any difference between our setup and other libs.

@marandaneto
Copy link
Member

@stephane-archer
Copy link
Author

@marandaneto Is it already available for users? can you tell me what version it is so I can test?

@marandaneto
Copy link
Member

@stephane-archer 3.4.0 as linked above, if using flutter, you just have to upgrade your pods because the flutter dep always use the latest version 3.x.x

@stephane-archer
Copy link
Author

stephane-archer commented Jun 3, 2024

Pods version - PostHog (3.2.5)
I can still see this warning when building on Mac, please @marandaneto Re-open this issue

Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-x64, locale en-GB)

@marandaneto
Copy link
Member

Please test it using 3.4.0 as requested.

@stephane-archer
Copy link
Author

if I delete macos/Pods/ and macos/Podfile.lock this doesn't put PostHog (3.4.0), is there any commands for that?
posthog_flutter: ^4.0.0

@marandaneto
Copy link
Member

@stephane-archer This is just pods caching, you can see here the latest version https://cocoapods.org/pods/PostHog
Delete the pods folder, delete the lock file, update the repo (pod repo update), etc.

@stephane-archer
Copy link
Author

@marandaneto I was able to update the pods and I don't see the warning anymore.
I'm confused about the fact that Pods and Flutter packages are independent, one does not force the other.
Could you clarify why PostHog is not just a Flutter package and why it needs a Pod? I'm a bit confused about how packages and Pods are related and interact with each other.

@marandaneto
Copy link
Member

@stephane-archer happy that it is fixed.
this is how flutter packages work, https://docs.flutter.dev/packages-and-plugins/developing-packages

@stephane-archer
Copy link
Author

@marandaneto can you force a pod update when someone updates their flutter package?

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