newrelic / newrelic-ios-agent-spm

This repository hosts the Swift Package Manager deployment of the iOS agent
Apache License 2.0
15 stars 9 forks source link

Bundle at 'X.app/Frameworks/Y.framework' contains disallowed nested bundles #15

Closed twprzybysz closed 1 year ago

twprzybysz commented 1 year ago

Description

Cannot send build to App Store Connect due to the following error: Invalid Bundle. The bundle at 'NewRelicTest.app/Frameworks/NewRelicModule.framework' contains disallowed nested bundles. With error code STATE_ERROR.VALIDATION_ERROR.90205 for id f2f30305-10b1-4890-a0b0-7b3677159bb2

Steps to Reproduce

  1. Create empty project with iOS target
  2. Add module with one file
  3. Add spm to this module
  4. Write method in module which is responsible for NR token registration
  5. Call that method from target
  6. Set provisioning and archive
  7. Upload project to App Store

NewRelicTest.zip

Expected Behavior

Build upload should be successful without any errors.

Your Environment

Xcode 13.1, macOS Monterey, MBP M1 2020

kgasienica commented 1 year ago

Any prior on this? @cdillard-NewRelic

cdillard-NewRelic commented 1 year ago

Hello @kgasienica, I just tried this with our latest agent version 7.4.0 and Xcode 14.2. I used your NewRelicTest.zip sample project and uploaded a test build to TestFlight including the NewRelic SPM dependency. It uploads to TestFlight and works without issue. Can you please try this project with latest Xcode and agent version and report back? Thanks!

twprzybysz commented 1 year ago

@cdillard - NewRelic indeed the upload process is ok, but when I try to run I'm getting DYLD error: Library not loaded: @rpath/NewRelic.framework/NewRelic

Tested on NewRelic 7.4.0 & Xcode 14.1.

twprzybysz commented 1 year ago

@cdillard-NewRelic Conducted test on Xcode 14.2 - same problem.

cdillard-NewRelic commented 1 year ago

To make sure your NewRelicTest target can access NewRelic framework when building NewRelicModule you must add the NewRelic package to the NewRelicTest target. See this screenshot. Your NewRelicTest target needs to have NewRelic package listed here.

Screen Shot 2023-01-23 at 9 09 22 AM

Let us know if you still experience issues after changing which target lists NewRelic library.

twprzybysz commented 1 year ago

Ok so the update of iOS SDK to 14.x and embedding library solved the problem.