Parse-sdk-ios-osx: Xcode 12 beta 6 unable to compile Parse Cocoapods

Created on 7 Sep 2020  路  8Comments  路  Source: parse-community/Parse-SDK-iOS-OSX

Using Xcode 12 beta 6, compiling for an iOS Simulator running iOS 14, the app cannot compile when the Parse pod is installed.

Repro steps

  1. Create a new iOS App project using Xcode 12 beta 6 (choose App Delegate / Storyboard, not Swift UI)
  2. In the terminal, using cocoapods version 1.9.3 (stable), run pod init then modify the Podfile to contain
source 'https://github.com/CocoaPods/Specs.git'

# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'

target 'parse-ios14-example' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for parse-ios14-example
  pod 'Parse', '1.18.0', :modular_headers => true

end
  1. Run pod install to install the pods, then open the newly created workspace instead of the project
  2. Select "iPhone 11 Pro Max" as the deployment target
  3. Hit CMD+R to run the app

Expected result

The simulator launches an empty app

Actual result

The compiler terminates with an error in ParseClientConfiguration.m:129: Incompatible block pointer types sending 'void (^)(ParseClientConfiguration *__strong)' to parameter of type 'void (^ _Nonnull)(id<ParseMutableClientConfiguration> _Nonnull __strong)'

Full log:

/Users/julianvogels/Developer/parse-ios14-example/Pods/Parse/Parse/Parse/ParseClientConfiguration.m:129:61: error: incompatible block pointer types sending 'void (^)(ParseClientConfiguration *__strong)' to parameter of type 'void (^ _Nonnull)(id<ParseMutableClientConfiguration>  _Nonnull __strong)'
    return [ParseClientConfiguration configurationWithBlock:^(ParseClientConfiguration *configuration) {
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/julianvogels/Developer/parse-ios14-example/Pods/Parse/Parse/Parse/ParseClientConfiguration.m:10:
/Users/julianvogels/Developer/parse-ios14-example/Pods/Parse/Parse/Parse/ParseClientConfiguration.h:208:101: note: passing argument to parameter 'configurationBlock' here
+ (instancetype)configurationWithBlock:(void (^)(id<ParseMutableClientConfiguration> configuration))configurationBlock;
                                                                                                    ^
1 error generated.

Most helpful comment

@julianvogels You can pod install the current version of Parse. When it fails to compile, go to ParseClientConfiguration.m and in the last function "copyWithZone", replace everything inside the function with this, at least until it gets updated.

ParseClientConfiguration *const configuration = [[ParseClientConfiguration alloc] initEmpty];
if (!configuration) return nil;
// Use direct assignment to skip over all of the assertions that may fail if we're not fully initialized yet.
configuration->_applicationId = [self->_applicationId copy];
configuration->_clientKey = [self->_clientKey copy];
configuration->_server = [self.server copy];
configuration->_fileUploadController = self->_fileUploadController;
configuration->_localDatastoreEnabled = self->_localDatastoreEnabled;
configuration->_applicationGroupIdentifier = [self->_applicationGroupIdentifier copy];
configuration->_containingApplicationBundleIdentifier = [self->_containingApplicationBundleIdentifier copy];
configuration->_networkRetryAttempts = self->_networkRetryAttempts;
configuration->_URLSessionConfiguration = self->_URLSessionConfiguration;
return configuration;

All 8 comments

Example project: parse-ios14-example.zip

Thanks for the detailed issue but this is a duplicate of #1526, the issue was fixed by #1527 which has been merged into the master branch. Whilst you wait for the next release you could switch your podfile to the master branch.

Thanks for having a look @TomWFox! I tried switching my Podfile to the master branch. It worked, but I am also using ParseLiveQuery 2.7.1, which depends on Parse iOS SDK version 1.18.0, so the pod install fails. Guess I'll have to wait for the release.

Hmm I feel like there should be a way round that but I'm not enough of a cocoapods expert to know! The team are trying to get a release out ASAP so hopefully it will be available on cocoapods in a few days.

@julianvogels You can pod install the current version of Parse. When it fails to compile, go to ParseClientConfiguration.m and in the last function "copyWithZone", replace everything inside the function with this, at least until it gets updated.

ParseClientConfiguration *const configuration = [[ParseClientConfiguration alloc] initEmpty];
if (!configuration) return nil;
// Use direct assignment to skip over all of the assertions that may fail if we're not fully initialized yet.
configuration->_applicationId = [self->_applicationId copy];
configuration->_clientKey = [self->_clientKey copy];
configuration->_server = [self.server copy];
configuration->_fileUploadController = self->_fileUploadController;
configuration->_localDatastoreEnabled = self->_localDatastoreEnabled;
configuration->_applicationGroupIdentifier = [self->_applicationGroupIdentifier copy];
configuration->_containingApplicationBundleIdentifier = [self->_containingApplicationBundleIdentifier copy];
configuration->_networkRetryAttempts = self->_networkRetryAttempts;
configuration->_URLSessionConfiguration = self->_URLSessionConfiguration;
return configuration;

@thefishstick thank you! you just saved me hours for the very old project I'm working on now

@julianvogels I have the same problem? Did you find a solution?

@JulienLevallois since ParseLiveQuery 2.7.2 was released to CocoaPods, the issue vanished. Try pod outdated to see if there are more up-to-date versions of the Parse and ParseLiveQuery pods available and use those.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndreasStokidis picture AndreasStokidis  路  5Comments

otymartin picture otymartin  路  3Comments

talkaboutdesign picture talkaboutdesign  路  8Comments

kazukiotsuka picture kazukiotsuka  路  3Comments

dtrenz picture dtrenz  路  10Comments