Posts

Sort by:
Post not yet marked as solved
0 Replies
17 Views
As TN3135 clearly explains the limitations apple puts on the low level networking, it doesn’t really give a reason. Presumably the power consumption problem. But as the battery technology continues evolving, it could be exciting that apple might loose the restrictions someday. The watch itself is powerful enough to do a lot of sophisticated works, sure it works best with companion apps on iPhone, but even as a standalone device, we can still provide many advanced user experience with low level networking supports. wish apple guys can read it and give a consideration.
Posted
by
Post not yet marked as solved
0 Replies
15 Views
Hi There, I have a strange problem: the Swift package cannot be added to my iOS project. The problem might be due to the project settings, but despite trying for a long time, I still haven't been able to figure it out. My project is a React Native project and uses CocoaPods. When I drop the Swift package into my React Native project, the package becomes a folder. When I drop the Swift package into other iOS projects, it works without any problems. If I try to use "Package Dependencies" to add the Swift package, it gets stuck on "Preparing to validate..." My project seems unable to add any Swift packages; it cannot add other Swift packages either. The Swift package is local. However, it works fine in other projects, even in newly created React Native projects. The problem might be with my project itself, but I have no idea where to check now. please guide me with any advice, I will appreciate it!
Posted
by
Post not yet marked as solved
0 Replies
17 Views
Problem Statement: Unable to import .h file from an ObjC SPM to a .h file in an ObjC file in a framework with mix of ObjC and Swift code The issue is: in order to support access of ObjC file in Swift code in a framework we need to use umbrella header (in place of bridging header). Once the file is imported in Umbrella header and made public it will no longer allow import of .h file from package in its interface Project Structure: a. Package: ObjCPackage ObjCPackage |- Package.swift |- ObjCPackage MathsUtilities.h (class interface) MathsUtilities.m (class implementation) NiceLogs.h (protocol) b. Project: ObjCSwiftFramework ObjCSwiftFramework |- ObjCSwiftFramework.h (umbrella header) |- Calculation.h (objc class interface) |- Calculation.m (objc class implementation) |- SwiftCalci.swift (swift class) Details: #import <ObjCSwiftFramework/Calculation.h> added in ObjCSwiftFramework.h as Calculation has to be used in SwiftCalci Calculation.h marked as public in target membership in Xcode so that it can be added in umbrella header ObjCSwiftFramework.h #import "NiceLogs.h" in Calculation.h gives error Here is a small sample which I created to demonstrate the problem: ObjCSwiftFramework
Posted
by
Post not yet marked as solved
0 Replies
12 Views
Hi everyone , I would like to ask about system setting, does any setting can make the Mac wakeup faster when it display off after logout.? it look like it will take around 20s to show the login screen after key press. I want it be faster. do any setting for this behavior ? Thanks for all.
Posted
by
Post not yet marked as solved
1 Replies
19 Views
Hi, I'm about to adopt .externalStorage but I will also use CloudKit in the near future. I did not find any reference that list of requirements for SwiftData models to be used with CloudKit, only for Core Data models. It seems those Core Data requirements (like no-unique) apply to SwiftData as well. However I did not find any info on this: Can @Attribute(.externalStorage) be used when I want to sync my model with CloudKit?
Posted
by
Post not yet marked as solved
0 Replies
68 Views
I'm trying to understand how Apple handles dragging windows around in an immersive space. 3d Gestures seem to be only half of the solution in that they are great if you're standing still and want to move the window an exaggerated amount around the environment, but if you then start walking while dragging, the amplified gesture sends the entity flying off into the distance. It seems they quickly transition from one coordinate system to another depending on if the user is physically moving. If you drag a window and start walking the movement suddenly matches your speed. When you stop moving, you can push and pull the windows around again like a super hero. Am I missing something obvious in how to copy this behavior? Hello world, which uses the 3d gesture has the same problem. You can move the world around but if you walk with it, it flies off. Are they tracking the head movement and if it's moved more than a certain amount it uses that offset instead? Is there anything out of the box that can do this before I try and hack my own solution?
Posted
by
Post not yet marked as solved
1 Replies
53 Views
Hi! Not sure if this is a swift data or more a Decimal in general type of question. What's going on: I have a SwiftUI app using SwiftData, I have persisted a Model with a property "reducedPrice" of type Decimal. It's stores correctly the value. Now, I have read the value during automated tests and tried comparing the values: let reducedPrice = model.reducedPrice // swift data property let target = Decimal(4.98) // expected target value to compare to swift data value. Now if I just print the result of the comparison between those 2 I get a false result. print(reducedPrice == target) //output : false The swift data model was populated from a direct copy of another struct that comes from an JSON import using Codable+CodingKeys (I used Decimal type). What I expected: I expected it to be true. Debug Observations I did noticed that on the variable inspector both had the same magnitudes but in reality the mantissa are different. I'm attaching a screenshot. My Theory They are different just because something under SwiftData stores different way the decimal as in comparison on how I am creating the Decimal for the comparison inside the automated tests. My question Is this expected behavior? Any suggestion on best practices on how to handle this? Thank you in advance any relevant guidance is very appreciated!
Posted
by
Post not yet marked as solved
0 Replies
50 Views
I've been developing a solution that has an embedded USB driver. I can build and run my solution just fine but I cannot pass verification for uploading to App Store Correct and TestFlight The problem is that the provisioning profile I am using (for development) does not have the explicit Vendor ID (idVendor) but is using the development value of asterisk "*". I've created a release version of my entitlements file with the proper Vendor ID and I have a distribution certificate for iOS. Further, I've created a provisioning profile for app-store distribution (not development) and imported it via Xcode. When I select this provisioning profile, I get the following errors from Xcode: Xcode 14 and later requires a DriverKit development profile enabled for iOS and macOS. Visit the developer website to create or download a DriverKit profile. Provisioning profile "MyProvisioningProfile - App Store" doesn't match the entitlements file's value for the com.apple.developer.driverkit.transport.usb entitlement. If I create and use a DriverKit profile, The Xcode UI errors go away on the "Signing & Capabilities" page. However, these profiles seem to be for development only. I then get an error, during compilation, telling me that the app and extension have two different signers, one for development (DEXT) and one for distribution (App). To sum up, using a DriverKit profile fails during the build process and using a distribution profile is a non-starter for Xcode. I can't even build. What do I need to do to get this to work?
Posted
by
Post not yet marked as solved
0 Replies
47 Views
I'm using the systemMusicPlayer to play music and want to update the playback time using addObserver forKeyPath. [self setMusicPlayer: [MPMusicPlayerController systemMusicPlayer]]; I've tried these two methods: [self addObserver:self forKeyPath:@"musicPlayer.currentPlaybackTime" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:&musicPlayer]; [self.musicPlayer addObserver:self forKeyPath:@"currentPlaybackTime" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:&musicPlayer]; I do get the initial values for currentPlaybackTime in: -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context but I never get any calls when the player is playing the song (the whole point). If I set the currentPlaybackTime to a specific value (locating manually using a slider), I get calls with the values I set (useless since I know what I am setting them to). How are we supposed to track the playback time without just polling it constantly?
Posted
by
Post not yet marked as solved
1 Replies
54 Views
I am trying to launch openImmersiveSpace, but seem like there is an issue with the openImmersiveSpace Task. Error: Static method 'buildExpression' requires that 'Task<OpenImmersiveSpaceAction.Result, Never>' conform to 'View' Here is the code and the error shows up on the "Task" line. import SwiftUI import RealityKit import RealityKitContent struct TestView: View { @Environment(\.openImmersiveSpace) var openImmersiveSpace @Environment(\.dismissImmersiveSpace) var dismissImmersiveSpace var body: some View { VStack{ Text("Open Full Immersive & switch to NextViewArea") NavigationLink { Task { await openImmersiveSpace(id: "ImmersiveSpace") } NextViewArea() } label:{ Label(" Enter Full Immersive Space") } } } } How can I move onto the next view area in the floating window while also launching full immersive space. Any help would be much appreciated.
Posted
by
Post not yet marked as solved
0 Replies
47 Views
I'm trying to broadcast some customized data into the peripheral advertisingData package. Based on the WWDC 2019, and some posts Ios BLE extended Advertising example, seems like with iphone devices that support bluetooth 5.0, we can send up to 124 bytes. However Apple didn't say how to send extensive advertisement data (which key or API to use). And I tested with the CBAdvertisementDataLocalNameKey, seems like I can still ONLY send within 31 bytes. My code: @IBAction func switchChanged(_ sender: Any) { // All we advertise is our service's UUID. if advertisingSwitch.isOn { peripheralManager.startAdvertising([CBAdvertisementDataServiceUUIDsKey: [TransferService.serviceUUID], CBAdvertisementDataLocalNameKey: "1234567890asddsgsfhgfshfgshfsggdrfgdbfsbfgshgfshbfgb"]) } else { peripheralManager.stopAdvertising() } } And on the central side, my code: func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String: Any], rssi RSSI: NSNumber) { if let name = advertisementData[CBAdvertisementDataLocalNameKey] as? String { os_log("name:", String(name)) } } But I only got the first some bytes: name String "1234567890asddsgsfhgfshfgs" My question is, does apple really support Extended Advertising starting from iPhone 8? If so, how should I use it to send data up to 124 bytes?
Posted
by
Post not yet marked as solved
2 Replies
53 Views
Our product includes a sudo plugin so we can apply user-defined policies to manage privileged access to command line programs. We’ve been getting reports where the plugin sometimes doesn't get invoked and the sudo command falls back to its default behavior. This seems to only be happening intermittently, but when the issue does occur, this message appears in the Console: Library Validation failed: Rejecting '/usr/local/libexec/sudo/<our_plugin>.so' (Team ID: <OURTEAMID>, platform: no) for process 'sudo(<pid>)’ (Team ID: N/A, platform: yes), reason: mapping process is a platform binary, but mapped file is not I recall a previous discussion of this message (that I can’t locate now), which explained that although the host process has library validation disabled, the code flow raises an error anyway, so that the host process can detect it and bypass the validation to load the plugin. It looks like that's what sudo is doing: it has the private entitlement com.apple.private.security.clear-library-validation and makes the appropriate system call when the plugin initially fails to load [1] — but apparently this isn't working reliably for our sudo plugin. We’ve observed that restarting the Mac generally resolves the issue, at least for a while. This resembles the “classic symptom of a code signing oddity” where the signature is cached and the Mach-O image is rewritten rather than replaced (as documented in Updating Mac Software). But our software uses an Installer package for updates as well as initial installation, and the Installer is documented as not having this issue, so I believe the problem lies somewhere else. I’m running out of ideas; are there any other avenues I should investigate? Thanks for any help. [1] This is described in an article called "About com.apple.private.security.clear-library-validation"; I can't link to it directly from the developer forums, but it can easily be found by searching for the title.
Posted
by
Post not yet marked as solved
0 Replies
46 Views
Hi everyone, I am having a problem on AVPlayer when I try to play some videos. The video starts for a few seconds, but immediately after I see a black screen and in the console there is the following error: <__NSArrayM 0x14dbf9f30>( { StreamPlaylistError = "-12314"; comment = "have audio audio-aacl-54 in STREAMINF without EXT-X-MEDIA audio group"; date = "2024-05-13 20:46:19 +0000"; domain = CoreMediaErrorDomain; status = "-12642"; uri = "http://127.0.0.1:8080/master.m3u8"; }, { "c-conn-type" = 1; "c-severity" = 2; comment = "Playlist parse error"; "cs-guid" = "871C1871-D566-4A3A-8465-2C58FDC18A19"; date = "2024-05-13 20:46:19 +0000"; domain = CoreMediaErrorDomain; status = "-12642"; uri = "http://127.0.0.1:8080/master.m3u8"; } )
Posted
by
Post not yet marked as solved
0 Replies
60 Views
I have encountered a strange behavior these past couple weeks while dealing with Bluetooth, mostly because my code hasn't changed in over 6 months (maybe it was not working before and now it's correct, who knows). Essentially, when i pair with a bluetooth device for the first time, the onchange has stopped firing. I can post more exact code of the view but I didn't think it was necessary but after you select the device you want to connect to (for the first time) you get asked by the OS to pair. After successful connection, we read information from the device (the Profiles). Once I get that information, i set dataGathered to true which triggers .onChange and I can navigate. However, with this initial connection/pairing the .onChange is never triggered, but i know i'm getting my dataGathered set to true because my print is being set. Subsequent connections do cause .onChange to be triggered with 0 profiles and with many profiles. This code hasn't changed in months so i'm not sure if there's SwiftUI bug that's sprung up or what, or if there's an inherint issue with what i was doing and it's only now being caught. struct DeviceSearchView: View { @StateObject var connectedManager: Manager = Manager() @StateObject var bluetoothListener: Listener = BluetoothListener() var body: some View { body .onChange(self.bluetoothListener.connectedDevice) { device in device.getData() } .onChange(self.connectedManager.dataGathered) { dataGathered in // determine navigation } } } Manager Object final class Manager: ObservedObject, BTDelegate, Identifiable /*i've tried adding/switching with Equatable but no change*/ { @Published var dataGathered: Bool = false @Published var profileList: Profile = [Profile]() @Published var index: Int = 0 func updatedProfile(list: NSArray, selectedIndex: Int) { print("profiles are in fact here") var newList = [Profile]() for element in list { if let profile = element as? B50Profile { print("\(profile.name)") if !newList.contains(profile){ newList.append(profile) } } } self.profileList = newList self.index = selectedIndex self.dataGathered = true print("data gathered is \(self.dataGathered)" } }
Posted
by
Post not yet marked as solved
0 Replies
70 Views
Hi all, I'm working on a small PoC to get Content Filtering (FilterDataProvider) working on macOS without any user interaction. So far, I've pushed two payloads to my machine using user-approved MDM enrollment: com.apple.system-extension-policy com.apple.webcontent-filter The application containing the network extension is present in /Applications. The installation of the profiles both succeed and I can see a Content Filter is created in the Network section of System Settings. Even the status says "Enabled", but the dot remains orange. Inspecing the system logs (specifically: filtering on process:neagent) shows me the following error: 1. Failed to find a com.apple.networkextension.filter-data extension inside of app com.my.app.containing.the.ext Only when I submit an activation request using OSSystemExtensionRequest.activationRequest, the network extension starts (without prompts, as expected) and everything works. Is this expected behaviour? Do I need to submit an activation request through code regardless of the fact that MDM pre-approved the System Extension prompts and created the Content Filter in the System Settings?
Posted
by
Post not yet marked as solved
0 Replies
63 Views
Hello, We have discovered an app on the App Store that has copied our application entirely, including the UI interface, icons, and artwork. The only difference is a single letter in the app name, while the logo remains remarkably similar. We couldn't find a report button on the App Store page. How can we report it? Thank you,
Posted
by
Post not yet marked as solved
1 Replies
58 Views
Hi! I would like to release my app in the EU, and I would be classified as trader. Thereby I have to hand over some data like address, phone number etc. My question is: can I use a VoIP number as phone number? I'm just concerned about the sms verification. Much appreciated!
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all