Open bigParis opened 8 years ago
The problem is in the loading of the bundle. Look at the debug console in Xcode to look for dynamic loading errors.
@johnno1962 Error loading /Users/yy/Desktop/makefriends/makefriends-ios_requirement_feature/proj.ios_mac/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle: dlopen(/Users/yy/Desktop/makefriends/makefriends-ios_requirement_feature/proj.ios_mac/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle, 265): Symbol not found: _OBJCCLASS$_MFAlertView Referenced from: /Users/yy/Desktop/makefriends/makefriends-ios_requirement_feature/proj.ios_mac/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle Expected in: flat namespace in /Users/yy/Desktop/makefriends/makefriends-ios_requirement_feature/proj.ios_mac/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle
This is the message shown in debug console, MFAlertView is a self-defined component, Injection will not work with self-defined component, or how can I load injectionBundle in a right way?
That should work. Look for something affecting the visibility of that class in the source i.e. https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html
@johnno1962
Bundle load failed
* RECORDED BUILD SUCCEEDED Renaming bundle so it reloads.. rm -rf "/Users/mtt0123/penghao/TechGitLab/MTCamera/MTCameraMoudleDemo/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle6.bundle" && cp -r "/Users/mtt0123/penghao/TechGitLab/MTCamera/MTCameraMoudleDemo/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle" "/Users/mtt0123/penghao/TechGitLab/MTCamera/MTCameraMoudleDemo/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle6.bundle" Loading Bundle... Modified iOSInjectionProject/injectionCount.txt ... \ Bundle load failed *** Consult the Xcode console.
Look at your Xcode console for the error this time.
RECORDED BUILD SUCCEEDED Renaming bundle so it reloads.. rm -rf "/Users/Terry/WorkSpace/QYGithub/QYDemo/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle12.bundle" && cp -r "/Users/Terry/WorkSpace/QYGithub/QYDemo/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle" "/Users/Terry/WorkSpace/QYGithub/QYDemo/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle12.bundle" Codesigning with identity '-' for iOS device Loading Bundle... Modified iOSInjectionProject/injectionCount.txt ... Bundle load failed Consult the Xcode console.
And Nothing in Console
Are you trying to use on a device? That no longer works I’m afraid.
When I run a simple demo project, It can be injected successfully, but when I test it on a big project it not works. I got messages from injection console as below
* RECORDED BUILD SUCCEEDED Renaming bundle so it reloads.. rm -rf "/Users/yy/Desktop/makefriends/makefriends-ios_requirement_feature/proj.ios_mac/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle" && cp -r "/Users/yy/Desktop/makefriends/makefriends-ios_requirement_feature/proj.ios_mac/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle" "/Users/yy/Desktop/makefriends/makefriends-ios_requirement_feature/proj.ios_mac/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle" Loading Bundle... Modified iOSInjectionProject/injectionCount.txt ... \ Bundle load failed *** Consult the Xcode console.
But I open InjectionBundle.xcodeproj and it can be build successfully, how to fix this problem?