I'm currently finding it impossible to get a text filtering extension to be invoked when there's an incoming text message.
There isn't a problem with the app/extension because this is the same app and code that is already developed, tested, and unchanged since I last observed it working.
I know if there's any history of the incoming number being "known" then the extension won't get invoked, and I used to find this no hindrance to testing previously provided that:
the incoming number isn't in contacts
there's no outgoing messages to that number
there's no outgoing phone calls to the number.
This always used to work in the past, but not anymore.
However, I've ensured the incoming text's number isn't in contacts, in fact I've deleted all the contacts.
I've deleted the entire phone history, incoming and outgoing, and I've also searched in messages and made sure there's no interactions with that number.
There's logging in the extension so I can see its being invoked when turned on from the settings app, but its not getting invoked when there's a message.
The one difference between now and when I used to have no problem with this - the phone now has iOS 18.5 on it.
Its as if in iOS 18.5 there ever was any past association with a text number, its not impossible to remove that association.
Has there been some known change in 18.5 that would affect this call filtering behavior and not being able to rid of the incoming message caller as being "known" to the phone?
Update
I completely reset the phone and then I was able to see the the message filter extension being invoked. That's not an ideal situation though.
What else needs to be done beyond what I mentioned above in order to get a phone to forget about a message's number and thus get an message filtering extension to be invoked when there's a message from that number?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Delete me
Is this setup possible / have a solution:
There is a .xcframework F, which uses a 3rd party library, lets call it L.
There is an app which uses the xcframework
The app also uses L
Both the app and F use SPM to integrate L
F is using L for its own internal purposes. F is providing some functionality to the app. How it implements that ideally should be a black box from the app's perspective.
The app also happens to use L for its own purposes.
I can't get this set up working, always get warnings about duplicate symbols when running the App.
This will presumably be due to the fact there are separate copies of L in both F and A.
So how can that be eliminated?
Can F not statically like to L and use the App's version of L at runtime? If so how can Xcode be configured so that F can actually compile?
Or vice versa - can the App not statically link in its own copy of L and use that in the framework? If so, similar questions, how to configure Xcode to set this up?
I can't believe this is an obscure use case, yet after days of searching and reading documentation I can't find any solution.
Note that I was able to get this going when the app and the framework used Cocoapods to integrate L, but I just can't do similarly if the use of Cocoapods is replaced with SMP.
When using cocoapods, within the frameworks Xcode section, the pods framework is set to Do Not Embed. This is probably the vital difference between the working Cocoapods implementation and the not working SPM solution. However, when using SPM Xcode doesn't present any option to either embed nor not embed the dependency. Why not? Can it somehow be set to not embed?
If an Xcode project has some compiler flags set in Build Phases / Compile Sources, then is it possible to have those enabled if scheme A is selected and disabled if scheme B is selected.
Same question for things in Build Settings, such as Other Compiler Flags.
I suppose it could be achieved by having two targets, one with things enabled and one without, but for a very large complex project, duplicating targets is not necessarily an easy thing to do.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I've got several Xcode iOS projects and in the Editor menu section there are dozen's of options, as in the diagram.
However if I create a new iOX Project (with Xcode 16.2) look at how sparse the Editor menu is. Why is that, why do they appear for other projects but not for a new one and why are the contents different?
If I create an Xcode (version doesn't matter, 16.N )project of type framework then install some dependencies using SPM.
Then within the Frameworks and Libraries section, the Embed part is empty.
This doesn't happen if the project type is app rather than framework.
If I want to set this to embed or not embed then how can this be done if its not even visible, for that matter how can I tell what it is set to even?
In Xcode I've:
select Product / Scheme / Edit scheme
tap on Archive on the left hand side of the
select post actions and + to add a new script
Then in there I have added a script I want to run on the archive after its created.
I'd like to be able to see the output the script churns out as it goes along but doesn't seem possible?
If I just add something like echo "hello" to the start of the script then I don't see "hello" visible anywhere when I build an archive (via Product/Archive).
I'm looking in the build navigator. Is there somewhere else to look or is it possible to get the logging into the navigator?
Within Xcode's settings location section is a drop down menu to switch between setting the derived data location to be default, relative or custom.
However its a global setting.
I work on more than one project simultaneously, and for one of them I want the location set to relative, but default for all the others.
Is there any way of achieving that?
If an iOS app gets terminated by watchdog due to, for example, hanging the main thread, is that considered to be a crash or something different.
I'm asking because, according to google and AI, Crashlytics can detect and report these,but in my experience it does not.
If I deliberately cause a watchdog termination by for example sleeping on the main thread for a long time then these never appear in Crashlytics.
I know Apple folks here don't comment on non Apple software, so I'm not asking about Crashlytics, just wondering and interested about watchdog timeout terminations and how they differ from a "regular" crash.
I just noticed this today while building a React Native app.
Anybody else seen this and know what it means/how to track it down/how to fix it
I've got an app where I want to split its Model code into a framework (.xcframework and .framework for debugging) so that it can be used by more than one app.
The code has dependencies on 3rd party code, which are installed via pods.
During the conversion process I keep running into the same issue which manifests with all the 3rd party code - which is that the majority of its api can be used (something like 80-90%) but for the remainder there is a linker error at runtime showing undefined symbols.
I have this problem with CocoaLumberjack,RealmSwift, PhoneNumberKit and more.
Its very quick and easy to reproduce the issue with a minimal framework and minimal app, below I'll describe how a minimal setup using CocoaLumberjack reproduces the issue:
From scratch, I use Xcode to create a framework project, run pod init, then modify the pod file to be:
platform :ios, '16.0'
workspace 'TheFramework'
project 'TheFramework'
target 'TheFramework' do
use_frameworks!
pod 'CocoaLumberjack/Swift', '3.8.5'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
Then I add source code:
import Foundation
import CocoaLumberjack
public class AClassInTheFramework {
public class func aMethod() {
let consoleLogger = DDOSLogger.sharedInstance
DDLog.add(consoleLogger, with: .debug)
DDLogDebug("Some logging")
}
}
Within the Xcode project, Build Libraries for Distribution is set to Yes, I also add that line to the pod file in case CocoaLumberjack isn't set similarly.
In the Framework's Xcode General section, Frameworks and Libraries contains Pods_TheFramework.framework set to Do Not Embed.
In the Build Phases section, in the Link Binary with Libraries section, Pods_TheFramework.framework is set to required.
Next I create an Xcode app template, run pod install, and edit the app pod file to be:
platform :ios, '16.0'
workspace 'AppUsingFramework'
project 'AppUsingFramework'
target 'AppUsingFramework' do
use_frameworks!
pod 'CocoaLumberjack/Swift', '3.8.5'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
end
end
end
I build the framework, and drag and drop it into the app.
I add the following code to the app's delegate:
import TheFramework
...
AClassInTheFramework.aMethod()
The App's target has the following linkage settings:
When I build and run the app, there is the following error:
If I change the source code in the framework to this:
public class AClassInTheFramework {
public class func aMethod() {
let consoleLogger = DDOSLogger.sharedInstance
DDLog.add(consoleLogger, with: .debug)
// DDLogDebug("Some logging")
}
}
Then there is no error and the code runs successfully. This illustrates the problem I've encountered with all the nested frameworks - in this particular case calls to DDLog.add() don't result in an error but calls to DDlogDebug() do, and that has been mirrored with other nested frameworks (for example with Realm, opening a database, adding, finding,retrieving an item all works without a problem, however attempting to use Realm's Results<> API results in a similar symbol not found error).
Additionally note that the identical CocoaLumberjack code can run fine when used directly from within the app, i.e., if I add the following code to the app:
import CocoaLumberjack
func useCocoaLumberjackDirectlyFromWithinApp() {
let consoleLogger = DDOSLogger.sharedInstance
DDLog.add(consoleLogger, with: .debug)
DDLogDebug("Some logging")
}
useCocoaLumberjackDirectlyFromWithinApp()
Then it runs, i.e. DDLogDebug() can be successfully called from within the app, its only when its called via the framework that the error occurs.
Why might I be encountering these issues? I'd have thought either I'd be able to use 100% of the nested framework's public api, or 0% of it (is something is not configured correct), not ~80% which is what I am encountering.
Any ideas?
TIA
I've got a large and complex app which has several dependencies upon 3rd party libraries (installed as pods).
The app is structured according to Model-View-Controller design and there is a requirement to implement the Model part as an .xcframework so it can be included and used in the original app along with a few new apps.
However, Apple documentation states that umbrella frameworks are not supported (Technical Note TN2435).
The Model code has several dependencies which would be totally unfeasible to replace or remove, for example it uses RealmSwift for database storage. Obviously it would be impossible to write one's own database storage scheme in place of using Realm.
However, if my framework uses Realm as a dependency, then its now become an umbrella framework.
So therefore not supported according to Apple documentation.
So what are options/solutions?
Is it possible for an iOS app to programmatically detect if its built for TestFlight/App Store distribution versus built for development?
The motivation for doing this is so that the app can detect if a push server should send pushes using the Apple production server or the sandbox server - when the app sends the push token to the server, I'd like it to additionally send an indicator to the server so the server knows which of the Apple servers to use.
Is there a way to achieve this?
TIA
I've got an existing app which is using some 3rd party xcframeworks within its app extensions (for example within a Notification Service Extension).
Within the target for the app extensions there is a Frameworks and Libraries section where the xcframework was dragged and dropped into.
However now I want to create a new project and do a similar thing, within the app's target there is a Frameworks and Libraries section, but when an app extension target is created, Xcode is not adding a Frameworks and Libraries section.
There is a Link Library with Binary section, however this doesn't have an embed section (where you can select to embed, don't embed, embed without signing etc.) and I get build error trying to drag and drop the xcframework in here.
Where id the Framewoks and Libraries section go for app extensions for projects created with Xcode 16? How can this section be added?
I want to set the minimum deployment to 16.0, however Xcode (16.2) won't let me select that.
In the drop down box it shows 18,17,16,15, however if any of these is selected it sets them as 18.6, 17.6, 16.6 or 15.6 (see image)
If an attempt is made to edit the value manually, to 16.0, then after change it, Xcode just deletes that value and sets it to nothing.
What's going on here? Why is Xcode only allowing the version other than be something.6 and why will it not let you manually edit it?