[email protected]
[email protected]
[email protected]
[email protected]
Xcode 8.3.3
Build for iOS 10.3.1 (iPhone 7 Plus Simulator)
Deployment Target: 9.3
Devices: iPhone
Other Linker Flags: -ObjC -lc++
Dead Code Stripping: No
Architectures: arm7 arm7s
ld: warning: ignoring file Build/Products/Debug-iphonesimulator/libReactNativePermissions.a, file was built for archive which is not the architecture being linked (i386): Build/Products/Debug-iphonesimulator/libReactNativePermissions.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RCTRootView", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
AppDelegate.m
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"app"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
@end
Soloved by adding $(inherited) to Other Linker Flags
I have the same issue, and I already have $(inherited) in Other Linker Flags, how to solve that problem?
Most helpful comment
I have the same issue, and I already have $(inherited) in Other Linker Flags, how to solve that problem?