Skip to content

Commit

Permalink
Merge pull request #389 from CocoaPods/xcode-8-fix-plist-serialization
Browse files Browse the repository at this point in the history
Fixes plist serialization with Xcode 8 beta 1
  • Loading branch information
neonichu authored Jun 29, 2016
2 parents 794812b + af5cf64 commit 368113a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
[Boris Bügling](https://github.com/neonichu)
[#390](https://github.com/CocoaPods/Xcodeproj/pull/390)

* Fix plist serialization with Xcode 8 beta 1.
[Boris Bügling](https://github.com/neonichu)
[#389](https://github.com/CocoaPods/Xcodeproj/pull/389)


##### Bug Fixes

* None.
Expand Down
11 changes: 10 additions & 1 deletion lib/xcodeproj/plist/ffi/dev_tools_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def self.respondsToSelector(instance, sel)
end

XCODE_PATH = Pathname.new(`xcrun xcode-select --print-path`.strip).dirname
XCODE_VERSION = Gem::Version.new(`xcodebuild -version`.split(' ')[1])

def self.load_xcode_framework(framework)
Fiddle.dlopen(XCODE_PATH.join(framework).to_s)
Expand All @@ -70,14 +71,22 @@ def self.load_xcode_framework(framework)
# @note The IB frameworks only seem to be necessary on Xcode 7+
#
def self.load_xcode_frameworks
is_80_or_later = XCODE_VERSION >= Gem::Version.new('8.0')

DevToolsCore.silence_stderr do
load_xcode_framework('SharedFrameworks/DVTFoundation.framework/DVTFoundation')
load_xcode_framework('SharedFrameworks/DVTServices.framework/DVTServices')
load_xcode_framework('SharedFrameworks/DVTPortal.framework/DVTPortal')
load_xcode_framework('SharedFrameworks/DVTSourceControl.framework/DVTSourceControl')
load_xcode_framework('SharedFrameworks/CSServiceClient.framework/CSServiceClient')
load_xcode_framework('SharedFrameworks/CSServiceClient.framework/CSServiceClient') unless is_80_or_later
load_xcode_framework('Frameworks/IBFoundation.framework/IBFoundation')
load_xcode_framework('Frameworks/IBAutolayoutFoundation.framework/IBAutolayoutFoundation')
if is_80_or_later
load_xcode_framework('SharedFrameworks/DVTAnalyticsClient.framework/DVTAnalyticsClient')
load_xcode_framework('SharedFrameworks/DVTAnalytics.framework/DVTAnalytics')
load_xcode_framework('SharedFrameworks/DVTDocumentation.framework/DVTDocumentation')
load_xcode_framework('SharedFrameworks/SourceKit.framework/SourceKit')
end
load_xcode_framework('Frameworks/IDEFoundation.framework/IDEFoundation')
load_xcode_framework('PlugIns/Xcode3Core.ideplugin/Contents/MacOS/Xcode3Core')
end
Expand Down

0 comments on commit 368113a

Please sign in to comment.