Closed dimohamdy closed 8 years ago
I need just a little more of the console output to tell you why this failed.
@johnno1962 i update issue
Thanks, The error is due to the following:
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator' ld: library not found for -lswiftFoundation for architecture x86_64 clang: error: linker command failed with exit code 1
That driectory is present on my machine, can you check?
i found the directory
@johnno1962 can you help me ?
The problem is the linker command is not working:
/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -F/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -filelist /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle.LinkFileList -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 x86_64/injecting_class.o -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator/InjectTest.app/Frameworks -undefined dynamic_lookup -fobjc-arc -fobjc-link-runtime -framework UIKit -framework QuartzCore -framework OpenGLES -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle_dependency_info.dat -o /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle
Without access to your machine, I can’t say more.
It is due to the following which I can’t understand:
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator'
can you upload your example project
There is no example project to speak of. My sugestion is you start with a far simpler project and see if you can get injection to work then work you way up to trying to get this project to work.
it's very simple app i want to change backgroundcolor of viewcontroller, can you tell me the permission of XCode (read write or what)
The way to track this down is to past the link command into terminal and see if you can get it working:
/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -F/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -filelist /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle.LinkFileList -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 x86_64/injecting_class.o -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator/InjectTest.app/Frameworks -undefined dynamic_lookup -fobjc-arc -fobjc-link-runtime -framework UIKit -framework QuartzCore -framework OpenGLES -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle_dependency_info.dat -o /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle
But I think I can see the problem now. You have a non-standard Xcode path:
/Volumes/MAC2/Applications/Xcode.app
Would you be able to move your Xcode and see if that makes a difference?
i will check it
Problem is here in the script:
my ($toolchain) = $learnt =~ m@(/Applications/Xcode.*?/XcodeDefault.xctoolchain)/@;
my $sdk = ($config =~ /-sdk (\w+)/)[0] || 'macosx';
$obj .= "\", \"-L'$toolchain'/usr/lib/swift/$sdk";
$obj .= "\", \"-F$buildRoot/Products/Debug-$sdk" if $buildRoot;
#}
you could change it to (injectSource.pl in plugin): my ($toolchain) = $learnt =~ m@(\S+/Applications/Xcode.?/XcodeDefault.xctoolchain)/@;
yes i must change this path "/Applications/Xcode.*?/XcodeDefault.xctoolchain "
\S represent the current path of xcode
or better: my ($toolchain) = $learnt =~ m@($xcodeApp.*?/XcodeDefault.xctoolchain)/@;
\S+ is regexp for any non-spaces
Or better still: my ($toolchain) = $learnt =~ m@(@{[$xcodeApp||'/Applications/Xcode']}.*?/XcodeDefault.xctoolchain)/@;
thanks this fix my problem please update the script ,but i have other problem
Ignore any warning, Swizzled InjectTest.ViewController 0x1145cf3d0 -> 0x108e87f10 and the inject not work
Good luck
@johnno1962 can you update script in master
done
i try sample and get this error my xcode Version 7.2.1 (7C1002)
buidRoot: /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build logDir: /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Logs/Build Learnt compile: /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/binaryboy/Desktop/InjectTest/InjectTest/ViewController.swift /Users/binaryboy/Desktop/InjectTest/InjectTest/AppDelegate.swift -target x86_64-apple-ios9.2 -enable-objc-interop -sdk /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -I /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -F /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-generated-files.hmap -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-own-target-headers.hmap -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-all-target-headers.hmap -Xcc -iquote -Xcc /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-project-headers.hmap -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/DerivedSources/x86_64 -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/binaryboy/Desktop/InjectTest -emit-module-doc-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController~partial.swiftdoc -Onone -module-name InjectTest -emit-module-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController~partial.swiftmodule -serialize-diagnostics-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController.dia -emit-dependencies-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController.d -emit-reference-dependencies-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController.swiftdeps -o iOSInjectionProject/x86_64/injectingclass.o real 0m0.894s user 0m0.125s sys 0m0.206s ls: .framework: No such file or directory Building iOSInjectionProject/InjectionBundle.xcodeproj "/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" -configuration Debug -arch x8664 -sdk iphonesimulator 2016-03-13 19:03:04.131 xcodebuild[11360:4209239] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 19:03:04.135 xcodebuild[11360:4209239] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CocoaPodUI.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 19:03:04.136 xcodebuild[11360:4209239] Failed to load plugin at: /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CocoaPodUI.xcplugin, skipping. Reason for failure: ** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] 2016-03-13 19:03:04.151 xcodebuild[11360:4209239] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CATweakerSense.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 19:03:04.154 xcodebuild[11360:4209239] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ACCodeSnippetRepository.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 19:03:04.677 xcodebuild[11360:4209239] ### Failed to load Addressbook class CNContactNameFormatter objc[11360]: Class VWKProject is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[11360]: Class VWKWorkspaceManager is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[11360]: Class VWKRunOperation is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[11360]: Class VWKShellHandler is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[11360]: Class VWKDocumentationManager is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[11360]: Class VWKXCodeConsole is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. Build settings from command line: ARCHS = x86_64 SDKROOT = iphonesimulator9.2 === BUILD TARGET InjectionBundle OF PROJECT InjectionBundle WITH CONFIGURATION Debug === Check dependencies CompileC build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.o BundleContents.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject export LANG=en_US.US-ASCII export PATH="/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/yv/0hqnb34j6d1dtx56l150y2jh0000gp/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wmissing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=9.2 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-generated-files.hmap -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-own-target-headers.hmap -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-all-target-headers.hmap -iquote /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-project-headers.hmap -iquote.. -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator/include -I/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/libxml2 -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/DerivedSources/x86_64 -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/DerivedSources -F/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -include /var/folders/yv/0hqnb34j6d1dtx56l150y2jh0000gp/C/com.apple.DeveloperTools/7.2.1-7C1002/Xcode/SharedPrecompiledHeaders/InjectionBundle-Prefix-gxzsmsoyfduvciatahmfsfmkaqpe/InjectionBundle-Prefix.pch -MMD -MT dependencies -MF /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.d --serialize-diagnostics /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.dia -c /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/BundleContents.m -o /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.o Ld build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle normal x86_64 cd /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject export IPHONEOS_DEPLOYMENT_TARGET=9.2 export PATH="/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -F/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -filelist /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle.LinkFileList -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 x86_64/injecting_class.o -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator/InjectTest.app/Frameworks -undefined dynamic_lookup -fobjc-arc -fobjc-link-runtime -framework UIKit -framework QuartzCore -framework OpenGLES -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle_dependency_info.dat -o /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator' ld: library not found for -lswiftFoundation for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) * BUILD FAILED The following build commands failed: Ld build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle normal x86_64 (1 failure) \ Build Failed with status: 65. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. _ at /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57. main::error('Build Failed with status: 65. You may need to open and edit t...') called at /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 460 Bundle build failed * Disconnected from: /Users/binaryboy/Library/Developer/CoreSimulator/Devices/B02AE16A-BAED-4328-A604-1C679C510A71/data/Containers/Data/Application/03B50383-71AD-47D8-8506-9FAF4D342699 Connection from: /Users/binaryboy/Library/Developer/CoreSimulator/Devices/B02AE16A-BAED-4328-A604-1C679C510A71/data/Containers/Data/Application/949A7C34-354B-4909-A350-0C560B8223F1 x86_64 (129) buidRoot: /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build logDir: /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Logs/Build Learnt compile: /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/binaryboy/Desktop/InjectTest/InjectTest/ViewController.swift /Users/binaryboy/Desktop/InjectTest/InjectTest/AppDelegate.swift -target x86_64-apple-ios9.2 -enable-objc-interop -sdk /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -I /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -F /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-generated-files.hmap -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-own-target-headers.hmap -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-all-target-headers.hmap -Xcc -iquote -Xcc /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/InjectTest-project-headers.hmap -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/DerivedSources/x86_64 -Xcc -I/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/binaryboy/Desktop/InjectTest -emit-module-doc-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController~partial.swiftdoc -Onone -module-name InjectTest -emit-module-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController~partial.swiftmodule -serialize-diagnostics-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController.dia -emit-dependencies-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController.d -emit-reference-dependencies-path /Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Intermediates/InjectTest.build/Debug-iphonesimulator/InjectTest.build/Objects-normal/x86_64/ViewController.swiftdeps -o iOSInjectionProject/x86_64/injecting_class.o real 0m0.263s user 0m0.110s sys 0m0.086s ls: .framework: No such file or directory Building iOSInjectionProject/InjectionBundle.xcodeproj "/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" -configuration Debug -arch x8664 -sdk iphonesimulator 2016-03-13 20:45:42.553 xcodebuild[40107:4360505] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 20:45:42.729 xcodebuild[40107:4360505] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CocoaPodUI.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 20:45:42.729 xcodebuild[40107:4360505] Failed to load plugin at: /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CocoaPodUI.xcplugin, skipping. Reason for failure: ** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] 2016-03-13 20:45:42.817 xcodebuild[40107:4360505] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CATweakerSense.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 20:45:43.014 xcodebuild[40107:4360505] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ACCodeSnippetRepository.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2016-03-13 20:45:44.125 xcodebuild[40107:4360505] ### Failed to load Addressbook class CNContactNameFormatter objc[40107]: Class VWKProject is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[40107]: Class VWKWorkspaceManager is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[40107]: Class VWKRunOperation is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[40107]: Class VWKShellHandler is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[40107]: Class VWKDocumentationManager is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. objc[40107]: Class VWKXCodeConsole is implemented in both /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin/Contents/MacOS/ObjectGraph and /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSHObjcUML.xcplugin/Contents/MacOS/KSHObjcUML. One of the two will be used. Which one is undefined. Build settings from command line: ARCHS = x86_64 SDKROOT = iphonesimulator9.2 === BUILD TARGET InjectionBundle OF PROJECT InjectionBundle WITH CONFIGURATION Debug === Check dependencies CompileC build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.o BundleContents.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject export LANG=en_US.US-ASCII export PATH="/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/yv/0hqnb34j6d1dtx56l150y2jh0000gp/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wmissing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=9.2 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-generated-files.hmap -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-own-target-headers.hmap -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-all-target-headers.hmap -iquote /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/InjectionBundle-project-headers.hmap -iquote.. -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator/include -I/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/libxml2 -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/DerivedSources/x86_64 -I/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/DerivedSources -F/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -include /var/folders/yv/0hqnb34j6d1dtx56l150y2jh0000gp/C/com.apple.DeveloperTools/7.2.1-7C1002/Xcode/SharedPrecompiledHeaders/InjectionBundle-Prefix-gxzsmsoyfduvciatahmfsfmkaqpe/InjectionBundle-Prefix.pch -MMD -MT dependencies -MF /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.d --serialize-diagnostics /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.dia -c /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/BundleContents.m -o /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.o Ld build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle normal x86_64 cd /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject export IPHONEOS_DEPLOYMENT_TARGET=9.2 export PATH="/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/Volumes/MAC2/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Volumes/MAC2/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -F/Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator -filelist /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle.LinkFileList -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 x86_64/injecting_class.o -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator -F/Users/binaryboy/Library/Developer/Xcode/DerivedData/InjectTest-gitdwimdtpewpoalhymgncrpjydw/Build/Products/Debug-iphonesimulator/InjectTest.app/Frameworks -undefined dynamic_lookup -fobjc-arc -fobjc-link-runtime -framework UIKit -framework QuartzCore -framework OpenGLES -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/InjectionBundle_dependency_info.dat -o /Users/binaryboy/Desktop/InjectTest/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator' ld: library not found for -lswiftFoundation for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) * BUILD FAILED The following build commands failed: Ld build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle normal x86_64 (1 failure) \ Build Failed with status: 65. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. _ at /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57. main::error('Build Failed with status: 65. You may need to open and edit t...') called at /Users/binaryboy/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 460 _ Bundle build failed ***