Posts

Post not yet marked as solved
0 Replies
240 Views
When I try to display a UIActivityViewController, I get funky logging in the xcode console. This is my code: @IBAction func shareAction(_ sender: Any) { // text to share let text = "Some very interesting text!" let url = Constants.URL.appStore.absoluteString guard let logo = UIImage(named: "App Logo")? .circle() .resize(333, 333) else { return } // set up activity view controller let itemsToShare: [Any] = [ logo, text, url ] let activityViewController = UIActivityViewController(activityItems: itemsToShare, applicationActivities: nil) activityViewController.popoverPresentationController?.sourceView = self.view // exclude some activity types from the list if #available(iOS 15.4, *) { activityViewController.excludedActivityTypes = [ .airDrop, .sharePlay ] } else { activityViewController.excludedActivityTypes = [ .airDrop ] } // present the Share Sheet self.present(activityViewController, animated: true, completion: nil) } The logging emerges in the console as soon as the code calls: self.present(activityViewController, animated: true, completion: nil) When I set a break point on that line, no logging occurs. If I add a completion block to that call with a break point on the first line, the logging occurs before it hits that break point. so all logging seems to be generated while displaying the UIActivityViewController. This is my logging Cannot issue sandbox extension for URL:https://apps.apple.com/app/id Couldn't read values in CFPrefsPlistSource<0x303b38900> (Domain: com.apple.country.carrier_1, User: kCFPreferencesCurrentUser, ByHost: No, Container: /var/mobile/Library/CountryBundles/, Contents Need Refresh: No): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)}> (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction.} Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port <0x10640ca30> Gesture: System gesture gate timed out. Line 2, 5, 7, 9 are red the other lines are yellah I have been looking on the internet and found nothing. I have been looking in this forum, and found one possible match (without a solution): https://forums.developer.apple.com/forums/thread/746721 When looking through the logging: 'entitlement com.apple.runningboard.primitiveattribute' Should I add something to my entitlements to be allowed to show a UIActivityViewController? Is that the solution? If so: How do I add that entitlement? (or any of the other entitlements mentioned there) And since when is that required?? The app (and this feature) seem to work like a charm ... so I could ignore. Only I find it difficult to ignore RED logging by xcode. If it is red, it is bound to be kinda serious, right? Or is there a whole other reason / cause why I suddenly get this? Now running: xcode Version 15.3 (15E204a) iOS 17.4.1
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
0 Replies
405 Views
I have viewed the WWDC video about MapKit in SwiftUI AWESOME! I want to work with that! I noticed that you can view the map at an angle, so that you can for instance look under a bridge. I saw in the video that it is possible to add a MapPolygon. But when the MapView apparently has a 3rd dimension ... is it possible to add a MapPolygon with a certain thickness? Or perhaps let a MapPolygon only occupy space from say 10 to 20 meters high? Thanks!! Wouter
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
1 Replies
721 Views
Hi, I am writing an app for iPhone and iPad that requires to write text files to a USB thumb Drive and an SD Card. I notice Apple sells a Lightning to USB Camera adapter. If I stick a USB Thumb drive in that Lightning to USB Camera adapter, will I ba able to write a file on that file system? It would be fine if I have to do that via the 'Share sheet', but it would be even better if I can select the file system myself and write to that. When I view the product online, I see the following on the product page: "After you connect the Lightning to USB Camera Adapter, your iPad or iPhone automatically opens the Photos app, which lets you choose which photos and videos to import, then organizes them into albums." So ... will I (as a developer) be able to access the USB file system, or is it reserved for the Photos app?? Will I have to use the 'External Accessory framework' or is that only for writing software that connects to proprietary hardware connected to the port? Same question for the Apple USB-C to USB adapter (for iPads) Same question for the Apple Lightning to SD Card Camera adapter Same question for the Apple USB-C to SD Card reader Thanks very much!! Kind regards, Wouter Wessels
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
Hi, In our current CI/CD environment, I can easily upload an IPA to Firebase so that we can distribute test versions of the app. Now we are trying to move the CI/CD to Apple Xcode Cloud and I am trying to figure out how to upload my app to the Firebase Distribution system. Please advise ;-) Kind regards, Wouter
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
1 Replies
505 Views
Hi, We seem to have an issue in our app that only seems to occur at wakeup of the iPad. So: Wakeup iPad Launch my App Push 'on/off button' of iPad to put it to sleep Wait 'a bit' (like 15 minutes) for iPadOS to truly sleep Wake up the iPad (press on/off button again and enter pin code) (app is still/again in front) Now the behaviour of the app is incorrect How do I debug this with xcode? The connection between xcode and the app is also terminated when the iPad sleeps. Thanks for your advice! Kind regards, Wouter Wessels
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
2 Replies
674 Views
Hi, For the first time today, I got a warning about non-public api. This is the warning: The app references non-public selectors in Payload/AppName.app/AppName: removeParts: However: Since the previous version, I changed only the way I call reloadData on my UITableviews, to fix a crash in my app When searching for the string 'removeParts' I get zero hits in my app and the framework that I use. How can I find the offending private api reference in my code? Is there a log or something that might tell me which call to change? Kind regards, Wouter Wessels
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
1 Replies
2.6k Views
Hi, I see some posts about this, from 6 years ago, but I would like to know how this message would impact my App. So when uploading an Archive to Apple for distributing to the App Store, I see that the 'Cloud Managed Apple Distribution' certificate is set to expire in 10 days. Also (probably connected) the iOS Team Provisioning Profile will also expire at the same date. Should I do something myself? Or will the renewing be done automagically by xcode? If I upload now (without renewing), will my app still be available in the App Store after the certificate has expired? If I upload now (without renewing) will the apps still work on all devices that have downloaded this version or previous versions of the app? Kind regards, Wouter Wessels
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
I would like to implement remote logging in my Swift app for iOS. Log lines will need to be sent to a server so that I can analyse problems when the app is actually being used 'in the field'. This is the easy part. For user privacy, this might be limited to TestFlight versions of the app. The app is sometimes used in an area of poor or non-existent connectivity. So sendng the logs to our servers may fail. Therefore, I would like to see that the logs are buffered when connecting to our log server failed. The easiest way to buffer is in Memory (Array of 'LogEntry'), but when a bug we are trying to track involves a crash ... all memory is lost, so I would like the logs to be buffered on disk. Is there a way to do that? Perhaps using OSLog, or perhaps some other way? I understand that on iOS, the app does not (yet) have access to its logs. That would solve my problem, cos then I can read back the logs that I made and send them to the server when needed. I have thought about creating my own Log file, and (when there is a server connection) I read lines from the start of the file, and send that to the server. However, I have found no way to 'read and delete the first line of a file' without reading the whole file, and writing 'everything except the first line'. Seems like CoreData would not be such a bad idea, albeit a bit heavy for such a small task. Any suggestions? Any existing components that I can include in my project? (using cocoapods, SPM?) Thanks! Wouter
Posted
by Woutster.
Last updated
.
Post not yet marked as solved
14 Replies
9.4k Views
I would like to implement a free trial for my Auto renewable subscription.However, As a user, I hate to have to commit to anything before I see what it is ... even when the first period is free. I know myself, I tend to forget to cancel the subscription ...So, I thought that I might be able to store the 'first launch date' in the KeyChain and only start checking the subscriptions after the initial free period that I define (and show the user).I know that I might lose a bit of money (for instance if a user downloads the app on a second device and uses a second free trial period), but I think some users will appreciate the fact that they do not have to commit to a subscription before they see what the app can do for them.Is it allowed to do it this way?When I look in the documentation about free trials, I see text like:"You can set up introductory offers for your apps that contain auto-renewable subscriptions in App Store Connect."But I cannot find: "You can only implement introductory offers in App Store Connect"Any thoughts?Kind regards,Wouter Wessels
Posted
by Woutster.
Last updated
.