I am trying to add complication feature to my watchOS app. I need to add some keys to the Info.plist.
Project Navigator - no Info.plist file (as expected)
Target watchOS > Build Settings > Info.plist values.
I am unable to add a value. Hovering over a row does NOT show small '+' or '-' icons.
How do I edit the Info.plist?
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi - I've added in-app purchases (Quarterly and Yearly
) to my app and submitted it for TestFlight. The app is available, but in my Developer account, the in-app purchases section still shows the products as 'Waiting for Review.'
When I test the app for in-app purchase, the dialog does not appear. Is this issue of "Approval" of the in-app purchase product?
If YES, how can I get approval for these in-app purchase products?
FYI: I have attached a screenshot of the in-app purchase products.
Please suggest
Thanks,
Sushil
Hello everyone, I have the problem at the moment that when I create a new project in a new empty repository, the files are always opened the old project.
I have already deleted all caches and also deleted Xcode 16.2 and reinstalled.
Does anyone of you know the problem?
Best regards
Joerg
I have a iOS app using a gobind xcframework library.
All went well when using Xcode 15.0 (15A240d), but failed on Xcode 16.2 (16C5032a). It’s confirmed the failure is from only Xcode version difference, all others like source code, lib binary, physical test iPhone all keeping the exact same.
After digging, the root comes from golang os.Executable() call (https://pkg.go.dev/os#Executable), which is used in xcframework library.
Using Xcode 15.0, os.Executable() returns “/var/containers/Bundle/Application/E80602C7-EFFB-4F1B-9FF8-FBA0E7E3DA76/Runner.app/Runner” as normal.
But with Xcode 16.2, os.Executable() panic with err “cannot find executable path”.
I’ve checked Xcode&SDK version change history, couldn’t find any clue like relevant permissions restrictions stuff.
Could someone please share a hint? Thanks .
I just made clean data on simulator then started getting the below error built on Xcode ?
Showing Recent Issues
Entitlements file "Clinic.entitlements" was modified during the build, which is not supported. You can disable this error by setting 'CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION' to 'YES', however this may cause the built product's code signature or provisioning profile to contain incorrect entitlements.
Topic:
Developer Tools & Services
SubTopic:
Xcode
If I install RealmSwift into an ios app using SPM, I have no problems.
However if I install it into an ios framework, then when building there is this error:
error: missing required modules: 'Realm.Private', 'Realm', 'Realm.Swift'
I have discovered that if I change the import statement from:
import RealmSwift
to
private import RealmSwift
then doing that makes this build error goes away (but doing that isn't a feasible workaround as I would like to publicly export classes stored in Realm from the framework).
There's no point in posting issues with Realm on their support board as its being deprecated and its tumble weeds on their forum.
But I would be very interested in hearing from the Apple expects explanation or speculation on:
why is importing the same framework via SPM into a framework xcode project resulting in different behavior then when importing it into an app?
why would changing import to private import make the build error go away?
TIA
I am using ARKit with RealityKit to scan objects using LiDAR on iOS. I can generate an OBJ file from ARMeshAnchors, but I am missing the texture export (JPG + MTL).
What I Have So Far:
Successfully capturing mesh using ARMeshAnchor.
Converting mesh into MDLAsset and exporting .obj.
I need help generating the .jpg texture and linking it to the .mtl file.
private func exportScannedObject() {
guard
let camera = arView.session.currentFrame?.camera
else { return }
func convertToAsset(meshAnchors: [ARMeshAnchor]) -> MDLAsset? {
guard let device = MTLCreateSystemDefaultDevice() else {return nil}
let asset = MDLAsset()
for anchor in meshAnchors {
let mdlMesh = anchor.geometry.toMDLMesh(device: device, camera: camera, modelMatrix: anchor.transform)
// Apply a gray material to the mesh
let material = MDLMaterial(name: "GrayMaterial", scatteringFunction: MDLScatteringFunction())
material.setProperty(MDLMaterialProperty(name: "baseColor", semantic: .baseColor, float3: SIMD3(0.5, 0.5, 0.5))) // Gray color
if let submeshes = mdlMesh.submeshes as? [MDLSubmesh] {
for submesh in submeshes {
submesh.material = material
}
}
asset.add(mdlMesh)
}
return asset
}
func export(asset: MDLAsset) throws -> URL {
let directory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
let url = directory.appendingPathComponent("scaned.obj")
if MDLAsset.canExportFileExtension("obj") {
do {
try asset.export(to: url)
return url
} catch let error {
fatalError(error.localizedDescription)
}
} else {
fatalError("Can't export USD")
}
}
if let meshAnchors = arView.session.currentFrame?.anchors.compactMap({ $0 as? ARMeshAnchor }),
let asset = convertToAsset(meshAnchors: meshAnchors) {
do {
let url = try export(asset: asset)
showScanPreview(url)
} catch {
print("export error")
}
}
}
extension ARMeshGeometry {
func vertex(at index: UInt32) -> SIMD3<Float> {
assert(vertices.format == MTLVertexFormat.float3, "Expected three floats (twelve bytes) per vertex.")
let vertexPointer = vertices.buffer.contents().advanced(by: vertices.offset + (vertices.stride * Int(index)))
let vertex = vertexPointer.assumingMemoryBound(to: SIMD3<Float>.self).pointee
return vertex
}
// helps from StackOverflow:
// https://stackoverflow.com/questions/61063571/arkit-3-5-how-to-export-obj-from-new-ipad-pro-with-lidar
func toMDLMesh(device: MTLDevice, camera: ARCamera, modelMatrix: simd_float4x4) -> MDLMesh {
func convertVertexLocalToWorld() {
let verticesPointer = vertices.buffer.contents()
for vertexIndex in 0..<vertices.count {
let vertex = self.vertex(at: UInt32(vertexIndex))
var vertexLocalTransform = matrix_identity_float4x4
vertexLocalTransform.columns.3 = SIMD4<Float>(x: vertex.x, y: vertex.y, z: vertex.z, w: 1)
let vertexWorldPosition = (modelMatrix * vertexLocalTransform).columns.3
let vertexOffset = vertices.offset + vertices.stride * vertexIndex
let componentStride = vertices.stride / 3
verticesPointer.storeBytes(of: vertexWorldPosition.x, toByteOffset: vertexOffset, as: Float.self)
verticesPointer.storeBytes(of: vertexWorldPosition.y, toByteOffset: vertexOffset + componentStride, as: Float.self)
verticesPointer.storeBytes(of: vertexWorldPosition.z, toByteOffset: vertexOffset + (2 * componentStride), as: Float.self)
}
}
convertVertexLocalToWorld()
let allocator = MTKMeshBufferAllocator(device: device);
let data = Data.init(bytes: vertices.buffer.contents(), count: vertices.stride * vertices.count);
let vertexBuffer = allocator.newBuffer(with: data, type: .vertex);
let indexData = Data.init(bytes: faces.buffer.contents(), count: faces.bytesPerIndex * faces.count * faces.indexCountPerPrimitive);
let indexBuffer = allocator.newBuffer(with: indexData, type: .index);
let submesh = MDLSubmesh(indexBuffer: indexBuffer,
indexCount: faces.count * faces.indexCountPerPrimitive,
indexType: .uInt32,
geometryType: .triangles,
material: nil);
let vertexDescriptor = MDLVertexDescriptor();
vertexDescriptor.attributes[0] = MDLVertexAttribute(name: MDLVertexAttributePosition,
format: .float3,
offset: 0,
bufferIndex: 0);
vertexDescriptor.layouts[0] = MDLVertexBufferLayout(stride: vertices.stride);
let mesh = MDLMesh(vertexBuffer: vertexBuffer,
vertexCount: vertices.count,
descriptor: vertexDescriptor,
submeshes: [submesh])
return mesh
}
}
What I Need Help With:
How do I generate the JPG texture from the AR scene?
How do I save an MTL file linking the OBJ model to the texture?
How can I correctly apply the texture when viewing the OBJ in an external 3D viewer?
I appreciate any guidance, including sample code or resources! If you have a complete working solution, I’d love to discuss further via private channels.
I want use Swift and objective-c both, I build bridge header ,but I got to errors. I can't fix them. Please help me. Thank you . ios iphone app.
I tried to monitor the device's network status with Network framework code below.
let networkMonitor = NWPathMonitor(requiredInterfaceType: .cellular)
networkMonitor.pathUpdateHandler = { [weak self] path in
if path.status == .satisfied {
print("Cellular Satisfied")
} else {
print("Cellular Unsatisfied")
}
}
When I run the app in my iPhone(iOS 15.5) and turn cellular on/off, iPhone suddenly loses connection with XCode.
Lost connection to the debugger on “...'s iPhone”.
Domain: IDEDebugSessionErrorDomain
Code: 12
Recovery Suggestion: Restore the connection to “...'s iPhone” and run “...” again, or if “...” is still running, you can attach to it by selecting Debug > Attach to Process > ....
User Info: {
DVTErrorCreationDateKey = "2022-06-23 02:16:30 +0000";
IDERunOperationFailingWorker = DBGLLDBLauncher;
}
Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
"device_model" = "iPhone13,2";
"device_osBuild" = "15.5 (19F77)";
"device_platform" = "com.apple.platform.iphoneos";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 2;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 5861;
"operation_errorCode" = 12;
"operation_errorDomain" = IDEDebugSessionErrorDomain;
"operation_errorWorker" = DBGLLDBLauncher;
"operation_name" = IDEiPhoneRunOperationWorkerGroup;
"param_consoleMode" = 0;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 5;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 0;
"param_launcher_substyle" = 0;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_runnable_swiftVersion" = "5.6";
"param_runnable_type" = 2;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos15.4";
"sdk_osVersion" = "15.4";
"sdk_variant" = iphoneos;
}
In my opinion, it seems like an error of XCode. Plz let me know if there's any solution.
Also, there's a similar issue here : https://developer.apple.com/forums/thread/681459
My project is using Fastlane 2.226.0. After converted groups to folders on XCode 16, I got an error when executed below function in Fastfile:
get_version_number(xcodeproj: "MyProject.xcodeproj", target: "MyProject")
Below is the error message output after I ran fastlane:
Unable to find XCode build setting: MARKETING_VERSION
When trying to use the watchOS preview the simulator fails to load and throws about 15 errors. Clearly the simulator is trying to load all of the iOS packages to the watchOS simulator. However, these packages clearly aren't included in the watchOS app. Furthermore, both apps build successfully to the main simulators, just not the previews. Having a list of errors that simply should not be there is a pretty big annoyance when something is going wrong. How do I fix this?
The following function could run several hundred times with no problem but will occasionally cause a EXC_BAD_ACCESS (SIGBUS). The last time it was a KERN_PROTECTION_FAILURE perhaps meaning it is trying to write to a read only memory but previously it was KERN_INVALID_ADDRESS. I have tried debugging tools to no avail. Can anyone see any reason why the following function could be causing this. Just in case the function is a red herring the only other thing that was running is a AVQueuePlayer that contains 11 tracks, but the crash happens mid song making it unlikely.
The function includes running other functions so below is all related functions that happen as a result of a swipe gesture.
func completeLeft() {
let add1 = Int(tiles[Square - (squares2move + 2)].name ?? "0") ?? 0
let add2 = Int(currentNode.name ?? "0") ?? 0
let add = add1 + add2
if add.isMultiple(of: 9) == false {
if squares2move == 0 {
self.moveinprogress = 0
return
}
moveLeft1()
}
if add.isMultiple(of: 9) {
squares2move += 1
moveLeft2()
}
func moveLeft1() {
var duration = TimeInterval(0.1)
duration = Double(squares2move) * duration
self.soundEffect = "swipe"
self.playEffects(Volume: self.effectsVolume)
let move = SKAction.move(to: positions[Square - (squares2move + 1)], duration: duration)
currentNode.run(move, completion: {
self.tiles[Square - (squares2move + 1)].name = self.currentNode.name
self.tiles[Square - 1].name = ""
self.currentNode.position = self.positions[Square - (squares2move + 1)]
self.newNumber()
})
}
func moveLeft2() {
var duration = TimeInterval(0.1)
duration = Double(squares2move) * duration
self.soundEffect = "swipe"
self.playEffects(Volume: self.effectsVolume)
let move = SKAction.move(to: positions[Square - (squares2move + 1)], duration: duration)
currentNode.zPosition = currentNode.zPosition - 1
currentNode.run(move, completion: {
self.currentNode.position = self.positions[Square - (squares2move + 1)]
self.tiles[Square - 1].name = ""
self.currentNode.name = "\(add)"
self.tiles[Square - (squares2move + 1)].name = "\(add)"
if add > self.score {
self.score = add
}
if add >
self.currentgoal {
self.levelComplete()}
else {
self.playEffects2(soundEffect: "Tink", Volume: self.effectsVolume, Type: "caf")}
if self.currentNode.childNode(withName: "Label") == nil {
self.currentNode.texture = SKTexture(imageNamed: "0.png")
let Label = SKLabelNode(fontNamed: "CHALKBOARDSE-BOLD")
Label.text = "\(add)"
Label.name = "Label"
let numberofdigits = Label.text!.count
if numberofdigits == 1 {
Label.fontSize = 45 * self.hR}
if numberofdigits == 2 {
Label.fontSize = 40 * self.hR}
if numberofdigits == 3 {
Label.fontSize = 32 * self.hR}
if numberofdigits == 4 {
Label.fontSize = 25 * self.hR}
Label.horizontalAlignmentMode = .center
Label.verticalAlignmentMode = .center
Label.fontColor = .systemBlue
Label.zPosition = 2
self.currentNode.addChild(Label)
self.currentNode.zPosition = self.currentNode.zPosition + 1
var nodes = self.nodes(at: self.positions[Square - (squares2move + 1)])
nodes = nodes.filter { $0.name != "Tile" }
nodes = nodes.filter { $0 != self.currentNode }
nodes = nodes.filter { $0 != self.currentNode.childNode(withName: "Label") }
for v in nodes {
v.removeFromParent()}
}
else {
let Lbl = self.currentNode.childNode(withName: "Label") as? SKLabelNode
Lbl!.text = "\(add)"
let numberofdigits = Lbl!.text!.count
if numberofdigits == 1 {
Lbl!.fontSize = 45 * self.hR}
if numberofdigits == 2 {
Lbl!.fontSize = 40 * self.hR}
if numberofdigits == 3 {
Lbl!.fontSize = 32 * self.hR}
if numberofdigits == 4 {
Lbl!.fontSize = 25 * self.hR}
self.currentNode.zPosition = self.currentNode.zPosition + 1
var nodes = self.nodes(at: self.positions[Square - (squares2move + 1)])
nodes = nodes.filter { $0.name != "Tile" }
nodes = nodes.filter { $0 != self.currentNode }
nodes = nodes.filter { $0 != self.currentNode.childNode(withName: "Label")
}
for v in nodes {
v.removeFromParent()}
}
self.moveinprogress = 0
})
}
}
func moveLeft() {
var duration = TimeInterval(0.1)
duration = Double(squares2move) * duration
self.soundEffect = "swipe"
self.playEffects(Volume: self.effectsVolume)
let move = SKAction.move(to: positions[Square - (squares2move + 1)], duration: duration)
currentNode.run(move, completion: {
self.tiles[Square - (squares2move + 1)].name = self.currentNode.name
self.tiles[Square - 1].name = ""
self.currentNode.position = self.positions[Square - (squares2move + 1)]
self.newNumber()
})
}
Topic:
Developer Tools & Services
SubTopic:
Xcode
A while ago, perhaps early in v16, Xcode stopped tracking file liveness. I'd hoped the regression would be fixed, but... not yet.
Is there some setting I'm missing? Is this from underlying filesystem limits? or from working with swift packages?
Conversely, if/since this is a regression, is this the new normal, and not to be fixed (e.g., because the modern build system cannot be retrofitted to detect and update stale resources)?
Assuming I create a Swift package and open it in Xcode...
1. New files
I expect to get errors when I create a new swift file, add bad code, and build.
Instead, the file doesn't seem to be added to the build.
If I try to use Add Files to "{project}".. menu, the file is disabled for selection.
A workaround is to close and re-open the project
2. Files updated extrinsically
If outside Xcode I format the files in the package or edit them, I expect Xcode to notice and either 1) update with the new contents if there were no changes, or 2) ask what to do if there were changes.
Instead, Xcode proceeds oblivious to the underlying changes.
It is not a workaround to use Integrate/Refresh file status menu for SCM status.
Again, a workaround is to close and re-open the project.
Possible factors
Swift package projects, if resource tracking is tied to metadata unused in package projects?
External filesystem: these are on APFS volumes mounted via TB-4 and USB-3
Pilot error?
Impact
This leads me to re-open projects 10's of times a day, to create test files or maintain lint. Also, because I have to drop out of Xcode to process files before checking in, I end up using an external git workflow/UI.
Also, because Xcode is not particularly extensible, I've written external tools for analyzing and generating Swift, hosted via CLI or eclipse (which support resource markers for UI navigation). I use Swift LSP in Eclipse for analysis and git-driven changes, and end up coding there because well, I'm already there.
I'd take slower builds over this continuous hassle and context-switching in a heartbeat.
Topic:
Developer Tools & Services
SubTopic:
Xcode
We are renaming the project and a Static Library the is critical to the operation on the app is not found during compiling.
We have the same project working fine. We have reviewed the project.pbxproj file and searched for erroneous linking, reviewed the Target settings and there is nothing obviously wrong. (Copied and secured the original)
Typically workflow is:
Clean
Delete Derived Data dir
D/l Swift Packages
Build/Run
The team has many years using Xcode / Swift and the project and this is not clear how to resolve. We have scoured SO and the solutions do not apply.
Facts:
-No cocoapods
-Search Paths all set
Linker all set
Thoughts?
I tried dragging an apns file for a live activity into my simulator to begin a Live Activity.
It didn't do anything. I didn't see it mentioned in the wwdc videos either. So I'm wondering if this experience is not yet developed, or maybe I'm doing something incorrectly?
in Project/Package Dependencies, some problem occurs while i add Exact Version value like '1.1.0-0fec058'. the finally value i input will be random updated to 1.0.0 or other value. Reproduce by input any version value like '1.2.0-"0"' which second part begin with 0. So bad experience.
I want to release a Framework F, containing several other frameworks (such as Realm, Appetitive, Cocoalumberjack, PhoneNumberKit) for use by app A.
According to this article: https://medium.com/@bittudavis/how-to-create-an-umbrella-framework-in-swift-ca964d0a2345
They write, without referencing a source: "Although Apple discourage creating umbrella framework".
Is that true, do Apple discourage umbrella frameworks, if so why and is it a very strong discourage or a mild one?
If not discouraged, then how can this be achieved with Xcode 16?
I've been attempting to follow a few tutorial to achieve this, such as https://medium.com/john-lewis-software-engineering/adding-a-third-party-framework-inside-a-first-party-framework-in-xcode-3ba58cfd08da
however so far without any success. This last article mentions the Link Binary With Libraries section, which doesn't exist in Xcode 16.
There's the Frameworks, Libraries, and Embedded Content section where I have been attempting to add the frameworks into my Framework F (choosing Embed without Signing).
I'm able to successfully build Framework F, but when app A attempts to use it (adding F to the Frameworks, Libraries, and Embedded Content section with option embed and sign, or embed and don't sign, makes no difference) then I get run time errors about the umbrellaed frameworks not being able to be found.
Hi,
I am in the last step "preparing for submission" and everything excepts "age rating" is fine. How can I fix this?
I have two apps and on neither i can edit "age rating" :(
Hi, I currently have an app that connect to an arduno via CoreBluetooth. However, the app no longer discovers the arduino when the operating system was upgraded to iOS 18.3.1, however on iOS version 17.6.1 the ardiuno was discoverable I was able to test this theory on two different phones each with different iOS versions. Why are my peripherals no longer being discovered with this update? and what is the solution?
When I try to build my project in Xcode (from Unity AR) project, it throws me these errors:
I feel like I've tried everything to make the LaunchScreen work. I downloaded xcode the night I tried running this build, so the whole deleting and redownloading and restarting everything didn't work. I've tried making sure my macbook and terminal are fully up to date. I literally can't find a solution! Please help!!
I will also say, I'm fairly new to App building, Xcode, and Unity. But this does seem like a barrier that is stopping me from testing my project.
Topic:
Developer Tools & Services
SubTopic:
Xcode