Added Encrypted Core Data Xcode 9 workaround. (#149)

This commit is contained in:
namalu 2017-10-10 10:02:58 -07:00 коммит произвёл GitHub
Родитель eb06c16230
Коммит 37d3e97b5a
13 изменённых файлов: 6069 добавлений и 4851 удалений

Просмотреть файл

@ -6,7 +6,7 @@ use_frameworks!
target 'healthvault-ios-sdk_Example' do target 'healthvault-ios-sdk_Example' do
platform :ios, '10.0' platform :ios, '10.0'
pod 'HealthVault', :path => '../' pod 'HealthVault', :path => '../'
pod 'EncryptedCoreData', :inhibit_warnings => true pod 'EncryptedCoreData', :inhibit_warnings => true, :git => 'https://github.com/project-imas/encrypted-core-data.git', :commit => 'b97ffaf2f' # xcode 9 workaround
pod 'SQLCipher', :inhibit_warnings => true pod 'SQLCipher', :inhibit_warnings => true
target 'healthvault-ios-sdk_Tests' do target 'healthvault-ios-sdk_Tests' do

Просмотреть файл

@ -15,22 +15,30 @@ PODS:
- SQLCipher/common - SQLCipher/common
DEPENDENCIES: DEPENDENCIES:
- EncryptedCoreData - EncryptedCoreData (from `https://github.com/project-imas/encrypted-core-data.git`, commit `b97ffaf2f`)
- HealthVault (from `../`) - HealthVault (from `../`)
- HealthVault/Tests (from `../`) - HealthVault/Tests (from `../`)
- Kiwi - Kiwi
- SQLCipher - SQLCipher
EXTERNAL SOURCES: EXTERNAL SOURCES:
EncryptedCoreData:
:commit: b97ffaf2f
:git: https://github.com/project-imas/encrypted-core-data.git
HealthVault: HealthVault:
:path: ../ :path: ../
CHECKOUT OPTIONS:
EncryptedCoreData:
:commit: b97ffaf2f
:git: https://github.com/project-imas/encrypted-core-data.git
SPEC CHECKSUMS: SPEC CHECKSUMS:
EncryptedCoreData: f6762fb05f88a52f36c5648659abc91b57f244b4 EncryptedCoreData: f6762fb05f88a52f36c5648659abc91b57f244b4
HealthVault: 7769453ba55849e8360625284fdc87764464841b HealthVault: 7769453ba55849e8360625284fdc87764464841b
Kiwi: f49c9d54b28917df5928fe44968a39ed198cb8a8 Kiwi: f49c9d54b28917df5928fe44968a39ed198cb8a8
SQLCipher: 43d12c0eb9c57fb438749618fc3ce0065509a559 SQLCipher: 43d12c0eb9c57fb438749618fc3ce0065509a559
PODFILE CHECKSUM: f686f6ab3ea9781f70d36d480a4438b218d8ef7b PODFILE CHECKSUM: 5f22b5e241714ea20d48531e38cdd6718810c54f
COCOAPODS: 1.2.1 COCOAPODS: 1.3.1

Просмотреть файл

@ -19,31 +19,204 @@ extern NSString * const EncryptedStoreErrorDomain;
extern NSString * const EncryptedStoreErrorMessageKey; extern NSString * const EncryptedStoreErrorMessageKey;
extern NSString * const EncryptedStoreDatabaseLocation; extern NSString * const EncryptedStoreDatabaseLocation;
extern NSString * const EncryptedStoreCacheSize; extern NSString * const EncryptedStoreCacheSize;
extern NSString * const EncryptedStoreFileManagerOption;
typedef NS_ENUM(NSInteger, EncryptedStoreError) typedef NS_ENUM(NSInteger, EncryptedStoreError)
{ {
EncryptedStoreErrorIncorrectPasscode = 6000, EncryptedStoreErrorIncorrectPasscode = 6000,
EncryptedStoreErrorMigrationFailed EncryptedStoreErrorMigrationFailed
}; };
@interface EncryptedStoreFileManagerConfiguration : NSObject
#pragma mark - Initialization
- (instancetype)initWithOptions:(NSDictionary *)options;
#pragma mark - Properties
@property (nonatomic, readwrite) NSFileManager *fileManager;
@property (nonatomic, readwrite) NSBundle *bundle;
@property (nonatomic, readwrite) NSString *databaseName;
@property (nonatomic, readwrite) NSString *databaseExtension;
@property (nonatomic, readonly) NSString *databaseFilename;
@property (nonatomic, readwrite) NSURL *databaseURL;
@end
@interface EncryptedStoreFileManagerConfiguration (OptionsKeys)
+ (NSString *)optionFileManager;
+ (NSString *)optionBundle;
+ (NSString *)optionDatabaseName;
+ (NSString *)optionDatabaseExtension;
+ (NSString *)optionDatabaseURL;
@end
@interface EncryptedStoreFileManager : NSObject
#pragma mark - Initialization
+ (instancetype)defaultManager;
- (instancetype)initWithConfiguration:(EncryptedStoreFileManagerConfiguration *)configuration;
#pragma mark - Setup
- (void)setupDatabaseWithOptions:(NSDictionary *)options error:(NSError * __autoreleasing*)error;
#pragma mark - Getters
@property (nonatomic, readwrite) EncryptedStoreFileManagerConfiguration *configuration;
@property (nonatomic, readonly) NSURL *databaseURL;
@end
@interface EncryptedStoreFileManager (FileManagerExtensions)
@property (nonatomic, readonly) NSURL *applicationSupportURL;
- (void)setAttributes:(NSDictionary *)attributes ofItemAtURL:(NSURL *)url error:(NSError * __autoreleasing*)error;
@end
@interface EncryptedStore : NSIncrementalStore @interface EncryptedStore : NSIncrementalStore
#pragma mark - Initialization
+ (NSPersistentStoreCoordinator *)makeStoreWithOptions:(NSDictionary *)options managedObjectModel:(NSManagedObjectModel *)objModel; + (NSPersistentStoreCoordinator *)makeStoreWithOptions:(NSDictionary *)options managedObjectModel:(NSManagedObjectModel *)objModel;
+ (NSPersistentStoreCoordinator *)makeStoreWithStructOptions:(EncryptedStoreOptions *) options managedObjectModel:(NSManagedObjectModel *)objModel; + (NSPersistentStoreCoordinator *)makeStoreWithStructOptions:(EncryptedStoreOptions *) options managedObjectModel:(NSManagedObjectModel *)objModel;
+ (NSPersistentStoreCoordinator *)makeStore:(NSManagedObjectModel *) objModel + (NSPersistentStoreCoordinator *)makeStore:(NSManagedObjectModel *) objModel
passcode:(NSString *) passcode; passcode:(NSString *) passcode;
+ (NSPersistentStoreCoordinator *)makeStoreWithOptions:(NSDictionary *)options managedObjectModel:(NSManagedObjectModel *)objModel error:(NSError * __autoreleasing*)error; //+ (NSPersistentStoreCoordinator *)makeStoreWithOptions:(NSDictionary *)options managedObjectModel:(NSManagedObjectModel *)objModel error:(NSError * __autoreleasing*)error;
+ (NSPersistentStoreCoordinator *)makeStoreWithStructOptions:(EncryptedStoreOptions *) options managedObjectModel:(NSManagedObjectModel *)objModel error:(NSError * __autoreleasing*)error; + (NSPersistentStoreCoordinator *)makeStoreWithStructOptions:(EncryptedStoreOptions *) options managedObjectModel:(NSManagedObjectModel *)objModel error:(NSError * __autoreleasing*)error;
+ (NSPersistentStoreCoordinator *)makeStore:(NSManagedObjectModel *) objModel + (NSPersistentStoreCoordinator *)makeStore:(NSManagedObjectModel *) objModel
passcode:(NSString *) passcode error:(NSError * __autoreleasing*)error; passcode:(NSString *) passcode error:(NSError * __autoreleasing*)error;
#pragma mark - Passphrase manipulation
#pragma mark - Public
/**
@discussion Check old passphrase and if success change old passphrase to new passphrase.
@param oldPassphrase The old passhrase with which database was previously opened.
@param newPassphrase The new passhrase which is desired for database.
@param error Inout error.
@return The status of operation.
*/
- (BOOL)checkAndChangeDatabasePassphrase:(NSString *)oldPassphrase toNewPassphrase:(NSString *)newPassphrase error:(NSError *__autoreleasing*)error;
/**
@discussion Check database passphrase.
@param passphrase The desired passphrase to test for.
@param error Inout error.
@return The status of operation.
*/
- (BOOL)checkDatabasePassphrase:(NSString *)passphrase error:(NSError *__autoreleasing*)error;
#pragma mark - Internal
/**
@brief Configure database with passhrase.
@discussion Configure database with passphrase stored in options dictionary.
@attention Internal usage.
@pre (error != NULL)
@param error Inout error.
@return The status of operation.
*/
- (BOOL)configureDatabasePassphrase:(NSError *__autoreleasing*)error; - (BOOL)configureDatabasePassphrase:(NSError *__autoreleasing*)error;
/**
@brief Test database connection against simple sql request.
@discussion Test database connection against simple sql request. Success means database open state and correctness of previous passphrase manipulation operation.
@attention Internal usage.
@pre (error != NULL)
@param error Inout error.
@return The status of operation.
*/
- (BOOL)checkDatabaseStatusWithError:(NSError *__autoreleasing*)error; - (BOOL)checkDatabaseStatusWithError:(NSError *__autoreleasing*)error;
/**
@brief
Primitive change passphrase operation.
@discussion Ignores database state and tries to change database passphrase.
Behaviour is unknown if used before old passphrase validation.
@attention Internal usage.
@pre (error != NULL)
@param passphrase The new passphrase.
@param error Inout error.
@return The status of operation.
*/
- (BOOL)changeDatabasePassphrase:(NSString *)passphrase error:(NSError *__autoreleasing*)error; - (BOOL)changeDatabasePassphrase:(NSString *)passphrase error:(NSError *__autoreleasing*)error;
/**
@brief Primitive set passphrase operation.
@discussion Ignores database state and tries to set database passphrase.
One of first-call functions in database setup.
@attention Internal usage.
@pre (error != NULL)
@param passphrase The desired first passphrase of database.
@param error Inout error.
@return The status of operation.
*/
- (BOOL)setDatabasePassphrase:(NSString *)passphrase error:(NSError *__autoreleasing*)error; - (BOOL)setDatabasePassphrase:(NSString *)passphrase error:(NSError *__autoreleasing*)error;
// Warning! // This method could close database connection ( look at implementation for details )
/**
@brief Validates database passphrase for correctness.
@discussion Tries to reopen database on provided passphrase.
Closes database and try to open in on provided passphrase.
@warning Could close database connection ( look at an implementation for details ).
@pre (error != NULL)
@param passphrase The desired passphrase to validate.
@param error Inout error.
@return The status of operation.
*/
- (BOOL)validateDatabasePassphrase:(NSString *)passphrase error:(NSError *__autoreleasing*)error; - (BOOL)validateDatabasePassphrase:(NSString *)passphrase error:(NSError *__autoreleasing*)error;
/**
@brief Primitive database change passphrase operation.
@discussion Tries to open database on provided oldPassphrase and in success it tries to change passphrase to new passphrase.
@attention Internal usage.
@pre (error != NULL)
@param oldPassphrase: The old passphrase.
@param newPassphrase: The new passphrase.
@param error: Inout error.
@return The status of operation.
*/
- (BOOL)changeDatabasePassphrase:(NSString *)oldPassphrase toNewPassphrase:(NSString *)newPassphrase error:(NSError *__autoreleasing*)error; - (BOOL)changeDatabasePassphrase:(NSString *)oldPassphrase toNewPassphrase:(NSString *)newPassphrase error:(NSError *__autoreleasing*)error;
@end @end
@interface EncryptedStore (Initialization)
+ (NSPersistentStoreCoordinator *)makeStoreWithOptions:(NSDictionary *)options managedObjectModel:(NSManagedObjectModel *)objModel error:(NSError * __autoreleasing*)error;
+ (NSPersistentStoreCoordinator *)coordinator:(NSPersistentStoreCoordinator *)coordinator byAddingStoreAtURL:(NSURL *)url configuration:(NSString *)configuration options:(NSDictionary *)options error:(NSError * __autoreleasing*)error;
+ (NSPersistentStoreDescription *)makeDescriptionWithOptions:(NSDictionary *)options configuration:(NSString *)configuration error:(NSError * __autoreleasing*)error API_AVAILABLE(macosx(10.12),ios(10.0),tvos(10.0),watchos(3.0));
@end
@interface EncryptedStore (Configuration)
//alias to options.
@property (copy, nonatomic, readonly) NSDictionary *configurationOptions;
@property (strong, nonatomic, readonly) EncryptedStoreFileManager *fileManager;
@end
@interface EncryptedStore (OptionsKeys)
+ (NSString *)optionType;
+ (NSString *)optionPassphraseKey;
+ (NSString *)optionErrorDomain;
+ (NSString *)optionErrorMessageKey;
+ (NSString *)optionDatabaseLocation;
+ (NSString *)optionCacheSize;
+ (NSString *)optionFileManager;
@end

Разница между файлами не показана из-за своего большого размера Загрузить разницу

79
Example/Pods/EncryptedCoreData/README.md сгенерированный
Просмотреть файл

@ -36,6 +36,85 @@ Provides a Core Data store that encrypts all data that is persisted. Besides th
* Run `pod install` * Run `pod install`
* In your application delegate source file (AppDelegate.m), add `#import "EncryptedStore.h"` * In your application delegate source file (AppDelegate.m), add `#import "EncryptedStore.h"`
# Using EncryptedStoreFileManager
In case of strong coupling with file system functions and others default conventions FileManager was introduced.
Have a look at components:
* EncryptedStoreFileManagerConfiguration
* EncryptedStoreFileManager
Various options are stored in Configuration.
And FileManager could be passed to all functions as an option.
```
NSDictionary *options = @{ EncryptedStore.optionFileManager : fileManager };
```
However, it should solve some dirty hacks.
Let's try.
## Database lives in different bundle.
```
NSBundle *bundle = [NSBundle bundleWithIdentifier:"com.opensource.database_framework"];
EncryptedStoreFileManagerConfiguration *configuration = [EncryptedStoreFileManagerConfiguration new];
configuration.bundle = bundle;
// or
[[EncryptedStoreFileManagerConfiguration alloc] initWithOptions: @{EncryptedStoreFileManagerConfiguration.optionBundle : bundle}];
// next, you need to bypassing configuration to setup store.
EncryptedStoreFileManager *fileManager = [[EncryptedStoreFileManager alloc] initWithConfiguration:configuration];
NSDictionary *options = @{ EncryptedStore.optionFileManager : fileManager };
```
## Complex setup and file system methods separation.
By default, database file (sqlite) is stored on disk in Application Support Directory.
But you can configure file extension, file name and file url in `EncryptedStoreFileManagerConfiguration`.
## Apply attributes to database file.
In general, this functionality is not needed.
It is a part of setup core data stack process.
## Configure persistentContainer
`NSPersistentContainer` uses NSPersistentStoreDescriptions to configure stores.
```
NSManagedObjectModel *model = [NSManagedObjectModel new];
NSPersistentContainer *container = [[NSPersistentContainer alloc] initWithName:@"abc" managedObjectModel:model];
NSDictionary *options = @{
self.optionPassphraseKey : @"123",
self.optionFileManager : [EncryptedStoreFileManager defaultManager]
};
NSPersistentStoreDescription *description = [self makeDescriptionWithOptions:options configuration:nil error:nil];
container.persistentStoreDescriptions = @[description];
[container loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *description, NSError * error) {
if (error) {
NSLog(@"error! %@", error);
}
}];
```
But if you wish:
```
EncryptedStore *store = // retrieve store from coordinator.
// set database file attributes
NSDictionary *attributes = // set attributes
NSError *error = nil;
[store.fileManager setAttributes:attributes ofItemAtURL:store.fileManager.databaseURL error:&error];
// inspect bundle
store.fileManager.configuration.bundle;
```
# Using EncryptedStore # Using EncryptedStore
EncryptedStore is known to work successfully on iOS versions 6.0 through 9.2. EncryptedStore is known to work successfully on iOS versions 6.0 through 9.2.

34
Example/Pods/Local Podspecs/EncryptedCoreData.podspec.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,34 @@
{
"name": "EncryptedCoreData",
"version": "3.1",
"license": "Apache-2.0",
"summary": "iOS Core Data encrypted SQLite store using SQLCipher",
"description": "Provides a Core Data store that encrypts all data that is persisted. Besides the initial setup, the usage is exactly the same as Core Data and can be used in existing projects that use Core Data.",
"homepage": "https://github.com/project-imas/encrypted-core-data/",
"authors": {
"MITRE": "imas-proj-list@lists.mitre.org"
},
"source": {
"git": "https://github.com/project-imas/encrypted-core-data.git",
"tag": "3.1"
},
"frameworks": [
"CoreData",
"Security"
],
"requires_arc": true,
"platforms": {
"ios": "8.0",
"osx": "10.10"
},
"source_files": "Incremental Store/**/*.{h,m}",
"public_header_files": "Incremental Store/EncryptedStore.h",
"dependencies": {
"SQLCipher": [
"~> 3.4.0"
]
},
"xcconfig": {
"OTHER_CFLAGS": "$(inherited) -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_CC"
}
}

14
Example/Pods/Manifest.lock сгенерированный
Просмотреть файл

@ -15,22 +15,30 @@ PODS:
- SQLCipher/common - SQLCipher/common
DEPENDENCIES: DEPENDENCIES:
- EncryptedCoreData - EncryptedCoreData (from `https://github.com/project-imas/encrypted-core-data.git`, commit `b97ffaf2f`)
- HealthVault (from `../`) - HealthVault (from `../`)
- HealthVault/Tests (from `../`) - HealthVault/Tests (from `../`)
- Kiwi - Kiwi
- SQLCipher - SQLCipher
EXTERNAL SOURCES: EXTERNAL SOURCES:
EncryptedCoreData:
:commit: b97ffaf2f
:git: https://github.com/project-imas/encrypted-core-data.git
HealthVault: HealthVault:
:path: ../ :path: ../
CHECKOUT OPTIONS:
EncryptedCoreData:
:commit: b97ffaf2f
:git: https://github.com/project-imas/encrypted-core-data.git
SPEC CHECKSUMS: SPEC CHECKSUMS:
EncryptedCoreData: f6762fb05f88a52f36c5648659abc91b57f244b4 EncryptedCoreData: f6762fb05f88a52f36c5648659abc91b57f244b4
HealthVault: 7769453ba55849e8360625284fdc87764464841b HealthVault: 7769453ba55849e8360625284fdc87764464841b
Kiwi: f49c9d54b28917df5928fe44968a39ed198cb8a8 Kiwi: f49c9d54b28917df5928fe44968a39ed198cb8a8
SQLCipher: 43d12c0eb9c57fb438749618fc3ce0065509a559 SQLCipher: 43d12c0eb9c57fb438749618fc3ce0065509a559
PODFILE CHECKSUM: f686f6ab3ea9781f70d36d480a4438b218d8ef7b PODFILE CHECKSUM: 5f22b5e241714ea20d48531e38cdd6718810c54f
COCOAPODS: 1.2.1 COCOAPODS: 1.3.1

9194
Example/Pods/Pods.xcodeproj/project.pbxproj сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
install_framework() install_framework()
{ {
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
@ -23,9 +27,9 @@ install_framework()
source="$(readlink "${source}")" source="$(readlink "${source}")"
fi fi
# use filter instead of exclude so missing patterns dont' throw errors # Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename local basename
basename="$(basename -s .framework "$1")" basename="$(basename -s .framework "$1")"
@ -54,6 +58,15 @@ install_framework()
fi fi
} }
# Copies the dSYM of a vendored framework
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
fi
}
# Signs a framework with the provided identity # Signs a framework with the provided identity
code_sign_if_enabled() { code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
@ -76,7 +89,7 @@ strip_invalid_archs() {
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped="" stripped=""
for arch in $archs; do for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place # Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1 lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch" stripped="$stripped $arch"
@ -89,14 +102,14 @@ strip_invalid_archs() {
if [[ "$CONFIGURATION" == "Debug" ]]; then if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/EncryptedCoreData/EncryptedCoreData.framework" install_framework "${BUILT_PRODUCTS_DIR}/EncryptedCoreData/EncryptedCoreData.framework"
install_framework "$BUILT_PRODUCTS_DIR/HealthVault/HealthVault.framework" install_framework "${BUILT_PRODUCTS_DIR}/HealthVault/HealthVault.framework"
install_framework "$BUILT_PRODUCTS_DIR/SQLCipher/SQLCipher.framework" install_framework "${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework"
fi fi
if [[ "$CONFIGURATION" == "Release" ]]; then if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/EncryptedCoreData/EncryptedCoreData.framework" install_framework "${BUILT_PRODUCTS_DIR}/EncryptedCoreData/EncryptedCoreData.framework"
install_framework "$BUILT_PRODUCTS_DIR/HealthVault/HealthVault.framework" install_framework "${BUILT_PRODUCTS_DIR}/HealthVault/HealthVault.framework"
install_framework "$BUILT_PRODUCTS_DIR/SQLCipher/SQLCipher.framework" install_framework "${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework"
fi fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait wait

Просмотреть файл

@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
XCASSET_FILES=() XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY}" in case "${TARGETED_DEVICE_FAMILY}" in
1,2) 1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
@ -44,29 +48,29 @@ EOM
fi fi
case $RESOURCE_PATH in case $RESOURCE_PATH in
*.storyboard) *.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.xib) *.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.framework) *.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;; ;;
*.xcdatamodel) *.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;; ;;
*.xcdatamodeld) *.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;; ;;
*.xcmappingmodel) *.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;; ;;
*.xcassets) *.xcassets)
@ -74,7 +78,7 @@ EOM
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;; ;;
*) *)
echo "$RESOURCE_PATH" echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;; ;;
esac esac

