Posts

Sort by:
Post not yet marked as solved
0 Replies
35 Views
Xcode 15 introduced official support for static frameworks. docs here This is presumably because there's quite a bit over overlap with the mergeable libraries feature. Static frameworks potentially give developers a nice option for bundling resources with a static library. This was previously only really viable if you explicitly packaged up a .bundle with your .a (static library) which could be cumbersome for both the creator and consumer of a library. Or you explicitly copied your framework resources into your main app binary when building your app. The release notes for Xcode 15 state: Embedding a static framework using a Copy Files build phase now removes the static archive from the framework when it is embedded in the target bundle. When inspecting the app target on disk this appears to be the case. In fact the behaviour is the same as with a mergable in release mode whereby a "stub" binary exists with no symbols. The release notes also state: The COPY_RESOURCES_FROM_STATIC_FRAMEWORKS build setting, previously used in the legacy build system to extract and copy the resources from a static framework to the target bundle, no longer has any effect with the new build system as the entire framework is copied instead This also appears to be the case when inspecting the files on disk as the frameworks appear to be present in the main app with their resources. So far so good. The issue arises when trying to access the bundle associated with this framework. The documentation doesn't mention any special access requirements to it's assumed that standard bundle access APIs should work. Using a class let bundle = Bundle(for: InfoCoreMain.self) This returns the main application bundle and therefore fails to find the correct asset. This can be rationalised by the fact that the InfoCoreMain class does now actually exist within the main app target binary due to being statically linked. It's worth noting however, that mergable libraries in release mode do seem to work in this way and can resolve the bundle fine*. Using an explicit bundle identifier let bundle = Bundle(identifier: "***.***.InfoCore") Using an explicit bundle identifier returns nil even though we can see the framework on disk. Using a path Using a path to access the framework also doesn't work. if let bundlePath = Bundle.main.path(forResource: "InfoCore", ofType: "framework") { let bundle = Bundle(path: bundlePath) // Now you can access resources in the framework bundle } else { // Framework bundle not found } All of the above is the same behaviour for release and debug builds. I have tried this on Xcode 15.2 and 15.3 *Mergeable libraries do seem to have issues in debug mode. See this forum post. https://forums.developer.apple.com/forums/thread/749818
Posted
by
Post not yet marked as solved
0 Replies
30 Views
Because it may be quicker to ask: with a TPP, readData() gets a data size of 0 if the process has finished writing to the network. However, there seems to be no way to find out if it has finished reading from the network, other than to do a .write() and see if you get an error. (I filed a FB about this, for whatever that's worth.) Since the API is flow-based, not socket, it's not possible to tell if the app has set its own timeout. Or exited. So one question I have is: if I do flow.write(Data(count:0)) -- is that a possible way to determine if it's still around? Or will it be interpreted as read(2) returning 0? (Putting this in for testing is difficult, but not impossible -- as I said, this might be the quickest way to find out.)
Posted
by
Post not yet marked as solved
0 Replies
31 Views
Hello, We have an iOS application (navigation/mobility app) that we need to have it stay connected to TCP server even app is in background. We tried disabling screen lock. We tried having location permission as "always". But it is not consistent. Usually, after 15 minutes, TCP connection is disconnected. We are unable to run code on app's side if it is in the background. Our other workaround option is similar to WhatsApp or what every other companies / our rivals in the market do. Have a VOIP feature, use voip notification to wake up the app. But we really don't want to do that sort of thing. Any feedback and any ideas are welcomed. Thanks.
Posted
by
Post not yet marked as solved
0 Replies
21 Views
Cannot assign a device for operation encoder/down1/downs_0/conv1/weight/Initializer/random_uniform/RandomUniform: Could not satisfy explicit device specification '' because the node {{colocation_node encoder/down1/downs_0/conv1/weight/Initializer/random_uniform/RandomUniform}} was colocated with a group of nodes that required incompatible device '/device:GPU:0'. All available devices [/job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:GPU:0]. Colocation Debug Info: Colocation group had the following types and supported devices: Root Member(assigned_device_name_index_=-1 requested_device_name_='/device:GPU:0' assigned_device_name_='' resource_device_name_='/device:GPU:0' supported_device_types_=[CPU] possible_devices_=[] Identity: GPU CPU Mul: GPU CPU AddV2: GPU CPU Sub: GPU CPU RandomUniform: GPU CPU Assign: CPU VariableV2: GPU CPU Const: GPU CPU
Posted
by
Post not yet marked as solved
0 Replies
25 Views
React-native 0.73.6, Xcode 14.2, CocoaAsyncSocket 7.6.5 `ld: warning: directory not found for option '-L<Multiple' ld: warning: directory not found for option '-F/Users/mr9q2/Library/Developer/Xcode/DerivedData/eduhookuser-fmwtqgvpalkgsmeiayqpwllwrscp/Build/Intermediates.noindex/ArchiveIntermediates/eduhookuser/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/hermes-engine/Pre-built' ld: library not found for -lCocoaAsyncSocket clang: error: linker command failed with exit code 1 (use -v to see invocation)
Posted
by
Post not yet marked as solved
0 Replies
43 Views
Hello everyone, I looked at various methods how to Unit/UITest SwiftData but I couldn't find something simple. Is it even possible to test SwiftData? Does someone found a solution for that?
Posted
by
Post not yet marked as solved
0 Replies
29 Views
Recently I bought a new iPhone 14 Max Pro with a iOS 17 Beta release. While updating the phone with a cloud backup from my old iPhone 7 Plus the latest software (iOS17.5) has been installed on the phone. Now, every time I use my new phone the following message appears: A new iOS-Update is available. Please update from iOS 17 Beta. Unfortunately I can't do this because the menu "Settings", "Common Settings", "Software updates" shows that I've already installed the latest version. The message is "17.5 - Your iOS is at the latest release". I've already tried to set my phone to the factory settings and several other steps like disabling Beta-Updates didn't work. What can I do? By the way: I'm not an Apple professional I'm a standard user but the standard Apple Support told me they can not help me but to reach out to you guys.
Posted
by
Post not yet marked as solved
0 Replies
22 Views
xcode15.3, ios 17.4SDK VPN NEPacketTunnelProvider, After successful socket listen local ip 0.0.0.0, data packets cannot be received in release mode, but can be received in debug mode.This bug has been bothering me for a few days. Please help me. Thank you very much. In networkExtension code: ... let ip4Set = ... ip4Set.includedRoutes = [NEIPv4Route.default()] ... func readDevicePackets(){ ... packetFlow.readPacketObjects { (packetList) in ... let sendPacketList: [NEPacket] = changePacket(packetList) ... packetFlow.writePacketObjects(sendPacketList) readDevicePackets() }
Posted
by
Post not yet marked as solved
0 Replies
21 Views
In larger scenes, I need to record motion trajectories. RoomCaptureSession always starts from (0,0,0), and I use the last tracked point as the offset value to connect multiple trajectory points, just like StructureBuilder merging models But when StructureBuilder merged, it eliminated some of the models, which would make the trajectory points I saved lose accuracy, and I cannot know how much scene size was specifically eliminated between them Is there any way you can help me?
Posted
by
Post not yet marked as solved
0 Replies
27 Views
I want to implement in-app purchases for my Mac Safari web extension. I can think of two ways: Draw the payment UI in an extension web page, and send a message to the native extension app to call StoreKit code. Open the container app from an extension web page, where the app draws the payment UI. I couldn't make #1 work with either StoreKit 2, which is async, and context.completeRequest(returningItems:) doesn't want to be called in a Task, saying context is not sendable) or StoreKit 1, where calling context.completeRequest(returningItems:) in paymentQueue(_:updatedTransactions:) for some reason doesn't return a response to the extension's web page. I couldn't make #2 work because I couldn't find a way to open the container app from the web extension. I registered a custom URL for my container app, but context.open that url does nothing. Web extensions that use IAP with #2 are available on the Mac app store, so it must be possible, could anyone shed some light on how to open the container app and pass the purchased info to the extension web page even if the container app is not open? Thanks in advance.
Posted
by
Post not yet marked as solved
0 Replies
22 Views
I schedule a local notification to remind me to check in at work at 8 am if I am not already checked in, the code is working fine when app is in foreground, but when I kill the app, it alway show alert no matter if I already checked in or not. func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { let isCheckedIn = AppManager.shared.isCheckedIn() if isCheckedIn { completionHandler([]) } else { completionHandler([.list, .sound, .banner]) } }
Posted
by
Post not yet marked as solved
0 Replies
57 Views
Hello everyone My goal is to create Apple's activity ring sparkle effect. So I found Paul Hudson's Vortex library. There is already a sparkle effect, but I don't know how to modify it to achieve my goal. Because I'm pretty new to SwiftUI animations. Does anyone have any idea how I could do this? Vortex project: https://github.com/twostraws/Vortex
Posted
by
Post not yet marked as solved
0 Replies
17 Views
Searching for nearby POIs using MKLocalPointsOfInterestRequest has been unsuccessful with error Error Domain=MKErrorDomain Code=5 "(null)" UserInfo={MKErrorGEOError=-10}. Is there any solution?
Posted
by
Post not yet marked as solved
0 Replies
16 Views
Before iOS 17, CTFrameGetLines(ctFrame) returns exact number of lines it will displayed on the screen. However after iOS 17.2.x, under some unknown condition, it returns less CTLines. It's easy to reproduce: let formattedString = NSMutableAttributedString() formattedString.append(.init(string: "你", attributes: [.font: UIFont.boldSystemFont(ofSize: 14)])) formattedString.append(.init(string: "\n\n\n\n\n\n好\n")) let ctSetter = CTFramesetterCreateWithAttributedString(formattedString as CFAttributedString) let rect = CGRect(x: 0, y: 0, width: 100, height: 1000) let bezierPath = UIBezierPath(rect: rect) let ctFrame = CTFramesetterCreateFrame(ctSetter, CFRangeMake(0, formattedString.length), bezierPath.cgPath, nil) let ctLines = CTFrameGetLines(ctFrame) print("CTLine count: \(CFArrayGetCount(ctLines))") The test code above should print CTLine count: 7, but actually it returns 4. One weird CTLine is like: - 1 : <CTLine: 0x3031e0780>{run count = 1, string range = (2, 3), width = 0, A/D/L = 9.24023/2.75977/0, glyph count = 3, runs = ( <CTRun: 0x10173ec50>{string range = (2, 3), string = "\n\n\n", attributes = { NSFont = "<UICTFont: 0x101728800> font-family: \"Helvetica\"; font-weight: normal; font-style: normal; font-size: 12.00pt"; }} ) } never met this issue before, is it a bug or just new feature...
Posted
by
Post not yet marked as solved
0 Replies
18 Views
It gives me error for "import SplineRuntime". It says no such module even if I add the packagies dependencies from github. I tried to rebuild and clean everything but it still gives me this error.
Posted
by
Post not yet marked as solved
0 Replies
19 Views
Hi All, Finder is caching the old application name and not showing the new application. I am deploying my iPad app to M1 Mac by generating a package file. In the newer version of this application, I have changed my application name and deployed the application from backend to user machines. Eventhough application is deployed successfully, the application name still remains the old. I went through the forum and tried the reset the finder cache and launcher service caches, but still the new application name is not coming. But when I uninstall and reinstall the application it is showing the new application name. Can someone suggest a way to reset this using script, as we are deploying the application from backend, we dont have direct access to the client machines Thanks Ranga
Posted
by
Post not yet marked as solved
3 Replies
74 Views
I'm defining a typealias for a set, and then creating an extension for the new typealias. When I do this, I'm getting an odd syntax error. Any/all guidance appreciated. typealias IntSet = Set&lt;Int&gt; extension IntSet { func aFunction() -&gt; Set&lt;String&gt; { let array: [String] = self.map { "\($0)" } return Set(array) } } At the return line, I get the following syntax error: Cannot convert return expression of type 'Set&lt;Int&gt;' to return type 'Set&lt;String&gt;' Even if I replace the return line with the following, I get the same compile error return Set("array")
Posted
by
Post not yet marked as solved
0 Replies
34 Views
When I use "[[UIApplication sharedApplication] setAlternateIconName:iconId completionHandler:nil];" to change the icon, the following exception is thrown. Please tell me how to deal with this problem Error Domain=NSOSStatusErrorDomain Code=-54 "(null)" UserInfo={_LSLine=66,_LSFunction=-[_LSDIconCliend setAlternateIconName:forIdentifier:iconsDictionary:reply:]}
Posted
by
Post not yet marked as solved
0 Replies
47 Views
I am in a weird twilight-zone of a git problem in xcode. I specify some files to be staged and it fails to do with no warning of any sort. So I cannot commit them or apply stashed changes to them. I can do it one.file.at.a.time. I have over 11k intermediate files that .gitignore won't ignore, nor stage nor commit to do anything so I could stop tracking them.
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all