'expo build ios' is passed but 'eas build ios' was failed

Viewed 288

I'm using Expo 44 version, Android build is successful, but iOS build has problems.

When I use the 'expo build ios' command, the build is successful, but when I press the install button in Testflight, the installation fails with the message 'the requested app is not available or doesn't exist'.

When you use the 'eas build -p ios' command, an error occurs in 'AppDelegate.m', and the cause is not understood at all. (I have never modified AppDelegate.m)

The eas log where the error occurred is as follows.

› Compiling kimxyfrontendapp » AppDelegate.m

❌  (/Users/expo/workingdir/build/ios/kimxyfrontendapp/AppDelegate.m:75:1)

  73 | }
  74 | 
> 75 | - (BOOL)application:(UIApplication *)application
     | ^ duplicate declaration of method 'application:openURL:options:'
  76 |    openURL:(NSURL *)url
  77 |    options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
  78 | {
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸   CompileC /Users/expo/Library/Developer/Xcode/DerivedData/kimxyfrontendapp-cpzeuazmpykfzebzmkdzhkngavhh/Build/Intermediates.noindex/ArchiveIntermediates/kimxyfrontendapp/IntermediateBuildFilesPath/kimxyfrontendapp.build/Release-iphoneos/kimxyfrontendapp.build/Objects-normal/arm64/AppDelegate.o /Users/expo/workingdir/build/ios/kimxyfrontendapp/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'kimxyfrontendapp' from project 'kimxyfrontendapp')
▸ (1 failure)
2022-06-14 03:18:26.769 xcodebuild[3914:9535] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-14 03:18:26.769 xcodebuild[3914:9535] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-14 03:18:26.829 xcodebuild[3914:9535] XType: com.apple.fonts is not accessible.
2022-06-14 03:18:26.829 xcodebuild[3914:9535] XType: XTFontStaticRegistry is enabled.
** ARCHIVE FAILED **

The following build commands failed:
    CompileC /Users/expo/Library/Developer/Xcode/DerivedData/kimxyfrontendapp-cpzeuazmpykfzebzmkdzhkngavhh/Build/Intermediates.noindex/ArchiveIntermediates/kimxyfrontendapp/IntermediateBuildFilesPath/kimxyfrontendapp.build/Release-iphoneos/kimxyfrontendapp.build/Objects-normal/arm64/AppDelegate.o /Users/expo/workingdir/build/ios/kimxyfrontendapp/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'kimxyfrontendapp' from project 'kimxyfrontendapp')
(1 failure)
Exit status: 65

...

Build failed: Fastlane build failed with unknown error. Please refer to the "Run fastlane" and "Xcode Logs" phases.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.

My AppDelegate.m is

#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>
#import <React/RCTConvert.h>

#if defined(FB_SONARKIT_ENABLED) && __has_include(<FlipperKit/FlipperClient.h>)
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#if defined(FB_SONARKIT_ENABLED) && __has_include(<FlipperKit/FlipperClient.h>)
  InitializeFlipper(application);
#endif
  
  RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
  rootView.backgroundColor = [UIColor whiteColor];
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [self.reactDelegate createRootViewController];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];

  [super application:application didFinishLaunchingWithOptions:launchOptions];

  return YES;
 }

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
  // If you'd like to export some custom RCTBridgeModules, add them here!
  return @[];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
 #ifdef DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
 #else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
 #endif
}

// Linking API
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
  return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
}

// Universal Links
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
  BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
  return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result;
}

- (BOOL)application:(UIApplication *)application
   openURL:(NSURL *)url
   options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:application openURL:url options:options];
}
@end
0 Answers
Related