Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 iOS release Error: "unable to locate Info.plist" #568

Closed
1 task done
dvijeniii05 opened this issue May 7, 2024 · 1 comment
Closed
1 task done

馃悰 iOS release Error: "unable to locate Info.plist" #568

dvijeniii05 opened this issue May 7, 2024 · 1 comment
Labels
help wanted Extra attention is needed stale

Comments

@dvijeniii05
Copy link

dvijeniii05 commented May 7, 2024

What happened?

Something strange started occurring recently.

When I try to build a release version of iOS App, i keep getting an error on the script RNGoogleMobileAds that runs by 'react-native-google-mobile-ads' with the following message:

Screenshot 2024-05-06 at 16 25 47

Had i look into the script itself, checking the path for Info.plist that it is using and it looks good i.e. pointing to myAppName.app file inside the derived data.

Also, this issue was only introduced recently, used to work with no problem about 3-4 weeks ago. So, i am not sure whether it is something new that was introduced with Xcode version 15.2 or what?

Interesting find BUT not an acceptable solution:
I wanted to try what is going to happen if i delete this script from "Build Phases" in Xcode and move it into my scheme to run as a 'post action' in Build phase. And this have worked!
Screenshot 2024-05-07 at 11 12 41

So it is almost like the Info.plist is now not available when scripts from "Build Phase" are running and only gets added later on. But could not see anything in docs in this regards.

Platforms

Only on iOS

React Native Info

System:
  OS: macOS 14.4.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 73.69 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.0
    path: /var/folders/lv/d55g0xbn7ks9g5m92g6h84jr0000gn/T/yarn--1715076863794-0.3064717222663096/node
  Yarn:
    version: 1.22.19
    path: /var/folders/lv/d55g0xbn7ks9g5m92g6h84jr0000gn/T/yarn--1715076863794-0.3064717222663096/yarn
  npm:
    version: 9.8.1
    path: ~/.nvm/versions/node/v18.18.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/adil/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 18.0.2
    path: /usr/bin/javac
  Ruby:
    version: 2.7.7
    path: /Users/adil/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.6
    wanted: ^0.72.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Are your using Typescript?

  • My project is using Typescript

package.json

"react-native-google-mobile-ads": "^13.2.1",
    "react-native": "^0.72.0",

app.json

{
  "name": "someName",
  "displayName": "someName",
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-2345~235235", //Fake numbers for Github
    "ios_app_id": "ca-app-pub-235235~23552", //Fake numbers for Github
    "user_tracking_usage_description": "This identifier will be used to deliver personalized ads to you."
  }
}

ios/Podfile

# Resolve react_native_pods.rb with node to allow for hoisting
 def node_require(script)
   # Resolve script with node to allow for hoisting
   require Pod::Executable.execute_command('node', ['-p',
     "require.resolve(
       '#{script}',
       {paths: [process.argv[1]]},
     )", __dir__]).strip
 end

# Use it to require both react-native's and this package's scripts:
 node_require('react-native/scripts/react_native_pods.rb')
 node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

setup_permissions([
  'AppTrackingTransparency',
])

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'someString' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'SomeStaringTests' do
    inherit! :complete
    # Pods for testing
  end

  post_install do |installer|
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
end

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

@dvijeniii05 dvijeniii05 added the help wanted Extra attention is needed label May 7, 2024
Copy link

github-actions bot commented Jun 4, 2024

Hello 馃憢, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 4, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed stale
Projects
None yet
Development

No branches or pull requests

1 participant