Просмотреть файл

@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
install_framework() install_framework()
{ {
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
@ -23,9 +27,9 @@ install_framework()
source="$(readlink "${source}")" source="$(readlink "${source}")"
fi fi
# use filter instead of exclude so missing patterns dont' throw errors # Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename local basename
basename="$(basename -s .framework "$1")" basename="$(basename -s .framework "$1")"
@ -54,6 +58,15 @@ install_framework()
fi fi
} }
# Copies the dSYM of a vendored framework
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
fi
}
# Signs a framework with the provided identity # Signs a framework with the provided identity
code_sign_if_enabled() { code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
@ -76,7 +89,7 @@ strip_invalid_archs() {
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped="" stripped=""
for arch in $archs; do for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place # Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1 lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch" stripped="$stripped $arch"
@ -89,16 +102,16 @@ strip_invalid_archs() {
if [[ "$CONFIGURATION" == "Debug" ]]; then if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/EncryptedCoreData/EncryptedCoreData.framework" install_framework "${BUILT_PRODUCTS_DIR}/EncryptedCoreData/EncryptedCoreData.framework"
install_framework "$BUILT_PRODUCTS_DIR/HealthVault-Tests/HealthVault.framework" install_framework "${BUILT_PRODUCTS_DIR}/HealthVault-Tests/HealthVault.framework"
install_framework "$BUILT_PRODUCTS_DIR/SQLCipher/SQLCipher.framework" install_framework "${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework"
install_framework "$BUILT_PRODUCTS_DIR/Kiwi/Kiwi.framework" install_framework "${BUILT_PRODUCTS_DIR}/Kiwi/Kiwi.framework"
fi fi
if [[ "$CONFIGURATION" == "Release" ]]; then if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/EncryptedCoreData/EncryptedCoreData.framework" install_framework "${BUILT_PRODUCTS_DIR}/EncryptedCoreData/EncryptedCoreData.framework"
install_framework "$BUILT_PRODUCTS_DIR/HealthVault-Tests/HealthVault.framework" install_framework "${BUILT_PRODUCTS_DIR}/HealthVault-Tests/HealthVault.framework"
install_framework "$BUILT_PRODUCTS_DIR/SQLCipher/SQLCipher.framework" install_framework "${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework"
install_framework "$BUILT_PRODUCTS_DIR/Kiwi/Kiwi.framework" install_framework "${BUILT_PRODUCTS_DIR}/Kiwi/Kiwi.framework"
fi fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait wait

Просмотреть файл

@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
XCASSET_FILES=() XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY}" in case "${TARGETED_DEVICE_FAMILY}" in
1,2) 1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
@ -44,29 +48,29 @@ EOM
fi fi
case $RESOURCE_PATH in case $RESOURCE_PATH in
*.storyboard) *.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.xib) *.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.framework) *.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;; ;;
*.xcdatamodel) *.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;; ;;
*.xcdatamodeld) *.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;; ;;
*.xcmappingmodel) *.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;; ;;
*.xcassets) *.xcassets)
@ -74,7 +78,7 @@ EOM
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;; ;;
*) *)
echo "$RESOURCE_PATH" echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;; ;;
esac esac

