Posts

Post not yet marked as solved
2 Replies
3.6k Views
I have successfully implemented Universal Links so that a visitor to specific URLs on our site is redirected to one of our apps. It all works well. Alarmingly well, in that it all worked perfectly first time. (I blame the documentation). A question I can't find specifically addressed in the documentation is: what if we have two apps that can both handle a given link? This is in fact our situation. In most cases users will have one or other of the apps installed. The correct behaviour would then be to direct the user to the installed app. In some cases the user will have both apps installed. In that case the ideal behaviour would be to direct the user to what we have defined to be the "main" app. It looks to me as if it is possible to two apps in an apple-app-site-association file, but not having found this in the documentation, I wonder: has anyone on here actually tried this? Did it work as expected?
Posted Last updated
.
Post marked as solved
2 Replies
1.8k Views
I have my CarPlay app working rather well. The content items appear; when the user taps an item, it plays; and the Now Playing screen shows the item being played.BUT – the first time this is done after connecting to CarPlay, the Now Playing screen thinks that playback is paused. The big button in the middle is adrawn as a Play button, and although the duration of the item is shown, its position remains at zero. Meanwhile the sound is playing perfectly.If I then tap on the Play button, a Play MPRemoteCommand is sent to the app, which ignores it (because already playing), so the sound continues. But the Play button in the Now Playing screen now turns into a Pause button, and the progress bar now starts to move forward, one second per second, from the correct position (that is, if I wait 10 seconds before tapping Play, the bar will start at 10 seconds not at 0).From now on, everything is in step. Pausing and playing work as expected, both in function and in their effect on the Now Playing screen.Here is the complete Now Playing info which is set when playback begins [logged directly by NSLog]. It is set immediately after playback has begun. MPNowPlayingInfoPropertyElapsedPlaybackTime = 0; MPNowPlayingInfoPropertyPlaybackRate = 1; albumTitle = Instructions; albumTrackCount = 1; albumTrackNumber = 1; artwork = "<UnivAlbumArtwork: 0x600003856de0>"; playbackDuration = "44.93757936507937"; title = "Download Instructions";I am hoping that someone else has come across this and can tell me what I should be doing that I'm not! All this is being tested in the simulators on both Xcode 9 and Xcode 10, and this is the only anomaly.
Posted Last updated
.
Post not yet marked as solved
1 Replies
270 Views
Our app allows users to set anniversaries: think of a birthday as an example. This means that the user needs to be able to enter a day-month-year date or a day-month date. At present we have to synthesise a clone of UIDatePicker which allows "----" as an additional year after "2020". Does the new UIDatePicker have any ability to make the year optional?
Posted Last updated
.
Post not yet marked as solved
0 Replies
285 Views
A long-established app which has always worked with VoiceOver is not working on iOS 13.2.It is as if an invisible screen were layered on top of the app screen and intercepting all the VoiceOver touches, so that instead of the normal app response one gets odd sound effects of the "You shouldn't have tapped here" variety: burbles, twitters and thumps. On one occasion a random VO rectangle appeared, which spoke the word "Settings" when tapped, though the word "Settings" occurred nowhere in the app. On another occasion some desperate taps resulted in the iPad playing "Ticket to the Moon"…I have tested this on the iPad Pro 11".Has anyone else encountered this, or, better still, found a way round it?The bug has already been reported to Apple: the reference is FB7340738.
Posted Last updated
.
Post marked as solved
7 Replies
2.9k Views
On iOS:When one receives a file of type .pages by email, Mail displays a large Pages icon and tapping on it opens Pages. (A long-press brings up the more complicated Actions screen).When one receives a file of type .vcf by email, Mail displays a large Contacts icon and tapping on it opens Contacts. (A long-press brings up the more complicated Actions screen).I have my own custom file type, .ripf, and I want to have the same behaviour because that is what my users will expect. Accordingly, in my app's Info.plist I have a CFBundleDocumentTypes dictionary providing a one-element LSItemContentTypes array referring to the name 'com.universalis.ripcard', and a UTExportedTypeDeclarations dictionary associating the UTTypeIdentifier 'com.universalis.ripcard' with a public.filename-extension 'ripf' and a public.mime-type 'text/vnd.universalis.ripcard'. All the other entries in those two dictionaries are present and correct as far as I can tell. Both CFBundleDocumentTypes[0].CFBundleTypeIconFiles and UTExportedTypeDeclarations[0].UTTypeIconFiles contain a list of icon files for the file type.(That rather long paragraph is to avoid boring people by including the entire Info.plist!)Some things do work..ripf files received via AirDrop bring up a suitable "Open with..." message which mentions my app, and tapping the message opens the app..ripf files received as an email attachment display as an icon. But it is the app's icon and not the icon of the file type.BUTTapping on a received file's icon does not open the app, but only opens the generic Actions screen, offering Message, Mail, WhatsApp, Notes, and only then (after the user has scrolled sideways) "Copy to..." my app.Now, the whole apparatus of CFBundleDocumentTypes and UTExportedTypeDeclarations is obscure and under-documented, and indeed the main documenation for the latter has a big warning at the top saying that it is obsolete and not being updated. That doesn't matter so much. What I need to know is:(Less important): How do I get the right file icon?(More important): How do I get my app to open when the icon is tapped, as Pages and Contacts do? There must be a way – unless special cases for those two apps are wired into iOS itself.
Posted Last updated
.
Post not yet marked as solved
1 Replies
656 Views
The documentation for [NSData enumerateByteRangesUsingBlock:] makes no statement about the order in which the ranges in the NSData will be enumerated. For example, an implementation of this method would conform to the strict letter of its contract if it chose to enumerate the ranges backwards.Is it in fact guaranteed that the block will be called with the ranges presented consecutively, from first to last, providing each byte once and once only and providing earlier bytes before later ones?
Posted Last updated
.
Post marked as solved
2 Replies
416 Views
I am downloading a file at the user's request (hence, starting the download in the foreground). The download is quite large (1.2GB) and so the user may well close the app and get on with doing something else while the download is going on.My app doesn't need to do anything with the downloaded file once it has finished arriving, other than to move it into the right place. From the app's point of view, this can be done next time the user opens it. From the app's point of view, there is no point in the system's launching the app into the background specifically in order to do this. From iOS's point of view, it saves resources not to launch an app unnecessarily. Moreover, there is the disadvantage of having a hard-to-test code path involved in the "silent launch in order to move the file into place". I like testability!But before taking the decision to set sessionSendsLaunchEvents=NO in NSURLSessionConfiguration, I need to know what the likely consequences are. Will nsurlsessiond hold on to the downloaded file until the user opens my app again – perhaps the same time tomorrow – or is it likely to throw the file away, so that the whole download ends up needing to be done again?I can't find any documentation about this, which may be me, or may be the documentation. But any guidance will be appreciated. I know that this is meant to be an implementation detail, but in this case it does make a definite difference.
Posted Last updated
.