Post

Replies

Boosts

Views

Activity

Reply to OSLogStore can't access an app's extensions?
@MobileTen I mean an application extension, such as an action extension, notification content extension, notification service extension etc. I've rephrased the question to hopefully make it more understandable: Is there a way of using Logger/OSLogStore such that logging performed within an extension can later be retrieved by the application? For example suppose an app is logging like this: let logger = Logger(subsystem: "com.mysubsystem.log", category: "app") logger.debug("app stuff") and suppose an extension (such as a notification service extension for example) logs like this: let logger = Logger(subsystem: "com.mysubsystem.log", category: "ext") logger.debug("ext stuff") Then next time the app runs, if it attempts to retrieves the log with code such as: let logStore = try! OSLogStore(scope: .currentProcessIdentifier) let oneHourAgo = logStore.position(date: Date().addingTimeInterval(-3600)) let allEntries = try! logStore.getEntries(at: oneHourAgo) for entry in allEntries { look at the content of the entry Then within the for loop, there's lots and lots of stuff retrieved, including "app stuff", but there is no "ext stuff". Is there anyway the application can retrospectively retrieve logging performed within the extension?
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’22
Reply to usernotifications.filtering entitlement prevents a contact with an image from being added/updated
Did some more investigation, and the issue is down to the fact that UIScreen.main.bounds is (0.0,0.0,0.0,0.0) if the com.apple.developer.usernotifications.filtering entitlement is present. Without the entitlement is has values for width and height. This was causing an image with 0 dimensions attemting to be added to the contact. So the question is why are the bounds empty if the entitlement is present?
Topic: Code Signing SubTopic: Entitlements Tags:
Sep ’22
Reply to Scheduling local notification after app is terminated from App Switcher by the user manually
You need to get your terminology correct in your requirement as its not clear what you are asking. What does schedule local notification mean exactly? A local notification and a push notification are two different things, your talking about local notification and push notification and so its confusing what you want. A local notification is posted by the app, they can be scheduled by the app to be displayed in the future. A push notification is not a local notification, when the app receives a silent push notification it can display a local notification, but the app cannot receive a silent notification if its not running. There are different types of push notification, if you send a non silent notification then it will be displayed to the user (and will look like a local notification) even if the app is not running.
Sep ’22
Reply to Scheduling local notification after app is terminated from App Switcher by the user manually
Switch from using a silent push notification to a user push notification, then that will get displayed to the user even if the app is terminated. If the push payload's notification title/subtitle/body can be set by the server then it will just get displayed to the user directly. If the notification title/subtitle/body needs to be changed after the push has been received, then that can be done by using a notification service extension.
Sep ’22
Reply to Notification displayed via Notification Service Extension doesn't display correctly if the iPhone is passcode protected and locked
@Gualtier Malde  Thank you, what setting is it that affects this? I have Show Previews set to always and can't find any other setting that makes the content of the notification appear
Replies
Boosts
Views
Activity
Jan ’22
Reply to OSLogStore can't access an app's extensions?
@MobileTen I mean an application extension, such as an action extension, notification content extension, notification service extension etc. I've rephrased the question to hopefully make it more understandable: Is there a way of using Logger/OSLogStore such that logging performed within an extension can later be retrieved by the application? For example suppose an app is logging like this: let logger = Logger(subsystem: "com.mysubsystem.log", category: "app") logger.debug("app stuff") and suppose an extension (such as a notification service extension for example) logs like this: let logger = Logger(subsystem: "com.mysubsystem.log", category: "ext") logger.debug("ext stuff") Then next time the app runs, if it attempts to retrieves the log with code such as: let logStore = try! OSLogStore(scope: .currentProcessIdentifier) let oneHourAgo = logStore.position(date: Date().addingTimeInterval(-3600)) let allEntries = try! logStore.getEntries(at: oneHourAgo) for entry in allEntries { look at the content of the entry Then within the for loop, there's lots and lots of stuff retrieved, including "app stuff", but there is no "ext stuff". Is there anyway the application can retrospectively retrieve logging performed within the extension?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Unwanted Communication Extension template code doesn't work
Forgot to mention that replacing MainInterface in the storyboard with UnwantedCommunicationReportingExtension doesn't work either - when run it results in a similar Unknown class error in the console.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to How is one supposed to create a Background Assets extension? There's no extension type for this existing in Xcode beta 5
Still not there in Xcode beta 6
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to How long does it take to download iOS Simulator?
Download Xcode directly, rather than installing via the App Store. https://developer.apple.com/download/applications/
Replies
Boosts
Views
Activity
Aug ’22
Reply to Connect account to a phone + SIM connection
(Unless you are a Carrier organization) then you're app cannot programmatically obtain the phone number, nor query the sim like that
Replies
Boosts
Views
Activity
Sep ’22
Reply to I was hoping to get some advice. I was trying to upload my app the the AppStore Review. The app is an iOS 16 exclusive app and got this error. Anyone know what to make of it? Thanks!
iOS 16 isn't officially released yet, and Xcode 14 RN only just came out. Try uploading again in a day or a few
Replies
Boosts
Views
Activity
Sep ’22
Reply to usernotifications.filtering entitlement prevents a contact with an image from being added/updated
Did some more investigation, and the issue is down to the fact that UIScreen.main.bounds is (0.0,0.0,0.0,0.0) if the com.apple.developer.usernotifications.filtering entitlement is present. Without the entitlement is has values for width and height. This was causing an image with 0 dimensions attemting to be added to the contact. So the question is why are the bounds empty if the entitlement is present?
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Scheduling local notification after app is terminated from App Switcher by the user manually
"But in some devices". Not in some devices, in every device - if the app is terminated and you send it a silent push then the app won't receive it. But if the intention is to display a notification to the user, then why are you using a silent push sent to the app rather than a user push???
Replies
Boosts
Views
Activity
Sep ’22
Reply to Scheduling local notification after app is terminated from App Switcher by the user manually
You need to get your terminology correct in your requirement as its not clear what you are asking. What does schedule local notification mean exactly? A local notification and a push notification are two different things, your talking about local notification and push notification and so its confusing what you want. A local notification is posted by the app, they can be scheduled by the app to be displayed in the future. A push notification is not a local notification, when the app receives a silent push notification it can display a local notification, but the app cannot receive a silent notification if its not running. There are different types of push notification, if you send a non silent notification then it will be displayed to the user (and will look like a local notification) even if the app is not running.
Replies
Boosts
Views
Activity
Sep ’22
Reply to Scheduling local notification after app is terminated from App Switcher by the user manually
Switch from using a silent push notification to a user push notification, then that will get displayed to the user even if the app is terminated. If the push payload's notification title/subtitle/body can be set by the server then it will just get displayed to the user directly. If the notification title/subtitle/body needs to be changed after the push has been received, then that can be done by using a notification service extension.
Replies
Boosts
Views
Activity
Sep ’22
Reply to Xcode 14.1 beta: How do you run the backgroundassets-debug command?
Looks like I have to use xcrun, and update the Mac to Ventura. Going to try and update it now and see what happens
Replies
Boosts
Views
Activity
Sep ’22
Reply to Background Assets: how to add BAManifestURL | backgroundassets-debug tool doesn't do anything
Forgot to mention the WWDC22 session mentions a bunch of stuff to go into info.plist, but it doesn't mention BAManifestURL. In general the WWDC materials seem out of date and no use anymore. Is there some accurate up-to-date documentation?
Replies
Boosts
Views
Activity
Sep ’22
Reply to App crashes in review but works well in Simulator or real device.
Second what Ptit-Xav says. If you're installing via running the app in Xcode then (unless you are explicitly changing the scheme setting) you are installing a debug build, which is not the same as a release build, and will often lead to different behaviors.
Replies
Boosts
Views
Activity
Sep ’22
Reply to How to render a 'Glass Jar' image in IOS app using SwiftUI?
You might get some answers if you post your question on stack overflow
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22