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?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
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.
A few days ago I uploaded a build to Testflight successfully.
Just now I made absolutely no changes whatsoever other than to increment the build number. This latest build doesn't appear in Testflight.
Tell me this can't be anything other than a bug with Testflight, if a build from a few days was good enough to appear, then how come with no changes it no longer is.
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).
In the past I've used lipo to remove unwanted architectures from fat frameworks, using lipo -remove.
However when attempting to do similarly with a .xcframework I keep getting errors, its not just the -remove command.
If for example I run lipo -info someFramework.xcframework then the error is:
can't map input file: someFramework.xcframework (Invalid argument)
if I cd into the xcframework and run
lipo -remove ios-arm64_x86_64-simulator
then the error is
unknown architecture specification flag: ios-arm64_x86_64-simulator in specifying remove operation: -remove ios-arm64_x86_64-simulator
With Xcode 15 if you attach an iPhone (with iOS 17 installed) and then select Window|Devices & Simulators, then you can see the connected iPhone of the left hand side of the organizer.
However with the iPhone selected, when the Open Console button is clicked it doesn't launch the console for the phone but instead for the Mac.
There's therefore no way to view the handset logs (you can see the app logs within Xcode as per usual, but you can't view the holistic handset logs).
The Xcode 15 beta does not have a 17.* folder within Developer/Platforms/iPhoneOS.platform/DeviceSupport.
How therefore does it build/install/run on a a phone with iOS 17 installed? Is there a different mechanism for device support used from 17 onwards than has historically been the case?
I want to build/run using Xcode 14.n with an iOS 17 phone, but without being able to locate the iOS 17 support file am unable to do so.
Where is the iOS 17 device support files with Xcode 15? How can I build using Xcode 14 for iOS 17 if its not present in Xcode15 (in order to drag and drop it into Xcode 14)
My app builds fine with Xcode 14, 13 and 12, but when attempting to build it with Xcode 15 there's an "Cycle inside MyApp; building could produce unreliable results." error.
The output below isn't giving me any clues that I can see about what the cause of the cycle is nor how to fix it, any ideas?
Cycle inside MyApp; building could produce unreliable results.
Cycle details:
→ Target 'MyApp': ExtractAppIntentsMetadata
○ Target 'MyApp': CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework
○ Target 'MyApp' has copy command from '/Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework' to '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework'
○ Target 'MyApp' has copy command from '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/CallExtension.appex' to '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/CallExtension.appex'
○ That command depends on command in Target 'MyApp': script phase “Add Git/CI Build Info”
○ Target 'MyApp' has process command with output '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Info.plist'
○ Target 'MyApp' has copy command from '/Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework' to '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework'
Raw dependency cycle trace:
target: ->
node: <all> ->
command: <all> ->
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata ->
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:ExtractAppIntentsMetadata ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--package-copy-files-phase> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--package-copy-files-phase ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase11-copy-files> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase11-copy-files ->
node: <CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework> ->
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework ->
node: <Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework> ->
CYCLE POINT ->
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework /Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase10--cp--copy-pods-resources> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase10--cp--copy-pods-resources ->
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-F72A917A68CD9152103DBA60-Pods-MyApp-resources-Debug-input-files-037b34732b45cb31a2dcb00ffdfe9f5c-resolved.xcfilelist ->
command: P2:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:WriteAuxiliaryFile /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-F72A917A68CD9152103DBA60-Pods-MyApp-resources-Debug-input-files-037b34732b45cb31a2dcb00ffdfe9f5c-resolved.xcfilelist ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase9--cp--embed-pods-frameworks> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase9--cp--embed-pods-frameworks ->
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-7E0D6830477C665FCC1083CC-Pods-MyApp-frameworks-Debug-input-files-36820974ee8465975a73448c9644b936-resolved.xcfilelist ->
command: P2:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:WriteAuxiliaryFile /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-7E0D6830477C665FCC1083CC-Pods-MyApp-frameworks-Debug-input-files-36820974ee8465975a73448c9644b936-resolved.xcfilelist ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase8-upload-crashlytics> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase8-upload-crashlytics ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase7-upload-debug-symbols-to-sentry> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase7-upload-debug-symbols-to-sentry ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase6-crashlytics> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase6-crashlytics ->
node: <target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase5-copy-files> ->
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase5-copy-files ->
node: <Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/CallExtension.appex> ->
<snip> too large to post all