Jump to content

Rollo62

Members
  • Content Count

    1945
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by Rollo62

  1. Rollo62

    Running the IDE in a VM on Mac Book Pro?

    I only rationalize this by being able to do Apple iOS / Mac Development, to get back from their also higher rated AppStore. There is no other reason, Macos is really behind Windows IMHO in so many ways (sorry only my opinion as a long trained Windows user). Mostly I miss the openess and the informativeness of the Windows system, not much is hiding behind artificial walls.
  2. Rollo62

    Google Play Store - request extension for Delphi apps

    Probably your app did something wrong. I've got 7 extensions recently, and 1 rejection. But the rejection was because the app was not ready, and the according server was not running. I just wanted to start the process before 01.08.19, and hope that when I resend another version, complete with working server access and all license, disclaimer settings etc. I will get a go. The Google judgement is not only because of 64Bith though.
  3. Rollo62

    Running the IDE in a VM on Mac Book Pro?

    1. thats clearly too much, you shuld look at a different store. Maybe the big price comes from 4TB SSD disk ? 2. buy the last before model, not the latest 3. keyboard is crap, but usable (see many noted in the web) 4. traxckpad is great, although I liked the more small version in older MacBooks (also many notes in the web) 5. Reliablity and quality is high, performance is high 6. Their safety habits suck, they overdue "safety" handling in every place (membership, dev. certificates, shut down devices aft. 3x wrong entry, API), leaving no room for any custom deviation or settings, you have to follow the "Apple way", or you're out 7. I run my last MAcBook Pro still everyday, after 6 years, same speed, same quality. Apple is no normal business, but a religion. https://www.worldreligionnews.com/religion-news/is-apple-a-religion But their high status brokes down a lot recently, when they did big failures in MacBook Pro design, hitting their loyal customers in the face. Also a lot to read about in the web. But nevertheless, MacBook Pro is definitively among the 3 top notebooks, I would guess. Don't worry. Use large and fast SSD disk (I use 2TB, but its terrible expensive) Use large and fast memory (your 32GB should be on the safe side), I use 32GB too, and I'm able to run several VM machines at same time
  4. Rollo62

    Running the IDE in a VM on Mac Book Pro?

    I use VmWare successfully for many years now. Only in one older version I faced some issues, otherwise runs w/o any flaws, support is OK (although not "NOW", I'm used to wait some hours). One main reasin is also that VmWare supports all platforms (Win, Mac, Linux, Cloud), and the VM images are interchangeable. I didn't wanted to fumble around with 2-3 VM parties, but only with one instead. The small differences between the 3 major players in performance or features are acceptable noise IMHO.
  5. Rollo62

    Running the IDE in a VM on Mac Book Pro?

    This is maybe interesting
  6. Dear all, I have a strange behaviour when using Bluetooth LE. In my apps I use the same, well tested BT library in many apps, which works fine so far. Now I have one app that crashes in foreground, with exception "Project TestApp raised an exception class 6." The stack trace shows similar __CRASHING_DUE_TO_PRIVACY_VIOLATION__ message, but the rest is not very helpful. There is no reference to any of my units nor at least anything that could be explaining why this happens. I've tried a lot to re-order and try add/remove several features, but I couldn't receivce any clue from this, the error stays there and is reproduceable. What I've found out so far is that is might be related to the iOS background mode permissions I want to be able to receive data from a before (in foreground) connected device, which would require bluetooth-central usually, but to keep the connection active during background bluetooth-peripheral seems to be necessary too, although I don't use it that way. At least this configuration keeps my data running in background as well, as intended. I use it the following way: app in forground discover IoT devices connect IoT device receive data from the IoT device (every second) so far this works fine app still in foreground the IoT device disconnects the app closes the connection at that point suddenly the crash appears So far when I use the SAME bluetooth library, doing the same things, no crash happens. It seems to be related to the background modes, only when they are defined, then it crashes (also in other apps, not using background mode). There are some infos in the web about __CRASHING_DUE_TO_PRIVACY_VIOLATION__, which seems to have to do with accessing private parts, like photo or other gobd relevant data (at least I could imaging that these requirements could cuase such crash). But I don't really use any of such in my app, nor that I even touch anything during disconnection of an IoT device. What I can see before the crash is an exception in the IDE while debugging: "Project TestApp raised an exception class 6." I have no more ideas howto debug this issue, since this seems to happen deep inside iOS. So far I tried to remove all other relevant aspcets around, but none of them seems to change anything. Enclosed you find a crash report from iOS, the callstack looks similar and never gives any reference to anything I would see relevant. I hope you have some hints or solutions, howto fix this. Edit: Ja, writing a thread is a good way to rethink and find possible reasons This could be the reason of coarse, I will try how thisa flag could be added, since I think its not in the usual version info. Edit2: Yes, this was the reason. After adding these 4 lines in the info.plist.TemplateiOS.xml template file it keeps working. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <%VersionInfoPListKeys%> <%ExtraInfoPListKeys%> <key>NSBluetoothPeripheralUsageDescription</key> <string>The app needs bluetooth access to be able to process data from an IoT device in the background</string> <key>NSBluetoothAlwaysUsageDescription</key> <string>The app needs bluetooth access to be able to process data from an IoT device in the background</string> </dict> </plist> Oh, how I hate these permission crashs, without any notice. Those changes in the template file might get lost when the IDE has to re-create this file, so this is another point of failure, but I'm well aware of this. Would be great if Embarcadero could offer a way to add such additions in the version Now I've got a permission request message like "Bluetooth want to share data with devices around ...", which I have to enable. What is strange, that this doesn't appear at app start, but only when a device disconnects. Another strange thing that I have to re-start an IoT twice now, before it gets detected again, but maybe this is due to my test settings here. I hope somebody has a good explanation and solution to these questions also. Maybe there is a workaround for that, but at the moment I'm happy that the crashes are gone. For the rest I have to do further testing now. I don't understand how Embarcadero get Beacons working in the background, which should basically use the same settings as I do here. Never had checked with beacons, maybe one day in the future, but they are also using only the BLE framework ,as fas as I know. Either all beacons might see same crashes, or Embarcadero made a trick to make them work silently. Maybe sombody has experience with beacons, bluetooth and background modes ? CrashReport.txt
  7. I would like to get back to the original (and related) issues: Its still not 100% clear what the reason is, but as a workaround I found that the follwoing method helps. Simply wait 1-2 sec. after the disconnection of a device and cleaning up the BluetoothLE stack, before restarting the next DiscoverDevices cycle. Seems that iOS needs some time to cleanup internally, and too early restarts might confuse the system. There are different delay times from phone to phone (iPhone 6S differs from iPhone X and needs more time), which makes sense (different CPU, etc.). When discovering is started too early, then I don't see the new device in OnEndDiscoverDevices, in my case I also see this never again no matter how often DeviceDiscover is restarted, and so I will never be able to re-connect again. Only a power down/up cycle the IoT device helped in that case (and I tried may different items from different vendoes, so its not a case of the IoT device). Anyhow, not sure about the real internals, but I'm afraid adding some more time (I had 300ms before) raising to 2000ms will do the job for me at the moment.
  8. Rollo62

    Give TViewport3D a test flight.

    @Gustav Schubert Thanks, good to know. I have seen changes some time ago but I havent really checked the details up to now. Anyway, seeing Apple getting more relaxed is a good thing for developers
  9. Rollo62

    Give TViewport3D a test flight.

    Works well on iPhoneX. Looks interesting, but I haven't checked all details (too much math in the morning is not good for your mood). Be aware that you might have only 100 test devices open for this. How did you set that in the TestFlight , to allow free, unregistered phones ? I always wanted to check that out, but I don't really need this, since I work mostly with some known phones and testers. Is the Apple-limit of 100 testers and 100 phones gone now ?
  10. Usually with such things (also with RadStudio) I prefer to keep "most" default settings, and hope that they will perform best. Why else should they be "default" then ? Only for some well known issues I will of coarse setup differently. Tweaking the last bit out of such systems is a task that needs a lot of test and research, which I am not paid for Another reason: The first thing a service operator during a support call will ask you the following: Have you set up the default settings ? I not, then go home and restart fresh (I do same with my projects ).
  11. 👍 - don't use snapshots at all (they were intended as short time snapshot anyway), I use complete duplicated images instead (about < 1 min on modern SSD) - Keep Windows lean and clean (tidy up temporarily files and system update files regularily) - Clean the VM image regularily ... <to be continued>
  12. Thanks for the proposal. Yes, revert may reset the libraries, but can I really always trust what it does ? So to use the "clean project" approach is probably only a few clicks more, and from there I can be very sure that it will work the way intended. This is only a small part of the whole project configuration, what about the rest ? I don't really like all these "magic" functions in the IDE project management when it turns out that they might have flaws in the end. For example the inheritance of project options (All --> Debug --> Release) never worked out for me to be stable, so I better check and fumble befor every major option setup, to be sure that not suddenly something bad happend there. Maybe there are better solutions to check and compare, e.g. to use export/import options sets, project configurations or the .dproj files directly, and make all global adjustment in the option sets XML or in the .dproj files directly before re-loading and building. I could think of external tools, like the Settings Migration Tool, Project Magician, or others for help keeping the project clean, is there probably any tool or a combination of several tools, that can help in a nice way ? A kind of .dproj DIFF viewer and editor which is able to sort out related settings might be great utility as well.
  13. Rollo62

    Screenshots for new app

    A lot of those ratios are scales of a kind of base ratio. I get screenshots from the devices to native resolution e.g. 1242x2208 somehow, and then re-scale the other variants from this base usually. Its getting more difficult since iPhone X, but you can still prepare a lot of variants from one screenshot. For example with a resize tool like IrfanView, which allows to keep resizing images with fixed aspect ratio, you can see that resizing came close tho the magic number (like 2209), and when you then remove the fixed aspect checkbox to be able to enter the desired number directily in the edit field (like 2208). Please check enclosed Excel file, where I found that e.g. the magic numbers 1242 and 2048 play a special role. I can re-scale the original base pictures to most of the needed aspect ratios (which may differ a few bits) w/o much distortion. So I must confess I'm not an designer, and I cannot see any issues with the bare eye (I'm sure that some designer will find some flaws), so I don't care much about this "invisible" distortion of the image.. But when I upload such artwork this is rarely rejected by Apple, so maybe also there somebody took a fast look at it, no special AI algorithm. For production I prepared some batch files for the processing, but I always wanted to put this whole image generation into a small tool, also for Android. iOS_Dimensions2.xls
  14. @Dave Nottage Yes, it seems to work permanently in background only when I set both modes, but I do only use it as bluetooth-central. Otherwise it could be killed within 10 minutes. The iOS documentation tells me that background app can be killed anyway, no matter how many modes are set, if the phone needs resources (so that doen't make me feel much secure in this area), although my app is not safety critical. What I assume is that defining the bluetooth-peripherial seems to trigger the strange behaviour, which I haven't seen before. Theoretical there should be nothing wrong defining a background mode that I don't use, but this rejects maybe some more customers from the app. Anyhow, I have to do still more tests, but next week I'm on holiday, so won't be able too in short time. I would be happy to see more developers with BLE running in foreground or background in general, so far I have seen ' only little feedback in these topics (to be fair I see also little feedback in Xamarin and other products forums). There could be a solution to completely rework and rewrite the BT stack, but it still makes most sense to me to use the existing BT system, also because it shall work well on all platforms.
  15. Rollo62

    Screenshots for new app

    I use screenshots from physical devices, and some form-factors I scale to what is needed. Although this is not the way that is recommended, I got no rejections so far. Important is that the aspect ratio stays the same, doesn'T get blurry and looks like on a real device. Only for tablets this doesn't work out (to skale a phone to tablet), so you must look for the right base screenshots for phones and tablets. Maybe this helps to find the right aspect ratios.
  16. https://community.idera.com/developer-tools/b/blog/posts/additional-information-for-the-android-32-bit-extension This proposal is still processing for me, at least Google didn't directly said NO. Currently the cases were pushed from 1st operator to technical team, waiting for their answer. I hope that I will hear some positive results, to move on with my work.
  17. Sorry, I missed to put this in <irony> tags. Of coarse this is a nogo for Beacon apps, same as for BeaconFence. Isn't there a big field of applications (if not the largest field) for beacons using the background mode ? These changes were for Beacons, but not directly for normal Bluetooth LE apps. You mean keeping background mode like this I wouldn't need the location update, and the BLE accessories is the " bluetooth-peripheral" flag, right ? So do you mean here to use location updates to keep BLE alive in background ? Keeping alive already does the " bluetooth-peripheral" flag for me, but with some side-effects. Or with an ability to clear internal BT buffers after disconnected devices. A better solution would be to use " bluetooth-central" only, in background mode, hopefully w/o any side effects. But this I didn'T get to work w/o the " bluetooth-peripheral" flag.
  18. Rollo62

    New project with embedded browser

    That would be great. This is something I assume that is done internally by TMS WebCore, but from my understanding what I asked them, this is a internal WebBrowser, not opened for the normal use, but seems only for internal processing. So that answer took me away from testing and purchasing this product,, but a reliable bridge between Delphi and browser with all modern JS features is a big thing IMHO, and could even take over some parts of the growing node.js ecosystem a little bit.
  19. Rollo62

    New project with embedded browser

    @Dave Nottage Thanks for sharing, did you also get it working with the mobile frameworks ?
  20. @Dave Nottage Well, is that line of yours an advertisement for BeaconFence ? I were lucky to use Bluetooth in foreground up to now, but it should be possible with the background modes. Why else did Embarcadero added them ? Is there any way to get background modes working as expected? I could already do background receive/transmit data, start Tts, place a local notification, etc. when the app was in foreground and the phone is just switched off (to black screen). But when the app is set to background before switching off (black screen), this might not work all the time. At at least I would say foreground works very stable in my library (which took a long way), the only problem now is the missing ability to reconnect at once, only 2nd power up of the IoT devices does the job. There seems to be something strangely blocked in the BT system, I have to investigate in the FMX code. Generally BT worked for me after long tests and finetuning, and one of the biggest issues from day one was the disconnection of IoT devices. While connection went more or less nicely, the disconnection may end in all kinds of strange behaviours, which I think has to do with the mixing of internal BT threads and Delphi threads, to avoid UI blocking. What helped me there was to completely destroy (free) the TBluetoothLEDevice variable, to get disconnection stable. Especially disconneting is still a very fragile process, and I'm happy it works halfway stable so far.
  21. Hi all, as described here, I found a solution to the crash problem when using bluetooth background modes. Unfortunately this puts new issues on the table. Short recap: I use these background modes ( of coaarse all under latest 10.3.2 and current XCode/iOS versions). Actually I would need only bluetooth-central, since I want to receive data from a connected device. Once the connection is lost, I don't need to re-connect. Which works, but only for a short time (2- 10 min), then iOS seems to kill this app, even if peramently (1x per sec.) data is received. So I searched for solutions and found some in the web to add bluetooth-peripheral, so this mode will allow permanent app connection and streaming data, and even discovering devices and re-connect (untested). To get this running, I need to add these permission keys But the purpose of this bluetooth-peripheral background mode is, that the Phone will act as a peripheral, which I don't really need here. The drawback of this is, that I receive a new privacy permission request message, strangely when I disconnect a previous connected device, not earlier. (2.) Issue: unintended permission request call This message seemed to be related to the BluetoothLE.ClearServices; call, which I was calling to cleanup. This call seems to be used only when using as peripheral, not cleaning the services in central mode. Anyway, removing this call disabled the permission request. So far ,so good, 2 issues fixed. (3) issue: after disconnection, the device cannot be re-discovered again in the first attempt When I disconnect an IoT device (shut off), andwait until app has completely disconnected, and switch it on again. Strangely the device is not found any longer. It can be discovered again, when I does this power cycle twice (shut off the IoT device and power up again), then its discovered as usual. Of coarse I search for missing variables in my code, but I found the reasonf for this behaviour is the following: 1. time power up the IoT device 1. time connection: OnDiscoverLEDevice is called and the ADevice.DeviceName contains the name of the IoT device, as it should All OK, the IoT device is connected 1. time power off the IoT device, until fully disconnected in the app 2. time power up the IoT device 2. time connection: OnDiscoverLEDevice is called and the ADevice.DeviceName IS EMPTY STRING "", this causes the problem here 2. time power off the IoT device 3. time power up the IoT device 3. time connection: OnDiscoverLEDevice is called and the ADevice.DeviceName contains the name of the IoT device, al OK again, as in 1. start So the device is only able to re-connect when its two times powered up. I already tried to reset the BluetoothDeviceLE, the BluetoothAdapter, the BluetoothManager somehow, but without success. Also waiting a long time (30 min) before power up doesn't reset. When I connect another IoT device instead, it works, so it looks as if only the last device cannot simply be reconnected. Question: I'm still searching howto solve issue (3), to at re-connect every power up, maybe you have some clues howto get this running ? Some other open questions: How can I get rid of the bluetooth-peripheral mode at all ? - To be able to use bluetooth-central only, but with ability to receive data from a connected device in background mode. - To be able to use bluetooth-central only, but with the ability to discover and connect devices in background mode.
  22. I've tried the follwing to reset the internal devices data FBluetoothLE1.CurrentManager.AllDiscoveredDevices.Clear; FBluetoothLE1.CurrentManager.LastDiscoveredDevices.Clear; FBluetoothLE1.CurrentManager.ForceRefreshCachedDevices := True; None of this works to solve issue (3). It looks as if this is something deep inside the iOS framework, which probably could be reset there somehow with some magic method. I'm further testing and searching solutions, but I hope for some help from the community.
  23. So far I have better perfomance on iOS, no matter 10.3.1 or 10.3.2, compared to Android, which is still behind. But I couldn't really notice any big difference between the 10.3.1 and 10.3.2, also when using approximately same datarate as your, with storing into Sqlite, showing Chart, showing each data point on the screen. Ok, usually the datarates are lower, about 1 / sec., but I can also process the fastest channels and IoT devices with 0.25 sec. w/o stucking. The data comes in via Bluetooth LE, into a threaded ringbuffer, then getting processed chunk by chunk in a dedicated analyser, abnd the result is put into a special TMessage and sended to any subscriber in my app (which can up to 4-5 subscribers at a time (Sqlite table storage, Preview display, Chart view, debug logging, text to speech, etc.). I must confess that I have already made larger structural changes between 10.3.1 and .2, because of improving Android system mainly, so from these improvements iOS also gains a lot. But my early tests in a 1:1 same configuration for both IDE verisons showed no big, noticeable differences.
  24. Not sure if this is related, I asked a similar question before. In my case its not only about the IDE upgrade, but also about howto port projects best from one to the other version. I found especially re-creating new projects and resetting them manually with every setting, the best and most reliable way for me to get projects updated. Since new versions might have new features and settings especially in FMX (like info.plist, entitlements, version info, etc.), the IDE does not always make the right choice when opening old projects into new IDE.
×