First!
☁ wonder react-native --version
react-native-cli: 2.0.1
react-native: 0.58.6
☁ wonder node --version
v13.6.0
☁ wonder npm --version
6.13.4
When attempting to build and exe on simulator locally I'm getting;
despite there not being anything running on this port and this is the out-of-the-box port for RN projects but I will paste my AppDelagate file and tool versions..Can anyone explain how this works so that I can troubleshoot.
> react-native run-ios
Found Xcode project wonder.xcodeproj
Building using "xcodebuild -project wonder.xcodeproj -configuration Debug -scheme wonder -destination id=C9362944-1FDD-4D6E-A6BB-8E758F427 -derivedDataPath build"
User defaults from command line:
IDEDerivedDataPathOverride = /Users/{NAME}/Documents/Projects/wonderService/wonder/ios/build
note: Using new build system
note: Planning build
note: Using build description from disk
PhaseScriptExecution Start\ Packager /Users/{NAME}/Documents/Projects/wonderService/wonder/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F3800
6873D1.sh (in target 'React' from project 'React')
cd /Users/{NAME}/Documents/Projects/wonderService/wonder/node_modules/react-native/React
/bin/sh -c /Users/{NAME}/Documents/Projects/wonderService/wonder/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
Connection to localhost port 8081 [tcp/sunproxyadmin] succeeded!
AppDelegate.h file
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"wonder"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [UIColor blackColor];
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
Above I do remember having to add
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
this can be reversed.However,I don't believe this to be the error
I also understand when customizing PORTS for projects it could be made here
node_modules/react-native/React/React.xcodeproj/project.pbxproj
but there are no signs of any other PORT being used in the instance.
lastly, I've toggled between using 127.0.0.1 && localhost... SAME RESULT