Hello all!
My application written with C++ for iOS. Want to make some functionality in static library for the purpose of reuse it in different C++ projects. Want to make universal library for using StoreKit2. Global idea is to wrap StoreKit2 Swift out with CPP interoperability.
Now trying to make clear for my self how to create C++ static library with Swift interoperability for iOS in XCode. There are only Objective-C option when you creating static library in XCode for iOS. Is it correct:
Create Static Library with Objective-C in XCode
Remove all default Objective-C files
Add C++ files
Add C++/Swift interoperability in build settings
Add swift classes
Beside all of it some questions:
When C++ static library contain Swift code with interoperability will it require some special settings for project (Swift standard lib or some other settings)? Or it could be used like any other C++ libraries?
What is the optimal build settings in this case to reduce dependencies when using it different projects?
Is there any examples of the same approach for iOS development?
Dive into the vast array of tools, services, and support available to developers.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am experimenting with Swift Testing and Xcode Cloud and would like to write some tests that require to use MusicKit functionality. For example I'd like to fetch an album via MusicCatalogRessourceRequest to test an initializer of another struct.
However this test fails because the permission to access the music library is not granted. Once the permission is granted, the test works as expected.
Things I have tried:
Add NSPrivacyAccessedAPITypes to the Info.plist. This did not show any effect. Below is the corresponding snippet
Trying to tap the button programmatically. Once again this did not show any effect.
The Info.plist snippet:
<key>NSPrivacyAccessedAPITypes</key>
<array>
<string>NSPrivacyAccessedAPIMediaLibrary</string>
</array>
The code snippet to tap the button:
let systemAlerts = XCUIApplication(bundleIdentifier: "com.apple.springboard")
let allowButton = systemAlerts.buttons["Allow"]
if allowButton.exists {
allowButton.tap()
}
What am I doing wrong here? I need access to MusicKit functionalities to write meaningful tests. Thank you
Issue with "Mine" Branch Not Displaying After Switching GitHub Accounts in XcodeCloud
I have been using XcodeCloud for a while. Recently, in one of my projects, I switched from using my personal GitHub account to a separate GitHub account for work purposes. Since then, when I manually start a workflow, nothing is displayed under the "Mine" section on the branch selection screen.
I suspect that Xcode is attempting to list branches from the previously used account, causing branches from my new account not to appear. Where are these old account settings stored, and how can I reset them?
For reference:
In Xcode's Accounts settings, only the new GitHub account is present—the old account is no longer listed.
The git user in the local repository has also been updated to the new one.
Any assistance on how to resolve this issue would be greatly appreciated!
Hi all. I don't know where else to go in order to find a way to communicate with Apple or reach help.
I have enrolled to the Apple Developer Product, no money charged in my account by I have received confirmation of Apple Acknowledgement that I have made an order.
Specifically 2 weeks now I try to contact someone from Apple side but with no luck. Recently I received the following and I had a small conversation from them.
If you have additional questions related to this request, please > reference case number 20000089031868.
Ge***le -> this is the name of the support agent
Did I do something wrong from my side? Does anyone has the same issue?
I get this error when registering as a developer'Your enrollment could not be completed'
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Hi,
I'm working in unity and I've implemented Firebase Phone Number Authentication in it. Everything works fine when I directly install build from xCode. App Attest screen shows up, user receives OTP on their phone and login works. But when I download the same build from TestFlight, it gets stuck after the user sends OTP request.
I've added Push Notifications and App Attest in capabilities. I've also additionally added Remote Notifications.
In device log I see an error about mobile provisioning file but I've added that to my account also. Is this expected behavior that phone number authentication does not work on TestFlight? If yes, how can I get this approved from apple since they need to test it before approving it.
Thanks!
Apple is not granting access to the developer account, but funds have already been partially charged
Hello,
We are facing a serious issue while trying to gain access to our developer account. We have submitted all the required documents (passport scan, payment information), but we still have not received access.
At the same time, funds have already been partially charged from our card, yet there has been no progress from Apple. Support is not providing clear answers, and the process is being delayed. This is seriously affecting our work!
Has anyone encountered a similar situation? How can we speed up the resolution? Any advice would be greatly appreciated.
Thank you!
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
From last week all crash for watchOS has been broken.
The latest version 15.22.1 missing all stack trace and showing weird as attached.
All the crashes for previous versions totally disappeared.
The problem is:
As per screenshot below, one can only see the lineChart. I have another struct AffiliateView coded under this Chart:
import SnapKit
import Charts
import DGCharts
class AffiliateViewController: UIViewController {
private lazy var chartView: LineChartView = {
let chart = LineChartView()
chart.noDataText = "No data available."
chart.chartDescription.enabled = false
chart.xAxis.labelPosition = .bottom
chart.rightAxis.enabled = false
chart.legend.enabled = true
chart.backgroundColor = .lightGray // For debugging visibility
return chart
}()
private lazy var containerView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
// Add container view and chart view to the main view
view.addSubview(containerView)
view.addSubview(chartView)
// Add SwiftUI View inside the container view
let affiliateView = AffiliateView()
let hostingController = UIHostingController(rootView: affiliateView)
addChild(hostingController)
containerView.addSubview(hostingController.view)
hostingController.view.frame = containerView.bounds
hostingController.didMove(toParent: self)
layout()
setupChartData()
}
private func layout() {
// Layout the container view (SwiftUI content)
containerView.snp.makeConstraints { make in
make.top.equalTo(view.safeAreaLayoutGuide.snp.top)
make.left.right.equalToSuperview()
make.height.equalTo(350) // Increase the height for the SwiftUI content
}
// Layout the chart view below the container view
chartView.snp.makeConstraints { make in
make.top.equalTo(containerView.snp.bottom).offset(20) // Space between chart and the affiliate content
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.height.equalTo(200) // Set a fixed height for the chart
}
}
private func setupChartData() {
let dataEntries = [
ChartDataEntry(x: 1, y: 10),
ChartDataEntry(x: 2, y: 20),
ChartDataEntry(x: 3, y: 15),
ChartDataEntry(x: 4, y: 30),
ChartDataEntry(x: 5, y: 25)
]
let dataSet = LineChartDataSet(entries: dataEntries, label: "Clicks per Day")
dataSet.colors = [.blue]
dataSet.valueColors = [.black]
dataSet.circleColors = [.red]
dataSet.circleRadius = 4.0
let data = LineChartData(dataSet: dataSet)
chartView.data = data
chartView.notifyDataSetChanged()
}
}
// SwiftUI View remains in the same file
struct AffiliateView: View {
@State private var customMessage: String = ""
@State private var uniqueLink: String = "Your unique link will appear here."
@State private var clickData: [Double] = [10, 20, 15, 30, 25] // Example data
var body: some View {
NavigationView {
VStack(spacing: 20) {
// TextField for custom message input
TextField("Enter your custom message...", text: $customMessage)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(.horizontal)
// Generate Link Button
Button(action: generateLink) {
Text("Generate Sign-Up Link")
.font(.headline)
.foregroundColor(.white)
.frame(maxWidth: .infinity, maxHeight: 50)
.background(Color.red)
.cornerRadius(10)
}
.padding(.horizontal)
// Generated Link Label
Text(uniqueLink)
.font(.body)
.multilineTextAlignment(.center)
.padding(.horizontal)
// You can add a chart here if you want to show it in SwiftUI too
/* LineChartView(data: clickData, title: "Clicks per Day", legend: "Daily Clicks") */
}
.navigationTitle("Affiliate Marketing")
.navigationBarTitleDisplayMode(.inline)
}
}
private func generateLink() {
let encodedMessage = customMessage.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
uniqueLink = "https://affiliate.example.com/referral?message=\(encodedMessage)"
addClickData()
}
private func addClickData() {
clickData.append(Double.random(in: 0...100))
}
}
As you see, the AffiliateView has been declared outside of Controller View class. The View content was visible before the lineChart was added into this code. Now the View content is not visible anymore. I have tried to increment/decrement values at make.height.equalTo() but to no avail.
Could anyone kindly point me in the right direction?
My swiftUI project has started to constantly display "Cannot find 'symbol' in scope" errors in code i haven't touched, and the project still compiles fine. Neither cleaning build folder or compiling fix the errors, but if I right click the symbol, select "jump to definition" it will find it without problem and then when I return to the original file the error will be cleared.
What can I do to stop these from happening?
Topic:
Developer Tools & Services
SubTopic:
Xcode
I am Developer of SMCB ANAND Application, my Apple Developer Program membership had been expired in September 2024. I observed that expired in November 2024.
Since that time i couldn't able to renew Apple Developer Program membership.
I went through Apple Developer app for renew the membership but still i couldn't renew it
Kindly provide a solution for the same
I can't add my iPhone to my Apple Developer team, even though my iPhone is properly connected to my Mac.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I have been trying to enroll for the Apple developer program for almost a year now but Apple has been deliberately frustrating my efforts despite providing every requested information and ID.
I have provided every single detail and have gotten to payment/purchase twice but Apple refused to debit/process my payments on both occasions. The latest being last week. I have successful $0.00 test transactions from Apple proving that my payment card is valid on Apple. There really isn't any excuse for not allowing me to complete purchase.
After that, Apple disabled my enrollment on the web and directed me to restart on the developer mobile app which I still complied with. Yet, after uploading my ID via a link that was sent to me by a certain Jenny from Developer support (eurodev@apple) and filling in my address hoping to finally proceed to purchase, Apple has disabled my enrollment and I see the message "Your enrollment could not be completed. Your enrollment in the Apple Developer Program could not be completed at this time." The web option has also been disabled.
No message or explanation was provided.
Developer support and Apple support have refused to respond to my many mails since then.
It's almost as if they were not expecting me to meet their requirements as EVERY SINGLE STEP has been met with some sort of restriction.
I have successfully created and uploaded apps on the Google PlayStore till date using the same details without any hassles. I have no criminal records nor restrictions against my person and neither did Apple indicate anything that could prevent my enrollment so this treatment is distasteful.
I believe Apple discriminates against locations because I am African. I doubt if US or European applicants face this type of discriminatory treatment from a supposed multinational corporation.
I am not the only African complaining about this treatment too.
It is sad because Apple generates revenue from Africa but does not consider us to be relevant enough.
Shameful.
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
Developer Tools
Feedback Assistant
Developer Program
I am facing a problem. I have enrolled developer program on 7th may, 25. It says will take 2 days but I haven't received any confirmation.
Again I submitted information on 11th February, 25 but still haven't received any email about confirmation or rejection.
I tried to contact apple support. They created ticket for me. But haven't received any further information from them.
It seems like I am a ghost and apple is not seeing me.
Can anyone tell me what is the problem.
Thank you
Hi everyone,
I’ve been experiencing a persistent issue with my MacBook Pro (M2 Pro, macOS 15.2) when using Xcode (version 16.2). If Xcode is open and my Mac goes into sleep mode, the screen size changes upon waking. Specifically, I notice 3mm bezels appear on each side of the screen, making the display slightly smaller, and everything scales down to fit this reduced size.
This issue happens multiple times a day and has been ongoing for over a year. It’s quite disruptive to my workflow.
Here is a video to illustrate the problem:
Has anyone encountered this before? If so, do you have any suggestions for fixing it or steps I can take to debug the issue?
Thanks in advance for your help and support!
Topic:
Developer Tools & Services
SubTopic:
Xcode
In the test plan settings, it's possible to select an .xcappdata bundle for a set of tests:
I failed to find any documentation about it in the context of macOS apps testing. What I'm trying to achieve is having a sandboxed app container (/Users/{user}/Library/Containers/{bundle-id)/Data/) replaced before running a test suite.
Is it something possible to achieve using the latest Xcode? What should be the .xcappdata structure to make it work on macOS?
Production build on eas failing for a couple of days. Submitted a request for information day before yesterday, but I was wondering if anyone else has been having this problem. I will post any update from Apple if/when I get it.
Topic:
Developer Tools & Services
SubTopic:
General
Hello, In 2024 I received notice of Apple Developer Account termination (Team ID: FCKZLDS8EQ) (with no reason) and in 5 days I have sended the appeal. After 30+ days - my account was terminated. The notification said that I only have a month to file an appeal, I did it within 5 days, but neither during the month nor so far - I have not received a response. Also, after the appeal, I contacted support saying that there was no response to the appeal and still remained unanswered to these tickets: 102346160903 and 102349953096. I described everything in detail in that appeal. I have an Apple Developer membership since 2014 and this is some kind of misunderstanding, I have an old trusted developer account without any violations.
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Hi recently when I renewed my Developer account, which had expired I found out it takes 24 hours for the active to be renewed. But your account page does not provide notice of this, and was very confusing for me!
I had to spend the time to contact support to find this out - can we please just have a 'renewal pending' status instead displayed to our developer's accounts? I would greatly appreciate this!
Best Regards,
Justin
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
We’re developing an iPad application that visualizes 2D and 3D building floor plans, including a mesh network of nodes that control lighting and climate. The node count ranges from 1,000 to 15,000.
We’re using SceneKit to dynamically render the floor plan and node mesh on an iPad 10th generation running iPadOS 18.3. While the core visualization works, we are experiencing significant performance degradation as the node count increases.
Specifically:
At 750–1,000 nodes, UI responsiveness noticeably declines.
At 2,000 nodes, navigating the floor plan becomes nearly unusable.
We attempted to optimize performance with a Geometric Pool algorithm, but the impact was minimal. Strangely, the same iPad handles 30,000+ 3D objects effortlessly when using Unity or Unreal Engine, raising the question of whether SceneKit may not be optimized for this scale.
Our questions:
Is SceneKit suitable for visualizing such large node counts, or are we hitting an inherent limitation of the framework?
Are there best practices or optimization techniques for SceneKit that we might be missing?
Should we consider a hybrid approach or fully transition to a different 3D engine for this use case?
We’ve attached a code sample below demonstrating the issue. Any insights, suggestions, or experiences would be greatly appreciated!
ContentView.swift