diff --git a/lib/xcodeproj/project/xcproj_helper.rb b/lib/xcodeproj/project/xcproj_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/xcodeproj/project/xcproj_helper.rb
+++ b/lib/xcodeproj/project/xcproj_helper.rb
@@ -83,7 +83,7 @@ module Xcodeproj
           @objc_class ||= CoreFoundation.objc_getClass('PBXProject')
         end
 
-        XCODE_PATH = Pathname.new('/Applications/Xcode.app/Contents')
+        XCODE_PATH = Pathname.new(`xcode-select -p`).join('../..')
 
         def self.image
           Fiddle.dlopen(XCODE_PATH.join('SharedFrameworks/DVTFoundation.framework/DVTFoundation').to_s)
Use `xcode-select -p` to determine path.