I'm trying to build an old Xcode project from last year and I'm getting the following error from momc. I've tried reverting to Xcode 5.1.1 and then Xcode 5.0 and it's not making any difference. The project built cleanly when I last worked with it.
DataModelVersionCompile Build/Products/Debug-iphoneos/KinsaNative.app/Kinsa.momd KinsaNative/Kinsa.xcdatamodeld
cd /Users/mike/kinsa/KinsaNativeIOS
setenv PATH "/Users/mike/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Users/mike/Desktop/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/mike/Desktop/Xcode.app/Contents/Developer/usr/bin/momc -XD_MOMC_SDKROOT=/Users/mike/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -MOMC_PLATFORMS iphonesimulator -MOMC_PLATFORMS iphoneos /Users/mike/kinsa/KinsaNativeIOS/KinsaNative/Kinsa.xcdatamodeld /Users/mike/kinsa/KinsaNativeIOS/Build/Products/Debug-iphoneos/KinsaNative.app/Kinsa.momd
Assertion failed: (host_bootstrap_port != MACH_PORT_NULL), function _sim_host_bootstrap_init, file /SourceCache/Interposition_Sim/Interposition_Sim-111/libSystem/system/bootstrap.c, line 26.
2014-07-11 12:35:29.483 momc[6913:142282] *** -[NSKeyedUnarchiver initForReadingWithData:]: data is empty; did you forget to send -finishEncoding to the NSKeyedArchiver?
/Users/mike/kinsa/KinsaNativeIOS/KinsaNative/Kinsa.xcdatamodeld:0: error: Compilation failed for data model at path '/Users/mike/kinsa/KinsaNativeIOS/Build/Products/Debug-iphoneos/KinsaNative.app/Kinsa.momd/Kinsa.mom'
Seems to be a OS X 10.10 Yosemite bug. Build works fine on a box running Mavericks.
Radar filed with apple at rdar://17654563
Related
We are unable to distribute our sample app which uses our framework as well as our users can't.
While archiving and distributing to AppStore, the app is rejected with the following message:
Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path. If your app contains bitcode, bitcode processing may have failed. Because of these errors, this build of your app will not be able to be submitted for review or placed on the App Store.
The framework contain the bitcode, or at least there's a BITCODE_GENERATION_MODE = bitcode build setting in our .xcconfig, which basically means, the Xcode will add -fembed-bitcode build flag to any clang invocation.
From here, we've started testing using Ad-Hoc builds, to speed up our trial and error attempts, which also fails while Rebuild from bitcode option is selected. Organiser shows the popup with the following contents:
ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk -o /var/folders/vz/b0jj0dms4014y5htfv93svfc0000gn/T/ipatool20201130-52097-13rj9hy/thinned-out/arm64/Payload/iosTest.app/Frameworks/SciChart.framework/SciChart --generate-dsym /var/folders/vz/b0jj0dms4014y5htfv93svfc0000gn/T/ipatool20201130-52097-13rj9hy/thinned-out/arm64/Payload/iosTest.app/Frameworks/SciChart.framework/SciChart.dSYM --strip-swift-symbols /var/folders/vz/b0jj0dms4014y5htfv93svfc0000gn/T/ipatool20201130-52097-13rj9hy/thinned-in/arm64/Payload/iosTest.app/Frameworks/SciChart.framework/SciChart
Status: pid 52150 exit 1
Stdout:
SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Logs provided isn't very informative, here is the snippet from IDEDistributionPipeline.log
-= Output =-
ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version
Undefined symbols for architecture arm64:
"___llvm_profile_runtime", referenced from:
__hidden#25821_ in 0832.o
__hidden#25821_ in 0833.o
__hidden#25821_ in 0834.o
__hidden#25821_ in 0835.o
__hid
2020-11-30 16:19:17 +0000 den#25821_ in 0836.o
__hidden#25821_ in 0837.o
__hidden#25821_ in 0838.o
...
ld: symbol(s) not found for architecture arm64
Exited with 1z
Failed to compile bundle: /var/folders/vz/b0jj0dms4014y5htfv93svfc0000gn/T/SciChart6aun_sfs/SciChart.arm64.xar
Stderr:
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2808:in `block in CompileOrStripBitcodeInBundle'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2747:in `each'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2747:in `CompileOrStripBitcodeInBundle'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3016:in `block in ProcessIPA'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2978:in `each'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2978:in `ProcessIPA'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3928:in `<main>'
2020-11-30 16:19:17 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with 1
which after bunch of warnings shows the actual error at the end of file (I can't include full log, since it's too much of a raw text):
code = 1061;
description = "ipatool failed with an exception: #<CmdSpec::NonZeroExitException: ...
info = {
};
level = ERROR;
type = exception;
Not sure what to to do with this, I've tried different build settings options, nothing helped... Already contacted apple, but no feedback yet, and knowing them, we can wait far too long...
The strange part here, is if we include our .framework directly as a source code and then archive the app - everything works as expected. If we include it as XCFramework or just .framework, which is pre-built - it fails as described above.
I might miss something simple or obvious here, so please let me know if somebody have some insights on that matter.
Some system info:
macOS BigSur 11.0.1
XCode Version 12.2 (12B45b)
We've tried different combinations of macOS and Xcode, e.g.:
Catalina with Xcode 12
BigSur with Xcode 11
etc.
Any help is greatly appreciated.
Thanks.
Long story short, there were LLVM instrumentation included, which prevents AppStore processing. I've written a whole blog post about it here - https://blog.scichart.com/xcframework-xcode-12-and-bigsur-issues/
To sum up, here is a few required steps to make sure while creating XCFramework for distribution:
Using archive builds is a MUST, release build isn't enough
BUILD_LIBRARY_FOR_DISTRIBUTION must be set to YES
SKIP_INSTALL must be set to NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO to turn off GCC instrumentation and remove them from the binary
CLANG_ENABLE_CODE_COVERAGE = NO to turn off code coverage tools from the binary
Having all of the above helped to solve our preparing and distribution problem and hopefully save you some time if you happened to face same issues as we did.
I'm trying to build my Xamarin iOS app on Mac and failing on an error related to a deprecated command line parameter.
I tried targeting iphone 10, 11 and above but still failing on same error.
I Updated NuGets to latest versions, also tried creating an empty ResourceRules.plist file.
Xcode 12.1 (17222)
Build 12A7403
=== Xamarin.Mac ===
Version: 6.22.1.26 (Visual Studio Community)
=== Xamarin.iOS ===
Version: 14.4.1.3 (Visual Studio Community)
=== Operating System ===
Mac OS X 10.15.7
Build Command from log:
Tool /Applications/Xcode.app/Contents/Developer/usr/bin/actool execution started with arguments: --errors --warnings --notices --output-format xml1 --output-partial-info-plist /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/partial-info.plist --app-icon AppIcon --compress-pngs --target-device iphone --target-device ipad --minimum-deployment-target 11.0 --platform iphoneos --compile /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/bundle /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/cloned-assets/Assets.xcassets
...
...
Copied /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.Settings.aotdata.arm64 to /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/Plugin.Settings.aotdata.arm64
/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app built successfully.
Creating "bin/iPhone/Release/mtouch.stamp" because "AlwaysCreate" was specified.
Target _CopyITunesArtwork:
Copying file from "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/iTunesArtwork#2x" to "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/iTunesArtwork#2x".
Target _CopyITunesArtwork:
Copying file from "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/iTunesArtwork" to "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/iTunesArtwork".
Target _CopyAppExtensionsToBundle:
Skipping target "_CopyAppExtensionsToBundle" because it has no inputs.
Target _GenerateAppExtensionDebugSymbols:
Directory "bin/iPhone/Release/MyDemoApp.iOS.app/../.dSYM" doesn't exist. Skipping.
Target _CollectFrameworks:
No Frameworks directory found.
Target _GenerateFrameworkDebugSymbols:
Skipping target "_GenerateFrameworkDebugSymbols" because it has no inputs.
Target _GenerateDebugSymbols:
Directory "bin/iPhone/Release/MyDemoApp.iOS.app.dSYM" doesn't exist. Skipping.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -num-threads 4 -z -o bin/iPhone/Release/MyDemoApp.iOS.app.dSYM bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -i -s obj/iPhone/Release/mtouch-symbols.list bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: warning: removing global symbols from a final linked no longer supported. Use -exported_symbols_list at link time when building: /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS
Touching "bin/iPhone/Release/MyDemoApp.iOS.app.dSYM/Contents/Info.plist".
/usr/bin/mdimport bin/iPhone/Release/MyDemoApp.iOS.app/../
Target _CodesignAppBundle:
Tool /usr/bin/codesign execution started with arguments: -v --force --timestamp=none --sign 5FC337A423A139F99B2D118EC7FA72D8D0D94ABE --resource-rules /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/ResourceRules.plist --entitlements /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/obj/iPhone/Release/Entitlements.xcent /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app
bin/iPhone/Release/MyDemoApp.iOS.app : error : Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!
bin/iPhone/Release/MyDemoApp.iOS.app : error : /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app: invalid resource specification rule(s)
Done building target "_CodesignAppBundle" in project "MyDemoApp.iOS.csproj" -- FAILED.
I saw some references to this error mainly in old posts referring to code signing but couldn't find a recent solution referring to Xamarin.
Any help would be appreciated.
Cheers,
Yuval
Having intractable build issues with Ionic 6.5.0 / Capacitor 2.2.0
I made the app not long ago, but today it won't build. After much fruitless updating/cleaning/building I deleted the ios directory and re-added it.
ionic cap add ios
ionic cap sync
Updated, removed DerivedData, clean build, same error:
CompileAssetCatalog /Users/me/Library/Developer/Xcode/DerivedData/App-ayobzjywexbfvjdrynzhsnownnyr/Build/Products/Debug-iphoneos/App.app /Users/me/Projects//MyProject/ios/App/App/Assets.xcassets (in target 'App' from project 'App')
cd /Users/me/Projects//MyProject/ios/App
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/me/Library/Developer/Xcode/DerivedData/App-ayobzjywexbfvjdrynzhsnownnyr/Build/Intermediates.noindex/App.build/Debug-iphoneos/App.build/assetcatalog_dependencies --output-partial-info-plist /Users/me/Library/Developer/Xcode/DerivedData/App-ayobzjywexbfvjdrynzhsnownnyr/Build/Intermediates.noindex/App.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist --app-icon AppIcon --compress-pngs --enable-on-demand-resources YES --filter-for-device-model iPhone10,1 --filter-for-device-os-version 13.5.1 --sticker-pack-identifier-prefix com.prosc.itineris.sticker-pack. --development-region en --target-device iphone --target-device ipad --minimum-deployment-target 11.0 --platform iphoneos --product-type com.apple.product-type.application --compile /Users/me/Library/Developer/Xcode/DerivedData/App-ayobzjywexbfvjdrynzhsnownnyr/Build/Products/Debug-iphoneos/App.app /Users/me/Projects//MyProject/ios/App/App/Assets.xcassets
2020-06-15 15:40:01.929 ibtoold[73405:1839106] DEBUG: Added to environment: {
TMPDIR = "/var/folders/g8/hc3lzhqn75d1ms9dzt46s7nw0000gn/T/E2DC0A8E-13DD-4566-A0E9-59C812831E2A";
}
Command CompileAssetCatalog failed with a nonzero exit code
If I run this command from the terminal it appears to exit with a 255 status, no errors/warnings/notices.
I tried the recommended updates in XCode, but I'm seeing some errors in the Xcode prior to the failure:
/Users/me/Projects/MyProject/node_modules/#capacitor/ios/Capacitor/Capacitor/Plugins/Network/Reachability.swift:207:4: Unexpected version number in 'available' attribute for non-specific platform '*'
/Users/me/Projects/MyProject/node_modules/#capacitor/ios/Capacitor/Capacitor/Plugins/Permissions.swift:39:5: Switch covers known cases, but 'AVAuthorizationStatus' may have additional unknown values, possibly added in future versions
/Users/me/Projects/MyProject/node_modules/#capacitor/ios/Capacitor/Capacitor/CAPBridge.swift:375:29: Coercion of implicitly unwrappable value of type 'String?' to 'Any' does not unwrap optional
/Users/me/Projects/MyProject/node_modules/#capacitor/ios/Capacitor/Capacitor/CAPPlugin.m:6:17: Method definition for 'shouldOverrideLoad:' not found
I don't think these are causing the error, however. Any suggestions / insights?
The solution was to update XCode to 11.5 by installing a new build from the App Store. My version of XCode was not installed from the app store.
After updating the additional XCode tools, this updated actool from 11.2.1 to 11.5
This had nothing to do with Ionic/Capacitor, building a totally new native iOS app was exhibiting the same error.
Compiled my project code and now I receive the following error on all XIB and Storyboard files. Can someone help me solve? All IB files point to the proper deployment target (9.0).
CompileXIB App/WelcomeScreenViewController.xib
cd /Users/jried31/Downloads/zzz/v6/App
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module App --output-partial-info-plist /Users/jried31/Library/Developer/Xcode/DerivedData/App-basveboargfgfwdisbiioebismye/Build/Intermediates/App.build/Debug-iphonesimulator/App.build/WelcomeScreenViewController-PartialInfo.plist --auto-activate-custom-fonts --target-device iphone --minimum-deployment-target 9.0 --output-format human-readable-text --compile /Users/jried31/Library/Developer/Xcode/DerivedData/App-basveboargfgfwdisbiioebismye/Build/Products/Debug-iphonesimulator/Alure.Me.app/WelcomeScreenViewController.nib /Users/jried31/Downloads/zzz/v6/App/App/WelcomeScreenViewController.xib
/* com.apple.ibtool.errors */
/Users/jried31/Downloads/zzz/v6/App/App/WelcomeScreenViewController.xib: error: The operation couldn’t be completed. (com.apple.InterfaceBuilder error 2001.)
In my case, a merge conflict caused the files to fail to compile, so I just had to open them up in a text editor and resolve the merge.
All the other solution did not work for me. I did not have a merge issue as I got the issue no matter which branch I was using.
In the end I redownloaded Xcode (7.3.1) and now it is working again.
Solved my own problem:
More Clarification of the issue was that all of the XIB's and Storyboard files would not compile, resulting in the 2001 error.
SOLUTION:
The problem was because the Simulator was based on iOS 9.1 and the build target for both the Podfile and iOS project was 9.0...That inconsistency caused issues. I resolved it by the following:
Product -> Clean
Product -> (hold down option) Clean build folders
Delete Derived Data (~/Library/Developer/Xcode/DerivedData)
Download the 9.0 simulator (if you choose to keep the project at 9.0 settings) resulting in two simulator builds (9.1 and 9.0)
Restart XCODE
--- Just make sure that all of your settings reflect the desired OS version you'd like to go with.
I'm running Xcode 5 and building for iOS 7. When I try to build this project for archiving I get this error. I get it on my local machine and on my jenkins build server. I have gone through the storyboard and I am not finding any reason for this error. It builds just fine on simulator and device. I am not even sure what runtime.nib is though addEditHCPViewController.nib is reference to one of the View Controllers inside of the storyboard. Any ideas?
CompileStoryboard myApp/Profiles.storyboard
cd "/builds/Company/workspace/myApp"
setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 6.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 6.1 --output-format human-readable-text --compile /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc /builds/Company/workspace/myApp/myApp/Profiles.storyboard
/* com.apple.ibtool.document.warnings */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:jlW-RT-oUY: warning: 2 views are vertically ambiguous.
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:1Qm-h4-IZr: warning: Position is ambiguous for "Picker".
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:d8p-iA-2QW: warning: Frame for "Button" will be different at run time.
/* com.apple.ibtool.errors */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard: error: Compilation failed. Unable to write to path: /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc
Underlying Errors:
Description: The file “runtime.nib” doesn’t exist.
Failure Reason: The file doesn’t exist.
Underlying Errors:
Description: The operation couldn’t be completed. No such file or directory
Failure Reason: No such file or directory
Description: “Profiles.storyboardc” couldn’t be removed.
Failure Reason: The file doesn’t exist.
Underlying Errors:
Description: The operation couldn’t be completed. No such file or directory
Failure Reason: No such file or directory
CompileStoryboard myApp/Profiles.storyboard
cd "/builds/Company/workspace/myApp"
setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 6.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 6.1 --output-format human-readable-text --compile /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc /builds/Company/workspace/myApp/myApp/Profiles.storyboard
/* com.apple.ibtool.document.warnings */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:d8p-iA-2QW: warning: Frame for "Button" will be different at run time.
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:jlW-RT-oUY: warning: 2 views are vertically ambiguous.
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:1Qm-h4-IZr: warning: Position is ambiguous for "Picker".
/* com.apple.ibtool.errors */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard: error: Compilation failed. Unable to write to path: /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc
Underlying Errors:
Description: The file “addEditHCPViewController.nib” doesn’t exist.
Failure Reason: The file doesn’t exist.
Underlying Errors:
Description: The operation couldn’t be completed. No such file or directory
Failure Reason: No such file or directory
I found the answer to this. During a merge in git, the project file had not been merged properly and Profiles.storyboard was being included as a resource twice. When it tried to compile the same resource the second time, it would fail.
I just Cleaned the project, then built it again, afterwards the error disappeared.
Just feel I should add that I had this problem for a while and had no clue how to solve it.
Turns out one of my Storyboard IDs had a slash in (/) which was causing the error. Removing this slash resolved the error!
Hope this helps some people!
Removing "/" in the storyboard Id is fixed my problem.
#imran-ahmed solved the problem. I worked on this problem for a couple hours and finally found the comment about the '/' in a StoryBoard ID. A year later and the '/' in the StoryBoard ID still kills Xcode compile. That was my problem and simply deleting the '/' solved the problem.
I faced a similar issue, in my case I had not checked the Target Membership option. Make sure it is checked otherwise Xcode won't be able to find it.