Post

Replies

Boosts

Views

Activity

Reply to Are there any macOS framework references for C?
You're not going find much of anything on Carbon due to deprecation since os X 10.8 https://developer.apple.com/documentation/coreservices/carbon_core and Xcode 5 https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html#//apple_ref/doc/uid/TP40001067-CH210-BBCFGHBB
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’23
Reply to How to translate data from c language void * pointer to [UInt8 ] in swift code.
Anything that's not declared within the struct is deallocated from the stack when set data returns. typedef struct { uint8_t *memo; uint8_t array[5]; int why[4]; char *books; } Bounce; implemenation of fix. void fix(Bounce *model) { memset(model->array,0x53,5); model->why[0] = 2; model->why[1] = 3; model->why[2] = 2; model->why[3] = 2; model->books = "Hello world"; model->memo = model->array; } import Foundation var bounce = Bounce() fix(&bounce) bounce.books.map({print(String(cString: $0))}) for value in 0..<5 { print(bounce.memo.advanced(by: value).pointee) } let why = bounce.why print(why) Output: Hello world 83 83 83 83 83 (2, 3, 2, 2) Program ended with exit code: 0 With the void* or anonymous type. typedef struct { void *memo; uint8_t array[5]; int why[4]; char *books; } Bounce; for value in 0..<5 { let thing = bounce.memo.assumingMemoryBound(to: UInt8.self).advanced(by: value).pointee print(thing) }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’23
Reply to Xcode 15, how to uncheck "Connect via network" for physical device?
On an AnyConnect VPN setup, disabling Bluetooth, WIFI, and Data has no effect unless you disconnect the VPN. Making this thing exclusive to the network is crazy. What if all this traffic leaves the local network before reaching its internal point-to-point target because of how a given network is configured? USB 3+ and Thunderbolt 2+ are more reliable in the form of a cable connection. If it's not broken, don't change it.
Dec ’23
Reply to Are there any macOS framework references for C?
You're not going find much of anything on Carbon due to deprecation since os X 10.8 https://developer.apple.com/documentation/coreservices/carbon_core and Xcode 5 https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html#//apple_ref/doc/uid/TP40001067-CH210-BBCFGHBB
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to Why does macOS allow dangerous operations on quarantined applications?
Do it all over again as a non-admin user of the Mac.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to tvOS app started crashing with 17.2, could not load NIB in bundle
Time to switch to SwiftUI. Just make sure it is part of the copy bundle resources located under build phases. If it is not then re-add it to the project.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to Can not create a View with generic inside an other View
Not sure what will possess you to do this but the language is not meant to be used like this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to UIHostingController wrong height animation
Animate the swift ui view, not the hosting controller.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to How to translate data from c language void * pointer to [UInt8 ] in swift code.
Anything that's not declared within the struct is deallocated from the stack when set data returns. typedef struct { uint8_t *memo; uint8_t array[5]; int why[4]; char *books; } Bounce; implemenation of fix. void fix(Bounce *model) { memset(model->array,0x53,5); model->why[0] = 2; model->why[1] = 3; model->why[2] = 2; model->why[3] = 2; model->books = "Hello world"; model->memo = model->array; } import Foundation var bounce = Bounce() fix(&bounce) bounce.books.map({print(String(cString: $0))}) for value in 0..<5 { print(bounce.memo.advanced(by: value).pointee) } let why = bounce.why print(why) Output: Hello world 83 83 83 83 83 (2, 3, 2, 2) Program ended with exit code: 0 With the void* or anonymous type. typedef struct { void *memo; uint8_t array[5]; int why[4]; char *books; } Bounce; for value in 0..<5 { let thing = bounce.memo.assumingMemoryBound(to: UInt8.self).advanced(by: value).pointee print(thing) }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to DataFrame's Column doesn't support array of dictionary
Try JSON encoding a data model and pass it into DataFrame.
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to OS 14.3 / iOS 17.3 iphone sync and backup issues
Beta software anything is expected until kinks are ironed out.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to Xcode 15, how to uncheck "Connect via network" for physical device?
The new debugger also has issues with the simulators. After 5 or 6 plus app launches, the sim will black screen and not load the app or sometimes when you close the app via Xcode, the sim will black screen and refuse to launch. Killing the simulator disconnects some debugger processes and then you're able to resume running on the sim.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Xcode 15, how to uncheck "Connect via network" for physical device?
On an AnyConnect VPN setup, disabling Bluetooth, WIFI, and Data has no effect unless you disconnect the VPN. Making this thing exclusive to the network is crazy. What if all this traffic leaves the local network before reaching its internal point-to-point target because of how a given network is configured? USB 3+ and Thunderbolt 2+ are more reliable in the form of a cable connection. If it's not broken, don't change it.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Name clashes with SwiftData classes
Never use names already defined in the frameworks. Always use original names for your types.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Does Apple documentation really help you learn Swift?
Try some hands-on courses from Udemy. If you have a paid LinkedIn subscription, try the free courses there, the nano degree from udacity.com, or hacking with Swift. It's a process that takes time with practice and commitment. Don't rely on one source. All the best.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to Swift Macros: Adding an enum case with an associated value produces incorrect results
You have a self-inflicted issue. Watch WWDC video on how to correctly rewrite the syntax tree instead of replace the tree. https://developer.apple.com/wwdc23/10166
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to Implementing passkey to password manager
That's the entire point of passkey but here you go https://developer.apple.com/documentation/authenticationservices/public-private_key_authentication/supporting_passkeys?language=objc
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to Why does it not exist via @AppStorage
@AppStorage or userdefaults is for storing small bits of data not huge binary blobs.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23