Post

Replies

Boosts

Views

Activity

Excluding few frameworks while extracting IPA
Hi,I have an Xcode project with multiple targets. I added a few custom frameworks to all the targets which increase the IPA file size. Actually, a few targets don't need to have these custom framework.I know we can exclude these frameworks by removing them from "Build Phases->Link Binaries With Libraries" for the particular target, but I am exploring to see whether these can be achieved by having a script so that we don't have to remove/add them manually whenever required.I have a custom plist file for each target which tells whether these frameworks are needed. Is there any command available to remove/strip the framework from the target while building the app so that I can write a script by referring the plist value.
2
0
1.9k
Feb ’19
New privacy policy
 My question about the new privacy policy -> https://developer.apple.com/app-store/app-privacy-details/   My mobile app collects app location and customer email address and pass those information to the back end for the process. Since I don’t use those data for tracking purpose , I wanted to know whether I need to disclose those datatypes under privacy section or can be skipped if it's optional.
1
0
584
Nov ’20
Swift package manager
I have an Xcode project that generates xyz.framework and that framework is used by other teams for their app. Updating the framework is a manual process. So I am planning to covert my xyz.framwork source to swift package manager. I couldn't find any such articles. Please let me know if there is any resource around this topic.
0
0
420
Apr ’21
Objective C protocol implementation in Swift
I have a framework written in Objective-C. My framework is in Swift and imported the 3rd party Objective-C framework in my project. @interface AAAA: NSObject(void)setHandler:(idHandler)handler @end I wanted to implement the Handler protocol in my Swift project. I did like this Class ZXY: NSObject, Handler{ init(){ super.init AAAA.setHandler(self) } // Implemented Handler Protocol optional methods func aaaa(){ } } Handler protocol optional method aaaa never called. Am I missing anything
1
0
1.1k
May ’21
Decoding Downloaded Data
I know that using using JSONDecoder we can convert the downloaded JSON data into class/struct object. Is there a way to do the same for raw data(NSData)/octect. Since downloaded is not a json, I am getting error. I have class like this public struct FileData: Codable{ public var data: Data? public init (data: Data? = nil){ self.data = data } } Is there a way to assign the downloaded data to FileData().data via decoding
7
0
596
Jun ’21
How to present a view with modal animation programmatically
I have a framework that will be consumed by other developers to develop the app. I designed a view using SwiftUI in that framework and wanted to present that view with model animation programatically from the framework. There are many sample that shows how to present a view with modal animation associated with button tap. Can anyone let me know how to present a view modal programmatically?
0
0
413
Jul ’21
Present SwiftUI without tap
I wanted to present an View with modal animation full screen on top the the existing view/viewcontroller programmatically(without button tap or tap gesture). Is it possible to present a view without button tap/tap gesture?
2
0
1.1k
Jul ’21
Pass Data from Swift to SwifUI
I developed a framework in Swift and designed a screen/view via SwiftUI. SwiftUI view will be presented on top of the Window by the class written in Swift. Now I need to pass the data from the Swift class to SwiftUI. Could one any help to know the best practice to pass the data to show the progress from Swift class to Swift UI. func A () {} func B () { // score will get updated frequently score = .... ScorePresenter().presentScoreUI() } } import SwiftUI struct ScorePresenter: { func presentScoreUI() { let hostController = UIHostingController(rootView: ScoreUI()) hostController = .overCurrentContext topViewController()!.present(hostController, animated: true, completion: nil) } } struct ScoreUI: View { var score = 1 Text(score).foregroundColor(.green) } When ever score changes in Score class ScoreUI must be updated accordingly.
2
1
1.2k
Jul ’21
DataFlow from Swift to SwfitUI
I have the business logic in Swift class and built UI using SwiftUI. Below the high level code that shows how SwiftUI and its subview receives the data from Swift. Please let me know if its correct approach class SwiftClass{     var score = "1"     func A () {}          func B () {         // score will get updated frequently         let scoreModal =  ScoreUIViewModel()         let scoreUI: ScoreUI = ScoreUI(showModal: .constant(true), scoreUIViewModel: scoreModal)         DispatchQueue.main.async {             scoreUI.displayScoreUI()         }        // score getting updated from another class         scoreModal.score = score // score getting updated from another class         score  = "2"         scoreModal.score = "2" // score getting updated from another class         score  = "3"         scoreModal.score = "3" // score getting updated from another class        score  = "4"         scoreModal.score = "4"      .......              } } import SwiftUI class ScoreUIViewModel: Observable {     @Published score: String } struct ScoreUI: View {     @State var scoreUIViewModel: ScoreUIViewModel     func displayScoreUI() {         let hostController = UIHostingController(rootView: ScoreUI())         hostController = .overCurrentContext         topViewController()!.present(hostController, animated: true, completion: nil)     }.environmentObject(scoreUIViewModel)      } struct ScoreText: View {     @EnvironmentObject var scoreUIViewModel: ScoreUIViewModel     Text(score).foregroundColor(.green) }
3
0
752
Jul ’21