Post

Replies

Boosts

Views

Activity

Reply to Is gethostbyname safe?
The problem is mostly that the IP address may not be valid for certain access : web site may be addressed on the same IP address with different hostname which are redirected to different web pages (that is part of apache configuration possibilities for example). SO it may work work but be careful.
Dec ’22
Reply to Swift codable: an object that is come from an API, changed from type Array to Object
This is quite ugly but to can help you. The new structure read the new JSON but return the previous interface `// Old structure struct ContactMediumOld: Codable {     struct ContactMedium: Codable {         var type: String         struct Characteristic: Codable {             var emailAddress : String         }         var characteristic: Characteristic     }     var contactMedium: [ContactMedium] } // New structure struct ContactMediumNew: Codable {     struct ContactMedium: Codable {         var type: String         struct Characteristic: Codable {             var emailAddress : String         }         // name of property also changed so use a computed for old name         private var characteristics: Characteristic         var characteristic: Characteristic {             characteristics         }     }          // read an simple object     private var contactMediumNew: ContactMedium          enum CodingKeys: String, CodingKey {         case contactMediumNew = "contactMedium"     }     // but return an array     var contactMedium: [ContactMedium] {         [contactMediumNew]     } }`
Topic: App & System Services SubTopic: General Tags:
Dec ’22
Reply to how to complete code just ONE "tab"?
xCode enable completion up to the next possibility.
Replies
Boosts
Views
Activity
Dec ’22
Reply to Portrait only app for iPad
In xCode select the Target , goto general tab then iPad orientation
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Is gethostbyname safe?
The problem is mostly that the IP address may not be valid for certain access : web site may be addressed on the same IP address with different hostname which are redirected to different web pages (that is part of apache configuration possibilities for example). SO it may work work but be careful.
Replies
Boosts
Views
Activity
Dec ’22
Reply to Swift codable: an object that is come from an API, changed from type Array to Object
This is quite ugly but to can help you. The new structure read the new JSON but return the previous interface `// Old structure struct ContactMediumOld: Codable {     struct ContactMedium: Codable {         var type: String         struct Characteristic: Codable {             var emailAddress : String         }         var characteristic: Characteristic     }     var contactMedium: [ContactMedium] } // New structure struct ContactMediumNew: Codable {     struct ContactMedium: Codable {         var type: String         struct Characteristic: Codable {             var emailAddress : String         }         // name of property also changed so use a computed for old name         private var characteristics: Characteristic         var characteristic: Characteristic {             characteristics         }     }          // read an simple object     private var contactMediumNew: ContactMedium          enum CodingKeys: String, CodingKey {         case contactMediumNew = "contactMedium"     }     // but return an array     var contactMedium: [ContactMedium] {         [contactMediumNew]     } }`
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Swift codable: an object that is come from an API, changed from type Array to Object
I would suggest you change your code to not use an array now the API has changed. Trying to keep this code will make your app more difficult to maintain. BTW you could create a dummy private var that has a codingKey with this property and set the contactMedium to be an computed array var returning the object.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Can A Property In An ObservableObject listen to Another Property? How?
Use a computed property : var opacity: Double { disabled ? 0.5 : 1 }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
Where is the crash log ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Checking more than 2 variables in a if statement
You start correctly with && but continue with $$ .
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Xcode 14.0.1 gets stuck while Launching app
Can you be more precise ❓
Replies
Boosts
Views
Activity
Nov ’22
Reply to Apple Swift version 5.7 not working on Apple Swift version 5.6.1
Build your framework with xCode 13.4.1
Replies
Boosts
Views
Activity
Nov ’22
Reply to TableView and UISegmentedControl
You can add a tag to the segmented I trop that could be the row index. Then in the segmented control delegate method you can know from which row is the control by looking at its tag value.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to XCode Error
What happens if you suppress the 2 Color var ?
Replies
Boosts
Views
Activity
Nov ’22
Reply to Deprecated API Usage
May be you use a very old pod. Check for versions.
Replies
Boosts
Views
Activity
Nov ’22
Reply to How to avoid CoreData corruption when developing Share extension to CoreData in AppGroup?
On iOS extension and app may rarely be running at the same time as starting the extension will put the app to background. You can find more info here
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Hiding sub view in Stackview adds extra space
I would say fillEqually , but without seeing you stack view settings it is hard to tell.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22