Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 139 forks source link

build failed with xcode 12.0 (12A7209) when run release command #338

Closed ipehimanshu closed 3 years ago

ipehimanshu commented 4 years ago

Hello sir

we are using latest plugin for pushwoosh and creating build using cordova,

Now when we use ionic cordova build ios --release --verbose

We see build failed with below reason.

Ld /Users/herobarua/Library/Developer/Xcode/DerivedData/Demo-gywakjctkejavrcefatsmqxgeinf/Build/Intermediates.noindex/Demo.build/Release-iphonesimulator/Demo.build/Objects-normal/arm64/Binary/Demo normal arm64 (in target 'Demo' from project 'Demo') cd /Users/herobarua/Apps/jeremy/Demo/platforms/ios /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios11.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk -L/Users/herobarua/Apps/jeremy/Demo/platforms/ios/build/emulator -L/Users/herobarua/Apps/jeremy/Demo/platforms/ios/Demo/Plugins/pushwoosh-cordova-plugin -L/Users/herobarua/Apps/jeremy/Demo/platforms/ios/Demo/Plugins/pushwoosh-cordova-plugin -F/Users/herobarua/Apps/jeremy/Demo/platforms/ios/build/emulator -filelist /Users/herobarua/Library/Developer/Xcode/DerivedData/Demo-gywakjctkejavrcefatsmqxgeinf/Build/Intermediates.noindex/Demo.build/Release-iphonesimulator/Demo.build/Objects-normal/arm64/Demo.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/herobarua/Library/Developer/Xcode/DerivedData/Demo-gywakjctkejavrcefatsmqxgeinf/Build/Intermediates.noindex/Demo.build/Release-iphonesimulator/Demo.build/Objects-normal/arm64/Demo_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -Xlinker -sectcreate -Xlinker TEXT -Xlinker entitlements -Xlinker /Users/herobarua/Library/Developer/Xcode/DerivedData/Demo-gywakjctkejavrcefatsmqxgeinf/Build/Intermediates.noindex/Demo.build/Release-iphonesimulator/Demo.build/Demo.app-Simulated.xcent /Users/herobarua/Apps/jeremy/Demo/platforms/ios/build/emulator/libCordova.a -weak_framework ImageIO -framework CoreLocation -framework AVFoundation -weak_framework WebKit -framework Security -framework Foundation -framework LocalAuthentication -weak_framework SystemConfiguration -framework CoreTelephony -framework CoreBluetooth -framework Photos -framework UserNotifications -framework Contacts -framework AddressBook -framework EventKit -framework CoreMotion -lPushwoosh -lPushwooshInboxUI -framework Storekit -lstdc++ -lz -Xlinker -dependency_info -Xlinker /Users/herobarua/Library/Developer/Xcode/DerivedData/Demo-gywakjctkejavrcefatsmqxgeinf/Build/Intermediates.noindex/Demo.build/Release-iphonesimulator/Demo.build/Objects-normal/arm64/Demo_dependency_info.dat -o /Users/herobarua/Library/Developer/Xcode/DerivedData/Demo-gywakjctkejavrcefatsmqxgeinf/Build/Intermediates.noindex/Demo.build/Release-iphonesimulator/Demo.build/Objects-normal/arm64/Binary/Demo ld: in /Users/herobarua/Apps/jeremy/Demo/platforms/ios/Demo/Plugins/pushwoosh-cordova-plugin/libPushwoosh.a(libPushwoosh.a-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/herobarua/Apps/jeremy/Demo/platforms/ios/Demo/Plugins/pushwoosh-cordova-plugin/libPushwoosh.a' clang: error: linker command failed with exit code 1 (use -v to see invocation)

BUILD FAILED

The following build commands failed: Ld /Users/herobarua/Library/Developer/Xcode/DerivedData/Demo-gywakjctkejavrcefatsmqxgeinf/Build/Intermediates.noindex/Demo.build/Release-iphonesimulator/Demo.build/Objects-normal/arm64/Binary/Demo normal arm64 (1 failure) xcodebuild: Command failed with exit code 65 [ERROR] An error occurred while running subprocess cordova.

    cordova build ios --release exited with exit code 65.

    Re-running this command with the --verbose flag may provide more information.

So i think some issue for latest xcode 12, because all working fine in previous xcode version, and after update xcode all build stuck with above error,

So can you please check more.

Thanks

herobarua commented 4 years ago

Yes Exactly i am getting issue right after update xcode 12 form 17 Sept, 2020

wfhm commented 4 years ago

@herobarua @ipehimanshu is the issue only reproducible when you build for a simulator? if so, does this solution work for you?

https://stackoverflow.com/a/63714000

ipehimanshu commented 4 years ago

@wfhm since last day all fine with this command ionic cordova build ios --release --verbose but after update xcode 12 it create issue, and we are creating build for device so which command should be used ?

ipehimanshu commented 4 years ago

@wfhm because if i remove pushwoosh plugin then all is fine, so issue with pushwoosh plugin.

louisautochartist commented 4 years ago

I have the same issue

wfhm commented 4 years ago

After testing the sample app with Xcode 12, iOS 14, iPhone 11 Pro Max, everything runs smoothly with ionic cordova build ios --release --verbose. However, we had the same xcodebuild: Command failed with exit code 65 issues, but with Cordova itself. So far it looks like it is something related to Cordova itself, not just the plugin. May I ask you to try reinstalling all the plugins (not just Pushwoosh plugin), remove/add again the iOS platform and let us know if it helps?

  1. ionic cordova plugin remove pushwoosh-cordova-plugin / ionic cordova plugin add pushwoosh-cordova-plugin
  2. do the same for the other plugins in your project
  3. npm install npm@latest (update npm)
louisautochartist commented 4 years ago

Yeah its apparantly to do with xcode 12 including arm in the standard architecture list

wfhm commented 3 years ago

@ipehimanshu @louisautochartist @herobarua were you able to build your projects after reinstalling platforms and plugins with updating npm to the latest one?