johnno1962 / InjectionApp

Issue Tracking Repo for Injection as an App
MIT License
111 stars 7 forks source link

Bundle Load Error when injecting from AppCode #23

Closed lyahdav closed 7 years ago

lyahdav commented 7 years ago

I am able to inject fine from Xcode, but I get the error below when patching from AppCode. I tried patching main.m too, but same error.

.../Logs/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle8.bundle/InjectionBundle, 265): Library not loaded: @rpath/XCTest.framework/XCTest
Referenced from: .../Logs/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle8.bundle/InjectionBundle
Bundle Load Error
*** Bundle has failed to load. If this is due to symbols not found, this may be due to symbols being hidden from dynamic libraries. ***

Why would it look for XCTest?

lyahdav commented 7 years ago

Would be nice to have a fix but I'm working around this for now by running the app from Xcode, enabling File Watcher from the Injection menu, and then editing in AppCode.

johnno1962 commented 7 years ago

Odd problem. What is the path to your Xcode?

lyahdav commented 7 years ago

Strangely enough I tried to reproduce today and couldn't. It works fine from AppCode now. Maybe a restart of AppCode or Xcode resolved it? My path to Xcode is /Applications/Xcode.app.