Whenever one googles for VoIP and iOS there's always a lot of results that appear that tell you about using CallKit.
However CallKit on its own is useless, it just provides a GUI/OS integration of VoIP, but not the actual SIP nor VoIP things themselves.
There's lots of 3rd party libraries out that, however they all include licensing, or paying a fee, and are tied to the 3rd party's servers.
Approximately how much effort is it to develop from scratch in Swift code to enable an app to receive VoIP calls (it doesn't need to make outgoing VoIP calls, and and only audio, not video needs to be supported).
Here's what I think would be involved:
Send information from the app to a SIP registrar. How difficult is this?
Enable VoIP push handling in the app, send the Voip Push token to a server. Handle incoming VoIP push.
Implement the VoIP transport, audio handling etc., for incoming VoIP
Integrate with the OS
I know how to do 2, and for 4 there's loads of tutorials on CallKit.
What I'd like to determine is what is involved and a level of effort for implementing 1) and 3) without using a 3rd framework.
Anybody done this themselves and has a rough idea?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
There's lots of material on the internet talking about how the VoIP background mode capability was deprecated in iOS 10. And yet its still presented as an option in the latest version of Xcode and it still appears in Apple's documentation
https://developer.apple.com/documentation/xcode/configuring-background-execution-modes
The documentation states:
The app provides Voice over IP services and requires automatic launch after system restart. For more information, see the CallKit framework.
It seems apps used to be able to be launched on restart prior to iOS 10, but since then they can't.
So is the documentation for this area out of date and wrong?
If its been deprecated for so long, why is it still documented and possible to add it to an application?
I want to programmatically create a contact with an image with the result that when the iPhone receives a call from the number associated with that contact its image will appear on the incoming call screen (occupying the full screen, not the little tiny icon variation).
But I'm having a hell of a job trying to figure out what dimensions should be used for the image to add to the contact.
If on the iPhone I take a screenshot and add that manually to a contact then make a call, then the call screen more or less displays the entire screenshot almost the same as the actual desktop. The call screen appears to be slightly magnifying the image.
So whatever size the screenshot is should be close enough for the contact image.
I've got an iPhone 14 pro and its UIScreen.main.bounds is 932 by 430. If I export an iPhone screenshot to a Mac, I can see its image size is 2796 by 1290, which is exactly 3 times the bounds size.
So I created an image of size 2796 by 1290 and programmatically added it to a contact (using CNMutableContact.imageData = myUIImage.pngData(). But when a call arrives the image that gets displayed on the call screen is way way way out of whack and alignment. Same too if I add am image of size 932 by 430 (i.e. without the 3 times factor).
I've done lots of experiments but I just can't figure out what size image I should add to the contact.
Does anybody happen to know?
(I exported the contact where I manually added the screenshot image as a .vcf to see what image size they use, but it doesn't export the full image that's actually displayed during a call screen, it just exports a truncation of the full image which is a square of 1200 by 1200.)
There's about 20 internal testers on our Testflight account, but a couple of them just never ever receive the invites/redemption codes so its impossible to get them set set up to be able to test the app.
They are added to the Internal Testing App Store Connect Users group, and I've also tried creating a new group and adding them to that as well as and instead of the App Store Connect Users group. These groups are added as testers of builds, and for the other 20 users their status says "Installed" but for a couple of testers their status always shows as "Invited Resend Invite".
The problem is, even if I click on Resend Invite an infinite number of times, these testers never receive anything. Never. Not after waiting an hour, 10 hours, a day, a week, a month. Click on click on click on Resend Invite and it does nothing, they never get anything.
No emails are not going into their trash/spam folder.
I've tried deleting the testers entirely from the entire developer account, and then when I re-add them back, then in that case they do get an email inviting them to join the developer account, but then they don't subsequently receive a TestFlight invite / code when added to a build.
The internal testers are all members of the same organization, so all have the same form of email address which is being used. 20 or 30 or them its ok, but for a couple of testers Testflight just hates them.
For one user, we tried everything and spent literally weeks, just was never ever able to get them set up and eventually had to give up. Our IT department had to specially create a new email for them, just to try and get them added to TestFlight. Hey and guess what, the new email worked, while the old one never did. But this isn't a solution, can't ask the IT dept to create new emails, and shouldn't have to.
But now the same thing is happening again to another tester.
Why does clicking Resend Invite not do anything? How can I force things and get this tester to receive an invite?
I've got a notification service extension which uses quite a lot of memory when it runs.
Its using UIGraphicsImageRenderer:image() to create an image based on the push payload, and that that is a very memory hungry function.
When the extension receives a push it uses less than the 25MB memory limit for extensions and its successful and runs to completion. However the next push that gets receives crashes due to memory not being freed (it doesn't matter if several minutes elapses between pushes).
After its crashed its successful once more (the action of it crashing must obviously be freeing up the memory, so after a crash there's enough memory to run again, but then the next push after that will crash and so on and so on).
I've run the extension interactively in Xcode's debugger to observe this behavior, but it also happens when running independently of Xcode (and thus lifetimes of things aren't being kept alive by the Xcode debugger).
As my extension has no control over the creation/destruction lifecycle of UNNotificationServiceExtension, is there anything that can be done to force the OS/UNNotificationServiceExtension to fully unload and release all its resources?
I want to programmatically add a contact, preferably within its own group, such that it remains only on the (iPhone) device local copy of contacts and doesn't get synched elsewhere.
However if I programmatically create a group then the group itself appears in iCloud, so presumably contacts within it will to.
What sort of arrangement of containers/groups/contacts etc. should I create to achieve this?
While attempting to upload my app to TestFlight (which has already been uploaded numerous times, including just a few days ago with the same code base) there is this error
"TMS-90338: Non-public API usage - The app references non-public selectors in : _isKeyDown, _modifiedInput, _modifierFlags....."
Nothing new there, that's been happening for months for myself and countless others and has been reported numerous times, i.e.
https://developer.apple.com/forums/thread/127678?answerId=715975022#715975022
https://developer.apple.com/forums/thread/714450
But now there's a difference - in the past the builds always appeared in Testflight after getting this warning, so it wasn't an issue.
But now that's changed, the build is no longer appearing in Testflight, so it suddenly is a very big issue.
I'm programmatically adding a contact with an image with the intention the image should display in full screen size when a caller matching the number of the contact calls (as opposed to the image appearing as a tiny round icon next to the caller name).
I'm creating an image of the same size and scale factor as the iPhone, and so far its working out ok - I have about 15 different phones, of various dimensions and scale factors, ranging from an old iPhone mini up to the most recent iPhone Pro Max, and on all of these it works as intended.
But there's an exception, an iPhone 12 Pro (which has dimensions 390 * 844 and scale factor 3), on this phone when there is a call the contact image appears as a tiny icon.
Why. Why is this phone different?
How can I know what size image should be added to a contact to appear at full size in the call screen when every phone has different dimensions and they are not behaving the same?
Additional question - the iPhone applies some cropping and expansion to whatever image gets added, is it possible to know what's being done to the image in order to make it display perfectly? (i.e. if the image contains some text, the fact the OS crops away some of the edge of the image, then expands what's left to fill the screen dimensions results in some pixelation)
I'm trying to fire a timer in a notification service extension, but what would work in the app doesn't work in the extension i.e.
Timer.scheduledTimer(timeInterval: 8.0, target: self, selector: #selector(doSomeStuff2), userInfo: nil, repeats: false)
or
Timer.scheduledTimer(withTimeInterval: 7.0, repeats: false) { timer in
...
}
and so on, etc.
Is that a way of getting a timer to fire in an extension?
This takes 2 minutes to recreate:
Create a new project in XCode
Run pod init to create a pod file
Add some pod to the pod file, I tried with MMWormhole or PhoneNumberKit or Realm
Run pod install
The app can be built however an archive cannot, it generates an error:
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Switch to Xcode 14.2 however and the archive can be built
An app can legally link into its own section of the Settings app, and if it uses CallKit, it can link into the Call Blocking & Identification section.
Linking anywhere else into Settings is making use of private URL schemes and is supposed to not be permitted and the app rejected during submission.
However the Robokiller app deep links into the Settings app with the page scrolled down to where the Phone section is.
How are they doing that? Is there some new API that permits the app to link to there? Or are they making illegal use of private URIs and have been getting away with getting past App Store review for years?
I intentionally deleted iOS development/distribution related certificates from my keychain (Login, Local Items, System, System Roots).
Then built my app in Xcode. Automatically manage signing is turned on and Xcode created/installed an Apple Development certificate to my keychain).
But if I create an archive, I am able to successfully create a development distribution, an ad-hoc distribution, and even upload to App Store Connect. Yet I don't have a distribution certificate anywhere in my keychain.
I therefore don't understand how this was possible. How could I create all those distributions without a distribution certificate in the keychain?
I've linked my contacts app on my iPhone to my company contacts database, and it shows up in the contacts app as "My Company Global Address List", and I can tap on it and search within it.
However using CNContactFetchRequest doesn't retrieve any of those contacts, is it something that's possible to do, if so how?
Without exception, every single code example/tutorial for adding a contact group uses a nil container value i.e. the toContainerWithIdentifier parameter is nil, as below. I've not been able to find an example usage where it isn't nil.
let group = CNMutableGroup()
group.name = "whatever"
let saveRequest = CNSaveRequest()
saveRequest.add(group, toContainerWithIdentifier: nil)
do {
try store.execute(saveRequest)
} catch {
handle error
}
I've been running this code and 99.9% of the time it works as expected. However on one handset the catch is being executed with
Error Domain=CNErrorDomain Code=207 "Container is read-only"
How should I deal with this? How can I find out what container it is being added to? Why would it be read only?
If nil means add to the default container, why is the default container in this case read only?
How can I change the code that it will always run on every device? I've not been able to find any examples/tutorials for creating a custom container to which the group can be added.
using an xcframework supplied by 3rd party.
I can build/run/install the app and use the framework without issue when running/installing from Xcode. However if I create an archive and then attempt to upload it to TestFlight I get two errors, the first is:
CFBundelIdentifer Collision. There is more than one bundle with the CFBundelIdentifer value bundleidofframework under the application
And the second is
Invalid Bundle. The bundle at ...myextension.appex contains disallowed file Frameworks.
(I'm using the framework within both the app and an extension)
Within the embed frameworks section of Xcode, the tickbox code sign on copy is ticked (that's the default value and if its unticked then the app doesn't run when installed directly via Xcode).