Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Fix broken Seed databse Command line utility (#89)
Browse files Browse the repository at this point in the history
* Add separate Xcode project for Seed database tooling

Also embed exampe app for seed database in own Xcode project

Make relevant changes in contentful-persistence.objc

* Bump CDA SDK version to 2.0.4

Use contentful-persistence.objc 2.0.0

* Explicitly use ruby 2.4.1

* Downgrade to cocoapods 1.2.1 because travis can't find 1.3

Try to bundle install in before_script

* Lock VCRURLConnection version to 0.2.2

* Lock Expecta and don't cache Bundler or Cocoapods on Travis
  • Loading branch information
loudmouth committed Sep 20, 2017
1 parent 716a092 commit 037ddfa
Show file tree
Hide file tree
Showing 51 changed files with 1,453 additions and 1,054 deletions.
2 changes: 1 addition & 1 deletion .env
@@ -1,3 +1,3 @@
DELIVERY_SDK_VERSION=2.0.3
DELIVERY_SDK_VERSION=2.0.4
MANAGEMENT_SDK_VERSION=0.10.1

2 changes: 1 addition & 1 deletion .envrc
@@ -1,2 +1,2 @@
export DELIVERY_SDK_VERSION=2.0.3
export DELIVERY_SDK_VERSION=2.0.4
export MANAGEMENT_SDK_VERSION=0.10.1
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -9,7 +9,8 @@ doc
## Cocoapods
Pods/

### Other
### Seed database
Examples/SeedDatabase/*/Pods

.pt
Examples/ContentfulDeliveryAPI.zip
Expand Down
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -4,16 +4,16 @@ git:
submodules: false
osx_image: xcode8.3
rvm:
- 2.4
cache:
- bundler
- cocoapods
- 2.4.1
#cache:
#- bundler
#- cocoapods
before_install:
- git submodule sync
- git submodule update --init --recursive
install:
- bundle install
- bundle exec pod repo update --silent
install:
- bundle exec pod install
script:
- "./scripts/travis-build-test.sh"
Expand Down
2 changes: 1 addition & 1 deletion ContentfulDeliveryAPI.podspec
Expand Up @@ -34,7 +34,7 @@ Pod::Spec.new do |s|
s.ios.frameworks = 'UIKit', 'MapKit'
s.ios.public_header_files = 'ContentfulDeliveryAPI/UIKit/{CDAEntriesViewController,CDAFieldsViewController,UIImageView+CDAAsset,CDAMapViewController,CDAResourcesCollectionViewController,CDAResourcesViewController,CDAResourceCell}.h'

s.osx.deployment_target = '10.10'
s.osx.deployment_target = '10.12'

s.dependency 'AFNetworking', '~> 3.1.0'
s.dependency 'ISO8601', '~> 0.6.0'
Expand Down
2 changes: 1 addition & 1 deletion ContentfulDeliveryAPI/CDAUtilities.m
Expand Up @@ -190,7 +190,7 @@ id CDAReadItemFromFileURL(NSURL* fileURL, CDAClient* client) {
NSArray* query = [parameters componentsSeparatedByString:@"="];

if ([[query firstObject] isEqualToString:queryParameter]) {
return [[query lastObject] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
return [[query lastObject] stringByRemovingPercentEncoding];
}
}

Expand Down
937 changes: 161 additions & 776 deletions ContentfulSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

3 changes: 2 additions & 1 deletion Examples/SeedDatabase/CoreDataManager+SeedDB.m
Expand Up @@ -6,6 +6,7 @@
//
//

#import <ContentfulDeliveryAPI/ContentfulDeliveryAPI.h>
#import "Asset.h"
#import "CoreDataManager+SeedDB.h"
#import "Document.h"
Expand All @@ -22,7 +23,7 @@
from the start.
*/
static NSString* const CDAAccessToken = @"a196a5806ddd5f25700624bb11dfc94aeac9f0a5d4bd245e68cf42f78f8b2cc6";
static NSString* const CDASpaceKey = @"duzidfp33ikw";
static NSString* const CDASpaceKey = @"duzidfp33ikw";

@implementation CoreDataManager (SeedDB)

Expand Down
23 changes: 23 additions & 0 deletions Examples/SeedDatabase/ManagedObjectModel/Asset.h
@@ -0,0 +1,23 @@
//
// Asset.h
// ContentfulSDK
//
// Created by Boris Bügling on 03/09/14.
//
//

@import CoreData;
@import Foundation;

#import <ContentfulDeliveryAPI/CDAPersistedAsset.h>

@interface Asset : NSManagedObject <CDAPersistedAsset>

@property (nonatomic, retain) NSNumber * height;
@property (nonatomic, retain) NSString * identifier;
@property (nonatomic, retain) NSString * url;
@property (nonatomic, retain) NSString * internetMediaType;
@property (nonatomic, retain) NSManagedObject *cat;
@property (nonatomic, retain) NSNumber * width;

@end
20 changes: 20 additions & 0 deletions Examples/SeedDatabase/ManagedObjectModel/Asset.m
@@ -0,0 +1,20 @@
//
// Asset.m
// ContentfulSDK
//
// Created by Boris Bügling on 03/09/14.
//
//

#import "Asset.h"

@implementation Asset

@dynamic height;
@dynamic identifier;
@dynamic url;
@dynamic internetMediaType;
@dynamic width;
@dynamic cat;

@end
19 changes: 19 additions & 0 deletions Examples/SeedDatabase/ManagedObjectModel/SyncInfo.h
@@ -0,0 +1,19 @@
//
// SyncInfo.h
// ContentfulSDK
//
// Created by Boris Bügling on 14/04/14.
//
//

@import CoreData;
@import Foundation;

#import <ContentfulDeliveryAPI/CDAPersistedSpace.h>

@interface SyncInfo : NSManagedObject <CDAPersistedSpace>

@property (nonatomic, retain) NSString * syncToken;
@property (nonatomic, retain) NSDate * lastSyncTimestamp;

@end
16 changes: 16 additions & 0 deletions Examples/SeedDatabase/ManagedObjectModel/SyncInfo.m
@@ -0,0 +1,16 @@
//
// SyncInfo.m
// ContentfulSDK
//
// Created by Boris Bügling on 14/04/14.
//
//

#import "SyncInfo.h"

@implementation SyncInfo

@dynamic syncToken;
@dynamic lastSyncTimestamp;

@end

0 comments on commit 037ddfa

Please sign in to comment.