Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request Alamofire#326 from kylef/universal-framework
Browse files Browse the repository at this point in the history
Convert Alamofire to a universal framework
  • Loading branch information
mattt committed Feb 9, 2015
2 parents 410e866 + 7f89ab9 commit 93bb408
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 497 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ before_install:
- gem install xcpretty
script:
- set -o pipefail
- xcodebuild -project Alamofire.xcodeproj -scheme "Alamofire iOS" test -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
- xcodebuild -project Alamofire.xcodeproj -scheme Alamofire test -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
- xcodebuild -project "iOS Example.xcodeproj" -scheme "iOS Example" build -sdk iphonesimulator ONLY_ACTIVE_ARCH=YES | xcpretty -c
517 changes: 145 additions & 372 deletions Alamofire.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

110 changes: 0 additions & 110 deletions Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire iOS.xcscheme

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4DD67C0A1A5C55C900ED2280"
BlueprintIdentifier = "27AB60061A7FAFBF0069F786"
BuildableName = "Alamofire.framework"
BlueprintName = "Alamofire OSX"
BlueprintName = "Alamofire"
ReferencedContainer = "container:Alamofire.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -28,9 +28,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F829C6B11A7A94F100A2CD59"
BuildableName = "Alamofire OSX Tests.xctest"
BlueprintName = "Alamofire OSX Tests"
BlueprintIdentifier = "27AB60111A7FAFBF0069F786"
BuildableName = "AlamofireTests.xctest"
BlueprintName = "AlamofireTests"
ReferencedContainer = "container:Alamofire.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -46,19 +46,19 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F829C6B11A7A94F100A2CD59"
BuildableName = "Alamofire OSX Tests.xctest"
BlueprintName = "Alamofire OSX Tests"
BlueprintIdentifier = "27AB60111A7FAFBF0069F786"
BuildableName = "AlamofireTests.xctest"
BlueprintName = "AlamofireTests"
ReferencedContainer = "container:Alamofire.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4DD67C0A1A5C55C900ED2280"
BlueprintIdentifier = "27AB60061A7FAFBF0069F786"
BuildableName = "Alamofire.framework"
BlueprintName = "Alamofire OSX"
BlueprintName = "Alamofire"
ReferencedContainer = "container:Alamofire.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -75,9 +75,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4DD67C0A1A5C55C900ED2280"
BlueprintIdentifier = "27AB60061A7FAFBF0069F786"
BuildableName = "Alamofire.framework"
BlueprintName = "Alamofire OSX"
BlueprintName = "Alamofire"
ReferencedContainer = "container:Alamofire.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -93,9 +93,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4DD67C0A1A5C55C900ED2280"
BlueprintIdentifier = "27AB60061A7FAFBF0069F786"
BuildableName = "Alamofire.framework"
BlueprintName = "Alamofire OSX"
BlueprintName = "Alamofire"
ReferencedContainer = "container:Alamofire.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
32 changes: 32 additions & 0 deletions Configurations/UniversalFramework_Base.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Alamofire.swift
//
// Copyright (c) 2014–2015 Alamofire (http://alamofire.org)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

// Make it universal
SUPPORTED_PLATFORMS = iphonesimulator iphoneos macosx
VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s
VALID_ARCHS[sdk=iphonesimulator*] = arm64 armv7 armv7s
VALID_ARCHS[sdk=macosx*] = i386 x86_64

// Dynamic linking uses different default copy paths
LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks'
32 changes: 32 additions & 0 deletions Configurations/UniversalFramework_Framework.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Alamofire.swift
//
// Copyright (c) 2014–2015 Alamofire (http://alamofire.org)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#include "UniversalFramework_Base.xcconfig"

// iOS-specific default settings
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*] = 1,2
TARGETED_DEVICE_FAMILY[sdk=iphone*] = 1,2

// OSX-specific default settings
FRAMEWORK_VERSION[sdk=macosx*] = A
COMBINE_HIDPI_IMAGES[sdk=macosx*] = YES
30 changes: 30 additions & 0 deletions Configurations/UniversalFramework_Test.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Alamofire.swift
//
// Copyright (c) 2014–2015 Alamofire (http://alamofire.org)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#include "UniversalFramework_Base.xcconfig"

FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*] = $(inherited) '$(SDKROOT)/Developer/Library/Frameworks'
FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*] = $(inherited) '$(SDKROOT)/Developer/Library/Frameworks'
FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(inherited) '$(DEVELOPER_FRAMEWORKS_DIR)'

// Yep.
LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = $(inherited) '@executable_path/../Frameworks' '@loader_path/../Frameworks'

0 comments on commit 93bb408

Please sign in to comment.