Closed dylanvdmerwe closed 4 years ago
This allows the app to be submitted to the store, but really shouldn't be necessary: http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/
I have a similar issue with signing the application.
I used http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/ and https://stackoverflow.com/questions/42641806/check-and-remove-unsupported-architecture-x86-64-i386-in-ipa-archive to strip the unwanted arhitectures but the issue stays the same.
Please help?
{ code = 306; description = "Failed to resolve rpath for IRLDocumentScanner: Could not resolve @executable_path for @executable_path/Frameworks from IRLDocumentScanner"; info = { }; level = WARN; }, { code = 330; description = "Failed to resolve linkage dependency IRLDocumentScanner i386 -> @rpath/TOCropViewController.framework/TOCropViewController: Unknown arch i386"; info = { }; level = WARN; }, { code = 306; description = "Failed to resolve rpath for IRLDocumentScanner: Could not resolve @executable_path for @executable_path/Frameworks from IRLDocumentScanner"; info = { }; level = WARN; }, { code = 330; description = "Failed to resolve linkage dependency IRLDocumentScanner x86_64 -> @rpath/TOCropViewController.framework/TOCropViewController: Unknown arch x86_64"; info = { }; level = WARN; }, { code = 306; description = "Failed to resolve rpath for TOCropViewController: Could not resolve @executable_path for @executable_path/Frameworks from TOCropViewController"; info = { }; level = WARN; }, { code = 306; description = "Failed to resolve rpath for TOCropViewController: Could not resolve @executable_path for @executable_path/Frameworks from TOCropViewController"; info = { }; level = WARN; }, { code = 0; description = "Failed to verify bitcode in IRLDocumentScanner.framework/IRLDocumentScanner:\nerror: Cannot extract bundle from /var/folders/ns/7dl_s86d7vl24x7tzmq9q3tm0000gn/T/IDEDistributionOptionThinning.wYA/Payload/InCAB.app/Frameworks/IRLDocumentScanner.framework/IRLDocumentScanner (i386)\n\n"; info = { }; level = ERROR; type = "malformed-payload"; }, { code = 0; description = "Failed to verify bitcode in TOCropViewController.framework/TOCropViewController:\nerror: Cannot extract bundle from /var/folders/ns/7dl_s86d7vl24x7tzmq9q3tm0000gn/T/IDEDistributionOptionThinning.wYA/Payload/InCAB.app/Frameworks/TOCropViewController.framework/TOCropViewController (i386)\n\n"; info = { }; level = ERROR; type = "malformed-payload"; } );
Regards, Toni
EDIT: I was able to make it work by taking care that Run Script task is done after Copy Files in Build Phases
Hello Chris,
We have similar issue when building our App with the Adobe PhoneGap Build service. But unfortunately the Abobe PhoneGap Build service does not allow us to manipulate the buildprocess so we cannot remove the x86_64 and i386 architecture. Is there another way to solve this issue? Maybe u can fix this in your plugin?
ERROR ITMS-90087: "Unsupported Architectures. The executable for BrancheView App.app/Frameworks/IRLDocumentScanner.framework contains unsupported architectures '[x86_64, i386]'." ERROR ITMS-90087: "Unsupported Architectures. The executable for BrancheView App.app/Frameworks/TOCropViewController.framework contains unsupported architectures '[x86_64, i386]'." ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'BrancheView App.app/Frameworks/IRLDocumentScanner.framework/IRLDocumentScanner' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'BrancheView App.app/Frameworks/TOCropViewController.framework/TOCropViewController' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's lin
Hi there, Chris!
Still having this problem when building my App with the Adobe PhoneGap Build service.
Did you find a solution for this?
Thanks in advance.
Hi, Chris.
I tried using 3.x.x version.
Now I cannot even compile.
Getting this log:
CompileSwift normal arm64 /project/TransPortes/Plugins/cordova-plugin-document-scanner/ScanPlugin/Scan.swift cd /project /Applications/Xcode101.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /project/TransPortes/Plugins/cordova-plugin-document-scanner/ScanPlugin/Scan.swift -emit-module-path /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/Objects-normal/arm64/Scan~partial.swiftmodule -emit-module-doc-path /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/Objects-normal/arm64/Scan~partial.swiftdoc -serialize-diagnostics-path /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/Objects-normal/arm64/Scan.dia -emit-dependencies-path /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/Objects-normal/arm64/Scan.d -emit-reference-dependencies-path /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/Objects-normal/arm64/Scan.swiftdeps -target arm64-apple-ios10 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode101.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -I /private/project/build/device -F /private/project/build/device -g -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 3 -O -serialize-debugging-options -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/swift-overrides.hmap -Xcc -iquote -Xcc /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/TransPortes-generated-files.hmap -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/TransPortes-own-target-headers.hmap -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/TransPortes-all-target-headers.hmap -Xcc -iquote -Xcc /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/TransPortes-project-headers.hmap -Xcc -I/private/project/build/device/include -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/InstallationBuildProductsLocation/Applications/usr/local/lib/include -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/UninstalledProducts/include -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/include -Xcc -I/private/project/build/device -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/DerivedSources/arm64 -Xcc -I/Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/DerivedSources -Xcc -working-directory/project -import-objc-header /project/TransPortes/Bridging-Header.h -pch-output-dir /private/project/build/sharedpch -pch-disable-validation -parse-as-library -module-name TransPortes -o /Library/Developer/Xcode/DerivedData/TransPortes-dngtvmfvmgpjvwcwmzhwkynonnck/Build/Intermediates.noindex/ArchiveIntermediates/TransPortes/IntermediateBuildFilesPath/TransPortes.build/Release-iphoneos/TransPortes.build/Objects-normal/arm64/Scan.o /project/TransPortes/Plugins/cordova-plugin-document-scanner/ScanPlugin/Scan.swift:2:8: error: no such module 'WeScan' import WeScan ^
ARCHIVE FAILED
The following build commands failed: CompileSwift normal armv7 /project/TransPortes/Plugins/cordova-plugin-document-scanner/ScanPlugin/Scan.swift CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler CompileSwift normal arm64 /project/TransPortes/Plugins/cordova-plugin-document-scanner/ScanPlugin/Scan.swift CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (4 failures) Error: xcodebuild: Command failed with exit code 65 at ChildProcess.whenDone (/private/project/cordova/node_modules/cordova-common/src/superspawn.js:135:23) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
I think you missed the pod install step (Although I am not sure how phonegap handles this, a lot of plugins use pods though, so it must be possible somehow). Please follow the steps in the README I linked to earlier exactly. The steps to integrate it are different compared to 4.x.x.
Seems to no longer be a problem. Tested with v4.2.1
.
Hey all,
Sorry I was not able to help a lot with this issue up until now. Anyone still not able to publish app to app store due to the unsupported architectures issue caused by this plugin or any other plugin for that matter can follow these steps below :-
Firstly add the xcode
package to your project :
npm i xcode
Then add this file to your root folder where config.xml exists.
Then add the following to your config.xml file :
<hook src="addPhaseRunScript.js" type="after_platform_add" />
You can remove and re-add the ios platform (This causes the hook script to run after the ios platform has been added) using :
cordova platform rm ios
cordova platform add ios
Done! You shouldn't be getting this error anymore!!
Hey all,
Sorry I was not able to help a lot with this issue up until now. Anyone still not able to publish app to app store due to the unsupported architectures issue caused by this plugin or any other plugin for that matter can follow these steps below :-
- Firstly add the
xcode
package to your project :npm i xcode
- Then add this file to your root folder where config.xml exists.
- Then add the following to your config.xml file :
<hook src="addPhaseRunScript.js" type="after_platform_add" />
- You can remove and re-add the ios platform (This causes the hook script to run after the ios platform has been added) using :
cordova platform rm ios cordova platform add ios
- Done! You shouldn't be getting this error anymore!!
Hi, I have problems with your solution, my console launchs:
Error: Cannot read property 'project' of undefined
I tried reinstall xcode, put relative paths in require but nothing, some solution?
Could you help me? please, I need solve this problem ASAP.
Regards.
@Marko1985 If you don't want to run the script with cordova, you can add the script to build phase in xcode directly.
See screenshot.
BTW, I am using the script here and it works great. https://stackoverflow.com/a/41416964
This is something that caught my by surprise. The app with this plugin is denied by Apple.
How do we go about fixing this as soon as possible?
System Info: