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

Commit

Permalink
Merge pull request #91 from contentful/hotfix/Xcode9-build
Browse files Browse the repository at this point in the history
Xcode9 compatibility
  • Loading branch information
loudmouth authored Sep 25, 2017
2 parents 037ddfa + 30b5fd4 commit c2ee652
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ContentfulDeliveryAPI/CDAField.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ NS_ASSUME_NONNULL_BEGIN
/** Unique ID of the field. */
@property (nonatomic, readonly) NSString* identifier;
/** Name of the field. */
@property (nonatomic, readonly) NSString* __nullable name;
@property (nonatomic, readonly) NSString* name;
/** Type of the field. */
@property (nonatomic, readonly) CDAFieldType type;
/** Whether the field was disabled. */
Expand Down
4 changes: 2 additions & 2 deletions ContentfulDeliveryAPI/Resources/CDAAsset.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ +(instancetype)assetFromPersistedAsset:(id<CDAPersistedAsset>)persistedAsset cli
NSParameterAssert(persistedAsset.internetMediaType);
NSParameterAssert(persistedAsset.url);

NSDictionary* fileContent = @{ @"contentType": persistedAsset.internetMediaType,
@"url": persistedAsset.url };
NSDictionary* fileContent = @{ @"contentType": (NSString * _Nonnull)persistedAsset.internetMediaType,
@"url": (NSString * _Nonnull)persistedAsset.url };

return [[self alloc] initWithDictionary:@{ @"sys": @{ @"id": persistedAsset.identifier,
@"type": @"Asset" },
Expand Down
2 changes: 1 addition & 1 deletion ContentfulDeliveryAPI/Resources/CDAEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#if __has_feature(modules)
@import MapKit;
#else
#import <MapKit/MapKit"
#import <MapKit/MapKit.h>"
#endif
#import "CDANullabilityStubs.h"
Expand Down
4 changes: 3 additions & 1 deletion ManagementAPI/Private/CDAResource+Management.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ -(CDARequest*)performPutToFragment:(NSString*)fragment
success:(void (^)())success
failure:(CDARequestFailureBlock)failure {
NSParameterAssert(self.client);
NSString *versionString = [self.sys[@"version"] stringValue];
NSParameterAssert(versionString);
return [self.client putURLPath:[self.URLPath stringByAppendingPathComponent:fragment]
headers:@{ @"X-Contentful-Version": [self.sys[@"version"] stringValue] }
headers:@{ @"X-Contentful-Version": (NSString * _Nonnull)versionString }
parameters:parameters
success:^(CDAResponse *response, CDAResource* resource) {
[self updateWithResource:resource];
Expand Down
3 changes: 2 additions & 1 deletion ManagementAPI/Private/CMAWebhook.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ +(NSDictionary*)parametersForWebhookWithName:(NSString*)name
headers:(NSDictionary*)headers
httpBasicUsername:(NSString*)httpBasicUsername
httpBasicPassword:(NSString*)httpBasicPassword {
NSMutableDictionary* parameters = [@{ @"name": name, @"url": url.absoluteString } mutableCopy];
NSParameterAssert(url.absoluteString);
NSMutableDictionary* parameters = [@{ @"name": name, @"url": (NSString * _Nonnull)url.absoluteString } mutableCopy];

if (topics) {
parameters[@"topics"] = topics;
Expand Down
3 changes: 2 additions & 1 deletion Tests/LocaleTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ @implementation LocaleTests
-(void)testFallbackLocalesForAssets {
StartBlock();

self.client = [[CDAClient alloc] initWithSpaceKey:@"dmm6iymtengv" accessToken:@"b18e713cf2c3c8916cad0cca8e801a3c230e9e6781098dc50fb0810ebc36a4a1"];
self.client = [[CDAClient alloc] initWithSpaceKey:@"dmm6iymtengv"
accessToken:@"b18e713cf2c3c8916cad0cca8e801a3c230e9e6781098dc50fb0810ebc36a4a1"];

[self.client fetchAssetsMatching:@{ @"locale": @"*" } success:^(CDAResponse* r, CDAArray* array) {
CDAAsset* asset = array.items.firstObject;
Expand Down

0 comments on commit c2ee652

Please sign in to comment.