I get following error while building the project.
Clening also didn't help. No idea what went wrong all of a sudden
CompileAssetCatalog /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Products/Debug-iphonesimulator/Pizza\ to\ Go.app Pizza\ to\ Go/Images.xcassets Pizza\ to\ Go/Images.xcassets
cd "/Users/Mayu/Documents/development/git/pizzatogo/iPhoneApp/Pizza to Go"
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Intermediates/Pizza\ to\ Go.build/Debug-iphonesimulator/Pizza\ to\ Go.build/assetcatalog_dependencies.txt --output-partial-info-plist /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Intermediates/Pizza\ to\ Go.build/Debug-iphonesimulator/Pizza\ to\ Go.build/assetcatalog_generated_info.plist --app-icon AppIcon --launch-image LaunchImage --platform iphonesimulator --minimum-deployment-target 7.0 --target-device iphone --compress-pngs --compile /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Products/Debug-iphonesimulator/Pizza\ to\ Go.app /Users/Mayu/Documents/development/git/pizzatogo/iPhoneApp/Pizza\ to\ Go/Pizza\ to\ Go/Images.xcassets /Users/Mayu/Documents/development/git/pizzatogo/iPhoneApp/Pizza\ to\ Go/Pizza\ to\ Go/Images.xcassets
/* com.apple.actool.errors */
: error: There are multiple app icon set instances named "AppIcon".
: error: There are multiple launch image set instances named "LaunchImage".
/* com.apple.actool.compilation-results */
/Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Products/Debug-iphonesimulator/Pizza to Go.app/Assets.car
/Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Intermediates/Pizza to Go.build/Debug-iphonesimulator/Pizza to Go.build/assetcatalog_generated_info.plist
As this error says you have duplicated images AppIcon and LaunchImage. To sort it just make copy of it and remove it from your project (have a look in Images.xcassets and remove it as well). After that import it again to Images.xcassets.
For me, the problem was that I had my assets folder with multiple targets with while extensions already had those target assigned. Fix was to make sure each asset folder was only assigned to its specific target, or delete folders that are not needed.
Error: multiple instances of AppIcon (when working with Storyboard).
This solution worked for me:
Look in the Storyboard window's Navigation panel for a duplicate listing of Images.xcassets. If there, highlight it and press delete key. When asked, select “remove reference” - not send to trash (which might delete the actual Images.xcassets folder). Apparently this duplicate listing in the project can occur if an attempt is aborted to import something into Images.xcassetes.
Related
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.
Whenever I add an app Icon to Asset Catalog and run on Device , it gives following error. This happens with every single project even, blank new projects.
Asset Catalog Compiler Error /Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets:
Failed to write image data for the app icon set from
"AppIcon.appiconset/app-icon-iphone#2x.png" to
"/Users/*****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzesdsfsgifiloaxklokg/Build/Products/Debug-iphoneos/sfdadfas.app/AppIcon60x60#2x.png".
But when I run on Simulator , this works fine and app icon is visible correctly.
I'm using Xcode 9.2 (9.1 had the same error) on macOS High Sierra.
Xcode 8.3.3 doesn't have this issue.
EDIT
Full Error on log,
CompileAssetCatalog
/Users//Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app
sfdadfas/Assets.xcassets
cd /Users/****/Documents/Test/sfdadfas
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/IntermediateBuildFilesPath/sfdadfas.build/Release-iphoneos/sfdadfas.build/assetcatalog_dependencies
--output-partial-info-plist /Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/IntermediateBuildFilesPath/sfdadfas.build/Release-iphoneos/sfdadfas.build/assetcatalog_generated_info.plist
--app-icon AppIcon --compress-pngs --enable-on-demand-resources YES --sticker-pack-identifier-prefix com.*****.test22.sfdadfas.sticker-pack. --target-device iphone
--target-device ipad --minimum-deployment-target 10.3 --platform iphoneos --product-type com.apple.product-type.application --compile
/Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app
/Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets
/* com.apple.actool.errors */
/Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets: error:
Failed to write image data for the app icon set from
"AppIcon.appiconset/app-icon-iphone#2x.png" to
"/Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app/AppIcon60x60#2x.png".
Underlying Errors:
Description: pngcrush exited with signal '6' for "/Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets/AppIcon.appiconset/app-icon-iphone#2x.png".
Error output:
In /Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets/AppIcon.appiconset/app-icon-iphone#2x.png,
correcting libpng error: Too many IDAT's found
/* com.apple.actool.compilation-results */
/Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app/Assets.car
/Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/IntermediateBuildFilesPath/sfdadfas.build/Release-iphoneos/sfdadfas.build/assetcatalog_generated_info.plist
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.
I'm targeting iOS (device and simulator) and setting up CMake to add the different resources needed in the bundle. The "xib" file is giving me some problems. If I take no further action, the iPhone/iPad simulator run fails with the error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Could not load NIB in bundle:
'NSBundle </Users/danieldekkers/Library/Application Support/iPhone Simulator/4.3.2/Applications/1C29638B-7593-4311-8F94-C8051AF90AD7/Discs.app>
(loaded)' with name 'MainWindow''
A missing NIB file in the bundle.
An example (http://www.vtk.org/Wiki/CMake:OSX_InterfaceBuilderFiles) shows that for OSX, you have to compile the xib files into nib files and add these to the bundle as a post-build step.
So my guess would be that something similar holds for iOS as well.
But my question is,... where do i add the compiled nib files?
I now do this in the CMakeLists.txt:
# We need to compile the interface builder *.xib files to *.nib files to add to the bundle
# Make sure we can find the 'ibtool' program. If we can NOT find it we skip generation of this project
FIND_PROGRAM( IBTOOL ibtool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" )
if ( ${IBTOOL} STREQUAL "IBTOOL-NOTFOUND" )
MESSAGE( SEND_ERROR "ibtool can not be found" )
ENDIF()
# Compile the .xib files using the 'ibtool' program with the destination being the app package
FOREACH( xib ${RSRC_IOS_XIB_FILES} )
ADD_CUSTOM_COMMAND( TARGET ${RT_APP_NAME} POST_BUILD
COMMAND ${IBTOOL} --errors --warnings --notices --output-format human-readable-text
--compile
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${RT_APP_NAME}.app/Contents/Resources/${xib}.nib
${RT_APP_ROOT}/rsrc/apple/ios/${xib}.xib
COMMENT "Compiling ${RT_APP_ROOT}/rsrc/apple/ios/${xib}.xib")
ENDFOREACH()
But iI don't really trust the "destination" of the compilation step, especially for the simulator.
Has anyone got this working or see what it is that I'm doing wrong?
It should "just work" with the CMake Xcode generator to add the *.xib files as sources to add_executable, and then set the RESOURCE target property to the list of *.xib files.
As shown in the CMake/Tests/iOSNavApp/CMakeLists.txt file.
This technique should work with CMake 2.8.5 and up, and Xcode 4 and up.
EDIT
Code from link copied/pasted here in case the link gets broken in the future:
cmake_minimum_required(VERSION 2.8.5)
project(NavApp3)
set(CMAKE_OSX_SYSROOT iphoneos4.3)
set(CMAKE_OSX_ARCHITECTURES "armv6;armv7;i386")
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/Classes
)
add_library(Functions STATIC TotalFunction.c TotalFunction.h)
set(M_SRCS main.m Classes/NavApp3AppDelegate.m Classes/RootViewController.m)
set(HEADERS Classes/NavApp3AppDelegate.h Classes/RootViewController.h)
set(RESOURCES MainWindow.xib RootViewController.xib)
add_executable(NavApp3 MACOSX_BUNDLE ${M_SRCS} ${HEADERS} ${RESOURCES})
target_link_libraries(NavApp3
Functions
"-framework CoreGraphics"
"-framework Foundation"
"-framework UIKit"
)
set_target_properties(NavApp3 PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER "com.yourcompany.NavApp3"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
RESOURCE "${RESOURCES}"
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES
XCODE_ATTRIBUTE_GCC_PREFIX_HEADER ${CMAKE_CURRENT_LIST_DIR}/NavApp3_Prefix.pch
XCODE_ATTRIBUTE_INFOPLIST_PREPROCESS YES
XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 3.0
)