Post

Replies

Boosts

Views

Activity

lipo command doesn't work with .xcframeworks
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
0
0
584
May ’23
CFBundleIdentfier Collision uploading app with 3rd party xcframework
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).
1
0
422
May ’23
Read only container error attempting to create a contact group
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.
0
0
609
May ’23
How have I been able to make Ad-hod builds/upload to App Store Connect without a distribution certificate
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?
0
0
278
Apr ’23
How does Robokiller deep link into Settings, are they using a private URL scheme?
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?
0
0
289
Apr ’23
Xcode 14.3 fails creating an archive if it contains a pod
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
0
0
522
Apr ’23
Is it possible to schedule a timer in a notification service extension?
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?
1
0
968
Apr ’23
What size image should be added to a contact such that it appears in full screen mode on the incoming call screen?
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)
0
0
536
Feb ’23
Builds not appearing in Testflight
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.
1
2
441
Feb ’23
"ITMS-90338: Non-public API usage - The app references non-public selectors" issue still present when uploading to TestFlight, except now its preventing builds from appearing
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.
3
0
831
Feb ’23
How should you programatically add a contact so it remains only on the device and isn't synched to iCloud?
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?
0
0
1.2k
Jan ’23
Notification Service Extension doesn't free memory between invocations
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?
0
0
699
Jan ’23
[__NSCFType set]: unrecognized selector with NSAttributedString:draw() gets called, based on width of position
If the code below is run it causes an exception 'NSInvalidArgumentException', reason: '-[__NSCFType set]: unrecognized selector sent to instance 0x283130be0' However, the exception can be removed by reducing the width value from 100.0 in positionRect, for example setting it to something like 50.0 removes the exception. But why is this? With a width value of 100.0 specified for positionRect, that's well short of the width of imageSize. And even if there is some size issue, why is there an unrecognized selector exception? let imageSize = CGSize(width: 400, height: 100) let testRenderer = UIGraphicsImageRenderer(size: imageSize) let testImage = testRenderer.image { context in context.cgContext.setFillColor(UIColor.black.cgColor) context.fill(CGRect(origin: .zero, size: imageSize)) let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = .left let attributes: [NSAttributedString.Key: Any] = [ .font: UIFont.systemFont(ofSize: 8.0), .paragraphStyle: paragraphStyle, .foregroundColor: UIColor.white.cgColor ] let attributedString = NSAttributedString(string: "This is some text", attributes: attributes) let positionRect = CGRect(x: 10, y: 10, width: 100.0, height: 8.0) attributedString.draw(with: positionRect, options: .usesLineFragmentOrigin, context: nil) }
1
0
1.2k
Jan ’23
A small number of testers never receive Testflight invites/redemption codes
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?
0
0
623
Dec ’22