Skip to content

Commit

Permalink
Added Carthage support
Browse files Browse the repository at this point in the history
Due to the Carthage installation method, this involved moving Heimdall.xcodeproj to the root directory in order to avoid ambiguity with the example project.

Updated the README to show off both CocoaPods and Carthage compatibility.
  • Loading branch information
henrinormak committed May 17, 2015
1 parent ecea8ae commit 53c3c75
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 57 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module CommonCrypto [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/CommonCrypto/CommonCrypto.h"
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/usr/include/CommonCrypto/CommonCrypto.h"
export *
}
69 changes: 27 additions & 42 deletions Example/HeimdallExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
8E05A4C61AE91F8C0047E970 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E05A4C51AE91F8C0047E970 /* Images.xcassets */; };
8E05A4C91AE91F8C0047E970 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E05A4C71AE91F8C0047E970 /* LaunchScreen.xib */; };
8E05A4D51AE91F8C0047E970 /* HeimdallExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E05A4D41AE91F8C0047E970 /* HeimdallExampleTests.swift */; };
8E7DE7EB1AF93F4D00FDE3A7 /* Heimdall.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8E7DE7E41AF93F2A00FDE3A7 /* Heimdall.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -24,33 +23,26 @@
remoteGlobalIDString = 8E05A4B81AE91F8C0047E970;
remoteInfo = HeimdallExample;
};
8E7DE7E31AF93F2A00FDE3A7 /* PBXContainerItemProxy */ = {
8ECE87871B08B04B001CF907 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8E7DE7DD1AF93F2A00FDE3A7 /* Heimdall.xcodeproj */;
containerPortal = 8ECE87811B08B04B001CF907 /* Heimdall.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8E866C541AE8FBEC005682A2;
remoteInfo = Heimdall;
};
8E7DE7E51AF93F2A00FDE3A7 /* PBXContainerItemProxy */ = {
8ECE87891B08B04B001CF907 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8E7DE7DD1AF93F2A00FDE3A7 /* Heimdall.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8E866CC51AE8FE7D005682A2;
remoteInfo = CommonCrypto;
};
8E7DE7E71AF93F2A00FDE3A7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8E7DE7DD1AF93F2A00FDE3A7 /* Heimdall.xcodeproj */;
containerPortal = 8ECE87811B08B04B001CF907 /* Heimdall.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8E866C5F1AE8FBEC005682A2;
remoteInfo = HeimdallTests;
};
8E7DE7E91AF93F3B00FDE3A7 /* PBXContainerItemProxy */ = {
8ECE878B1B08B04B001CF907 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8E7DE7DD1AF93F2A00FDE3A7 /* Heimdall.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 8E866C531AE8FBEC005682A2;
remoteInfo = Heimdall;
containerPortal = 8ECE87811B08B04B001CF907 /* Heimdall.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8E38307A1AFE176A007E4235;
remoteInfo = CommonCrypto;
};
/* End PBXContainerItemProxy section */

Expand All @@ -61,7 +53,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
8E7DE7EB1AF93F4D00FDE3A7 /* Heimdall.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -79,7 +70,7 @@
8E05A4CE1AE91F8C0047E970 /* HeimdallExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HeimdallExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8E05A4D31AE91F8C0047E970 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8E05A4D41AE91F8C0047E970 /* HeimdallExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeimdallExampleTests.swift; sourceTree = "<group>"; };
8E7DE7DD1AF93F2A00FDE3A7 /* Heimdall.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Heimdall.xcodeproj; path = ../Heimdall/Heimdall.xcodeproj; sourceTree = "<group>"; };
8ECE87811B08B04B001CF907 /* Heimdall.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Heimdall.xcodeproj; path = ../Heimdall.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -106,7 +97,7 @@
8E05A4BB1AE91F8C0047E970 /* HeimdallExample */,
8E05A4D11AE91F8C0047E970 /* HeimdallExampleTests */,
8E05A4BA1AE91F8C0047E970 /* Products */,
8E7DE7DD1AF93F2A00FDE3A7 /* Heimdall.xcodeproj */,
8ECE87811B08B04B001CF907 /* Heimdall.xcodeproj */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -157,12 +148,12 @@
name = "Supporting Files";
sourceTree = "<group>";
};
8E7DE7DE1AF93F2A00FDE3A7 /* Products */ = {
8ECE87821B08B04B001CF907 /* Products */ = {
isa = PBXGroup;
children = (
8E7DE7E41AF93F2A00FDE3A7 /* Heimdall.framework */,
8E7DE7E61AF93F2A00FDE3A7 /* CommonCrypto.framework */,
8E7DE7E81AF93F2A00FDE3A7 /* HeimdallTests.xctest */,
8ECE87881B08B04B001CF907 /* Heimdall.framework */,
8ECE878A1B08B04B001CF907 /* HeimdallTests.xctest */,
8ECE878C1B08B04B001CF907 /* CommonCrypto.framework */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -182,7 +173,6 @@
buildRules = (
);
dependencies = (
8E7DE7EA1AF93F3B00FDE3A7 /* PBXTargetDependency */,
);
name = HeimdallExample;
productName = HeimdallExample;
Expand Down Expand Up @@ -238,8 +228,8 @@
projectDirPath = "";
projectReferences = (
{
ProductGroup = 8E7DE7DE1AF93F2A00FDE3A7 /* Products */;
ProjectRef = 8E7DE7DD1AF93F2A00FDE3A7 /* Heimdall.xcodeproj */;
ProductGroup = 8ECE87821B08B04B001CF907 /* Products */;
ProjectRef = 8ECE87811B08B04B001CF907 /* Heimdall.xcodeproj */;
},
);
projectRoot = "";
Expand All @@ -251,25 +241,25 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
8E7DE7E41AF93F2A00FDE3A7 /* Heimdall.framework */ = {
8ECE87881B08B04B001CF907 /* Heimdall.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Heimdall.framework;
remoteRef = 8E7DE7E31AF93F2A00FDE3A7 /* PBXContainerItemProxy */;
remoteRef = 8ECE87871B08B04B001CF907 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
8E7DE7E61AF93F2A00FDE3A7 /* CommonCrypto.framework */ = {
8ECE878A1B08B04B001CF907 /* HeimdallTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = CommonCrypto.framework;
remoteRef = 8E7DE7E51AF93F2A00FDE3A7 /* PBXContainerItemProxy */;
fileType = wrapper.cfbundle;
path = HeimdallTests.xctest;
remoteRef = 8ECE87891B08B04B001CF907 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
8E7DE7E81AF93F2A00FDE3A7 /* HeimdallTests.xctest */ = {
8ECE878C1B08B04B001CF907 /* CommonCrypto.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = HeimdallTests.xctest;
remoteRef = 8E7DE7E71AF93F2A00FDE3A7 /* PBXContainerItemProxy */;
fileType = wrapper.framework;
path = CommonCrypto.framework;
remoteRef = 8ECE878B1B08B04B001CF907 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
Expand Down Expand Up @@ -320,11 +310,6 @@
target = 8E05A4B81AE91F8C0047E970 /* HeimdallExample */;
targetProxy = 8E05A4CF1AE91F8C0047E970 /* PBXContainerItemProxy */;
};
8E7DE7EA1AF93F3B00FDE3A7 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Heimdall;
targetProxy = 8E7DE7E91AF93F3B00FDE3A7 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
Expand Down
18 changes: 9 additions & 9 deletions Heimdall.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Heimdall"
s.version = "0.1.2"
s.version = "0.1.3"
s.summary = "Heimdall is a wrapper around the Security framework for simple encryption/decryption operations."
s.license = { :type => "MIT", :file => "LICENSE" }

Expand All @@ -22,18 +22,18 @@ Pod::Spec.new do |s|

s.source = { :git => "https://github.com/henrinormak/Heimdall.git", :tag => s.version.to_s }

s.preserve_paths = "Heimdall/CommonCrypto/*"
s.source_files = "Heimdall/Heimdall/*"
s.preserve_paths = "CommonCrypto/*"
s.source_files = "Heimdall/*"
s.requires_arc = true

s.xcconfig = { 'SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*]' => '$(PODS_ROOT)/Heimdall/Heimdall/CommonCrypto/iphonesimulator/',
'SWIFT_INCLUDE_PATHS[sdk=iphoneos*]' => '$(PODS_ROOT)/Heimdall/Heimdall/CommonCrypto/iphoneos/' }
s.xcconfig = { 'SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*]' => '$(PODS_ROOT)/Heimdall/CommonCrypto/iphonesimulator/',
'SWIFT_INCLUDE_PATHS[sdk=iphoneos*]' => '$(PODS_ROOT)/Heimdall/CommonCrypto/iphoneos/' }

s.prepare_command = <<-CMD
mkdir -p Heimdall/CommonCrypto/iphoneos
mkdir -p Heimdall/CommonCrypto/iphonesimulator
cp Heimdall/CommonCrypto/iphoneos.modulemap Heimdall/CommonCrypto/iphoneos/module.modulemap
cp Heimdall/CommonCrypto/iphonesimulator.modulemap Heimdall/CommonCrypto/iphonesimulator/module.modulemap
mkdir -p CommonCrypto/iphoneos
mkdir -p CommonCrypto/iphonesimulator
cp CommonCrypto/iphoneos.modulemap CommonCrypto/iphoneos/module.modulemap
cp CommonCrypto/iphonesimulator.modulemap CommonCrypto/iphonesimulator/module.modulemap
CMD

end
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<key>IDESourceControlProjectIdentifier</key>
<string>06D366A7-7546-47E1-8F75-215EDE0A9BAD</string>
<key>IDESourceControlProjectName</key>
<string>project</string>
<string>Heimdall</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>2C28B1DD5070055B39E4A084A7F19A1D2285B789</key>
<string>https://github.com/henrinormak/Heimdall.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>Heimdall/Heimdall.xcodeproj/project.xcworkspace</string>
<string>Heimdall.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>2C28B1DD5070055B39E4A084A7F19A1D2285B789</key>
<string>../../..</string>
<string>../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/henrinormak/Heimdall.git</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<dict>
<key>CommonCrypto.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
![Heimdall Helmet](/Images/heimdall_icon.png "Heimdall Helmet")

![CocoaPods compatible](https://img.shields.io/cocoapods/v/Heimdall.svg)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

# Heimdall

In Norse mythology, Heimdall is the gatekeeper of Bifröst, the rainbow road connecting Midgard, realm of the humans, to Asgard, the realm of gods.
Expand Down Expand Up @@ -28,9 +31,15 @@ Also, make sure your podfile includes the following line, which is necessary to
use_frameworks!
```

### Carthage (unconfirmed)
### Carthage

Simply include the following line in your Cartfile

```
github 'henrinormak/Heimdall' ~> 0.1
```

As the `Heimdall.xcodeproj` produces a dynamic framework, Heimdall should function properly with Carthage. This has not been confirmed.
Note that Heimdall produces two frameworks in the Carthage build directory - `Heimdall.framework` and `CommonCrypto.framework`, you only need to include/embed `Heimdall.framework` into your project.

### Subproject

Expand Down

0 comments on commit 53c3c75

Please sign in to comment.