Post marked as unsolved
120
Views
In my project, I pack two normal maps into one large size (4096x4096) texture(R,G channel for one, and B,Alpha for another).
If I use [UIImage imageNamed:] to load the image from the asset bundle, no matter how I set the compression for the image(lossless or other options), the result UIImage always has artifacts in each color channel(each channel contains colors coming from other channel. Default lossless option is the best among others, but still not acceptable). Because I use the pixels for normal map animation, these artifacts are noticeable.
If I move the image from asset bundle to project folder, and load it by using [[UIImage alloc]initWithContentFile:], because of no compression, the artifact goes away. But I get no benefits from image caching.
So, is there any workaround to load the image without compression while can be cached?
Post marked as unsolved
134
Views
I have tried to add an icon to my Python app that is otherwise fully functional, but for some reason, I believe I am missing a linking step. The current icon of the app is a Python rocket that I believe is auto-generated from the app being built from python, but I would like to change this.
I opened a test xcode project and was able to successfully add the icon.icns file to the info.plist in order to get the icon working correctly. I added the files to the folder of the Python project as well as adding them via xcode and to the target project. I cleaned the build folder, but I do not see the new icon like I was able to see in the test xcode project.
When adding the exact same files (icon.icns, and info.plist) to the Python project from the test xcode project, the app icon remains as a Python rocket. Do I need to go the asset.xcassets route, or is there something missing in adding the icon.icns file to the Info.plist file?
Post marked as unsolved
169
Views
Hii, Is there anyway to save the user name and password for users on flutter webview app for ios?
Thanks In advance
Aneesh
Post marked as unsolved
95
Views
Hey all,
I tried to use the Photoshop icon template that Apple provides in Affinity Photo but was unsuccessful. I'm probably doing something wrong and most likely lack the knowledge on how to use Affinity Photo for such task, so I was wondering if somebody here was able to create Big Sur icons with Affinity products?
I don't understand why Apple doesn't just tell use the exact corner radius needed and shadow settings instead of us needing to "guess".
Any help is appreciated :)
Post marked as unsolved
86
Views
As title said, I'm using Xcode 12.1, Mbp 15' 2017. My project is a large one that have over 300 images or icons and it will take aboud 45s to compile the assets. I just rebuild it after a success building and it will recompile assets.
What should I do to avoid this problem?
Post marked as unsolved
854
Views
Every now and then our CI run would fail to compile our app project with the following error:
Command CompileAssetCatalog failed with a nonzero exit code Exit status: 65 A simple re-trigger of the same CI job (Jenkins) without any code changes would then succeed without any errors.
This started happening with Xcode 11.0 and still exists today with Xcode 11.5 and Xcode 12.0 Beta.
Questions: How and where can I get more info why CompileAssetCatalog command failed?
What does exit status 65 mean?
Where can i find the error codes of actool?
Can anybody point me in the right direction how to debug this to figure out what makes it fail?
Side info:
We have two .xcassets files in our app project. Not sure if this is important.
Post marked as unsolved
122
Views
Hi,
I am getting the following during compilation:
The following build commands failed:
CompileAssetCatalog /Users/.../Resources/Shared.xcassets
How can I get more log around the issue ? (this is on CI)
Thanks.
Post marked as unsolved
235
Views
With iOS 14 WidgetKit, I am trying to display a widget with a 'particular' photo asset from the library. With a medium-size widget, I want the photo asset to fill the whole area (Aspect Fill), just like the native Photos widget.
struct My_WidgetEntryView : View
{
var entry : Provider.Entry
var body: some View
{
PhotoView(user: 1)
}
}
struct PhotoView: View
{
var user : Int
@ObservedObject private var assetImageModel = AssetImageModel()
init(user: Int)
{
self.user = user
self.assetImageModel.loadAsset()
}
var body: some View {
if self.assetImageModel.assetImage != nil {
Image(uiImage: self.assetImageModel.assetImage!)
.resizable()
} else {
Image(uiImage: UIImage(systemName: "photo")!)
.resizable()
}
}
}
class AssetImageModel: ObservableObject {
@Published var assetImage: UIImage?
init() {
loadAsset()
}
func loadAsset() {
if PHPhotoLibrary.authorizationStatus() == .authorized {
let allPhotosOptions = PHFetchOptions()
allPhotosOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: true)]
let assetsFetchResults = PHAsset.fetchAssets(with: allPhotosOptions)
if assetsFetchResults.count > 0 {
let asset = assetsFetchResults.lastObject
if asset != nil {
let options = PHImageRequestOptions()
options.isSynchronous = true
options.deliveryMode = .highQualityFormat
options.resizeMode = .exact
options.version = .current
PHCachingImageManager().requestImage(for: asset!, targetSize: CGSize(width: 360 * UIScreen.main.scale, height: 170 * UIScreen.main.scale), contentMode: .aspectFill, options: options, resultHandler: { image, _ in
//DispatchQueue.main.async {
self.assetImage = image
//}
})
} else {
//Asset was nil
}
} else {
//No assets
}
} else {
//No persmission
}
}
}
When the above is run, I get a crash with a memory warning stating allowed 30 MB memory limit has exceeded. This obvious due to this:
For the medium-size widget, I had to go by a 360 x 170 point size since there was no way to get the actual view dimensions before the the view gets displayed.
The actual target size then has to be multiplied by the screen scale, at the moment the test device is a 3x. Aspect Fill as to be the fill type. Due to this, PHCachingImageManageris returning a 360-point width with 480-point height for a portrait photo in order to fill the view. The final dimensions of the image end up being 1080 x 1440 pixel size. I imagine this is the reason for memory pressure.
Question
Is there a way to ask for a properly cropped 360 x 170 point size image? The stock Photos widget seems to manage this.
Things I Tried I tried normalizedCropRect in PHImageRequestOptions and had no luck.
Lowering the image size by a huge margin works, but the image looks blurred visually.
Post marked as unsolved
101
Views
Hello all,
I'm using vector PDFs in my xcasset file, created by and editable in Photoshop.
When I want to edit one of these files, I can't use "Open with External Editor" as this just shows the PDF in the Preview application. My current process is to "Show in Finder", right-click, Open With > Photoshop, but this seems needlessly messy!
I obviously don't want all PDFs to default to opening in Photoshop, but is there any way of just setting Xcode's external editor binding for PDFs?
Many thanks,
David
Post marked as unsolved
125
Views
I'm using Xcode 12.
I have set the ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME to "AccentColor", and created a Color Set named "AccentColor". When run I still see the default system blue color as the tint.
I don't understand why this does not work. I've done exactly as it is when I create a new iOS project from scratch. This does not seem to work in my existing project.
Post marked as unsolved
91
Views
Hi there, I was hoping for some help in understanding how to keep my Splash Screen from inverting when switching my device from Light to Dark Mode? (I want to keep the Splash Screen jpg the same on both modes)
I've tried on the assets folder and adding a light and dark option, and dragging the exact images into the boxes, but the Splash Screen's color are still inverted.
The device I was testing on is an iPhone 6 with 12.4 version installed.
Thanks in Advance
Post marked as unsolved
63
Views
I am attempting to read the contents of the Assets.car file and have the following software version on my Mac.
MacOSX : Catalina 10.15.6
XCode : 11.7
And the message I am getting from Xcode is:
Error extracting Assests.car: objc[31538]: Class
OSatencoder is implemented in both /usr/lib/libate.dylib (0x7fff8e9ed270) and
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/bin/assetutil
(0x1021c0238). One of the two will be used. Which one is undefined.
I did not have this issue before upgrading to this version of MacOSX.
Any suggestions on how to avoid this certain error?
Post marked as unsolved
101
Views
The icon of the app being displayed on the multitasking screen is not displayed.
Images are set in Assets.xcassets.
App icons such as the home screen will appear, but only the icon next to the app name displayed above during multitasking will not be displayed.
Do you know what caused it?
Development environment:
Xcode11.4
SwiftVersion 5.2
device -> iPhone11
OSversion 13.4.1
Post marked as unsolved
84
Views
Hi devs
I am making a tvOS app and I want to make an icon for it.
I have an LSR file with 2 layers of 2 1280x768 images.
How do I add this into the tvOS "App Icon and Shelf Image" asset catalog
This is my first tvOS app, so I really need help!
Thanks, NSApps
Post marked as solved
186
Views
When I have a Image in my Assets.xcassets, than comes an Error.Wenn I delete the Image than there is no error.
cd /Users/tomludwig/Library/Mobile\ Documents/com\~apple\~CloudDocs/Documents/Xcode\ /LexiconForSwiftUI\ \(original\)
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Intermediates.noindex/LexiconForSwiftUI.build/Debug-iphonesimulator/LexiconForSwiftUI.build/assetcatalog_dependencies --output-partial-info-plist /Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Intermediates.noindex/LexiconForSwiftUI.build/Debug-iphonesimulator/LexiconForSwiftUI.build/assetcatalog_generated_info.plist --app-icon AppIcon --accent-color AccentColor --compress-pngs --enable-on-demand-resources YES --filter-for-device-model iPhone12,5 --filter-for-device-os-version 14.0 --development-region en --target-device iphone --target-device ipad --minimum-deployment-target 14.0 --platform iphonesimulator --compile /Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Products/Debug-iphonesimulator/LexiconForSwiftUI.app /Users/tomludwig/Library/Mobile\ Documents/com\~apple\~CloudDocs/Documents/Xcode\ /LexiconForSwiftUI\ \(original\)/LexiconForSwiftUI/Preview\ Content/Preview\ Assets.xcassets /Users/tomludwig/Library/Mobile\ Documents/com\~apple\~CloudDocs/Documents/Xcode\ /LexiconForSwiftUI\ \(original\)/LexiconForSwiftUI/Assets.xcassets
2020-08-18 09:19:36.048 ibtoold[1098:25421] DEBUG: Added to environment: {
TMPDIR = "/var/folders/62/ht97fll57c39kqkdd51626br0000gn/T/34C9DCDF-97BF-4717-A216-537C31B68474";
}
int _CreateMapAddress(BOMStorage, unsigned int) can't mmap memory of size '4096' error: 'Invalid argument'
CoreUI: Error: unable to create storage file /Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Products/Debug-iphonesimulator/LexiconForSwiftUI.app/Assets.car error 'Invalid argument'
/* com.apple.actool.errors */
: error: ERROR: Each TDDistiller instance can be distilled only one time!
/* com.apple.actool.document.notices */
/Users/tomludwig/Library/Mobile Documents/com~apple~CloudDocs/Documents/Xcode /LexiconForSwiftUI (original)/LexiconForSwiftUI/Assets.xcassets:./AppIcon.appiconset/[][ipad][76x76][][][1x][][]: notice: 76x76@1x app icons only apply to iPad apps targeting releases of iOS prior to 10.0.
/* com.apple.actool.compilation-results */
/Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Intermediates.noindex/LexiconForSwiftUI.build/Debug-iphonesimulator/LexiconForSwiftUI.build/assetcatalog_generated_info.plist
/Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Products/Debug-iphonesimulator/LexiconForSwiftUI.app/AppIcon60x60@2x.png
/Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Products/Debug-iphonesimulator/LexiconForSwiftUI.app/AppIcon76x76@2x~ipad.png
/Users/tomludwig/Library/Developer/Xcode/DerivedData/LexiconForSwiftUI-cyqupfiuzpwcliblfainqnnopfcu/Build/Products/Debug-iphonesimulator/LexiconForSwiftUI.app/Assets.car
Command CompileAssetCatalog failed with a nonzero exit code