I am getting error in loading content blocker by creating group: When i provide list of small number of rules in content blocker the error didn't came, but when i add more rules in my blocker list it gives error, It means there is limit of data to provide on App Group? Any one followed some other approach please share
ContentBlockerErrorDomain Code=3
i think that you are facing this issue while using NSUserdefault
after setting object in UserDefault you need to synchronize it . that thing you missed:
once apply this :
NSUserDefaults.standardUserDefaults()["key"] = "value"
NSUserDefaults.standardUserDefaults().synchronize()
Related
Setup:
I am using PHPickerViewController to allow the user to select photos. I've implemented the PHPickerViewControllerDelegate protocol method picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]). I am getting the itemProvider from the results array.
Problem:
I need to access the data for the selected image. There is a method on NSItemProvider called loadDataRepresentation(), which takes a type identifier string and should return the image data in its completion block.
When I call this method sometimes it returns data, sometimes it doesn't. I've tried this for the multiple registered type identifiers for each provider, and I'm seeing the same thing. Sometimes it will return JPEG data, but not HEIF, other times only HEIF, and sometimes it won't return any data at all. This is consistent in that the same photo exhibits the same result each time I try to load its data.
When there is no data I see the following error:
Upload preparation for claim D8C281B7-CCCE-4299-95BF-9355FCF340E4 completed with error: Error Domain=NSCocoaErrorDomain Code=260 "The file “7AB1AB3F-7643-45C1-9DD9-5F5642965C3A.jpeg” couldn’t be opened because there is no such file."
Is there something I need to do to the photo before attempting to load its data? Maybe I'm missing a step here? This happens for photos I took directly with my iPhone XR. I am not using iCloud Photos, all photos are on the device.
"public.image" this identifier seems to be able to get all type of photos.
example : -
loadDataRepresentation(forTypeIdentifier: "public.image")
If you're getting this error in simulator it seems like it may be an OS bug, because doing a Device > Erase All Content and Settings.. to reset the simulator fixed this for me.
In our error logging, we are using Crashlytics.
Now there are 2 ways that we log errors:
The automatic logging (when the app has crashed) done when the app starts up again.
Immediate logging using the Swift SDK
In case 1. it seems that there is no way of logging additional information.
However, in case 2. we use the following call :
Crashlytics.sharedInstance().recordError(error, withAdditionalUserInfo:additionalInfo)
With additionalInfo being a simple set of KVP's ["ListingNumber": "abcAsEasyAs123"]
However, this does not show up on the portal as well as in the .txt download that they offer.
We then amended our logging method to try and attach the additional info to the error itself.
if let error = error {
let newError = NSError(domain: (error as NSError).domain, code: (error as NSError).code, userInfo: ["ListingNumber": "abcAsEasyAs123"])
Crashlytics.sharedInstance().recordError(newError)
}
However, even in this case, the additional info is nowhere to be found.
According to the documentation, this should be possible, but nothing I am doing is showing.
EDIT: This is not a duplicate of that question as I have read it and referenced the same material that the accepted answer used.
I'm trying to select an element of picker, the picker has Accessibility = picker_station, why can I do ? is something wrong ? or I need to use other code.
let app = XCUIApplication()
app.pickers["picker_station"].pickerWheels.element.adjust(toPickerWheelValue: "Aberdeen")
xcode error is:
Testing Failure - Internal error: unable to find current value '1 of 152' in possible values
Thanks
You are using it correctly, but the adjust(toPickerWheelValue:) method is buggy, as discussed here: https://forums.developer.apple.com/thread/16104
I agree with Oletha this seems to remain an unfixed bug in the framework.
We could fix the issue at least temporarily by calling
pickerWheel.swipeDown()
before calling
pickerWheel.adjust(toPickerWheelValue: "Value")
Otherwise we received the same crash.
After you displayed picker wheel on screen, you can update the value by:
app.pickerWheels.element.adjustToPickerWheelValue("Updated row value")
I am trying to use "reloadContentBlockerWithIdentifier" function of SFContentBlockerManager as follows:
[SFContentBlockerManager reloadContentBlockerWithIdentifier:#"appid.extensionid"
completionHandler: ^ (NSError *error) {
NSLog("%#", error.localizedDescription)
}
However, it only returns error message that said as follows:
The operation couldn’t be completed. (ContentExtensionsDomain error 1.)
I set both APP IDs (appid and appid.appextensionid) in "Certificates, Identifiers & Profiles" in developer.apple.com. Also, I made two "target"s for each -- ios app and ios app extension. I also checked open source implementations in Github which are roughly the same as mine, and App Extension manual several times, but it seems hard to find the relevant page for this problem. The most critical problem is: I couldn't find any offcial documents describing this message.
I'd appreciate if you let me know what is the problem.
Looking at the safari services generated swift interface, I could find the following enum for error codes:
public enum SFContentBlockerErrorCode : Int {
case NoExtensionFound
case NoAttachmentFound
case LoadingInterrupted
}
So in your case it's probably the NoAttachmentFound error. Which can be caused by failure to initialise an item provider with given data from a json file.
I am sharing photo usingFBDI presentShareDialogWithPhotoParams /presentShareDialogWithPhotos method in FBDialogs. This method shares photo successfully on my wall but always returns an error, meaning that it posts photos with an NSError.
Error is like....
Error Domain=com.facebook.Facebook.platform Code=103 "The operation couldn’t be completed.
(com.facebook.Facebook.platform error 103.)"
UserInfo=0x16d874f0 {error_code=103, error_description=An unknown error occurred., app_id=593434950703264, error_reason=( { result = 1; } )}
Why this happen?
I believe this answer will get deleted like my previous one, but anywho...
The issue have been fixed!!!,
just update your Facebook app to v20,
released on December 8th.
See:
Code=103 "The operation couldn’t be completed ..." in Share Photo
note:
I want to add comment to the question but I don't have the privilege to do that,
so I add an answer instead.
Yesterday, I came across the same issue, the strange thing was that is even after this error comes, just check your Facebook (for which you've shared a content), and yes you'll feel awesome, the content is already uploaded (shared) on Facebook. I'm also looking forward for this issue, in my checks this problem will only occurring if you're using this method + (FBAppCall *)presentShareDialogWithPhotoParams:(FBPhotoParams *)params clientState:(NSDictionary *)clientState handler:(FBDialogAppCallCompletionHandler)handler; from FBDialogs.h means, using of Facebook application dialog for sharing.