-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move CommonCrypto and zlib dependencies mapping to custom module map #520
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
98e1d62
Move CommonCrypto and zlib dependencies mapping to private module map
turbulem 8ca8df0
Add custom wrapper for SHA1 and custom modulemap for framework includ…
turbulem ca783db
Fix return type for SHA1 digest and cast warning
turbulem 138cfa7
Pull master branch from daltoniam/Starscream
turbulem bd0732e
Merge branch 'master'
turbulem 8df9d1e
Fix project inclusion and add missing linker flag
turbulem 7f12731
Add NSString+SHA1 to test target
turbulem a403aea
update to swift 4 manifest
nuclearace 79cd8a2
Merge pull request #556 from nuclearace/spm-4
daltoniam 94f8d58
Move CommonCrypto and zlib dependencies mapping to private module map
turbulem 70234bc
Add custom wrapper for SHA1 and custom modulemap for framework includ…
turbulem 912e7da
Fix return type for SHA1 digest and cast warning
turbulem 74e3c63
Pull master branch from daltoniam/Starscream
turbulem 33846d1
Fix project inclusion and add missing linker flag
turbulem 6371914
Add NSString+SHA1 to test target
turbulem d629a65
Merge branch 'master' of github.com:turbulem/Starscream
turbulem 631c256
Fix project settings
turbulem 467334e
Remove old file
turbulem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "SSCommonCrypto", | ||
"repositoryURL": "https://github.com/daltoniam/common-crypto-spm", | ||
"state": { | ||
"branch": null, | ||
"revision": "2eb3aff0fb57f92f5722fac5d6d20bf64669ca66", | ||
"version": "1.1.0" | ||
} | ||
}, | ||
{ | ||
"package": "SSCZLib", | ||
"repositoryURL": "https://github.com/daltoniam/zlib-spm.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "83ac8d719a2f3aa775dbdf116a57f56fb2c49abb", | ||
"version": "1.1.0" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// NSString+SHA1.h | ||
// Starscream | ||
// | ||
// Created by Sergey Lem on 6/25/18. | ||
// Copyright (c) 2014-2016 Dalton Cherry. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSString (SHA1) | ||
|
||
- (NSString *)ss_SHA1Base64Digest; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// NSString+SHA1.m | ||
// Starscream | ||
// | ||
// Created by Sergey Lem on 6/25/18. | ||
// Copyright (c) 2014-2016 Dalton Cherry. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
#import "NSString+SHA1.h" | ||
#import <CommonCrypto/CommonDigest.h> | ||
|
||
@implementation NSString (SHA1) | ||
|
||
- (NSString *)ss_SHA1Base64Digest { | ||
NSData *stringData = [self dataUsingEncoding:NSUTF8StringEncoding]; | ||
NSMutableData *digest = [NSMutableData dataWithLength:CC_SHA1_DIGEST_LENGTH]; | ||
CC_SHA1(stringData.bytes, (CC_LONG)stringData.length, digest.mutableBytes); | ||
return [[NSString alloc] initWithData:[digest base64EncodedDataWithOptions:0] encoding:NSUTF8StringEncoding]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
framework module Starscream { | ||
umbrella header "Starscream.h" | ||
|
||
export * | ||
|
||
explicit module SSCZLib [system] { | ||
header "include.h" | ||
link "z" | ||
export * | ||
} | ||
explicit module SSCommonCrypto [system] { | ||
private header "NSString+SHA1.h" | ||
link "CommonCrypto" | ||
export * | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <zlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm being picky here, but for consistency let's use same format without .git :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is some merge issue, I will update my branch and discards this changes.
I had no intention to change SPM config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's some GH issue, because these files are equal:
https://github.com/daltoniam/Starscream/blob/master/Package.swift
https://github.com/turbulem/Starscream/blob/master/Package.swift
I will make another branch and refresh this PR in order to make it clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I can adjust it later myself.