How can I add files to the iOS simulator in a CI environment? - xcode

I would like to include a UI test in my project that exercises its interaction with UIDocumentPickerViewController. The test will need to run on a CI machine, which needs to be able to wipe the simulator before each build, and operate without a human driving the GUI (either on the machine or the simulator).
There are a number of answered questions around how to add files to the iOS simulator, but they seem to all require manual interaction with the simulator UI. What I've tried so far:
Using xcrun simctl openurl file:///path/to/my%20file.pdf, but that just presents a sheet in the files app that would need manual intervention to actually save to the simulator.
Using xcrun simctl addmedia, but the media need to be images or videos and they end up in PHPickerViewController and not UIDocumentPickerViewController.
Using the openurl command above before the test kicks off and then adding a button in my app to open the shareddocuments:// URL to present the Files app, and using the UI test runner to click the "On My Phone" and "Save" buttons. This looks promising but also promises to be flaky.
What I haven't tried yet:
Set up a sockpuppet iCloud account and log the simulator into that account on every test run in order to use iCloud Drive. This seems like yet another credential to manage that will randomly break when it needs to agree to some new terms and conditions.
Replace my test app with a document-based app and figure out how to save a file from the bundle to its file storage without manual interaction. I'd love a guide on how to do this but it feels like I could easily spend a week getting up to speed on document-based apps to get it working.
The code I'm testing is a framework, so the app under test is free to have features that would make no sense to an actual user and is also free to do non-app-store-safe things. But it seems like other developers might appreciate a more general solution if you have one.

Related

How to do a Flutter Firebase app for both Mobile and Desktop at the same time

I see many samples and videos on how to do firebase for mobile and they call this "multiplatform". However, I don't see much on the desktop. There is one video on firebase flutter Windows by using a web and it seems to work. However, I do not see any tutorials for both mobile and desktop. Firebase would be a great example on syncing between desktop and mobile. We have such an app in development right now. Desktop development is new, but I'm surprised how little there is.
There is a library called firebase_dart, but the documentation seems weak.
The package firedart with the video listed above works in both desktop (linux and android without much modification..
What needed to be modified?
I had difficulty with the button on the very top of the phone, so I
added a sized box.
I had difficulty with debugPrint or print so I
added a Text widget with the results (to string).
That also worked.
Although I would like to not use fluent_ui, it does work for both desktop and mobile. I'm not sure what to do with realtime db, but I think I can make the firedart work for user sync between mobile and desktop.
It would be better if I could get firebase_dart to work.
https://www.youtube.com/watch?v=Tw7L2NkhwPc

Clear app data and cache on FORCE_INSTALLED apps when kioskCustomLauncherEnabled is on

We have a few private apps we distribute to dedicated Android devices, when we move them between users I want to be able to clear the app data from the apps. A few months ago, this was working but recently when we go to clear app data (from Settings) it isn't allowed by the policy.
We don't want users to be able to uninstall the apps but we do want to be able to clear app data so it doesn't retain user data from the prior user.
Is there a way to just clear a single apps data?
Is there some policy setting which controls whether or not you can clear app data?
Our current workaround is to manually switch to a profile without the apps (the ones we want to clear) then switch them back to the pertinent profile which forces and uninstall then reinstall of the apps. However, this is more cumbersome than we would like.
I think this is working as intended. +1 on kioskCustomerLauncher however being an app running in kiosk mode isn't a "secret", it's just transparent to the policy for ease-of-use, in my opinion :)
TheoL
AndroidEnterprise

UI Automation for AppleTV system using XCode

Is UI automation available for the main menu of the Apple TV and not a specific application? I already setup the whole UI testing thing using XCode and tried using the remote control but it is only available for the application that was defined using XCUIApplication.
So is it possible to control the whole system rather than a specific application? I was thinking of something similar to pyatv but using XCode since I might be able to get more information concerning the current focused apps and so on.
There is an API XCUIApplication(bundleIdentifier: ) to interact with not-AUT apps. You need to substitute the right identifier for this Springboard-like interface. Maybe it is a Headboard, but I'm not sure.
Bundle identifiers of tvOS apps https://github.com/rzakhar/XCTApps/blob/master/Sources/XCTApps/tvOS.swift

Notifications not working on Windows 10 - Electron JS

I was learning Electron and made a basic electron app and packaged it for windows. The app was not showing notifications so I followed the instructions here
On Windows 10, a shortcut to your app with an Application User Model ID must be installed to the Start Menu. This can be overkill during development, so adding node_modules\electron\dist\electron.exe to your Start Menu also does the trick. Navigate to the file in Explorer, right-click and 'Pin to Start Menu'. You will then need to add the line app.setAppUserModelId(process.execPath) to your main process to see notifications.
I did as suggested here and the notifications started working. They were still working after packaging the app. So I wanted to check whether after a user uses an installer to install this app, the notifications would still work.
I don't have any experience with packaging software, and I used InstallForge to make an installer. Turns out, after installing the app using the installer, the app still works but notifications don't, even after pinning the exe to start.
I tried copying the build folder (direct build, not the installer one) to another location and trying the same thing and it still works. This also works if I copy the installation folder to another location. But it does not work from inside Program Files(x86)\myapp\appname\build\myapp.exe so I am assuming this must be something about permissions, but I do not understand exactly what is happening. I have't checked the app yet on Linux so I don't know if I would face similar problems there as well.
Any pointers would be great, Thank you.

App approved, but crashes

I have made a Windows Phone app (for WP7.1) that uses BackgroundAudio for streaming, nothing too complicated. It was approved and made available for download in the store. However it no longer works, i.e. the app worked in debug+release when run from VS2012, and I assume the .xap I uploaded worked since microsoft approved it (they rejected it once and I was able to reproduce and fix the bugs they reported).
When downloaded the app simply bails on load on WP8 (lumia 820) i.e. flips back to the tiles immediately.
On WP7 (lumia 800) but the playbutton ignores input, however it downloads and displays the playlist, so some kind of functionality+network connection works.
I have tried the basics: installing using the application-deployment tool (app working), running the "Store Test Kit" which reports some slowdowns in the UI animations, but nothing serious (I hope).
Any ideas how to reproduce ".xap approved and downloaded from store but not working" or getting debug info from the phone without VS? Or any other things i can try out?
Every time your app crashes it will be logged and reported on your Windows Phone Dev Center Account. Just go in there and export the details to excel. Get the stack trace and put it in here. Maybe we can help.
The very first thing i can tell you is the opening page has some exceptions and that too it doesn't go well with some phones. Seriously there are concerns when a wp7 app is ported on wp8 device and vice-verse. To the extent of my knowledge there might be some binding issues. make sure you got the binding class to be public. And just as #AMR mentioned go the dev center and export the stacktrace. Try resolving them. Moreover if an app get certifies, it doesn't mean it is completely error free. The tests are limited to very coomon errors only.

Resources