injectionforxcode
injectionforxcode copied to clipboard
Code injection failed due to multiple certificates
Hi, I cannot inject code. I installed the plugin by cloning the git and built it with xcode (6.3 last version).
When I launch my app I see:
+[BundleInjection load] 127.0.0.1
Injection attempting connection to: 127.0.0.1:31442 (see project's main.(m|mm)
Injection attempting connection to: 192.168.1.104:31442 (see project's main.(m|mm)
Connected to "Injection" plugin, ready to load arm64 code.
Param #0 -> 1.000000
Param #1 -> 1.000000
Param #2 -> 1.000000
Param #3 -> 1.000000
Param #4 -> 1.000000
Color #0 -> 0.000000,0.000000,0.000000,1.000000
Color #1 -> 1.000000,0.000000,0.000000,1.000000
Color #2 -> 0.000000,1.000000,0.000000,1.000000
Color #3 -> 0.058130,0.055542,1.000000,1.000000
Color #4 -> 1.000000,1.000000,1.000000,1.000000
So I supposed the project is ready for injection. But when I want to inject some code, I have got this error:
** RECORDED BUILD SUCCEEDED **
Renaming bundle so it reloads..
rm -rf “/Users/jonathan/Desktop/Codage/EIVO/Moods/iOSInjectionProject/build/Debug-iphoneos/InjectionBundle3.bundle” && cp -r “/Users/jonathan/Desktop/Codage/EIVO/Moods/iOSInjectionProject/build/Debug-iphoneos/InjectionBundle.bundle” “/Users/jonathan/Desktop/Codage/EIVO/Moods/iOSInjectionProject/build/Debug-iphoneos/InjectionBundle3.bundle”
Codesigning with identity ‘iPhone Developer’ for iOS device
iPhone Developer: ambiguous (matches “iPhone Developer: Jonathan Tribouharet (T4N37HB354)” and “iPhone Developer: Jonathan Tribouharet (Q8YU37NSUJ)” in /Users/jonathan/Library/Keychains/login.keychain)
Could not codesign as ‘iPhone Developer’: /Users/jonathan/Desktop/Codage/EIVO/Moods/iOSInjectionProject/build/Debug-iphoneos/InjectionBundle3.bundle at /Users/jonathan/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 51.
main::error(‘Could not codesign as 9hone Developerø/Users/jonathan/D…’) called at /Users/jonathan/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 422
*** Bundle build failed ***
Check Bundle project.
I supposed the bug is because I have multiple certificate (multiple teams on, one personal (developer), one entreprise, and others from my clients) and codesign
don't know which one choose.
I don't know if you indicate to codesign
to use the same certificate I use for building my app with xcode.
HI, you’re nearly there. Use "Product/<ProjectName>/Open Bundle” to open the bundle project inside which you can select the specific identity. This value is cached in a file <project_root>/isoInjectionProject/
OK thanks. Maybe you could add this in the documentation.
I had to specify the specific signing certificate in the bundle project and put the full name of my signing certificate in identity.txt - i.e. "iPhone Developer: My Name (XX4XXXXX64)" to get it to work.
WonderFul Solution, Recommending mention this in README.md, I spent a lot of time to solve this problem.
I was just about to fix this and it seems this is resolved in Xcode 7.2 GM as the CODE_SIGN_IDENTITY now contains the (XX4XXXXX64) section. Let me know if you still have dificulties after deleteing the iOSInjectionProject/arm64/identity.txt file.
Thanks, I would upgrade Xcode to the latest version in two days. And deleting the identity.txt cannot solve it, instead adding signing certificate in identity.txt - i.e. "iPhone Developer: My Name (XX4XXXXX64)" does for me.
thanks for @johnno1962 providing such an genius plugin!!! I run this in simulator, but when it comes to my iPhone device, I received the same problem with @jonathantribouharet ,then as you suggested, I deleted the iOSInjectionProject/arm64/identity.txt file.but it still pops the same problem(ambiguous code identity...). Finally I have to delete other "iPhone Developer" certificates in login KeyChain to leave only one certificate, as a result it worked for my iPhone device. But I am confused, since xcode7.2 it allows us to debug with Xcode automatically generating provisioning files for us, why I have to delete other certificates to leave only one?
blew is my problem:
Codesigning with identity 'iPhone Developer' for iOS device iPhone Developer: ambiguous (matches "iPhone Developer: Name1 (354A2HDVR5)" and "iPhone Developer: Name2 (68X4N6DQ2C)" in /Users/Leon/Library/Keychains/login.keychain) *** Could not codesign as 'iPhone Developer': /Users/Leon/Documents/iOS_studyDemos/learn_MJExtension/iOSInjectionProject/build/Debug-iphoneos/InjectionBundle2.bundle **_ at /Users/Leon/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 55. main::error('Could not codesign as 9hone Developerø/Users/Leon/Docum...') called at /Users/Leon/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 493 **_ Bundle build failed ***
As we discuss above, This problem can be solved by edit the file iOSInjectionProject/arm64/identity.txt file
do not delete it, you should modify the last line As troya2 said that :+1: put the full name of my signing certificate in identity.txt - i.e. "iPhone Developer: My Name (XX4XXXXX64)" to get it to work. iOSInjectionProject/x86_64/identity.txt file
unfortunately, I recent change to realm which does not support injection.
Realm also Support Injection Now, and I am back for Injection, :+1:
SomeTimes it need to delete the same name identity in the keychain. Hoping to make a default chose, or a choice options.
Hello, since I have multiple signing identities I manually specified required identity in iOSInjectionProject/arm64/identity.txt
Anyway, I see this error when I try to inject changes:
iPhone Developer: Sergey Petrov (ID): ambiguous (matches "iPhone Developer: Sergey Petrov (ID)" in /Library/Keychains/System.keychain and "iPhone Developer: Sergey Petrov (ID)" in /Users/pr0ger/Library/Keychains/login.keychain)
Of course, I checked system keychain and didn't find any traces of duplicate of my signing identity there. What can I miss?
I’m afraid I don’t know. Try the sodesigning command from the command line and work from there.
thanks, I solve this problem last year.
Hi I am still facing this problem. but not find out any solution for this. I am using Xcode 9.3. So can anyone please suggest me what should I do.
Please try the new App store Version of the App https://itunes.apple.com/us/app/injectioniii/id1380446739?ls=1&mt=12