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

[Bug]: Xcodebuild archive failed #964

Open
2 of 3 tasks
Nikirama opened this issue Jan 24, 2024 · 0 comments
Open
2 of 3 tasks

[Bug]: Xcodebuild archive failed #964

Nikirama opened this issue Jan 24, 2024 · 0 comments

Comments

@Nikirama
Copy link

Nikirama commented Jan 24, 2024

What happened?

I'm trying to archive the app and get .ipa file through xcodebuild
xcodebuild archive -scheme <scheme> -configuration Debug -destination 'generic/platform=iOS' -archivePath <archive>.xcarchive DEVELOPMENT_TEAM=XXXXXX CODE_SIGN_IDENTITY="Apple Development"

But get an error:
`** ARCHIVE FAILED **

The following build commands failed:
CompileC /Users/user/Library/Developer/Xcode/DerivedData/-bdubyjvfyptbdeckosaeycnsyvom/Build/Intermediates.noindex/ArchiveIntermediates//IntermediateBuildFilesPath/.build/Debug-iphoneos/.build/Objects-normal/arm64/OneSignalPush.o /Users/user/PhpstormProjects/igms_mobile_app/output/platforms/ios//Plugins/onesignal-cordova-plugin/OneSignalPush.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target '' from project '')
(1 failure)`

The error occures only using Xcodebuild, from Xcode directly it gets built fine with steps:

  1. Open the project
  2. Set Product -> Destination to "Any iOS device (arm64)"
  3. Run Product -> Archive

Steps to reproduce?

1. Create a cordova project
2. Run cordova plugin add onesignal-cordova-plugin
3. Run cordova platform add ios
4. Go to platforms/ios
5. Run pod install
6. Run xcodebuild archive -scheme <scheme> -configuration Debug -destination 'generic/platform=iOS' -archivePath <archive>.xcarchive DEVELOPMENT_TEAM=XXXXXX CODE_SIGN_IDENTITY="Apple Development"



Steps I tried to solve it:
1. After **cordova plugin add onesignal-cordova-plugin** I see a warning
   [!] The `<project> [Debug]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-<project>/Pods-<project>.debug.xcconfig'. This can lead to problems with the CocoaPods installation
   I've added "$(inherited)" in LD_RUNPATH_SEARCH_PATHS manually and ran pod install again. The warning disappeared
2. Tried other OneSignal versions - 3.x and 2.x
3. Pod reinstall, update repo and setup

What did you expect to happen?

I expect to get .xarchive as a result

OneSignal Cordova SDK version

5.0.4

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

Cordova: 12.0.0 ([email protected])
Cordova-ios: 7.0.0
Cocoapods: 1.14.3
Xcode: 14.3.1 (Build version 14E300c)

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

1 participant