Open ghost opened 7 years ago
+1 I tried un-sign Xcode but it still can't work.
Software error:
Could not connect Access denied for user 'johnhol_inject'@'localhost' (using password: YES) at ../../../injection/common.pm line 13. Compilation failed in require at sale.cgi line 4. BEGIN failed--compilation aborted at sale.cgi line 4. For help, please send mail to the webmaster (webmaster@injection.johnholdsworth.com), giving this error message and the time and date of the error.
There are a number of new hurdles Xcode 8 puts up. The first thing to check is that the plugin has built without error and is loading into Xcode. Is there a Product/Injection Plugin menu item inside Xcode? If this is not present you need to unsign Xcode as described elsewhere. The second problem is that the âInjectionLoaderâ used in âunlatchedâ injection now needs to be codesigned before it can load into the simulator. Signing this is part of the injection plugin build and typical problems include invalid or duplicate codesigning identities. Check for errors when you build. If these two conditions are met injection should work. If there is a Project/Injection Plugin menu item but the Loader does not load giving an error in the console, try âpatchedâ injection using a main.m file. If you still canât get it to work please provide more detail of your problem than âit doesnât workâ. How doesnât it work? What is the error? Is the plugin loading?
@johnno1962 xcode is unsigned. "injection menu" is visible. I have installed in using Alcatraz. but now It gives me error:
`â¨â¨\ RECORDED BUILD SUCCEEDED ** â¨â¨Renaming bundle so it reloads..â¨rm -rf "/Users/user/PR/Project/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle1.bundle" && cp -r "/Users/user/PR/Project/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle" "/Users/user/PR/Project/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle1.bundle"â¨Codesigning with identity 'iPhone Developer' for iOS device⨠iPhone Developer: ambiguous (matches "iPhone Developer: User (N3YZ6Z6Z3X)" and "iPhone Developer: user123@gmail.com (43173B53US)" in /Users/user/Library/Keychains/login.keychain)
â¨â¨* Could not codesign as 'iPhone Developer': /Users/user/PR/Project/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle1.bundle *â¨â¨
at /Users/user/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57.â¨
main::error('Could not codesign as 9hone Developerø/Users/user...') called at /Users/user/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 513⨠* Bundle build failed *`
You need to resolve the ambiguity in the injection bundle project. Open Project/Injection Bundle/Open Bundle Project and modify code signing identity and delete iOSInjectionProject/identity.txt so it is updated (edited)
@johnno1962 sorry, where do I have to modify? in iOSInjectionProject which is in my project? there I see "Target is unsigned"
@johnno1962 thanks for the great help!!! finally I have to delete other "iPhone Developer" certificates in login KeyChain to leave only one certificate. this issue could be closed, I think.
@dollar2048 This is my issue ...
@luoerming I have used three lines to unsign Xcode 8 and update plugins:
sudo gem install update_xcode_plugins
update_xcode_plugins --unsign
update_xcode_plugins
from Here (unsign Xcode8)
cd InjectionLoader && xcodebuild -sdk iphonesimulator -config Debug && cd - && chmod +x "$INSTALL_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"/*.pl && cp -rf Classes/Xtrace.* InjectionLoader/build/*-iphonesimulator/InjectionLoader.bundle "$INSTALL_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH" /usr/bin/codesign --force --sign "iPhone Developer" --timestamp=none "$INSTALL_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"/InjectionLoader.bundle
@dollar2048 Thank you, This is my "Run Script" code, There is something wrong hereďź
I have a error code,
@luoerming 1) so did you unsign xcode8? 2) try to install "injection" via alcatraz and not via xcodebuild.
@dollar2048 Yes, I was using alcatraz installed, But I have a new error. đ
2016-09-29 17:12:47.437 example[50417:872947] Error loading /Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader: dlopen(/Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader, 265): no suitable image found. Did find: /Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader: required code signature missing for '/Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader'
@luoerming I have received also error 65 and it installed fine for me anyway. then I have Click OK and relauch XCode. XCode asked me to "Load plugin bundle". after that I can see Injection in my "Product" menu tab.
do you see Injection as installed plugin in your package manager?
@luoerming so you did install it in Xcode 8! the problem is solved, isn't it? ))
@dollar2048 đŞYes, Is already installed, But it can not work. This is error code .
2016-09-29 17:12:47.437 example[50417:872947] Error loading /Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader: dlopen(/Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader, 265): no suitable image found. Did find: /Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader: required code signature missing for '/Users/carroll/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/InjectionLoader.bundle/InjectionLoader'
@luoerming You have this error in the installation window. right? but the plugin was installed. right? try to use it.
@dollar2048 Thank you. It's indeed already installed in Xcode. But when I tried to run it. The Xcode console will be display this error code.
Sorry, than we have to ask @johnno1962
@dollar2048 Anyway, Thank you. Can I make a friend with you?
Itâs best to build the plugin from source rather than using Alcatraz now. The âInjectionLoaderâ error you are getting is becuase it is not codesigned whcih is done in the RunScript build phase you mention above. That is the place to look.
@johnno1962 But when I paste the RunScript. Xcode will not run.
@johnno1962 So this is because I did not give the signature of the injection plug-in?
The injection plugin itself does not need to be signed. It is the InjectionLoader which loads into the simulator on demand when you inject that needs to be signed with Xcode 8. I donât see why it canât find the InjectionLoader directory. it should be there if you have git cloned the repo correctly. But your problem is still ambiguous codesigning. Change "iPhone developer" in the run script to something else.
@johnno1962 by the way I have the same issue when try to compile "Injection" by cloning the project.
which specific issue? Codesigning issues are related to the keys in your keychain.
Yes. the same error in the RunScript. Related to Code signing. (that is why I could install only via Alcatraz)
Alcatraz is just ignoring what is an important error. If your error is still something like: iPhone Developer: ambiguous (matches "iPhone Developer: User (N3YZ6Z6Z3X)" and "iPhone Developer: user123@gmail.com (43173B53US)" in /Users/user/Library/Keychains/login.keychain)
you need to alter the run script so it has a unique identity to sign with. Either "iPhone Developer: User (N3YZ6Z6Z3X)â or "iPhone Developer: user123@gmail.com (43173B53US)"
i.e. alter this:
/usr/bin/codesign --force --sign "iPhone Developer" --timestamp=none "$INSTALL_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATHâ/InjectionLoader.bundle
@johnno1962 after deleting other "iPhone Developer" certificates in login KeyChain it builds with no error. I left only one certificate. :)
Hurrah! But does it work now?
@johnno1962 as for me, it started to work after installing via Alcatraz.
Cool. I wish there was a solution to this amiguous signing problem other than deleteing profiles.
Iâll leave this open for other users.
@johnno1962 Thanks anyway! this plugin is so nice.
For more information look here: https://johntmcintosh.com/blog/2016/10/03/code-injection-ios
I did all the steps from the blog, it's not working. The plugin seems to be installed - the additional menu items in XCode are available but the injected()
function is not being called. I added it to a view controller which I use. Not sure if it's a general problem with the plugins - I also tried to install XcodeColors (via Alcatraz, installation of which worked without problems after unsigning XCode), it installed fine, it shows it's installed, I restarted XCode but the messages are not colored.
@johnno1962 Thanks anyway! this plugin is so nice. and I have solved this problem. Thank you very much.
You can now avoid all this by using the new standalone Injection as an App. http://johnholdsworth.com/injection.html
@johnno1962 Wow, It's very cool new features, I can finally use this plugin Now!! But I still have an error code.
Like this:
1 warning generated. objc[76145]: Class BTBicycViewController is implemented in both /Users/xx/Library/Developer/CoreSimulator/Devices/EE0BB85E-98CF-4E4C-9B15-41CE0E6014F6/data/Containers/Bundle/Application/A8EDC737-112C-4AC7-BB43-FE169F0564BC/xx.app/xx (0x11069f7e0) and /Users/xx/Library/Developer/Xcode/DerivedData/biketo-dnylhyikwfqriaegbrpmsayzjwmh/Logs/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle6.bundle/InjectionBundle (0x1289017c0). One of the two will be used. Which one is undefined.
How to install in Xcode 8. Please give a detailed tutorial. I tried many times or failed.