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

App Crashes on Device When OHHTTPStubsSwift Added to iOS Framework via Swift Package Manager #359

Open
3 tasks
ccocchiaro opened this issue Jun 2, 2023 · 1 comment

Comments

@ccocchiaro
Copy link

New Issue Checklist

Environment

  • version of OHHTTPStubs: 9.1.0
  • integration method you are using:
    • Cocoapods
    • Carthage
    • submodule
    • [X ] other (Swift Package Manager)
  • version of the tool you use: Xcode Version 14.3.1 (14E300c)

Issue Description

I added OHHTTPStubsSwift to an iOS Framework via Swift Package Manager. The iOS Framework was added to an iOS App compatible with iOS 16.0. When run on an iOS simulator, it works fine. When run on an actual device (e.g. iPhone 12 Pro + iOS 16.5), it crashes with the exception below. I've not been able to find a solution to this yet, but any help would be appreciated. Thanks.

Complete output when you encounter the issue (if any)
dyld[899]: Library not loaded: @rpath/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct
  Referenced from: <9CEB2B54-F73F-3F4E-87E3-2B5564B204B5> /private/var/containers/Bundle/Application/86447C43-244C-45A8-B16F-336A2EC38B80/ScratchTrax.app/Frameworks/RecordingsFW.framework/RecordingsFW
  Reason: tried: '/private/var/containers/Bundle/Application/86447C43-244C-45A8-B16F-336A2EC38B80/ScratchTrax.app/Frameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/var/containers/Bundle/Application/86447C43-244C-45A8-B16F-336A2EC38B80/ScratchTrax.app/Frameworks/RecordingsFW.framework/Frameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/preboot/Cryptexes/OS/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/preboot/Cryptexes/OS/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/var/containers/Bundle/Application/86447C43-244C-45A8-B16F-336A2EC38B80/ScratchTrax.app/Frameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/preboot/Cryptexes/OS/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/preboot/Cryptexes/OS/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/var/containers/Bundle/Application/86447C43-244C-45A8-B16F-336A2EC38B80/ScratchTrax.app/Frameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/preboot/Cryptexes/OS/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/private/preboot/Cryptexes/OS/Users/ccocco/Library/Developer/Xcode/DerivedData/ScratchTrax-gxyjfurbdybqhzglvqkqdyonljgr/Build/Products/Debug-iphoneos/PackageFrameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file), '/System/Library/Frameworks/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct' (no such file, not in dyld cache)Library not loaded: @rpath/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct.framework/OHHTTPStubsSwift_-8CE68D094ACE2FB_PackageProduct
@ccocchiaro
Copy link
Author

I've isolated this to the fact that this library is used in 2 separate iOS frameworks. When I only add one of those framework (it doesn't matter which one), it runs fine. Adding both of them results in the crash.

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

1 participant