Category: Xcode
How to preview SwiftUI views in Xcode Playground.
Previewing SwiftUi code using Xcode playgrounds can be done by using settings live view or UIHostingController. Let us see this by using the following code snippet (SwiftUI View) which displays a button that increments a counter. UIHostingController Setting Live View
Privacy Manifests and Required Reason API
Most of the iOS developers might have received an email about “Privacy Manifest” issues from Apple when submitting an app for review. “We noticed one or more issues with a recent submission for App Store review ITMS-91053: Missing API declaration, TMS-91064: Invalid tracking information etc. You must include a NSPrivacyAccessedAPITypes array in your app’s privacy…
Auto Layout in iOS
Using Auto Layout feature developers can align UI controls for different devices, screen sizes and orientation. This reduces the code to be maintained and makes life easy for the developers. Auto Layout solves UI design issues by creating relationship between the UI elements. This follows constraint based layout system where you can define contraints for…
Cocoapods Permission Error
Received the following error while trying to run pod install. errno::EACCES – Permission denied @ dir_s_mkdir – /Users/<username>/.cocoapods/repos/trunk/Specs/9/3 So I had to run the command as sudo – sudo pod install. This successfully installed the pods for the project. But when trying to open the Xcode workspace, again received permission denied error for the Xcode…
Memory management in Swift
Memory management in Swift is done by Automatic Reference Counting or ARC. Whenever a variables holds an instance of an object the memory count for that object increases by 1. And when variable becomes out of scope or set to nil, the memory count decreases 1. In the above example, we are creating two instances…
Attribute Unavailable: Estimated section warning before iOS 11.0
Xcode 13 (iOS 15) displays the following warning message for project having minimum deployment as iOS 10. Attribute Unavailable: Estimated section header height before iOS 11.0 Attribute Unavailable: Estimated section footer height before iOS 11.0 This warning gets displayed for new UITableViewController added to the Storyboard file. You can get rid of the warning messages…
Xcode – framework not found FIRAnalyticsConnector
Tried updating all pods in Xcode projects using pod update. Noticed the following messages in the log. After doing Xcode build, noticed the following error. Framework not found FIRAnalyticsConnector Looks like firebase pod has been updated and to remove the above error, navigate to Build Settings and search for “FIRAnalyticsConnector” Open the “Other Linker Flags”…