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

OneSignalNotificationExtension build fail #1510

Closed
2 of 3 tasks
gurbela opened this issue Mar 31, 2023 · 16 comments
Closed
2 of 3 tasks

OneSignalNotificationExtension build fail #1510

gurbela opened this issue Mar 31, 2023 · 16 comments

Comments

@gurbela
Copy link

gurbela commented Mar 31, 2023

What happened?

OneSignalNotificationExtension target build fail:

Error:

Undefined symbol: _$sBOWV
Undefined symbol: _$ss018_bridgeAnyObjectToB0yypyXlSgF
Undefined symbol: _$ss17_assertionFailure__4file4line5flagss5NeverOs12StaticStringV_A2HSus6UInt32VtF
Undefined symbol: _$sypN
Undefined symbol: _swift_FORCE_LOAD$_swiftCoreFoundation
Undefined symbol: _swift_FORCE_LOAD$_swiftDarwin
Undefined symbol: _swift_FORCE_LOAD$_swiftDispatch
Undefined symbol: _swift_FORCE_LOAD$_swiftObjectiveC
Undefined symbol: _swift_allocObject
Undefined symbol: _swift_beginAccess
Undefined symbol: _swift_deallocObject
Undefined symbol: _swift_dynamicCast
Undefined symbol: _swift_endAccess
Undefined symbol: _swift_getObjCClassMetadata
Undefined symbol: _swift_isaMask
Undefined symbol: _swift_release
Undefined symbol: _swift_retain
Undefined symbol: _swift_unknownObjectRelease

Steps to reproduce?

This project worked well for a long time. But now he has a problem with build. 
The SDK is implemented according to the documentation

What did you expect to happen?

iOS Development Target 11.1

"react-native": "0.64.4",

I had "react-native-onesignal": "4.3.11" version but the new version has the same problem "4.5.1".

React Native OneSignal SDK version

4.5.1

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gurbela gurbela changed the title OneSignal OneSignalNotificationExtension build fail OneSignalNotificationExtension build fail Mar 31, 2023
@coderdave
Copy link

@gurbela have you by chance found a workaround for this? These same errors started happening for me after upgrading to xcode 14.3. Is that the same case with you?

@gurbela
Copy link
Author

gurbela commented Apr 3, 2023

@gurbela have you by chance found a workaround for this? These same errors started happening for me after upgrading to xcode 14.3. Is that the same case with you?

Yes. 14.3 has a problem

@nan-li
Copy link
Contributor

nan-li commented Apr 3, 2023

Hi @gurbela and @coderdave,

Thanks for reporting,

Did anything else change before this error started appearing?
Only your xcode version updated to 14.3?
Was there anything else changed?
What xcode version were you on before?

@coderdave
Copy link

Hi @gurbela and @coderdave,

Thanks for reporting,

Did anything else change before this error started appearing? Only your xcode version updated to 14.3? Was there anything else changed? What xcode version were you on before?

I started getting these errors after upgrading macOS to 13.3 and Xcode to 14.3.

FWIW, I still get these errors when changing the "Command Line Tools" to "Xcode 14.2"

Screenshot 2023-04-03 at 4 44 32 PM

@ray-holland-es
Copy link

ray-holland-es commented Apr 5, 2023

Having same problem (did not upgrade macOS, but did update to xcode 14.3). Downgrading and changing cli tools to 14.2 did not resolve either. I removed Onesignal from Frameworks and libraries and it builds all of a sudden. Still need to test if Onesignal works - I doubt it.

@coderdave
Copy link

What is interesting, I was able to get the app to run on a physical device. However, I have noticed under "App Groups" the text is in red and when I click the "refresh button", I get "Unable to log in" with my account. Is this related?

@ray-holland-es
Copy link

It looks like libPods-OneSignalNotificationServiceExtension.a gets linked correctly for the physical device but not for the simulator. When you go to it in The Target -> General -> Frameworks and Libraries and open in finder, it will open for the device, but not for the simulator.

@ray-holland-es
Copy link

ray-holland-es commented Apr 6, 2023

Figured it out.

Launching Xcode 14.3 in Rosetta is no longer allowed.

In the new menu command Product → Destination → Destination Architectures → Show Rosetta Destinations or Show Both.

Then set your destination explicitly as a Rosetta simulator and it should work.

Though it would be nice to update react-native-onesignal to work without rosetta...

@jennantilla
Copy link
Contributor

Thanks for the update, @ray-holland-es! Glad to hear that explicitly setting the destination worked for you.

@coderdave and @gurbela, has this worked for you as well, or are you still having issues?

@KylixMedusa
Copy link

The rosetta solution works for now, but it would be great if onesignal could run normally on the non rosetta simulators as well.

@emawby
Copy link
Contributor

emawby commented Apr 19, 2023

@KylixMedusa I am not able to reproduce on my m1 mac. What version of cocoapods are you using?

@gurbela
Copy link
Author

gurbela commented Apr 21, 2023

I couldn't solve this problem without updating the React Native version. Now I'm using the latest version of react-native and it's working fine

@gurbela
Copy link
Author

gurbela commented May 7, 2023

This solution works for me

  post_install do |installer|
      installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '5.0'
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end
end

@emawby emawby closed this as completed May 8, 2023
@feriferdinan
Copy link

still got this error

@ah584d
Copy link

ah584d commented Jul 11, 2023

any update ? the strange thing is that I'm receiving this error even working with rosetta

@ah584d
Copy link

ah584d commented Jul 13, 2023

this is what happened to me, I upgraded Xcode to 14.3.1 then downgraded to 14.2.
The computer has been almost kill (PRO M1), I had no choice to continue using 14.3.1 with Rosetta simulator.
I discovered the solution by installing all my project on a clean fresh computer (PRO M1), and I saw that when running with Rosetta we see the symbol x86_64, and on my "polluted" mac, even with Rosetta it was logging arm64....
and then I arrived to these articles which confirm my...pain.
https://developer.apple.com/forums/thread/725563
https://armen-mkrtchian.medium.com/run-rosetta-simulator-on-xcode-14-3-381d341364ee

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

No branches or pull requests

9 participants