The only way to test the onStart() method with AppArg for me was to put a file in the ~/.cn1/ folder and the pass just the file name with "Send AppArg". So it simulates the method call itself. I can test the app at least. As I can understand the real iOS url opening can only be tested on a real device. So can I say that Storage.getInstance().createInputStream(url); on the simulator is a special API? I mean, it accepts internal "private" files, not urls from the system, for example when the user wants to open a file with the registered extension as per the info.plist entry, as it is in my case.
Il giorno giovedì 22 ottobre 2020 alle 04:35:37 UTC+2 Shai Almog ha scritto: > That's not a path for the simulator. Simulator URLs look like > file://home/filepath but they point to ~/.cn1/... > iOS files have random file path names I'm not sure what you're asking for? > > On Wednesday, October 21, 2020 at 10:18:07 PM UTC+3 P5music wrote: > >> What do you mean? I am using the cross-platform instructions. >> Maybe you mean adding the prefix file:/// ? >> I am interested in iOS url format, how to simulate that? >> The AppArg is correctly passed and retrieved in the onStart() method. >> I passed a path to a file (on Linux) like /home/pc/folder/myFile.ext >> but >> try(InputStream is = Storage.getInstance().createInputStream(url);) >> fails. >> >> Il giorno mercoledì 21 ottobre 2020 alle 03:28:18 UTC+2 Shai Almog ha >> scritto: >> >>> See the "Send App Argument" entry in the simulator menu. This should >>> act similarly to Android though. >>> >>> On Wednesday, October 21, 2020 at 12:04:29 AM UTC+3 P5music wrote: >>> >>>> My CodenamOne app can respond to the user selecting a file with a >>>> certain extension (that is registered in the info.plist file on the iOS >>>> side). >>>> I would like to test this functionality in the Simulator in a way as >>>> similar to how the iOS native build would work as possible. >>>> I am using a Linux machine. I think at least I could pass the file url >>>> as a command line parameter. >>>> How to achieve that? >>>> >>>> -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/5db921ec-724f-4a65-b982-6b455c00135dn%40googlegroups.com.
