Post not yet marked as solved
I am working on a VPN app featuring Wireguard. The app was working fine. I planned to make a Framework for the Wireguard Target, Network Extension Target and the Code managing VPN, Now after removing all errors, resolving Bundle IDs and making all the targets compatible to iOS 16.0, I am getting this error in the Settings app as shown in the following
In short, same code is not working when moved into the framework.
I have read the similar thread talking about lowering the minimum deployments. All of my minimum deployments are set to iOS 16.0.
Any suggestions would be appreciated.
Thanking you in anticipation.
Ali.
Post not yet marked as solved
I'm trying to submit an app that we have successfully tested in TestFlight.
After completing all the distribution steps and submitting for review, the review is failing with the response:
"Your app version was rejected and no other items submitted can be accepted or approved. You can make edits to your app version below."
I haven't received an details in app or via email to provide further information.
The version in TestFlight that I have uploaded is: v1.0.23(23).
When entering the distribution details, and from the rejection response., it looks like the version number I'm entering on the main distribution page is the issue - maybe? I have tried entering 1.0.23, 1.0.23(23), even just 1.0 - but it constantly keeps getting rejected.
Is it really the version no. that is wrong, or potentially something else? How can I get more information on why the submission was rejected?
Post not yet marked as solved
I know that this has been posted many times, but I am facing an issue where I can't save a model instance. I know that this is due to enums from others trying to find solutions.
The error that shows:
CoreData: error: Row (pk = 2) for entity 'ResidentInfo' is missing mandatory text data for property 'name'
Solutions that I've tried:
removed all enums from their respective structs to being standalone.
making sure all enum calls use the full keyPath
removing CustomStringConvertible from all enums and moving them to rawValue strings
updating Xcode to 15.4b
probably other things I've forgotten at this point
File is too long to fit in post or comments (I'm sorry it's insanely long, it's a complex model), so I'll try to fit what I can where, are there anythings that stand out that may be an issue?
Enums:
enum Gender: String, CaseIterable, Codable {
case male = "Male"
case female = "Female"
case transmale = "Trans Male"
case transfemale = "Trans Female"
case nonbinary = "Nonbinary"
case other = "Other"
}
enum BodyBuild: String, CaseIterable, Codable {
case small = "Small"
case medium = "Medium"
case large = "Large"
}
enum Status: String, Codable {
case incomplete, complete
}
enum HairColor: String, CaseIterable, Codable {
case black = "Black"
case blonde = "Blonde"
case dirtyBlonde = "Dirty Blonde"
case brown = "Brown"
case lightBrown = "Light Brown"
case darkBrown = "Dark Brown"
case red = "Red"
}
enum EyeColor: String, CaseIterable, Codable {
case blue = "Blue"
case brown = "Brown"
case black = "Black"
case green = "Green"
case hazel = "Hazel"
case gray = "Gray"
case heterochromatic = "Heterochromatic"
}
enum RaceEthnicity: String, CaseIterable, Codable {
case native = "American Indian or Alaska Native"
case asian = "Asian"
case black = "Black or African American"
case pi = "Native Hawaiian or Other Pacific Islander"
case white = "White"
case mixed = "2 or More Races/Mixed"
}
enum MarkType: String, CaseIterable, Codable {
case birthMark = "Birth Mark"
case scar = "Scar"
case tattoo = "Tattoo"
case piercing = "Piercing"
case other = "Other"
}
enum heightFormatStyle: String {
case short, long, hash
}
enum suicideRiskLevel: String, Codable {
case low = "Low"
case medium = "Medium"
case high = "High"
}
enum MedicationFrequency: String, CaseIterable, Codable {
case daily = "Daily"
case weekly = "Weekly"
case biweekly = "Bi-Weekly"
case monthly = "Monthly"
case asNeeded = "As Needed"
case temporary = "Temporary Use"
case other = "Other"
}
enum SchoolOption: String, CaseIterable, Codable {
case ged = "GED"
case communityCollege = "Community College"
case university = "4-Year College"
}
enum FamilyDiseaseTypes: String, CaseIterable, Codable {
case alcoholism = "Alcoholism"
case asthma = "Asthma"
case cancer = "Cancer"
case drugAbuse = "Drug Abuse"
case hypertension = "High Blood Pressure"
case nervousBreakdown = "Nervous Breakdown"
case sca = "Sickle Cell Anemia"
case seizures = "Convulsions, Seizures Epilepsy"
case allergies = "Allergies"
case birthDefect = "Birth Defect"
case diabetes = "Diabetes"
case heartDisease = "Heart Disease"
case migraines = "Migraine Headaches"
case obesity = "Obesity"
case tuberculosis = "Tuberculosis"
case thyroid = "Glandular/Thyroid Issues"
}
Structs:
struct IdentifyingInformation: Codable {
var hairColor: HairColor = HairColor.black
var height: Height = Height(feet: 5, inches: 8)
var race: RaceEthnicity = RaceEthnicity.native
var build: BodyBuild = BodyBuild.small
var eyeColor: EyeColor = EyeColor.blue
var hispanic: Bool = false
var distinguishingMarks: [DistinguishingMark] = []
var currentLivingSitutation: String = ""
var currentSupportServices: String = ""
struct DistinguishingMark: Codable, Identifiable {
var id: UUID = UUID()
var type: MarkType = MarkType.tattoo
var location: String = ""
var description: String = ""
var photos: [Data] = []
}
struct Height: Codable {
var feet: Int
var inches: Int
func formatted(formatStyle: HeightFormatStyle = .short) -> String {
switch formatStyle {
case HeightFormatStyle.hash:
return "\(feet)'\(inches)\""
case HeightFormatStyle.long:
return "\(feet) feet \(inches) inches"
case HeightFormatStyle.short:
return "\(feet)ft \(inches)in"
}
}
}
}
struct EmergencyNeeds: Codable {
var food: Bool = false
var shelter: Bool = false
var clothing: Bool = false
var hygeine: Bool = false
var medical: Bool = false
var mentalHealth: Bool = false
var otherNeeds: String = ""
var abuseNeglectAllegations: Bool = false
var abuseReport: AbuseReport? = nil
struct AbuseReport: Codable {
var reportAccepted: Bool = false
var whoAccepted: String = ""
var reportNumber: String = ""
}
}
struct RiskAssessment: Codable {
var selfHarm: Bool = false
var selfHarmAttempt: Bool = false
var selfHarmExplanation: String? = nil
var currentFeelings: String? = nil
var dangerToOthers: Bool = false
var dangerToOthersExplanation: String? = nil
var suicideAssessmentRequired: Bool {
return selfHarm || dangerToOthers
}
}
struct SuicideAssessment: Loopable, Codable {
var dateCompleted: Date = Date()
var familyMember: Bool = false
var treatedMentalIllness: Bool = false
var chronicIllness: Bool = false
var historyOfSelfDestructiveBehavior: Bool = false
var recentLoss: Bool = false
var isolatedAloneHopeless: Bool = false
var goodbyeNoteOrPosessionDelegation: Bool = false
var plan: Bool = false
var betterOff: Bool = false
var wishToDie: Bool = false
var manualReview: Bool = false
var comments: String = ""
var helpCallMade: Bool = false
var riskLevel: suicideRiskLevel {
let riskScore = try? allProperties().reduce(0) { result, property in
if let isTrue = property.value as? Bool, isTrue {
return result + 1
} else {
return result
}
}
switch riskScore! {
case 0 ... 3:
return .low
case 4 ... 7:
return .medium
default:
return .high
}
}
}
[Continued in comments]
Post not yet marked as solved
Hello,
I have been developing a Swift package and importing it into other projects. When I import the package into a project and check the execution times of some package functions, I notice slow execution times. However, if I add the source files of the package directly into the project and run the same test functions, then the whole module optimization achieves amazing run times, which are tens of times faster. The package heavily uses generics, and the project is a command line project.
I would like to ask if there is a proper way to edit project build settings and the package.swift so that the compiler performs cross-module optimization and achieves hopefully similar run times with the whole-module optimization case.
Some previous posts indicated the use of -cross-module-optimization and SWIFT_CROSS_MODULE_OPTIMIZATION, and I tried them in numerous places in the project target build settings with no success. I also added this Swift setting to the package.swift:
swiftSettings: [
.unsafeFlags(["-cross-module-optimization"],
.when(configuration: .release)) ]
but it didn't lead to faster run times. I appreciate any comments/help. Thanks.
Post not yet marked as solved
Hi
I Download my app from test flight, when i click submit button to a backend call. App expects to get back with the response from the backend, to take to next pages.
But the app seems to be stuck waiting for the backend response. No error messages seen. i am sure the backend call is blocked from the test flight version. Same code works well from emulator and the physical device from local and from Google PlayStore. Only the test flight is the problem.
I am sure i messed up some settings , My Info.plist has as in below, can anyone please help.
NSAppTransportSecurity
NSPinnedNetworkSecurityItems
MyBundleName
NSIncludesSubdomains
NSAllowsArbitraryLoads
NSPinnedCAIdentities
SPKI-SHA256-BASE64
THEKEY
Post not yet marked as solved
It worked fine yesterday, now after upgrade of Xcode, app won't run. It doesn't matter if I try to run the app in a simulator or on a real iOS device, it does the same thing.
A window pops up with a title of "App installation failed: Unable to Install "app name"
Then down below there is a huge paragraph that starts with this:
Please try again later. Failed to load Info.plist from bundle at path /Users....
I have rebooted as well and also waited to make sure everything had time to load from the upgrade. I really have no clue how to resolve this issue.
Hoping someone can shed some light on this for me.
Thank you.
Post not yet marked as solved
OS Version:
MacOS Monterey Version 12.7.4 (21H1123)
This is happening for a while, I tried to replace mouse battery but the issue is same. Both external mouse and trackpad stops working for some seconds. I don't know what is causing this issue.
Need help, I know I can switch off the trackpad if external mouse is in use, but I don't want to do that, cause I use both at the depending on my work.
Post not yet marked as solved
I have somehow managed to switch off the error messages that come up as you are typing co9de in, I don't know how I did it, and I can't switch them back on, as they are very useful, please could someone tell me how to switch them back on.
Post not yet marked as solved
I know that most people on this forum will likely not be lawyers, but I am hoping someone with experience or insight can point me in the right direction.
I am trying to publish an application to the iOS app store and getting ready to publish, but I never addressed the part about export control documentation. I use some hardware components made in the UK, and the only cryptography I'm aware of using is HTTPS and AES-128 (LoRa security) in the hardware. My app will only be available in the U.S. I will not be exporting any data or hardware, and everything I am hosting my application on is in the U.S.
Does my application still fall under the EAR? Or is it something else I am supposed to be looking for? Someone I originally asked this about said that simply using imported hardware means it falls under the EAR, but that doesn't make sense to me.
I am new to all of this, so if anyone can at least point me in the direction to look or has experience, that would be greatly appreciated.
Post not yet marked as solved
Hi!
I want to know if its safe to redirect user to device's settings by using App-Prefs: url scheme.
We need this only when users have no connectivity as a way to help them debug what is going on with their network. Our target users are not very proficient with technology, so that's why we want to help them as much as we can.
Thanks in advance for your help on this matter
Post not yet marked as solved
We are developing a mobile app for our financial institution using React Native. As part of our fraud prevention measures, we need to determine the country a user is located in. However, we have noticed that the permission requests seem excessive for our requirements, especially since we only need this information if a user changes countries. Also, is there a way to only be notified when a user changes countries?
Our primary goal is to identify the user's country without requesting unnecessary permissions or compromising the user experience. We want to avoid requesting location permissions if possible, as it may raise concerns among our users.
What are the best practices and recommended approaches for financial institutions to determine a user's country in a React Native app, while minimizing the use of sensitive permissions? Are there any iOS-specific APIs, frameworks, or third-party libraries that can help us achieve this in a privacy-friendly manner?
We would greatly appreciate any guidance, insights, or examples from the developer community to help us strike the right balance between security and user privacy.
Thank you in advance for your assistance!
Post not yet marked as solved
Hi,
Can a single domain serve a /.well-known/apple-app-site-association file for multiple apps from different developers?
We currently have our own domain, let's say example.com,
which serves https://example.com/.well-known/apple-app-site-association
which lists our app, let's say "ABCDEFG.com.example.AppA" for path "/app/a".
We're talking with another developer who has another app on the store.
Can we add their app, "MNOPQR.com.different.AppB" on our site, https://example.com/.well-known/apple-app-site-association, add their app ID for path "/app/b",
ask them to add our example.com domain in their associated-domains entitlement,
and would it work?
I mean would https://example.com/app/a open our app "ABCDEFG.com.example.AppA" and https://example.com/app/b open their app "MNOPQR.com.different.AppB" ?
We want to open https://example.com/redirect/app redirect to either /app/a or /app/b depending on the query parameters and launch our or their app.
Thanks in advance!
Post not yet marked as solved
I have a peculiar situation, where the first time I present a sheet from a Section that has the header: set, the sheet disappears by itself the first time it is presented.
@State private var show = false
// …
List {
Section {
Text("foo")
} header: {
Text("bar")
}
.sheet(isPresented: $show) {
Text("baz")
}
// just to enable
Button("toggle") {
show = true
}
}
In Xcode I get this warning when I present the sheet (taken from our live app):
Attempt to present <_TtGC7SwiftUI29PresentationHostingControllerVS_7AnyView_: 0x10a819e00> on <_TtGC7SwiftUI19UIHostingControllerGVS_15ModifiedContentVS_7AnyViewVS_12RootModifier__: 0x10a020600> (from <_TtGC7SwiftUI32NavigationStackHostingControllerVS_7AnyView_: 0x10a0cba00>) while a presentation is in progress.
Tested on iOS 17.4.1, iPadOS 17.4.0 (Simulator), Xcode 15.3 Previews.
Circumstances
The circumstances are as following: a Section has to be in a List, and have content:, and header: or footer: set to something, and have the .sheet(…) set on the section itself.
The problem does not occur with these sections:
Section {
Text("…")
}
Section {
} footer: {
Text("…")
}
Section {
Text("…")
} header: {
}
… but the following views have the sheet disappear the first time it is presented:
Section {
Text("…")
} header: {
Text("…")
}
Section {
Text("…")
} footer: {
Text("…")
}
Section {
Text("…")
} header: {
Text("…")
} footer: {
Text("…")
}
Is this a known issue, and are there any known workarounds to present from a Section?
My best guess is to move the .sheet(…) to the parent container, but I'll have to restructure part of my code quite a bit to do so 😕
Post not yet marked as solved
My goal is to create Apples activity ring sparkle effect. So I found Paul Hudson's Vortex library. There is already a spark effect, but I don't know how to create a custom one that fits my needs. I'm still quite new to SwiftUI animations. Does someone have an idea how to do it?
VortexView(createSparkle()) {
Circle()
.fill(.white)
.frame(width: 16)
.tag("circle")
}
func createSparkle() -> VortexSystem {
let system = VortexSystem(tags: ["circle"])
system.birthRate = 150
system.emissionDuration = 0.2
system.idleDuration = 0.5
system.lifespan = 1.5
system.speed = 1.5
system.speedVariation = 0.2
system.angle = .degrees(330)
system.angleRange = .degrees(30)
system.acceleration = [0, 3]
system.dampingFactor = 4
system.colors = .ramp(.white, .yellow, .yellow.opacity(0))
system.size = 0.1
system.sizeVariation = 0.1
system.stretchFactor = 8
return system
}
Vortex project: https://github.com/twostraws/Vortex
Post not yet marked as solved
Im building a small iphone app with StoreKit and currently testing it in testflight right on my mac, not on iphone. StoreKit part almost exactly copied from SKDemo from one of the Apple's WWDC. For some users and for myself Transaction.currentEntitlements always returns .unverified results. I double-checked Apple Connect settings, i checked my internet connection and everything is fine. Is there some pitfalls for testflight on mac? How can I find out what is causing this problem?
Post not yet marked as solved
Hi all,
I work on a macOS app that's actually split into two apps: one primary app and one "helper" app that lives in the menubar and runs in the background when the primary app is quit. Recently, I've been integrating TipKit into these apps, and I'd like to have one unified TipKit database shared between them.
I set up TipKit in both apps' AppDelegate classes with the datastoreLocation set to the apps' shared Group Containers folder. I've verified with a SQLite DB viewer that both apps can store event donations and parameters as well as tip status in that shared database.
However, updates to the TipKit database are not being propagated between the two apps. For example, I have a TipKit event that only the "helper" app donates to, and I use that event for a TipKit rule in a Tip displayed in the primary app, but the tip only displays after I restart the primary app instead of immediately once the rule requirements are met (I've verified that the helper is properly making donations to that event).
Unfortunately, combining both apps into one app is out of the question (in the near term, anyways).
Is there anything I'm missing here to get cross-app TipKit communication to work?
Here's the relevant code (truncated and with variable and class names altered for IP reasons):
TipKitConstants.swift (accessible by both apps in a shared framework)
import TipKit
// MARK: - DataStore
@available(macOS 14.0, *)
extension Tips.ConfigurationOption.DatastoreLocation {
public static let sharedGroupContainer = Tips.ConfigurationOption.DatastoreLocation.url(NSURL.sharedGroupContainer()) // This NSURL extension points to a location in group containers that both apps can write to
}
// MARK: - Events
@available (macOS 14, *)
public struct TipKitEvents {
...
public static let helperEvent = Tips.Event(id: "helperEvent")
...
}
...
PrimaryAppDelegate+TipKit.swift (app delegate is in obj-c, hence the extension)
import TipKit
extension PrimaryAppDelegate {
@objc func setupTips() {
if #available(macOS 14, *) {
...
try? Tips.configure([
.displayFrequency(.immediate),
.datastoreLocation(.sharedGroupContainer)
])
}
}
}
HelperAppDelegate+TipKit.swift (app delegate is in obj-c, hence the extension)
extension HelperAppDelegate {
@objc func setupTips() {
if #available(macOS 14, *) {
try? Tips.configure([
.displayFrequency(.immediate),
.datastoreLocation(.sharedGroupContainer)
])
}
}
}
HelperClass+TipKit.swift (this is the class where the event donation happens)
import CommonFramework
extension HelperClass {
@objc func donateHelperEvent() {
if #available(macOS 14, *) {
Task(priority: .background) {
await TipKitEvents.helperEvent.donate()
}
}
}
...
}
ExampleTip.swift (exists in the primary app)
@available(macOS 14, *)
struct ExampleTip: Tip {
...
// All Tip protocol requirements are implemented above
var rules: [Rule] {
[#Rule(TipKitEvents.helperEvent) {
$0.donations.count >= 3
}]
}
...
}
PrimaryAppWindowController.h
@interface EditorWindowController : NSWindowController
...
// TipKit types are not representable in Objective-C, hence all the "id" types here
@property id templateCreationTip;
@property id templateCreationTipObservationTask;
@property id templateCreationTipPopover;
...
PrimaryAppWindowController.m
@implementation PrimaryAppWindowController
...
- (void)windowDidLoad
{
[self setUpTips];
}
...
PrimaryAppWindowController+TipKit.swift
@available(macOS 14, *)
extension PrimaryAppWindowController {
@objc func setUpTips() {
if exampleTip == nil {
exampleTip = ExampleTip()
}
exampleTipObservationTask = exampleTipObservationTask ?? Task { @MainActor in
if let tip = exampleTip as? ExampleTip {
for await shouldDisplay in tip.shouldDisplayUpdates {
if shouldDisplay {
showExampleTip()
} else {
(exampleTipPopover as? TipNSPopover)?.close()
exampleTipPopover = nil
}
}
}
}
}
@objc func showExampleTip() {
guard let exampleTip = exampleTip as? ExampleTip,
let buttonView = window?.toolbar?.items.filter({ $0.itemIdentifier.rawValue == ItemIdentifier.button }).first?.view else { return }
exampleTipPopover = TipNSPopover(exampleTip)
(exampleTipPopover as? TipNSPopover)?.show(relativeTo: buttonView.bounds,
of: buttonView,
preferredEdge: .maxY)
...
}
}
Post not yet marked as solved
It seems that all macOS apps currently going through App Review which use ASWebAuthenticationSession (or SwiftUI webAuthenticationSession) are being rejected, because:
Reason given:
Guideline 4.0 - Design
The user is taken to the default web browser to sign in or register for an account, which provides a poor user experience.
See here for more details: https://forums.developer.apple.com/forums/thread/750400
If webAuthenticationSession is no longer permitted for production apps, what is the current recommended approach for implementing OAuth 2 authentication?
Post not yet marked as solved
Never mention BETA, because when you revert to shipping, it's a disaster and the docs aren't correct. The carrier, T-Mobile is not technically astute. So, how do I get heard and acknowledged by a REAL person?
Lately, I keep getting this warning when closing Xcode asking if I want to save the changes. Strangely enough, I have never received this before. I looked to see if I could disable and enable autosave. Unfortunately I have not found anything. Does anyone have any tips?
Post not yet marked as solved
I currently have an app listed in the App Store under my company's name. Recently, we restructured our company and adopted a new name that better reflects our product. My question is: Can I update our company name and DUN (Data Universal Numbering) number in the App Store, or do I need to create a new account for our restructured company? Alternatively, should I submit the updated version of the app under the original company name and DUN number?