Post

Replies

Boosts

Views

Activity

Reply to self is used before all properties are initialized (Swift)
You need to declare the callback in ModelDemo(). Otherwise you get error : Missing argument for parameter 'callback' in call Insert 'callback: <#() -> ()#>' This should work (or at least compile): typealias CallBack = () -> () struct ModelDemo { var callback : CallBack? // () -> () } final class ViewModelDemo { var modelDemo = ModelDemo(callback: nil) init() { modelDemo.callback = modelCallback } private func modelCallback() { } }
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’21
Reply to IOS 13
The most likely reason was that iPhone 6 had not the capability to run some iOS 13 functions, notably the processor capability. Performance (and user experience) would have been too poor. You can still update to iOS 12.5.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’21
Reply to Alice Messages Exercise
Show the book and tell exactly what you don't understand. While loop have 2 patterns: while someCondition { // Do something } or repeat { // do something } while otherCondition With the first one, someCondition is tested before executing ; so there may be no iteration at all With the second otherCondition is tested after an iteration is executed: it is thus executed at least once.
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’21
Reply to Xcode Interface looks different to Apple Tutorial, looking for solution
I check Xcode and the interface looks different, I am running the latest version of Xcode. Yes indeed. What you see in tutorial is with Xcode 12.5. With Xcode 13, it is different and you have no more to choose aLifecycle. If you select SwiftUI, lifecycle is automatically SwiftUI Lifecycle. I'm unsure what Organisation Identifier You should select a Team (which will exist if you have a developer account) and this will be automatically filled. So tell what you get in the Team popup menu. Also tell what you get in Xcode > Preferences > Accounts
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to How to find the swift version used to build .ipa file
These 2 links may provide help: https://forums.swift.org/t/how-can-i-determine-the-swift-compiler-version-used-to-create-a-framework/45039 with eskimo answer: Was your library compiled in ABI stable mode? That is, with Build Libraries for Distribution (BUILD_LIBRARY_FOR_DISTRIBUTION) set? If so, the .swiftinterface file contains the info you need: // swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) otherwise h t t p s : / / newbedev. com/how-to-check-the-ios-sdk-version-used-to-compile-ipa-or-app-file From there you should find the SDK. From SDK, you will find Xcode release https://xcodereleases.com/ And hopefully the Swift version.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to Xcode 13.1 is super slow even when typing code
Did you give your Mac enough time (couple of hours) to update all Xcode data ? Could be that the completion is slowing down because it has not completed some updates.
Replies
Boosts
Views
Activity
Nov ’21
Reply to Xcode 13.1 is super slow even when typing code
You may also try to uncheck "Show live issues" In Xcode > Preferences > General
Replies
Boosts
Views
Activity
Nov ’21
Reply to how to match/search Metacharacters using RegularExpression?
You should escape the escape: var regex = try! NSRegularExpression(pattern: "[\\D]", options:[]) You could also try using class func escapedPattern(for string: String) -> String https://developer.apple.com/documentation/foundation/nsregularexpression/1408386-escapedpattern
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to UIAlertController disappearing instantaneously for iOS 15
Did you try to pait it again ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to How do I take user`s input textfield of Longitude and Latitude to plot Annotation on map?
You do not show how you defined savedLat and savedLong. Are they Star var ? What is the error message you get ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to self is used before all properties are initialized (Swift)
You need to declare the callback in ModelDemo(). Otherwise you get error : Missing argument for parameter 'callback' in call Insert 'callback: <#() -> ()#>' This should work (or at least compile): typealias CallBack = () -> () struct ModelDemo { var callback : CallBack? // () -> () } final class ViewModelDemo { var modelDemo = ModelDemo(callback: nil) init() { modelDemo.callback = modelCallback } private func modelCallback() { } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Carnegie Mellon tool for filling out privacy nutrition labels (beta testing)
Why don't you just go with TestFlight ? That would avoid soliciting on the forum, which is not appropriate IMHO.
Replies
Boosts
Views
Activity
Nov ’21
Reply to Unable to accept banking agreement update
Just some ideas. In Appstore Connect, select Agreements, Tax, and Banking > Agreements  Select Paid Apps in the list. And see if you can do it there. Otherwise, did you try with a different browser (that would be surprising).
Replies
Boosts
Views
Activity
Nov ’21
Reply to Recognizing text
but the Width is slightly smaller, and the X position centers the outline around the text. Could you explain with a screen capture ? On which device ? Portrait or Landscape or both ?
Replies
Boosts
Views
Activity
Nov ’21
Reply to Swift playgrounds 4
They just invited developers to test Playground 4: h t t p s : / / w w w.macrumors.com Apple Invites Some Developers to Try Swift Playgrounds 4 Ahead of Launch
Replies
Boosts
Views
Activity
Nov ’21
Reply to IOS 13
The most likely reason was that iPhone 6 had not the capability to run some iOS 13 functions, notably the processor capability. Performance (and user experience) would have been too poor. You can still update to iOS 12.5.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Alice Messages Exercise
Show the book and tell exactly what you don't understand. While loop have 2 patterns: while someCondition { // Do something } or repeat { // do something } while otherCondition With the first one, someCondition is tested before executing ; so there may be no iteration at all With the second otherCondition is tested after an iteration is executed: it is thus executed at least once.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Xcode Interface looks different to Apple Tutorial, looking for solution
I check Xcode and the interface looks different, I am running the latest version of Xcode. Yes indeed. What you see in tutorial is with Xcode 12.5. With Xcode 13, it is different and you have no more to choose aLifecycle. If you select SwiftUI, lifecycle is automatically SwiftUI Lifecycle. I'm unsure what Organisation Identifier You should select a Team (which will exist if you have a developer account) and this will be automatically filled. So tell what you get in the Team popup menu. Also tell what you get in Xcode > Preferences > Accounts
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to How to find the swift version used to build .ipa file
These 2 links may provide help: https://forums.swift.org/t/how-can-i-determine-the-swift-compiler-version-used-to-create-a-framework/45039 with eskimo answer: Was your library compiled in ABI stable mode? That is, with Build Libraries for Distribution (BUILD_LIBRARY_FOR_DISTRIBUTION) set? If so, the .swiftinterface file contains the info you need: // swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) otherwise h t t p s : / / newbedev. com/how-to-check-the-ios-sdk-version-used-to-compile-ipa-or-app-file From there you should find the SDK. From SDK, you will find Xcode release https://xcodereleases.com/ And hopefully the Swift version.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to My Proposal for development
This has been considered many times. If you search the web with voice authentication, you will find a lot. So that may be a good idea but not new.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’21