I have an error I don't seem to be able to resolve. I don't get this while testing on my phones, but it happens after uploading the App for review. The phone used in the received crash report is (iPhone XR). The crash report points to:
UIImage.init+ 92364 (imageLiteralResourceName:) + 144
This happens during app startup, and the code that using the UIImage function when it crash is:
let image = UIImage(imageLiteralResourceName: getCurrrentDayNumber())
... where the getCurrentDayNumber is my function, it returns the day number 1-31 depending on the day of the month as a string ("1" .."31"). This function using the Date() function, so it could be that the Date() function does not give a valid date during startup, and hence the imageLiteralResourceName gets wrong, but I thought that was unlikely.
Again, I don't get this error in any of the devices I have tested, nor in the Test build loaded to TestFlight, only during app review by Apple.
For the resources to load, I have created 31 image resources in Asset.xcassets. Each assets has three images, 1x,2x,3x for all 31 days in a month, where the 1x is typical 300x180 px.
Anyone that can point me to where I might find the issue?
Post not yet marked as solved
Simple question really, can Airtags be used as iBeacons? seem like a really simple solution for wayfingint in complicated buildings. can they?
Post not yet marked as solved
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?
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
Hi, I've been trying to play an audio asset (.m4a) using an AVAudioPlayer, but results in what I believe is an internal error.
I've been using the following code to load and play the asset. Please note that the code was run using an iPad Pro 11-inch simulator with iPadOS 14 in Xcode 12 beta.
guard let audioData = NSDataAsset(name: "Example")?.data else {
fatalError("Asset not found")
}
do {
let audioPlayer = try AVAudioPlayer(data: audioData, fileTypeHint: "m4a")
audioPlayer.play()
} catch {
fatalError(error.localizedDescription)
}
The catch block is not reached, but the audio does not play and the console logs the following:
2020-06-26 14:48:25.784066-0500 Name[45441:2235216] HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
2020-06-26 14:48:25.784551-0500 Name[45441:2235216] HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
2020-06-26 14:48:25.796707-0500 Name[45441:2235216] [aqme] 255: AQDefaultDevice (1): output stream 0: null buffer
2020-06-26 14:48:25.797137-0500 Name[45441:2235216] [aqme] 1778: EXCEPTION thrown (-50): error != 0
Can you please let me know if there's something wrong with the way I'm loading/playing the asset or if this looks like an internal bug in the betas?