Posts

Post not yet marked as solved
0 Replies
350 Views
If I turn on (my company supplied VPN access) and then attempt to build with Xcode then that has the consequence that all the dev/distribution certificates in the keychain turn red and say "certificate is not trusted". Turning off VPN doesn't reset them back and of course re-attempting to build will fail. However if I reboot my MacBook, then the keychain is back in a good state again. However as I work remotely I constantly have to flick VPN on and off throughout the day, and having to reboot endlessly is a pain. Is there something I can do to reset the Keychain's certs to a good state without having to reboot? (and without having to delete them all and re-add them all back to the keychain).
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
In this section of this web site https://developer.apple.com/account/#CodeLevelSupportCard its possible to view a historical list of submitted TSIs, but there's nothing in their content which is clickable. Looking around elsewhere, there doesn't appear to be anywhere or anyway to view the original question and the responses in submitted TSIs? Is that really the case, or is there a bug in the Apple web site and they are supposed to be viewable?
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
2 Replies
1.9k Views
I have a lot of phones and constantly switch between them, its very very annoying that when a phone is connected via cable, and then swapped out with another one, then Xcode will continue to install/run with the phone that's just been switched out, not the one that's just been connected by cable. This is because Connect via network it turned on and there's no way to turn it off. In previous versions of Xcode you could turn this on/off as you wished, not so with Xcode 15, it decides to turn it on for you and won't let you turn it off because its always disabled.
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
3 Replies
385 Views
I've gone through several tutorials, and the documentation, it seems there's no way to adjust the logging level dynamically, or even at build time for that matter. i.e. there is apparently nothing that exists such as: static let logger = Logger(subsystem: subsystem(), category: category()) logger.setMinimalLevel(.Warning) logger.trace("I won't get displayed because minimal level is debug") Am I mistaken and there is something like this?
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
0 Replies
193 Views
I'm getting loads of these appearing in my console, I can't find anything for it from googling. What does it mean?
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
1 Replies
514 Views
My goal is to try and get a unified logging system set up where logging from an iOS app and its extensions (primarily a notification service extension) get written into one central repository. So I was planning on setting up CocoaLumberjack in the app and the extension to use the same file path/name, adding the group capability to the app and the extensions and specifying the shared group directory as the file path. By default, for an app, CocoaLumberjack writes its files to: var/mobile/Containers/Data/Application/05464D4A-20F6-4E1F-9DBC-3109C053A1E8/Library/Caches/Logs/ On a Mac using an application such as iExplorer the above file and be located and viewed and copied etc. For an extension, it writes them to: /var/mobile/Containers/Data/PluginKitPlugin/5542F5EA-EB3A-4728-B33E-4E57C1B7B3B4/Library/Caches/Logs/ Now if I configure Cocoalumberjack to instead write the logger file to the shared group directory, then that will be at: /private/var/mobile/Containers/Shared/AppGroup/6CD5AF2C-54C9-46EF-B831-997B1DD6664F/ However its not possible using iExplorer to access this location. Using a Mac connected to the iPhone, is there an app or tool etc., that will enable me to locate the log file if it's created in the above AppGroup location?
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
0 Replies
514 Views
Our app has some Crashlytics & Localytics reporting to collect metrics for diagnostic and info gathering. One thing I'm noticing recently is that if a user has version m of the app installed and updates to version m+1, then for some users, the app has detected and reported that the push token obtained with version m+1 is different from that of version m (for the same handset). That's fine - if the app has detected the change to the token it can send the new one to the server so the server can update. But my question is - if the user didn't explicitly launch the app and thus present the app with the chance to send the new token to the server, then what will happen to the pushes sent by the server using the old token? Presumably they won't get delivered if the token has changed, but if the user has no need to launch the app then they're never going to receive any pushes from the server until they do launch the app. However there's not necessarily any reason why a user should repeatedly launch an app once it's been set up (depending upon what it does and how it delivers info to the user and how the user interacts with it, there's no reason why a user should have to launch the app after initial installation and launch). If so then this seems like a gap in the design of push notifications? If they can change on the same handset, or another scenario is the user backs up their device to iCloud and then restores to a different handset, then in that case the push tokens will have definitely changed, yet any apps using push don't get the chance to send the new token to the server until the user launches the app, meanwhile all pushes from the server will be dropped.
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
0 Replies
281 Views
The previous betas have all been ok, but beta 6 is for me totally and utterly unusable because it keeps hanging forever during the installation and attaching phases when trying to run an app (attached physically via cable, not bluetooth). The first time or two of making a code change, then running, its ok, but then its guaranteed to hang eventually, it gets stuck on the "Installing app to iPhone" phase. If I restart the phone and try again it might get past that, but then it just gets stuck on "Waiting to attach to app on iPhone" phase. I know its beta software and not expected to be perfect, but its unusable and previous beta versions are no longer available to rollback to. Has anybody encountered this before and knows of any tricks to get it to stop hanging and load/run the app? (Restarting Xcode, restarting the phone, re-building, does not fix it for me)
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
0 Replies
479 Views
I've been successfully using CXProvider.reportNewIncomingVoIPPushPayload() as follows: a (non VoIP) push is sent to the handset this is intercepted by a notification service extension the extension calls CXProvider.reportNewIncomingVoIPPushPayload() (the extension has the required com.apple.developer.usernotifications.filtering entitlement) this results in the app delegate's implementation of PKPushRegistryDelegate:didReceiveIncomingPushWithPayload getting called (the app is launched if terminated) This all works as expected, in particular when the app is terminated it still works. However its suddenly stopped working since my phone got updated to iOS 16.6 (I can't remember exactly what was on it previously, 16.5 or 16.4). Now with iOS 16.6 the behavior is that PKPushRegistryDelegate:didReceiveIncomingPushWithPayload() only gets called if the app is not terminated. If the app is terminated then calling CXProvider.reportNewIncomingVoIPPushPayload() results in the app getting launched and didFinishLaunchingWithOptions() getting called BUT didReceiveIncomingPushWithPayload() is not called when launching from a terminated state. As a consequence of didReceiveIncomingPushWithPayload() not getting called, the app isn't calling reportNewIncomingCallWithUUID() and so after a few runs the OS stops launching the app entirely saying: "Application will not be launched because it failed to report an incoming call too many times". When didFinishLaunchingWithOptions() is called the launchOptions are nil, i.e. there is no way to distinguish the app from being launched as a consequence of reportNewIncomingVoIPPushPayload()(*) being called and therefore it is not possible to call reportNewIncomingCallWithUUID(). So this feature is totally broken apparently from previous behavior. Any comment? TIA (*)Well actually, the extension could write a flag to a shared group and the app read that on launch, but what a hack, and should be unnecessary.
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
2 Replies
1.2k Views
Apple this is dead easy and quick to reproduce. Just create an app and then add a target of type background download. Xcode automatically assigns a group id to the target and generates a corresponding entitlements file like so: However the extension will not build, there is this error: You can bugger about in the developer portal as long as you want, ensuring the group identifier exists, ensuring provisioning profiles have this group capability, etc. etc. nothing will make this error go away. Now, what is unique about the download extension's entitlements file is the com.apple.developer.team-identifier key. This does not get generated for other extension - go ahead and see for yourself, create an action extension and give it a group, the result is its group appears in the entitlements file but not this com.apple.developer.team-identifier. If you try to print out $(TeamIdentifierPrefix) (via echoing it in a build script), you get this /Users/me/Library/Developer/Xcode/DerivedData/experiments-clpwbtcvdpqwuodxzwmsxwpztguo/Build/Intermediates.noindex/experiments.build/Debug-iphoneos/backgroundDownloadExtension.build/Script-243C9904292461BC001FDE14.sh: line 4: TeamIdentifierPrefix: command not found Hmm, command not found, but if you change the echo to ${TeamIdentifierPrefix} guess what gets printed, yes the team identifier i.e. in my case MV8J9D3236. Now if in the entitlements file I add the team identifier explicitly, like so Then magically the error about automatic signing and the provisioning profile goes away. Change it back to $(TeamIdentifierPrefix) and the error appears, change it to be explicit and it goes away. So by tweaking the entitlements file its possible to get the extension to build, however all is not well, now that it builds, if the extension is installed and run, the OS says: "Event (1) dropped for client (com.company.experiments) failed because the app and extension do not share any application groups." It says that despite the fact the app and extension both do have the same group capability. This is driving me nuts - the auto generated entitlements file is stopping the extension from compiling, but if you fix the build, it can't run. (Xcode 14.1, iOS 16.2)
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
0 Replies
362 Views
In WWDC 2016 Session 230 (https://wwdctogether.com/wwdc2016/230) they show the incoming Voip call screen (at time 02.59) with an image covering the entire call screen. How is that achieved?
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
1 Replies
447 Views
I've got a complex app extension and I'd like to be able to combine the logging from the app and the extension into a single file (for extraction/uploading etc.) I experimented adding the following code to both the app and the extension i.e. using the same subsystem for both app and extension logging. let subsystem = "mySubsystem" let logger = Logger(subsystem: subsystem, category: "main") logger.info("Log from within extension") // the version in the app says Log from within app do { let logStore = try OSLogStore(scope: .currentProcessIdentifier) let oneHourAgo = logStore.position(date: Date().addingTimeInterval(-3600)) let allEntries = try logStore.getEntries(at: oneHourAgo) let filtered = allEntries .compactMap { $0 as? OSLogEntryLog } .filter { $0.subsystem == subsystem } } The filtered content only contains logging from either the app or the extension. I suppose the issue might be the use of .currentProcessIdentifier as the scope, however that's the only scope that is defined. Is what is being attempted here possible? Is there any way to write to and extract a unified log for an app and app extension? If not, how about adding it, surely this would be something useful for people to be able to do
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
1 Replies
382 Views
If there is the following code for a notification service extension var countOfInvocations = 0 public class NotificationService: UNNotificationServiceExtension { public override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { NSLog("Push count: \(countOfInvocations)") countOfInvocations = countOfInvocations + 1 Then if pushes are sent to the handset it can be observed in the console log that the value of countOfInvocations keeps increasing, meaning the NotificationService class is getting instantiated and destroyed within the same process. However at what point does that process get torn down by the OS? It seems to be kept alive for about 10 minutes or so. Is there a way the extension can detect its the same or a new process?
Posted
by mungbeans.
Last updated
.
Post not yet marked as solved
1 Replies
531 Views
If you create a CallKit extension with Xcode 15 beta, then add some logging to the template code that gets created and run it on an iOS 17.3 beta phone the logging clearly shows that the OS is running the extension twice when the user turns on the extension in Settings. Run it on any device with < iOS 17 and its only invoked once, as it should be. However, not only does the OS run it twice, but based on the logging the two invocations are in parallel, not serial, suggesting two CallDirectoryHandler instances are being created and run simultaneously.
Posted
by mungbeans.
Last updated
.