Post

Replies

Boosts

Views

Activity

CBATTErrorDomain Code=14 "Peer removed pairing information"
Hi,I have been working with CoreBluetooth for a while now and I've never run into this error before. This error occurred when I tried connecting to my desired peripheral. I've pasted the error message below:Domain=CBATTErrorDomain Code=14 "Peer removed pairing information" UserInfo={NSLocalizedDescription=Peer removed pairing information}I've tried to connect with the peripheral using a third-party app on the Android platform, and it works fine. However, third-party application on iOS isn't able to connect to this peripheral. It timeout when connecting on the iOS platform with the third-party app.I'm not sure what the source of this error is, or how to go about solving this error?Thanks!
9
0
8.9k
May ’20
CoreData+CloudKit Model Migration Failing
So I've been developing happily with CoreData+CloudKit for a while now, and really haven't run into any issues until this. I've migrated my model a couple of times, and it worked fine, but this was the first time I added a new entity to the model. If I run on a device (any device, iPhone, iPad, Mac via Catalyst), I get a migration error. Here's the entirety of my persistentContainer setup: public var persistentContainer: NSPersistentContainer = { let modelPath = Bundle(for: CoreDataStack.self).url(forResource: "Progress", withExtension: "momd")! let model = NSManagedObjectModel(contentsOf: modelPath)! let container = NSPersistentCloudKitContainer(name: "Progress", managedObjectModel: model) container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { print(storeDescription) fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }()And here's the error I'm getting:Callstacks=true}}}CoreData: annotation: : Attempting recovery from error encountered during addPersistentStore: Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={sourceURL=[…].sqlite, reason=Cannot migrate store in-place: constraint violation during attempted migration, destinationURL=[…].sqlite, NSUnderlyingError=0x600000cebae0 {Error Domain=NSCocoaErrorDomain Code=134111 "(null)" UserInfo={_NSCoreDataOptimisticLockingFailureConflictsKey=( ), NSUnderlyingException=Constraint unique violation, reason=constraint violation during attempted migration, NSExceptionOmitCallstacks=true}}}Important note: I am not using contraints at all in this model. I have created a new Entity, given it a single attribute, and a single one-to-many relationship with an existing entity. That's all.Also, here's an excerpt from the logs when I have -com.apple.CoreData.MigrationDebug enabled, pointing to an issue with the CloudKit metadata tables update step:CoreData: annotation: Completed persistent history metadata tables update CoreData: annotation: Beginning CloudKit metadata tables update CoreData: annotation: Failed lightweight migration on connection CoreData: annotation: Rolling back formal transactionAnyone seen this, have any idea what could be failing, or how to make cloudkit/coredata happy with a migration like this?
10
3
4.6k
Jun ’20
Impact on existing iOS App by updating to the enhanced HTTP/2 based API from server side
I have an existing iOS application available on AppStore which has push notification implemetented. Currently we are using the legacy binary protocol in Server side while sending request to the Apple Push Notification service (APNs) which will no longer support post of November 2020.We are making changes to update this with enhanced HTTP/2 based API in server side to communicate with APNS, will this impact my existing iOS application? Do I need to make any changes / code changes from client (iOS App) side to make it compatible with my existing application?
1
0
1.2k
Jun ’20
Universal Links to multiple apps
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?
3
0
9.4k
Jun ’20
Updating System files
I guess this is appropriate here since Big Sur is still in development Yesterday I created a new APFS partition with macOS Big Sur. I usually edit some files in /System/Library files to tweak my home setup to my liking, including some display settings. However the steps I usually take to be able to edit these files no longer work. These steps were: Boot the Mac in recovery mode and go to the terminal, Here I disable SIP using csrutil disable, Reboot back in to Recovery Mode, open the terminal again Remount the disk with write permissions using mount -uw / Make the edits However step 4 no longer seems to work on Big Sur as I am getting an error: mount_apfs: volume could not be mounted: Permission denied mount: / failed with 66 Is there another way to mount the file system with write permissions?
3
0
3.7k
Jun ’20
WidgetKit TimelineProvider calling timeline() continuously
A newly created Widget extension, with the default code created by Xcode will continuously call the timeline() function while the widget is being debugged. Code provided below: import WidgetKit import SwiftUI struct Provider: TimelineProvider { &#9;&#9;public typealias Entry = SimpleEntry &#9;&#9;public func snapshot(with context: Context, completion: @escaping (SimpleEntry) -> ()) { &#9;&#9;&#9;&#9;NSLog("getting snapshot") &#9;&#9;&#9;&#9;let entry = SimpleEntry(date: Date()) &#9;&#9;&#9;&#9;completion(entry) &#9;&#9;} &#9;&#9;public func timeline(with context: Context, completion: @escaping (Timeline&lt;Entry&gt;) -> ()) { &#9;&#9;&#9;&#9;NSLog("getting timeline") &#9;&#9;&#9;&#9;var entries: [SimpleEntry] = [] &#9;&#9;&#9;&#9;let currentDate = Date() &#9;&#9;&#9;&#9;for hourOffset in 0 ..< 5 { &#9;&#9;&#9;&#9;&#9;&#9;let entryDate = Calendar.current.date(byAdding: .hour, value: hourOffset, to: currentDate)! &#9;&#9;&#9;&#9;&#9;&#9;let entry = SimpleEntry(date: entryDate) &#9;&#9;&#9;&#9;&#9;&#9;entries.append(entry) &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;NSLog("\(entries)") &#9;&#9;&#9;&#9;let timeline = Timeline(entries: entries, policy: .atEnd) &#9;&#9;&#9;&#9;completion(timeline) &#9;&#9;} } struct SimpleEntry: TimelineEntry { &#9;&#9;public let date: Date } struct PlaceholderView : View { &#9;&#9;var body: some View { &#9;&#9;&#9;&#9;Text("Placeholder View") &#9;&#9;} } struct SampleWidgetEntryView : View { &#9;&#9;var entry: Provider.Entry &#9;&#9;var body: some View { &#9;&#9;&#9;&#9;VStack { &#9;&#9;&#9;&#9;&#9;&#9;Text(entry.date, style: .time) &#9;&#9;&#9;&#9;} &#9;&#9;} } @main struct SampleWidget: Widget { &#9;&#9;private let kind: String = "SampleWidget" &#9;&#9;public var body: some WidgetConfiguration { &#9;&#9;&#9;&#9;StaticConfiguration(kind: kind, provider: Provider(), placeholder: PlaceholderView()) { entry in &#9;&#9;&#9;&#9;&#9;&#9;SampleWidgetEntryView(entry: entry) &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;.configurationDisplayName("My Widget") &#9;&#9;&#9;&#9;.description("This is an example widget.") &#9;&#9;} }
5
0
2.2k
Jun ’20
Family Sharing IAP Transaction IDs
Are the original_transaction_id fields in family sharing in-app purchase receipts populated with the ID of the original transaction (from the original purchaser), or does each family member get a new independent one? We're interested in supporting Family Sharing for our non-consumable in-app purchases, but since we also allow purchases to be activated on the web / other platforms, we're concerned that Family Sharing might enable somebody to create multiple accounts from a single purchase and use them independently on many more devices.
2
0
1k
Jun ’20
launchApplicationAtURL - Launched Application "Verifying" since Catalina
We have a test tool our engineers use to launch various versions of our application during development and verification. Each daily build of our application is stored on a server. As well, each push of a change generates a new build of our application that is stored on a server. These are added to a database and the developer application accesses the server via REST to find the desired version to run, retrieves a server path and launches the application. This tool is valuable in finding pushes that introduced regressions. The developer application (Runner) is using the launchApplicationAtURL:options:configuration:error: (deprecated I know) to launch the app. Prior to Catalina, this was working great. However, as of Catalina, this process is taking a VERY long time due to the app needing to be "verified". the app seems to need to be copied to the users machine and verified. It only occurs the first launch, but as most of the time the users are running new push or daily builds, it has made the app useless. With the new remote work environment it is even worse as VPN copy can take forever. I have switched to using NSTask with a shell script to open the executable in the bundle. If I add the developer tool (Runner) to the Developer Tools in Privacy this seems to launch the application without the need for verification. However this just seems wrong. It also provides little feedback to know when the application is up and running, which makes my user experience poor. As well many of the systems we use this tool on for verification do not have Developer Tools installed. They are VMs. Is there a way for me to use the launchApplicationAtURL:options:configuration:error: (or the new openApplicationAtURL:configuration:completionHandler:) to launch these versions of the application without the need for the lengthy verification process? Adding our application to the Developer Tools did not seem to help.
2
0
646
Jun ’20
Simulate Device On Safari
Hey Developers! I love web design and am trying to test out some CSS, I am currently using a MacBook Pro 13" (2020 Version), I only use Safari and I want to know if I'm able to simulate other devices like a Windows 10 PC, an Android phone, an iPhone, or an iPad. I do own an iPhone and iPad but wanted to do it all on my Mac, I've tried searching for Safari extensions to do this but so far I haven't found one. If you could give me some suggestions or a link to what I should use it would be appreciated. Thanks, Mateo
3
0
18k
Jun ’20
Debugging WidgetKit install error "Failed to get descriptors for extensionBundleID"
I'm trying to create an iOS 14 WidgetKit widget. It's compiling, but when I try to run it, on either simulator or device, I get the error below: Any suggestions on how to debug this? Details SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.myapp.dev.WidgetKitExtension' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.myapp.dev.WidgetKitExtension' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}., NSUnderlyingError=0x7fc0b0d12540 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}}} Domain: DTXMessage Code: 1- System Information macOS Version 10.15.5 (Build 19F101) Xcode 12.0 (17177)
34
0
20k
Jun ’20
Any chance to survive after “Apple Developer Program membership will be terminated” message?
Hello. I get the message from Apple: Hello, Thank you for your patience while we thoroughly evaluated the activity associated with your Apple Developer Program membership. We have completed our investigation and have determined that your Apple Developer Program membership, or another membership associated with your developer account, has been used for dishonest or fraudulent activity. This is prohibited by Section 3.2(f) of the Apple Developer Program License Agreement: "You will not, directly or indirectly, commit any act intended to interfere with the Apple Software or Services, the intent of this Agreement, or Apple’s business practices including, but not limited to, taking actions that may hinder the performance or intended use of the App Store, Custom App Distribution, or the Program." For this reason, your Apple Developer Program membership will be terminated. This appeal decision is final, and any subsequent appeals you file will be closed without review. The guiding principle of the App Store is to provide a safe and enjoyable experience for users and a great opportunity for all developers to be successful. We work hard to make the App Store a trustworthy ecosystem and expect our app developers to be honest with users and with us. Manipulative or misleading behavior degrades user trust in the App Store and is grounds for removal from the Apple Developer Program. We have found a pattern of manipulative or misleading behavior that has led to the termination of your Apple Developer Program membership. These behaviors can include, but are not limited to, inaccurate metadata describing your app or service, misleading app content, engaging in inauthentic ratings and reviews manipulation, providing misleading customer support responses, providing misleading responses in Resolution Center, engaging in misleading purchasing or bait and switch schemes, or other dishonest or fraudulent activity within or outside of the app. This notification is not intended to be a complete statement of the facts regarding this matter, and nothing in this letter should be construed as a waiver of any rights or remedies Apple may have, all of which are hereby reserved. Once your Apple Developer Program membership is formally terminated in our systems, we will deny your reapplication to the Apple Developer Program for one year. After one year, you may petition the App Review Board to reinstate your account by completing this form: Re-instate a Terminated Developer Program Membership. In your petition, provide the specific reasons why the App Review Board should consider re-instating your Apple Developer Program membership. Best regards, App Review Board Is this decision is final? Can I argue it somehow and send them letter and urge them not to delete my account? Can I do something or not? I deleted all the apps, which I think can cause the termination. Does it help me or not?
1
1
1.8k
Jun ’20
How to get the serial number of non-MFi USB?
I am developing an iOS program which is using UIDocumentPickerViewController to get the content of USB. It's OK. But I also need to get the serial number of USB. For MFi USB, I can use EAAccessoryManager to get the serial number, but it cannot apply to non-MFi USB. Is there any method to get the serial number of non-MFi USB? Jacks Hung
1
0
349
Jun ’20