79794234

Date: 2025-10-19 10:56:40
Score: 1
Natty:
Report link

i am sharing app delegate and info.plist

#import "AppDelegate.h"
#import "AmplifyPushNotification.h"
#import <React/RCTBundleURLProvider.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.moduleName = @"main";
  self.initialProps = @{};

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  [AmplifyPushNotification didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
  [AmplifyPushNotification didReceiveRemoteNotification:userInfo withCompletionHandler:completionHandler];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
  return [self bundleURL];
}

- (NSURL *)bundleURL
{
#if DEBUG
  // 💡 FIX: Use the standard React Native entry file for development builds
  // unless you are explicitly running with 'expo start' and a custom setup.
  // Assuming 'index' or 'index.js' is your main entry file.
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
  // This is correct for Release/Production builds which use a pre-built 'main.jsbundle'
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

@end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>PowderWatts</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(MARKETING_VERSION)</string>
    <key>CFBundleSignature</key>
    <string>????</string>

    <!-- Deep link URL scheme -->
    <key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>pwprodapp</string>
        </array>
      </dict>
    </array>

    <key>CFBundleVersion</key>
    <string>$(CURRENT_PROJECT_VERSION)</string>

    <!-- CodePush key -->
    <key>CodePushDeploymentKey</key>
    <string>N0cIZFyqifY1KvyaArBPUtwZ39akKSTB0sEz_</string>

    <key>ITSAppUsesNonExemptEncryption</key>
    <string>NO</string>

    <key>LSRequiresIPhoneOS</key>
    <true/>

    <!-- ✅ Updated App Transport Security configuration -->
    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
      <false/>
      <key>NSAllowsLocalNetworking</key>
      <true/>
      <key>NSExceptionDomains</key>
      <dict>
        <key>localhost</key>
        <dict>
          <key>NSExceptionAllowsInsecureHTTPLoads</key>
          <true/>
        </dict>
        <key>127.0.0.1</key>
        <dict>
          <key>NSExceptionAllowsInsecureHTTPLoads</key>
          <true/>
        </dict>
      </dict>
    </dict>

    <!-- iOS permissions -->
    <key>NSCameraUsageDescription</key>
    <string>Take photos for a new user avatar picture</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Access wifi AP to connect devices</string>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>Access wifi AP to connect devices</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>Use photos to set an avatar picture for the user</string>

    <!-- Custom fonts -->
    <key>UIAppFonts</key>
    <array>
      <string>HelveticaNeueCyr-Black.ttf</string>
      <string>HelveticaNeueCyr-BlackItalic.ttf</string>
      <string>HelveticaNeueCyr-Bold.ttf</string>
      <string>HelveticaNeueCyr-BoldItalic.ttf</string>
      <string>HelveticaNeueCyr-Heavy.ttf</string>
      <string>HelveticaNeueCyr-HeavyItalic.ttf</string>
      <string>HelveticaNeueCyr-Italic.ttf</string>
      <string>HelveticaNeueCyr-Light.ttf</string>
      <string>HelveticaNeueCyr-LightItalic.ttf</string>
      <string>HelveticaNeueCyr-Medium.ttf</string>
      <string>HelveticaNeueCyr-MediumItalic.ttf</string>
      <string>HelveticaNeueCyr-Roman.ttf</string>
      <string>HelveticaNeueCyr-Thin.ttf</string>
      <string>HelveticaNeueCyr-ThinItalic.ttf</string>
      <string>HelveticaNeueCyr-UltraLight.ttf</string>
      <string>HelveticaNeueCyr-UltraLightItalic.ttf</string>
    </array>

    <!-- Notifications -->
    <key>UIBackgroundModes</key>
    <array>
      <string>remote-notification</string>
    </array>

    <!-- Launch screen -->
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>

    <!-- Device requirements -->
    <key>UIRequiredDeviceCapabilities</key>
    <array>
      <string>arm64</string>
    </array>

    <!-- Orientation -->
    <key>UISupportedInterfaceOrientations</key>
    <array>
      <string>UIInterfaceOrientationPortrait</string>
    </array>

    <!-- Status bar behavior -->
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
  </dict>
</plist>
Reasons:
  • Blacklisted phrase (1): ???
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Zohaib Waris