Using expansion files for android wear watchfaces - wear-os

I am working a watch face everything works is fine but the problem is apk has crossed 100 MB (80% of space is because of image resources). So i m in a situation to use the expansion file. Have added the image resource as expansion file & i can now access the images in my handheld without any error. Now my question is how do i send my 80MB(around 500 images) to wear devices & use the images in my watch face. Is using the expansion file a good idea, am i in the right path or please suggest me a way to use my 100+ MB apk.

Got the solution to this issue. But not sure whether this is possible before wear 2.0,for 2.0 when uploading the wear apk, we can upload a expansion file for wear too. We can follow the same procedure, we use for handheld expansion file.

Related

Xcode 13 UI Previews folder takes too much space

I have a 250Gb M1 Mac Mini and it is starting to run out of disk space recently, it seems like the UI Previews is the main culprit which takes roughly 165GB space alone and is increasing each day. Tried to delete the folder using Dev Cleaner but was told not able to do so. Tried to google the issue but only found this thread with only a few replies. It makes me wonder is it just me or everyone has this issue?
I have the same problem. For me, DevCleaner is complaining about permissions, so I had to go to /Users/Me/Library/Developer/Xcode/UserData/Previews/Simulator\ Devices/ directory and manually delete simulator files.
Edit:
Save space by
xcrun simctl delete unavailable
xcrun simctl erase all
Delete /Users/username/Library/Developer/CoreSimulator folder.
I had a similar issue where /Users/Me/Library/Developer/Xcode/UserData/Previews/ "Simulator Devices" and "Simulator%20Devices" where taking up over 400GB of space.
I only found this was an issue when "System Data" on my iMac was over 450GB
I found the solution here, to delete the simulator devices.
https://www.reddit.com/r/iOSProgramming/comments/riguh3/xcode_preview_folder_increasing_in_size_what/
There was a little file called "device_set.plist" which i did not delete.
As to what may have caused this, I used the grand perspective app to see what was using all that space, and it ended up pointing to videos that were being played in previews.
The videos seem to load in a janky way and take a long time, and then to continue in the background when playing in xcode so I think that it might be related to the way SWiftUI Previews loads videos. However I am no expert, this is my speculation.
Xcode 14: Adding to what #TaeVitae wrote, I got tired of watching Xcode try and create the previews, so I did a bit more digging. I found that inside ~Library/Developer/Xcode/UserData/Previews/Simulator Devices/[device ID]/data/, some of the biggest culprits taking up space were Containers, Library and var.
I could easily delete Containers and Library. Deleting var took way too long for Xcode to recreate the preview, so I stopped waiting.
Yes, Xcode recreates Library, but deleting it significantly reduced the amount of storage it took up.

Xbox UWP Memory Usage Limit

I have a UWP video player app which runs on Xbox One. The app downloads resources: videos and audio, and then plays once completed. On my laptop, everything works fine and I can play the videos. However on the Xbox, at exactly the same point, I call fopen, which returns a nullptr andGetLastError() returning 112 - ERROR_DISK_FULL.
The total data size is about 7.5GB, but this error occurs less than half way through downloading. Is there some kind of storage limit on the Xbox? I have read this link https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/system-resource-allocation which says that deployed using Visual Studio these limits don't apply. I am currently using VS to debug the application so this should be possible if it is the reason.
Any help on this would be appreciated.
Many thanks,
Peter
To summary the issue. The error shows that the disk space of the Xbox that is used to store files is running out. What the document mentioned is about the memory limitation, not the disk limitation.
There is only a certain amount of space dedicated for file storage as the drive is split into partitions. Just like an external drive, it can be formatted for file storage or games and apps. It can't hold both. So they split the internal drive so there is some file storage with most of the drive dedicated to the storage of games and apps.
The application data folder that you are storing to goes to a drive that they can’t increase, a drive that is NOT the developer drive. It’s a fixed size.

OSX - How to debug distributed builds?

I sent my first desktop OSX app out to a small circle of testers today. One user cannot get past the splash screen.
I am wondering how one might debug something like this? Would I somehow write NSLogs to a file? Or does OS X have some sort of utility? I assume I need some sort of logging capability, right?
You can write your logs to file quite easily (not via NSLog, but just plain writing NSString to disk via writeToFile if you want to). You can also have your logs automatically uploaded to your server if you have one using NSURLConnection with a POST.
I prefer the latter because it requires little intervention from the testers, and happens automatically.
Distribution builds are not ment to be debugged or else it would have been development build.
You can how ever sync your device with itunes and then get the crash report(if you want to know the source of crash).from appdata.
reffer to this link. if you want to debug make a debug build with development provisoning. in your case ask the tester to send you the crash report and you keep the ipa or app file safe you will need it to read the crash report.

Flashing and closing PyS60 SIS

I created a py script for S60 2nd Edition FP3 with a background image, database, sound files which are stored in a folder on c drive. After several hours, I have managed to convert it into sis which I sent to my mobile phone.
First, I installed the sis on the external memory and it failed to work. I read online that it should be on the same drive as python runtime. So I installed it on phone memory but it just flashes and then closes.
I made another sis with a database and it worked so I suspect it could be because it cant find the background image and sound files in the folder. How can I know the cause of this? Also, how can I include the background image and sound files with the sis so that they are automatically installed when installing the sis file?
You have to specify the exact location of the media files inside the script.
And I think that some SIS packers allow to add files inside SIS.

Speeding up deploy operation in Visual Studio

I'm building an application for windows mobile devices, which deals with a database composed of approximately 1500 files. However, the size of each file is under 50kB, and the overall size is under 15MB.
When Visual Studio deploys the app to a mobile device, it takes from 25 to 30 minutes. I was wondering whether there is a way to speed up the process.
I guess the high amount of files is what is slowing it down, but since I turned on the "Copy only if newer" option for every file, I don't really see how I could change anything else. Furthermore, the longest stage seems to be "Deploy started..."
Any idea of how I could improve the overall performance?
The main problem is that filesystem driver on all WM devices. Basically the filesystem driver does not handle creating lots of directory entries in a single directory. The 'create' directory entry time increases with every file you create in a single directory, when you get up to the thousands of files the create time can take hours.
I've seen it lots of times when backing up devices with mail messages folder where someone has 7000+ email files (created over a long period of time). Backup is fast, but restore can take days because of this issue.
To avoid this, try to limit the number of files in one single folder by splitting across multiple folders, that combined with the manually copying the files like Vadmyst suggests should speed you up.
At start you can disable option for checking the latest version of the .NET CF framework ( Project options -> Devices -> Deploy the lates version... (checkbox).
If that will not help you can create binaries upload script, that will just copy files (xcopy...) to the destination device.

Resources