I am getting this error "The operation couldn’t be completed. (CSIndexErrorDomain error -1005.)" while running code for spotlight search on ipad.Does anyone know how to solve this error?
The CoreSpotlight is available on iOS 9 onwards.
Though your device maybe at iOS 9.x, it still may not work if it is a older device version.
From Apple docs.
Although app search is available for iOS 9 users, the search functionality of NSUserActivity and Core Spotlight is not supported on iPhone 4s, iPad 2, iPad (3rd generation), iPad mini, and iPod touch (5th generation)."
So if you are testing on any of the above devices or simulators for the same you will get the CSIndexErrorDomain error -1005.
From Corespotlight API documentation
CSIndexErrorCodeIndexingUnsupported = -1005, //Indexing isn't
supported on this device
Since the Search feature is not available on all the devices supporting iOS9 so check the following condition to know whether the device supports search
if ([CSSearchableIndex isIndexingAvailable])
and keep the methods of search under this condition.
Related
I created a completely new and empty FMX app, tried it using Delphi 10.3.3 and 10.4.0 (patch 3), and when installed on Android 7.1.2 devices (tried two different ones and the official simulator VM), after the splash screen this error message appears:
'java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.contains(java.lang.CharSequence)' on a null object reference'
The error message box flickers quickly (endless loop) and gets slower and slower and after a minute the complete device doesn't react anymore and I can only hard reset it.
I found this thread, so I'm not alone. They say it worked until Delphi 10.1.2. There are also many other similar search results.
Is there any solution? On other Android versions it works well.
Or what can I try to get more information about what causes it?
Do you know a good candidate for an app made with Firemonkey that I could download directly and try out on the device?
Now there is a fix available at quality.embarcadero.com!
Just one line has to be added to 'Androidapi.JNIBridge.pas'. I'm not sure if I should copy it here... Will update this answer when it is released.
This is what I get when I test my iPhone code on iPadPro 12.9 inch 2nd generation simulator. Isn't there a discrepancy ? Thanks, David.
I would highly recommend using this UIDeviceHardware instead of checking the interface idiom:
https://github.com/fahrulazmi/UIDeviceHardware/blob/master/UIDeviceHardware.m
NSString *platformString = [UIDeviceHardware platformString];
I've been using it for awhile now, and it works perfectly for me.
However, there is a problem when using it on simulator. When running on simulator, the platform is equal to x86_64 or i386 which will simply return iPad or iPhone. So ... I feel like you won't find a satisfying conclusion unless you tested this on a real device or at least got someone to test it for you on a real device.
In your case, you would check for one of these two platform strings:
"iPad Pro 12.9-inch (WiFi)" or "iPad Pro 12.9-inch (Cellular)"
https://github.com/fahrulazmi/UIDeviceHardware/blob/master/UIDeviceHardware.m#L83-L84
A good way to check for those is to just check for the prefix:
[platforString hasPrefix:"iPad Pro 12.9-inch"]
I have an iOS app using Sprite Kit that I would like to add a simple leaderboard. I have tried several tutorials, but all are for an older version of Xcode and iTunes connect. As of now I have successfully authenticated the user (ie. when I open the app it says welcome back, or asks to log in if I am not logged in).
Could someone please point me in the direction of a tutorial that encompasses a simple leaderboard (such as in Flappy Bird) that will explain the iTunesConnect side and coding within my app that is up to date with iOS 7 and Xcode 5? Thank you!
The apple documentation for leaderboards is quite good. It explains how to do the iTunes connection portion and another page has the Xcode implementation with code examples.
You can find the iTunes connect info here: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectGameCenter_Guide/Leaderboards/Leaderboards.html#//apple_ref/doc/uid/TP40013726-CH2-SW1
The code examples are here: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Achievements/Achievements.html#//apple_ref/doc/uid/TP40008304-CH7-SW3
Outside of that the app coda link that Iraklii mentioned is a great one.
I have to implement print functionality in my iPad app. I and my client have ios 5 device. I have heard that print functionality is no longer available in ios 5 devices. Is it really true? I wrote the code for print functionality, when I tested this on ios 4.3 it was working fine but when I upgraded my device to ios 5, the print controller never appears. Also when I open photos app, the print option is there. They say that now only photos can be printed from ios 5. Is there any way by which I can implement print functionality in my app. I have to implement this functionality to print PDFs and PPTs which user can read in this app and they are stored in resources folder. Please guide..
Regards
PC
I'm trying to play a YouTube video within an iPhone app using the technique in this URL
http://iphoneincubator.com/blog/audio-video/how-to-play-youtube-videos-within-an-application
The technique works fine and the video plays fine, except that I'm getting this warning.
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Internet Plug-Ins/YouTubePlugIn.webplugin/YouTubePlugIn" (file not found).
That does slow down the app for the first time I got the warning. Seems like a lot of people is getting the same warning, but none of the forums I read seems to have the solution to get rid of the warning.
Do I need to download something or do specific things?
I also tried adding the YouTube framework from "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/PrivateFrameworks/YouTube.framework"
Doesn't seem to solve the issue.
Please enlight.
Some clips might not play in mobile devices. Check if you clips does.
The "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/dyld' has changed; re-reading symbols" warnings can be ignored (the clips should play anyway if it is available on mobile devices).
Note. I don't know the correct reason why some clips don't play on mobile, it might be a transcoding issue (not being transcoded for mobile) or some publisher settings.
Would be interesting to know.
You need to run your app on the device. The Simulator doesn't have the YouTube app.