Are you able to reproduce the issue? Yes
What software version(s) and hardware have you reproduced the issue on?
iOS 14, iOS 15
iPhone XR, iPhone 12 simulator (On All iOS devices)
Description
When trying to import a P12 certificate using the API SecPKCS12Import, it is failing with error errSecDecode = -26275 since 09/23 in production. We tried to figure out the change in our code base (client as well as server side) that might have triggered this failure but there is no change on either side. The same P12 certificate is successfully validated using the below mentioned openssl command on the terminal.
openssl pkcs12 -in -passin pass:
Please can you tell us how we may debug the API SecPKCS12Import and understand what might be incorrect in P12 certificate format due to which it has started failing.
Note: The same code (with zero change) was working fine in production until 09/23.
If required, we may share the p12 certificate and associate password with you to debug it further.
Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Post
Replies
Boosts
Views
Activity
Hello, sometimes if I use NSMetadataQuery to obervse my file changes on macOS, it crash for this reason, its odd and i have no clue for this problem becuse in my code I never get results using index, anyone help? thanks!
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[_NSMetadataQueryResultArray objectAtIndex:]: index (251625) out of bounds (251625)'
terminating with uncaught exception of type NSException
abort() called
Dear:
Use core data to store super long strings. After storage, the strings are incomplete.
Xcode tips:
CoreData: debug: PostSaveMaintenance: fileSize 30409752 greater than prune threshold
CoreData: annotation: PostSaveMaintenance: wal_checkpoint(TRUNCATE)
help me?
I've created 2 auto-renewing products, one with a cheaper price and one with a more expensive price. I show the cheaper product for legacy users (users who have been on the app for a long time).
The problem here is that when a user goes to the App Store and manages their subscription there, they are able to see the cheaper option and subscribe to it.
Is there a way I can hide the cheaper product from being purchased through the App Store and only allow them to be purchased from my app?
I saw the Cleared For Sale option on the product but when I tried unchecking the box, it made it sound like after users' subscription ends, they will no longer continue auto-subscribing to the cheaper option. Or am I misunderstanding Cleared For Sale?
It seems PKCanvasView overrides the property UIScrollViewDelegate which inherits from the UIScrollView to PKCanvasViewDelegate. And does not provide access to UIScrollViewDelegate.
In order to implement zooming, so I added a PKCanvasView into my own UIScrollView. And implemented delegate method viewForZooming in which return PKCanvasView.
But all drawing in PKCanvasView was blurred when zooming or scale. How to re-render drawing after zoom to make it has reasonable stroke width and clear ?
Some related code:
let canvasView = PKCanvasView()
let scrollView = UIScrollView()
override func viewDidLoad() {
super.viewDidLoad()
self.view.addSubview(scrollView)
scrollView.addSubview(canvasView)
scrollView.delegate = self
scrollView.minimumZoomScale = 0.5
scrollView.maximumZoomScale = 2.5
}
func viewForZooming(in scrollView: UIScrollView) -> UIView? {
return canvasView
}
Some solutions I had tried:
1: Reset PKCanvasView contentScaleFactor
func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat) {
if let canvas = view {
let contentScale = scale * UIScreen.main.scale
canvas.contentScaleFactor = contentScale
}
}
Not worked!
2: Re-render PKStroke:
func reRender(_ scale: CGFloat) {
let newStrokeWidth = strokeWidth * scale
var newDrawingStrokes: [PKStroke] = []
for stroke in canvasView.drawing.strokes {
canvasView.tool = PKInkingTool(.pen, color: .red, width: newStrokeWidth)
var newPoints = [PKStrokePoint]()
stroke.path.forEach { (point) in
let newPoint = PKStrokePoint(location: point.location,
timeOffset: point.timeOffset,
size: CGSize(width: newStrokeWidth, height: newStrokeWidth),
opacity: CGFloat(1), force: point.force,
azimuth: point.azimuth, altitude: point.altitude)
newPoints.append(newPoint)
}
let newPath = PKStrokePath(controlPoints: newPoints, creationDate: Date())
let newStroke = PKStroke(ink: PKInk(.pen, color: UIColor.red), path: newPath)
newDrawingStrokes.append(newStroke)
}
let newDrawing = PKDrawing(strokes: newDrawingStrokes)
canvasView.drawing = newDrawing
}
Not worked! Still blurred, just changed strokeWidth by multiply scale.
3: I try to reset PKDrawing or PKStroke transform by using scrollView scale. Then PKDrawing position disordered and it was still blurred.
Please help me.
I am having problems printing a pdf file in an iPad app when running iPadOS15 or later.
With previous iPadOS versions, the choosePaper delegate method is called just once, and is called with a paperList of several valid entries (30 in the case of my printer).
Since iPadOS 15, the call is made numerous times.
Firstly, it is called a few time with 0 entries in the paperList.
Then it is called with the correct number (30 in my case) of entries.
But then it is called several more times, with just 1 (and incorrect) entry in the paperList.
Has anyone else come across this?
I am building an iOS app that uses the phone's GPS EXIF data from both camera and image library.
My problem is that I while I am able to get GPS data from images in the phone's library, I have not been able to get any GPS data when using the camera within my app.
I first built this app about a year ago and at that time I was able to get GPS data from both the library AND the camera from within the app. I believe that at that point I was still building for iOS 12.. I believe that the new security features that came with iOS 13 or 14 now dissalow my app's access to the GPS data when using the camera.
This issue is new as of iOS 13 or 14. The code I had was working fine with earlier versions of iOS
I am having no issues with getting GPS from the EXIF on the device library images.
Images taken with the NATIVE IOS CAMERA APP are saved to the library with full GPS data.
- However I am not able to get GPS data directly from camera image EXIF when using the camera from within my app.
When saving an image taking by the camera from within my app the image is saved to the library with NO GPS data.
I am able, at any time, to ask the device for current GPS coordinates.
As far as I can tell, device settings are all correct. Location services are available at all times.
My feeling is that iOS is stripping the GPS data from the EXIF image before handing the image data to my app.
I have searched Apple developer forums, Apple documention, Stack Exchange, on and on for over several weeks now and I seem no closer to knowing if the camera API even returns this data or not and if it will be necessary for me to talk to the location services and add the GPS data myself (which is what I am working on now as I have about given up on getting it from the camera).
Info.plist keys I am currently setting:
LSRequiresIPhoneOS
NSCameraUsageDescription
NSLocationAlwaysUsageDescription
NSLocationWhenInUseUsageDescription
NSMicrophoneUsageDescription
NSPhotoLibraryUsageDescription
NSPhotoLibraryAddUsageDescription
Am I missing some required plist key? I have been searching and searching for the name of a key that I might be missing but have found absolutely nothing other than people trying to hack some post-camera device location merging.
This has been very frustrating..
Any insite is appreciated
Is it currently possible to get GPS data directly from the camera's EXIF output any more?
Do I need to ask the device for the current GPS values and insert the GPS data into the image EXIF on my own?
Is there any example code of getting GPS data from the camera?
Is there any example code of inserting GPS data into the Exif before saving the file to the device?
Sample swift code which processes the camera image.
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
let pickedImage = info[UIImagePickerController.InfoKey.originalImage] as? UIImage
// let pickedImage = info[UIImagePickerController.InfoKey.editedImage] as? UIImage
// using editedImage vs originalImage has no effect on the availabilty of the GPS data
userImage.image = pickedImage
picker.dismiss(animated: true, completion: nil)
}
Since 8.2p1 OpenSSH support for FIDO/U2F hardware authenticators, add "ed25519-sk" and "ecdsa-sk" key type. macOS Monterey 12.2 bundled OpenSSH (version: 8.6p1) doesn't include built-in security keys support, but it seems that user can specify middle ware library to use FIDO authenticator-hosted keys (see man ssh-add, man ssh_config and man ssh-agent).
I try to implement FIDO security key provider library, but bundled ssh-agent seems don't try to load the implemented library and simply return with "unknown or unsupported key type":
$ ssh-agent -d -P "/*"
SSH_AUTH_SOCK=SOME_VALUE; export SSH_AUTH_SOCK;
echo Agent pid SOME_VALUE;
debug1: new_socket: type = SOCKET
debug2: fd 3 setting O_NONBLOCK
debug1: new_socket: type = CONNECTION
debug3: fd 4 is O_NONBLOCK
debug1: process_message: socket 1 (fd=4) type 25
debug2: process_add_identity: entering
debug1: parse_key_constraint_extension: constraint ext sk-provider@openssh.com
debug1: process_add_identity: add sk-ssh-ed25519@openssh.com SHA256:KEY_HASH "KEY_COMMENT" (life: 0) (confirm: 0) (provider: /path/to/libsk-libfido2.so)
debug1: new_socket: type = CONNECTION
debug3: fd 4 is O_NONBLOCK
debug1: process_message: socket 1 (fd=4) type 11
debug2: process_request_identities: entering
debug1: process_message: socket 1 (fd=4) type 13
debug1: process_sign_request2: entering
Confirm user presence for key ED25519-SK SHA256:KEY_HASH
process_sign_request2: sshkey_sign: unknown or unsupported key type
User presence confirmed
Manually install OpenSSH from third-party (such as MacPorts/Homebrew, or simply build it from source code) works, but third-party OpenSSH can't read passwords stored in Keychain.
Is bundled OpenSSH disable hardware key support at build time? Advice most appreciated. Thank you!
What does APS stand for in APS Environment Entitlement?
How can I access Apple Pay sandbox transaction history?
XCode version 13.2.1
I enabled os_log messages using the following code:
let myLog = OSLog(subsystem: "testing", category: "exploring")
override func viewDidLoad() {
os_log("LOGGING TEST BLAH BLAH", log: myLog)
print("Starting ViewDidLoad")
super.viewDidLoad()
os_log("LOGGING TEST BLAH BLAH", log: myLog)'
...
However, I do not see anything on the XCode console - just the print ("Starting ViewDidLoad").
Is there a setting in XCode to echo messages from the logger that needs to be turned on?
I understand that Logger is the preferred method now instead of os_log, but both should echo the log messages on XCode debug console from what I can tell..
Thanks!
Hello!
I make use of the new iOS 15.4 SKAdNetwork.updatePostbackConversionValue feature:
SKAdNetwork.updatePostbackConversionValue(0) { error in
if let error = error {
print(error.localizedDescription)
}
}
I am not sure why, but I always see this error message in the console:
SKAdNetwork: Error while updating conversion value: Error Domain=SKANErrorDomain Code=10 "(null)"
The operation couldn’t be completed. (SKANErrorDomain error 10.)
Any idea what’s going on there? What does Error Code 10 mean? Couldn't find anything in the documentation about that so far.
I have the NSAdvertisingAttributionReportEndpoint key with domain (https://api2.branch.io/v1/skadnetwork/advertiser_app) in my .plist.
I am trying to write a safari web extension that redirects users to Y URL if they type X URL without ever loading the X URL.
The piece of code that I have attached below works smoothly on chrome, but not on safari.
background.js
function onBeforeNavigate(event) {
const redirectURL = "https://google.com/"
chrome.tabs.update(event.tabId, { url: redirectURL })
}
chrome.webNavigation.onBeforeNavigate.addListener(onBeforeNavigate,{
url: [
{urlMatches: "https://girlcodeit.com/*"},
{urlMatches: "http://girlcodeit.com/*"}
]
})
manifest.json
"manifest_version": 2,
"name": "",
"description": "",
"version": "1.0",
"background": {
"scripts": [
"background.js"
]
},
"permissions": [
"webNavigation",
"tabs"
]
}
I have tried writing browser.tabs.update and just tabs.update in place of chrome.tabs.update in safari version, no change.
I want to achieve the redirection anyhow through a safari web extension, please suggest changes in this one or share any other approaches.
webRequestBlocking is not supported by Safari, so that doesn't work either.
I have given location permission for the app i'm developing. Now i need to reset location permission and want to see the permission pop-up.
I have tried tccutil reset and /var/db/locationd/clients.plist is not accessible. Both are failing even with sudo.
Please suggest any methods.
Hi everyone,
We are integrating Apple Pay on the Web, and we're trying to get the automatic renewal of the domain verification working according to the documentation: https://developer.apple.com/documentation/apple_pay_on_the_web/maintaining_your_environment
Initially the domain verification is successful, but then the automatic renewal does not work. We keep getting the emails with the subject "Your domain will expire soon.", but they only say "We were unable to automatically to reverify your domain." without any further details.
We confirmed that the site's SSL certificate has already been renewed by the time Apple attempted the renewal of verification, the certs are renewed 30 days before their expiry (using Let's Encrypt). So according to the docs, at least the renewal attempts 15, and then 7 days before the expiry should be successful.
One example domain is this one: https://www.kayak.com/.well-known/apple-developer-merchantid-domain-association.txt, but we have the same issue for all our other domains as well.
Does anyone have suggestions how to troubleshoot this further?
(I tried creating a support ticket, but they basically replied that they're non-technical, and just linked me to the documentation.
I've seen others complaining about this too, but couldn't find a conclusive solution, so I thought I'd signal boost and create a fresh topic to see if there are any more recent findings about this problem.)
Thanks!
Regards,
Mark
[Q] What is the thread safety status of the IOBluetooth framework?
Is it possible call any class from the IOBluetooth framework from a secondary thread?
I haven't found so far information about this in the documentation and the only pieces of info you can find through a google search say the framework is not thread safe but these are old pieces of info.
With "Automatically Manage Signing" enabled in Signing & Capabilities I got a message when uploading to the App Store complaining that my provisioning profile was missing Family Control capabilities.
I do have the capability enabled in XCode, and I can deploy directly to devices to see that the app works correctly (that is, it has the capability).
Further, I can see the same capability checked in the App Id under my developer profile.
Further, if I generate a profile manually it claims to include Family Controls in the info screen.
But still it won't let me upload the app.
I've tried:
deleting all automatically generated profiles and regenerating them.
adding and removing the capability in Xcode and in the App Id
generating a manual provisioning profile and downloading it (this one complains about the missing capability when I download it).
Any ideas?
Using the new date formatting API available in iOS 15, I would like to respect the 12 vs 24 hour setting on a user-by-user basis.
With DateFormatter it can be done as follows, for example, to force a 24 hour time irrespective of the user locale.
let formatter = DateFormatter()
formatter.dateFormat = "HH:mm" // or hh:mm for 12 h
However, I cannot figure out how to force the new date formatting API in iOS 15 to do the same thing, i.e. force displaying 12 vs 24 h.
I'm using a format style like this:
var formatStyle = dateTime
formatStyle.calendar = calendar
if let timeZone = timeZone {
formatStyle.timeZone = timeZone
}
return formatStyle
And applying it like this, for example, for a given Date instance:
date.formatted(formatStyle.hour(.defaultDigits(amPM: .abbreviated)))
However, this seems to always give a formatted string relevant to the locale, for example, it's always 12h for the US and always 24h for the UK. This is not the behaviour I really need though, and I'd like to allow each individual user to control what they see irrespective of the locale setting.
(Note that there is an in-app setting that allows the user to toggle between the 12 and 24 hour preference, which is the value I'd like to use to set the preference.)
In another question on this forum (https://developer.apple.com/forums/thread/124775) eskimo stated that launching a system extension from an daemon is not the right approach and that the OSSystemExtensionRequest.activationRequest API should be called from an App.
My question is, does this same restriction apply to a LaunchAgent started App?
If so, to ensure activation as soon as possible is the only option to use a SMLoginItemSetEnabled helper to start the App on login?
According to the WWDC19 video (Introducing Parameters for Shortcuts), the parameters are supposed to be resolved in the order you have placed them in the Intents Definition file in Xcode (see timestamp 13:02 through 13:16).
In my objective C implementation, this is not happening. I deleted the derivedData and clean the build file, but that did not help. Here is a screenshot of my intents definition parameters:
In my implementation, it seems to first process the parameters that do not have "Dynamic Options" check. Then it circles back and works on the ones that have "Dynamic Options". So in my case, it starts with partName, quantity, dimensions, thickness, width, and length. Then it works on partsListName.
Furthermore, while the "Disambiguation Prompt" is spoken/written, the "Disambiguation Introduction" is NOT spoken/written.
Is this a bug that is causing the parameters to be resolved in the wrong order, or do I need to do something differently to force it to resolve parameters in the order that I need it to go in? And are the "Disambiguation Introduction" supposed to work?