Can't build detached ExpoKit app on ios simulator

Hi Guys, last night my mac upgraded to xcode 10 (I wish it hasn’t done it…). As a result, when I try to run my ExpoKit app in the ios (12) simulator, I get:

error: Multiple commands produce '/Users/**********/WebstormProjects/LetsJobItApp/react-native/ios/build/Build/Products/Debug-iphonesimulator/letsjobit.app':
1) Target 'letsjobit' has create directory command with output '/Users/**********/WebstormProjects/LetsJobItApp/react-native/ios/build/Build/Products/Debug-iphonesimulator/letsjobit.app'
2) That command depends on command in Target 'letsjobit': script phase “[CP] Copy Pods Resources”

Build system information

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.0. (in target 'BVLinearGradient')

Build system information

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.0. (in target 'Google-Maps-iOS-Utils')

Build system information

warning: no rule to process file '/Users/**********/WebstormProjects/LetsJobItApp/react-native/ios/Pods/ExpoKit/template-files/keys.json' of type 'text.json' for architecture 'x86_64' (in target 'ExpoKit')

Build system information

warning: ignoring duplicated output file: '/Users/*********/WebstormProjects/LetsJobItApp/react-native/ios/build/Build/Products/Debug-iphonesimulator/letsjobit.app' (in target 'letsjobit')

** BUILD FAILED **

I don’t know where to start…

I’m on expo(kit) sdk 28. Help, please.

Cheers, Joao

Thanks @joaopiopedreira for this report :slightly_smiling_face:

I’m not familiar with these errors, however Xcode 10 introduces new build system which might affect some projects and if this is your case, then these two steps should solve your issues:

  1. In Xcode, go to File → Project/Workspace settings.
  2. Change the build system to Legacy Build system.

I’m curious if this will help, let me know the results :wink:

Hi @tsapeta, tried it and went a little better, but the error is still there:

- (void)viewController:(__unused EXViewController *)vc didNavigateAppToVisible:(EXKernelAppRecord *)appRecord
{
  EXKernelAppRecord *appRecordPreviouslyVisible = _visibleApp;
  if (appRecord != appRecordPreviouslyVisible) {
    if (appRecordPreviouslyVisible) {
      [appRecordPreviouslyVisible.viewController appStateDidBecomeInactive];
      [self _postNotificationName:kEXKernelBridgeDidBackgroundNotification onAbstractBridge:appRecordPreviouslyVisible.appManager.reactBridge];
      id appStateModule = [self nativeModuleForAppManager:appRecordPreviouslyVisible.appManager named:@"AppState"];
      if ([appStateModule respondsToSelector:@selector(setState:)]) {
        [appStateModule setState:@"background"]; // <--- Multiple methods named 'setState:' found with mismatched result, parame
      }
    }
    if (appRecord) {
      [appRecord.viewController appStateDidBecomeActive];
      [self _postNotificationName:kEXKernelBridgeDidForegroundNotification onAbstractBridge:appRecord.appManager.reactBridge];
      id appStateModule = [self nativeModuleForAppManager:appRecord.appManager named:@"AppState"];
      if ([appStateModule respondsToSelector:@selector(setState:)]) {
        [appStateModule setState:@"active"]; // <--- Multiple methods named 'setState:' found with mismatched result, parame
      }
      _visibleApp = appRecord;
      [[EXAnalytics sharedInstance] logAppVisibleEvent];
    } else {
      _visibleApp = nil;
    }
    
    if (_visibleApp && _visibleApp != _appRegistry.homeAppRecord) {
      [self _unregisterUnusedAppRecords];
    }
  }
}

I also have this same problem on xcode 10. Shouldn’t have upgraded. I think for now i’m going to try to downgrade.

Hi @cellis, please tell me if it worked for you. Cheers

@joaopiopedreira, haha, everyone is going to be hit this morning! I’m downloading the 4.9 gb xcode_9.4.1.xip. Will update after!

@cellis, oh man, I regret so much to have upgraded. But all I did was “try tonight” when my mac prompted to make updates - not even remember having done it explicitly… well, we’ll survive :wink:

@joaopiopedreira got it working with 9.4.1. But had to reinstall my pods or I would get the “FBNativeAd” error, perhaps installing pods with xcode 10 corrupted them?

Hmm, @cellis, you could be right there. I’m also downgrading. Will post here if that doesn’t work (fingers crossed!)

This problem with multiple methods named setState: was fixed in this commit, so I hope you just need to upgrade your ExpoKit to the newer version. The first version that includes this commit is 2.7.0 so you would also need to upgrade your SDK to at least 29.

Hi @tsapeta, does that mean that I’d be able to build in xcode 10? Cheers

Yes, it’s possible to build ExpoKit in Xcode 10, but only with legacy build system (see my first reply).
Actually, I’m building it right now :smiley:

Ok @tsapeta, great news. I’ll give it a go and let you know if succeeded. Cheers

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.