Hello there,
I have a couple of question about Apple Pay guidelines:
• if we offer Apple Pay payment method in our app, can we disable the selection (I mean the method selection NOT the Payment button!) IF certain condition happens? E.g. the user cannot select apple pay payment method because our basket is not ready yet.
• Are we forced to move the apple pay payment method on the top of our selection? E.g. Cards, Cash On Delivery, Coupon, Apple Pay --> Apple Pay, Cards, Cash On Delivery, Coupon
One last technical question:
• when we start the payment process we are gonna create the request and present the sheet BUT we have to call our backend for pre-authorization, is it allowed?
@objc private func applePayButtonTapped(sender: UIButton) {
// TODO: Is it allowed?
// We need to ask to our backend a pre-authorization and THEN procced with Apple Pay flow
// but this could be done ONLY after the user TAP on BUY with APPLE PAY and BEFORE
// paymentAuthorizationViewController is called.
// Are we compliant to do that?
if PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: FakeData.paymentInfo()) {
let request = PKPaymentRequest()
request.blablabla = blabla
let authorizationViewController = PKPaymentAuthorizationViewController(paymentRequest: request)
if let viewController = authorizationViewController {
viewController.delegate = self
present(viewController, animated: true, completion: nil)
}
}
}
Thanks in advance :)
General
RSS for tagExplore the art and science of app design. Discuss user interface (UI) design principles, user experience (UX) best practices, and share design resources and inspiration.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
When we are going to have a real analog clock option on the lock screen. If an apple watch can do it surely its not that difficult. For someone who uses a clock to tell what time it isn't as opposed to what time it is, i’m constantly having to convert a digital image where the image of hands on a dial is so much easier. Surely this isnt because someone has forgotten how to read a clock
I would like to use FreePascal with my iMac 27” - late 2015 - CPU: 3.2 GHz Intel Core i5 quad-core - macOS Monterey 12.7.6.
I can't figure out what I need to do to install XCode11 and how I can get the compiler to work. Can anyone help me? Thanks!
Vorrei usare FreePascal con il mio iMac 27” - late 2015 - CPU: 3,2 GHz Intel Core i5 quad-core - macOS Monterey 12.7.6.
Non riesco a capire cosa devo fare per installare XCode11 e come posso fare per far funzionare il compilatore. Qualcuno può aiutarmi? Grazie!
Hi, starting from iOS18, it is impossible to differentiate between completed meetings and future meetings in calendar - almost the same color (unless I switch to dark mode). Is there a way to fix it or is it a human engineering bug?
Hi there
I have developed an offline algorithm for calculating tides, which works based on the built-in database of tidal stations in some regions. The algorithm works correctly and the results match the real data.
I would like to receive and add moon data from Weather Kit to the algorithm for performance improvement experiments. What requirements do I need to apply to the application so that I can use data from Weather Kit in my algorithm ?
Hi,
Our application is a B2B app, supporting users from companies that own our equipment (print industry).
We want to allow company stakeholders to have a "Premium Plan" that will provide their company with numerous advantages in different aspects (service, training, data visibility)
Some features in our app will be locked/hidden if the company is not part of the Premium Plan. We want to allow authorized users to activate the Premium plan for their entire company.
We already have our website, where we already have a marketplace that allows web users to do this (using their company service agreement).
In term of complying with Apple's in-app purchase Policy, is it ok to tell users in the app to go to this marketplace if they want these features (and more)?
Thank you
Will the draw (animation) functionality of SF Symbols be available when symbols are cut/pasted into a Keynote presentation? Better yet, will the draw tools from SF Symbols 7 be available in Keynote for objects created in Keynote?
Hi,
I am trying to create a custom SF Symbol from an SVG file created with Affinity Designer but, even though my SVG file look perfect in Firefox for example compared to the exported custom.circle.svg file (as recommended in Apple's documentation), I fail to get rid of this error:
"The provided variants are not interpolatable"
My creation process using Affinity Designer is:
Export as SVG file
Duplicate the custom.circle.svg file exported from the SF Symbols app
In the new file, replace the 3 "path" tags in the "g" sections "id="Black-S", "Regular-S", "Ultralight-S" with the paths from the SVG file exported from Affinity designer
Set the 3 transform matrices to "matrix(1 0 0 1 0 0)" for the 3 variants to be generated at the correct location.
Verify in an SVG viewer that the file looks correct.
Import the file via Drag&Drop into the SF Symbols app.
What is wrong with my file?
Thank you in advance for any help,
Marc
mySymbol.svg.txt
I have a multi view app I am trying to develop as my first app. I have gone through much of HackingwithSwiftui
Xcode 16.1 SwiftUI on a MacAir
The prior views in the app store various information. golf Course info in one and Golfers info in another.
This third view is to record rounds of golf played. I started it simple with me entering input manually and that worked.
I then decided to start using pickers with the first two being a DatePicker and the second pulling in the nickname(Handle) for players to select from. in a Handle Picker.
Following is my code. I can select a date as of Now and prior for date played and also the second picker does pull in the all the Handles from my prior view and I can select a Handle of the player for the round.
I then fill in all the other information. When I exit the view I do see that the Round is created but the Date always defaults to Now and the Handle stays blank. When i go back in to edit the round I can change the date and select a Handle but can get them to save.
I have tried many things and searched for days on the web for examples with no luck. I am sure its something simple.
Any help is appreciated as I want to add for pickers for course, tee and other fields. But until I figure out what I am missing the project is at a standstill.
import SwiftUI
import SwiftData
struct RoundsEditDataView: View {
@Bindable var roundsdata: RoundsData
@Environment(.modelContext) private var modelContext
@State private var playDate = Date.now
@Query(sort: \PlayerData.playerHandle) private var players: [PlayerData]
@State private var selectedHandle: PlayerData? = nil
var body: some View {
Form {
HStack {
Text("Course:")
TextField("Course Name", text: $roundsdata.roundscourseName)
.textContentType(.name)
}
HStack {
DatePicker("Date:", selection: $playDate, in: ...Date(),
displayedComponents: .date)
}
Section {
Picker("Handle:", selection: $selectedHandle) {
Text("Select a Handle").tag(nil as PlayerData?)
ForEach(players, id: \.self) { player in
HStack {
Text(player.playerHandle)
.frame(maxWidth: .infinity, alignment: .leading)
.tag(player as PlayerData?)
}
.frame(maxWidth: .infinity, alignment: .leading)
.tag(player as PlayerData?)
}
}
// .pickerStyle(.inline) this does not fix issue or design wise work
}
The rest of this works fine for now until I decide to convert more to picker lists.
HStack {
Text("Tee:")
TextField("Tee", text: $roundsdata.roundsTee)
.textContentType(.name)
}
HStack {
Text("Handicap:")
TextField("Handicap", value: $roundsdata.roundsHandicap, format: .number)
.textContentType(.name)
}
HStack {
Text("*****:")
TextField("*****", value: $roundsdata.roundsGross, format: .number)
}
HStack {
Text("Net:")
TextField("Net", value: $roundsdata.roundsNet, format: .number)
.textContentType(.name)
}
HStack {
Text("Rating:")
TextField("Rating", value: $roundsdata.roundsRating, format: .number)
.textContentType(.name)
}
HStack {
Text("Slope:")
TextField("Slope", value: $roundsdata.roundsSlope, format: .number)
.textContentType(.name)
}
}
}
}
When I create a tab group for the sidebar on iPad, the title and disclosure triangle act like a single control. Every time I tap the section title, the disclosure triangle for that section activates and hides or exposes that section's children and actions.
I want the section title to behave like Photos, where tapping a section title just displays its view controller, and the disclosure triangle is a separate control that must be tapped to hide and show children and actions.
I did not see any delegate methods that would let me control this behavior. Is this supported?
Hi community my name is Adam Robles. I have a question. I recently downloaded the beta on my iPad Pro 13 inch and I noticed where are the iPad wallpapers I only get one wallpaper, but where what happened to the wallpaper that was released with iPad last year
Hello. Was wondering if anybody has come across code or tutorial on creating a dynamic wind compass. Already tied into weather api, struggling with UI
Is it possible to modify or mark elements in the room plan model generated by the framework?
Below is the sample css code where I render a web page in my webview screens fonts became too small after 18.4 and its so hard to read when I launch my app . Any workarounds to address this issue
.sg-labels-canvas {
font-size: 15px;
display: flex;
flex-direction: column;
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, sans-serif;
font-style: normal;
}
Hello, I'm developing an iOS app in Flutter, but I'm having trouble enabling Background Mode.
I added the following configuration to Info.plist and Runner.entitlements:
<key>UIBackgroundModes</key>
<array>
<string>processing</string>
<string>fetch</string>
<string>location</string>
</array>
However, the Background Mode option doesn't appear in my App ID to be enabled.
And the build fails with the message: Provisioning profile "Ready Response ios_app_store ..."
doesn't include the UIBackgroundModes entitlement.
How can I enable this option in my App ID?
Note: I'm using Android Studio and publishing through Codemagic.
When I first tried to create a custom SF Symbol using Affinity Designer, I encountered difficulties because of two problems which have cumulated:
SVG files created by Affinity Designer cannot be directly imported into the SF Symbols app because Affinity Designer totally recreates the content of tag <g id="Notes">, making so the file incompatible for later import into the SF Symbols app. So I had to manually fix that tag via a text editor in order to make the file compatible with the SF Symbols app.
Because I was so focused on fixing manually the SVG file, I did not see that the actual content of my SVG file did not follow all Apple recommendations. As a consequence, I have posted this question on the forum:
Struggling creating a custom SF Symbol: The provided variants are not interpolatable
Finally I have found a way to create an SVG file compatible with SF Symbols using Affinity Designer, meeting the Apple recommendations, and at last perfectly suitable for further use in Xcode.
You will find the solution in my reply to this post below which is actually a quasi copy/paste of my final own reply to my original post.
Marc
I would like to modify the content of a published LocationNode upon been clicked by the user. But unfortunately:
func hitTest(_ point: CGPoint, options: [SCNHitTestOption : Any]? = nil) -> [SCNHitTestResult]
returns an SCNNode array from which it is impossible to retrieve the original LocationNode being inserted in order to be able to modify it.
Of course the solution would be to either insert the SCNNode corresponding to the inserted LocationNode in a custom class or conversely insert the identifier of the custom object as a tag of the LocationNode, in order to solve the issue. But both options seem impossible to implement.
May anyone help me?
I have developed a mobile app using SwiftUI. Now I am in the process of building a CarPlay application. I know how to test the CarPlay app using a simulator but here is my confusion,
How to test the iPhone app and CarPlay together? I want to test few scenarios like, user login / logout from mobile app. Location enabled /disabled in the mobile app.
I know that swiftUI handles the scenes by itself. Kindly help me validate the above scenarios as I am getting black screen on iPhone whenever the CarPlay is launched. Below is the code snippet,
func application(_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions) -> UISceneConfiguration {
if connectingSceneSession.role == .carTemplateApplication {
let sceneConfiguration = UISceneConfiguration(name: "CarPlay Scene", sessionRole: connectingSceneSession.role)
sceneConfiguration.delegateClass = CarPlaySceneDelegate.self
return sceneConfiguration
}
// Configuration for other types of scenes
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
struct MyApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
.preferredColorScheme(.light)
}
}
}
Info.plist
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>CarPlay Scene</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).CarPlaySceneDelegate</string>
</dict>
</array>
</dict>
</dict>
My app lets users create things with text, and I've included Apple fonts so users can format their text with them. These were fonts I found in the Font Book app that comes with macOS. My assumption is that these, like the San Francisco font, can be distributed with apps.
Do I need to attribute these fonts to their creators and publish a license in my "About" page? If so, where do I find the license(s) and what is the proper way of publishing them? Is there anything else I should know?
Please let me know if this should've been posted under a different topic and tag
My app includes use of the new journal suggestions API.
I'd like to know what is the official icon for the button in my app which bring up the .journalingSuggestionsPicker
Another app, DayOne uses the icon attached. Is this the official icon? If yes, does it have a SFSymbols name?
Developer support were unable to help me.
Any help appreciated - many thanks