Просмотреть файл

@ -813,13 +813,16 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-healthvault-ios-sdk_Example-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
211869A455E8B6611E81595C /* [CP] Embed Pods Frameworks */ = { 211869A455E8B6611E81595C /* [CP] Embed Pods Frameworks */ = {
@ -828,9 +831,16 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-healthvault-ios-sdk_Example/Pods-healthvault-ios-sdk_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/EncryptedCoreData/EncryptedCoreData.framework",
"${BUILT_PRODUCTS_DIR}/HealthVault/HealthVault.framework",
"${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework",
); );
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EncryptedCoreData.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HealthVault.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SQLCipher.framework",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
@ -843,13 +853,16 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-healthvault-ios-sdk_Tests-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
5BB528A57811C7B45356E951 /* [CP] Copy Pods Resources */ = { 5BB528A57811C7B45356E951 /* [CP] Copy Pods Resources */ = {
@ -873,9 +886,18 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-healthvault-ios-sdk_Tests/Pods-healthvault-ios-sdk_Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/EncryptedCoreData/EncryptedCoreData.framework",
"${BUILT_PRODUCTS_DIR}/HealthVault-Tests/HealthVault.framework",
"${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework",
"${BUILT_PRODUCTS_DIR}/Kiwi/Kiwi.framework",
); );
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EncryptedCoreData.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HealthVault.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SQLCipher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kiwi.framework",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;