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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with react-native 0.64.1 under Xcode 12.5 #1223

Closed
pnogier opened this issue May 21, 2021 · 6 comments
Closed

Build fails with react-native 0.64.1 under Xcode 12.5 #1223

pnogier opened this issue May 21, 2021 · 6 comments

Comments

@pnogier
Copy link

pnogier commented May 21, 2021

Hi there,

I just upgraded to Xcode 12.5,
Upgraded react-native from 0.62.2 to 0.64.1,
Upgraded react-native-onesignal from 3.9.0 to 4.1.0

Now when I try to build my app, I get the following error :
ld: library not found for -lPods-OneSignalNotificationServiceExtension

None on the solutions listed in #1179 or #1103 solved my issue.

Here is my Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.0'

target 'Spacial' do
  # Pods for Spacial
  pod 'Stripe', '~> 21.5.1'
  pod 'tipsi-stripe', :path => '../node_modules/tipsi-stripe'

  #pod 'react-native-onesignal', :path => '../node_modules/react-native-onesignal'

  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

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

  use_flipper!()
  
  
  post_install do |installer|
    react_native_post_install(installer)
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
       config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
      end
     end
  end
end

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignal', '>= 3.0', '< 4.0'
end

Did some of you already faced this issue and find a solution ?

Thank you,

Cheers

@pnogier
Copy link
Author

pnogier commented May 21, 2021

Well, I guess I found why this happened :

Each time I run a pod install, it automatically add the libPods-OneSignalNotificationServiceExtension.a under Framework and Libraries in my OneSignalNotificationServiceExtension Target. I juts had to remove it manually and everything builds properly now.

However I now have to find why this library automatically adds itself and fix it. 🤗

Closing for now.

@pnogier pnogier closed this as completed May 21, 2021
@MathiasMoralesDixtra
Copy link

Well, I guess I found why this happened :

Each time I run a pod install, it automatically add the libPods-OneSignalNotificationServiceExtension.a under Framework and Libraries in my OneSignalNotificationServiceExtension Target. I juts had to remove it manually and everything builds properly now.

However I now have to find why this library automatically adds itself and fix it. 🤗

Closing for now.

Do you have news about that? I have the same issue.

@MathiasMoralesDixtra
Copy link

MathiasMoralesDixtra commented Aug 4, 2021

In my case, I fixed when I set the same version on Podfileplatform :ios, '11.0' that on Target in OneSignal notification and Project.
Screen Shot 2021-08-04 at 15 30 18

Screen Shot 2021-08-04 at 15 30 06

@pnogier
Copy link
Author

pnogier commented Aug 4, 2021

Hi @MathiasMoralesDixtra,
Thank you for the suggestion, I'll give it a try soon :)

@vokecodes
Copy link

You need to check the platform version in your Podfile and make it match your main target deployment info and one signal target

@pisacode
Copy link

I accidentally opened .xcodeproject file instead of .xcworkspace and the same error appeared. Got me 30 minutes to figure out to open the correct file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants