Post

Replies

Boosts

Views

Activity

Uploading to App Store Connect jumps to 100% and does nothing
I'm having issues uploading builds to App Store Connect through XCode 11.3.1 and 11.4 beta 2.I go through the signing process after clicking `Distribute App` and when it gets to the `Uploading` page it goes through the process of creating the API analysis file, Authenticating with the App Store, Verifying Assets with the App Store but when it gets to `Uploading package to the App Store...` the progress bar jumps to 100% and I see from my network that nothing is happening.I have tried using 2 different Mac's on 2 different networks (WiFi & 3G) and have this issue regardless which project I am uploading.If I keep trying and trying, it might eventually go through after maybe 20 tries which can take hours.I have no third party firewalls and 1 Mac has MacOS firewall disabled.Any ideas?
1
0
1.1k
Mar ’20
Safari redirect to base64 encoded html fails on iOS 14
For years i've been able to redirect a webpage to some html content that is hardcoded in base64, either using the mete refresh tag like this: <html> <head> <meta http-equiv="refresh" content="0;url=data:text/html;base64,PCFET0NUWVBFIEhUTUw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHRpdGxlPldlPC90aXRsZT4KICAgICAgICA8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD1VVEYtOCIgLz4KICAgIDwvaGVhZD4KICAgIDxib2R5PgogICAgICAgIFRFU1QKICAgICAgICAKICAgIDwvYm9keT4KPC9odG1sPgo="> </head> or using javascript like this: <html> <head> </head> <body> <script> window.location.href = 'data:text/html;base64,PCFET0NUWVBFIEhUTUw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHRpdGxlPldlPC90aXRsZT4KICAgICAgICA8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD1VVEYtOCIgLz4KICAgIDwvaGVhZD4KICAgIDxib2R5PgogICAgICAgIFRFU1QKICAgICAgICAKICAgIDwvYm9keT4KPC9odG1sPgo='; </script> </body> The redirect no longer seems to work on iOS 14. I'm hoping this hasn't been changed by design, but I don't think it has as the page renders just fine if I paste the string into the URL bar: data:text/html;base64,PCFET0NUWVBFIEhUTUw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHRpdGxlPldlPC90aXRsZT4KICAgICAgICA8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD1VVEYtOCIgLz4KICAgIDwvaGVhZD4KICAgIDxib2R5PgogICAgICAgIFRFU1QKICAgICAgICAKICAgIDwvYm9keT4KPC9odG1sPgo= I have a live app on the App Store that's been running for 7 years that relies heavily on this. Does anyone know of another way to redirect to a base64 encoded webpage?
8
0
5.9k
Jun ’20
Detecting the new iOS 14 Local Network Access permissions
Is there any new API for the new Local Network Access permissions? I have an app that uses the local network so users can configure their internet router. Currently when the local network permission appears, it throws a NSURLErrorNotConnectedToInternet The internet connection appears to be offline. which is no help at all. The same happens if the user disables the Local Network Privacy, future requests throw the NSURLErrorNotConnectedToInternet error. NSURLErrorNotConnectedToInternet can obviously be thrown in other situations, so this doesn't help us prompt the user to the issue and I can already foresee many support requests around this. I have submitted bug report FB8448776 Additionally, there seems to be a bug were the local network permissions do not appear in the apps own settings page. Bug report FB8448959
2
0
3.5k
Aug ’20
My Widget Extension will not build with Bitcode
I have just updated my iMac to an M1 and now one of my projects is giving me these warnings for 3 of the libraries embedded in a Widget Extension: ld: warning: all bitcode will be dropped because '/Users/..../DJSwiftHelpers_Extension' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. I understand that the app needs all libraries to be built with bitcode in order to be bitcode compatible. 2 of the libraries are my own, one in fact is actually built inside the same project and all have bitcode enabled. The libraries have 2 versions, 1 with "Allow app extension safe API only" and the other without. It's only the app extension libraries that are an issue. Those embedded in a Watch extension are fine. Those embedded in Intents are fine. It's just the Widget extension that complains so I don't think the issue is the Frameworks. I can clear the warnings by disabling bitcode for the Widget Extension, however on uploading the app to the App Store, bitcode is in fact disabled for the whole app. So I guess my questions are: Why has this only become an issue on an M1 mac and not on my Intel Mac? Can widget extensions support bitcode? Or is the bitcode setting just ignored? Is it really impossible to use bitcode when providing a Widget Extension?
3
0
3.1k
Sep ’21
SwiftUI size to fit Font using GeometryReader, font is too big
I am using GeometryReader to calculate the size of font to use to fit several lines of text, however it is always too big. What can be wrong with my calculation? Here's a simply Playground import SwiftUI import PlaygroundSupport struct MainView : View { var body: some View { VStack { SomeView() .frame(width: 508.0, height: 246.5) } } } struct SomeView: View { let newData = ["1", "2", "3", "4", "5", "6", "7", "8"] var lines: Int { newData.count } var body: some View { GeometryReader { geometry in VStack(alignment: .leading, spacing: 0) { ForEach(0..<lines) { idx in Text(newData[idx]) .padding(0) } } .font(.system(size: geometry.size.height / CGFloat(lines))) .onAppear { print(geometry.size) print(lines) print(geometry.size.height / CGFloat(lines)) } } } } PlaygroundPage.current.setLiveView(MainView()) This gives me this result which I need to show all 8 lines:  The GeometryReader correctly reports the height of the box to be 246.5 and the number of lines to be 8 which results in a 30.8125 font size. It seems the font size needs some additional padding but how do I calculate this? I want to be able to supply an unknown amount of data and have it fill the box. (Well I am actually using a LazyVGrid which is suffering the same issue).
0
0
1.8k
Sep ’21
Swift availability check for Mac Catalyst is failing!
I have added an iOS 15+ function to my app and now it is crashing on my M1 iMac running in iPad Mac Catalyst mode on macOS 11.6. Could this be a potential bug in macOS, Xcode or Swift? I have this code: if #available(iOS 15.0, macCatalyst 15.0, *) { dataSource.applySnapshotUsingReloadData(fullSnapshot, completion: nil) } else { dataSource.apply(fullSnapshot, animatingDifferences: false) } When I run it on my mac, I can see it is running thinking it is iOS 14.7 using print(UIDevice.current.systemVersion) however it runs the code within the available check and crashes because it is not available on my macOS version yet! I have tried using this code too: #if targetEnvironment(macCatalyst)             print("HERE") #else             print("HERE2") #endif and it prints HERE2 in the console! I don't see how this is possible?
4
1
4.7k
Oct ’21
SwiftUI NavigationView initial selection (iOS 15)
I'm trying to get a NavigationView to pre select an initial view but it seems impossible to get it working across both iPhone and iPad. Here's a very basic model with 3 views: struct SomeView: Hashable { let title: String let view: Text func hash(into hasher: inout Hasher) { hasher.combine(title) } } let destinations = [ SomeView(title: "View0", view: Text("View0")), SomeView(title: "View1", view: Text("View1")), SomeView(title: "View2", view: Text("View2")) ] and here's a very simple navigation view: struct ContentView: View { @State var initialSelection: SomeView? = destinations[0] var body: some View { NavigationView { SideBar(selected: $initialSelection) } } } struct SideBar: View { @Binding var selected: SomeView? var body: some View { List { ForEach(destinations, id: \.self) { d in NavigationLink(d.title, destination: d.view, tag: d, selection: $selected) } } } } When launched on an iPhone 13 Pro Max in Portrait mode, it correctly shows View0. When launched in Landscape mode, we get a blank screen with a back button. So it appears that the selection property of the NavigationLink will only work if that NavigationLink is drawn on the screen. I guess that makes sense. We can fix it by adding our default view to the NavigationView stack like this: var body: some View { NavigationView { SideBar(selected: $initialSelection) initialSelection?.view } } Now in Landscape mode we get the View0 showing. However when we tap the back button, nothing happens on the first tap. This is because tapping back, loads up the List view which triggers the selection property to show our default view. Tapping back for a second time, works. I tried to fix this using some logic to know if the NavigationView had actually shown the second column view or not, however it seems that even on an iPhone in portrait when it displays as a stack, the .onAppear code (shown below) still fires because the view was loaded and the logic is pointless. struct ContentView: View { @State var initialSelection: SomeView? @State var secondColumnShown = false var body: some View { NavigationView { SideBar(selected: $initialSelection) initialSelection?.view .onAppear(perform: { secondColumnShown = true }) } .navigationViewStyle(.columns) } } Is there a way to force the draw open for it to trigger the selection of the NavigationLink? Or is there some better logic I can use to only set the initialSelection view if it's on a small screen and the draw hasn't been shown? I've been battling this for a long time, and there's many stack overflow questions about this but no solutions that I can get to work on iOS 15
0
1
1.6k
Oct ’21
ASWebAuthenticationSession won't open the Safari login window on Monterey
My macOS app uses ASWebAuthenticationSession for users to login to a third party service. It's worked fine until Monterey. When I call start on ASWebAuthenticationSession it shows me the permission window as expected: However when I click Continue nothing else happens. It does not show the Safari window and load the login page. I've noticed these errors appear in the Console every time, so it seems it's having trouble opening Safari (even though I have Safari already open). Any suggestions on how to fix this? Surely ASWebAuthenticationSession isn't broken for everyone? error 10:40:50.598301+0000 kernel 43 duplicate reports for Sandbox: com.apple.WebKit(13346) deny(1) mach-lookup com.apple.diagnosticd error 10:40:50.598309+0000 kernel Sandbox: SafariLaunchAgen(5469) deny(1) system-fsctl _IO('h', 47) error 10:40:52.349729+0000 kernel Sandbox: com.apple.WebKit(6675) deny(1) mach-lookup com.apple.diagnosticd error 10:40:53.011948+0000 CoreServicesUIAgent LAUNCH: Launch failure with -10652/ <FSNode 0x60000068b6e0> { isDir = y, path = '/Applications/Safari.app' } error 10:40:53.019505+0000 CoreServicesUIAgent Unable to forward entitlements from overridden keySenderAuditTokenAttr [sess=100005 pid=5469 uid:501,501,501 g:20,20 pV:257536] to target port ( port:85539/0x14e23 rcv:0,send:2,d:0 limit:0), which will likely cause them to reject this AppleEvent, errorRef=[ NULL ]
16
0
7.5k
Nov ’21
Framework signature won't upgrade past v=20200
I have some third party frameworks that are signed with a v=20200 signature. When I add them to my project and set them to Embed and Sign, the app won't install on my device giving the error The code signature version is no longer supported. I have tried resigning them using codesign -s "Apple Development: XXXX XXXX (BLXXXXXX)" -f --preserve-metadata --generate-entitlement-der XXXSDK.xcframework but the signature always reports v=20200. I tried removing the code sign and letting Xcode do it's thing, but get the same result. Is this a problem with the way the .xcframework was built? Can I fix this without getting it rebuilt?
6
0
2.5k
May ’22
NavigationLink inside NavigationSplitView strange behaviours
I have a very simple NavigationSplitView setup. The first time you press the NavigationLink it pushes the next view, but then immediately dismisses it. Tap it again and it correctly pushes and stays on screen. Then when tapping the second NavigationLink it pushes a view but just shows a yellow warning triangle and not the text. Then when pressing the back button, it shows the initial view first, then the second view 🤷‍♂️ This is on iOS 16 beta 4. Any idea what is going on here? struct ContentView: View {     @State var splitViewVisibility: NavigationSplitViewVisibility = .all     var body: some View {         NavigationSplitView(columnVisibility: $splitViewVisibility) {             List {                 NavigationLink("First", destination: DetailView(string: "First"))             }         } detail: {             Text("Select the first view from the list")         }         .navigationSplitViewStyle(.balanced)     } } struct DetailView: View {     var string: String     var body: some View {         NavigationStack() {             List {                 NavigationLink("Second", value: "Second")             }             .navigationDestination(for: String.self, destination: { string in                 Text(string)             })         }         .navigationTitle(string)     } }
1
2
2.5k
Jul ’22
ITMS-90428: Invalid Swift Support - The files libswift_Concurrency.dylib don’t match
I am trying to upload a new build of my app from the new Xcode 14.1 RC but it keeps failing with the below error: ITMS-90428: Invalid Swift Support - The files libswift_Concurrency.dylib don’t match /Payload/MY_APP.app/MY_APP_WatchOS.app/libswift_Concurrency.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/MY_APP.app/MY_APP_WatchOS.app/libswift_Concurrency.dylib. My bundle contains a watchOS 4.3 app which I thought might have been an issue, so I tried increasing it to watchOS 7.0 but still got the error. Bitcode is disabled for all targets. I don't have post-processing enabled either.
12
1
4.0k
Oct ’22
Xcode Organiser is trying to download crashes from wrong account after transferring app
I transferred an app to a new developer account about 2 months ago. Since then, I am unable to view crashes through the Xcode Organiser. It gives me the error title "Error downloading Crashes List" with message "An error occurred preventing Xcode from downloading crashes list. xxxxxx@xxxxxx failed with error: Access Restricted with bundle id: xxxxx.xxxxx.xxxxx The account listed is the OLD account that owned the app. So it is trying to download crash reports from the old account and not the new account. How can I let it know the account changed for this app? The project itself has been updated to use the new account certs and i've even submitted multiple builds to the new account.
9
7
6.0k
Jan ’23
Xcode 14.2 randomly removes Apple dev accounts if more than 1
For years i've managed multiple AppleID accounts through Xcode. Xcode->Settings->Accounts would list them as logged in. Now with Xcode 14.2, i'll often go to sign a build or register a device and it'll tell me there's no account for the build. Looking in accounts it has removed all but 1. This happens very often. I am constantly having to re-login to account. I haven't managed to figure out when or what causes them to be removed. Restarting Xcode or the Mac can still leave them logged in, but after a period they just get removed. Anyone else experiencing this or have suggestions to fix it?
2
1
1.2k
Feb ’23