Post

Replies

Boosts

Views

Activity

Using SwiftUI APIs introduced in iOS minor releases
I have a Swift package that uses SwiftUI.Font.width that was introduced in iOS 16.1 (and not like the documentation suggests in iOS 16.0) Using this function in Xcode 14.0 (iOS 16.0) results in a compilation error. I tried using a conditional compilation statement but I still receive a compilation error in Xcode 14.0. if #available(iOS 16.1, *) { var font = Font.system(.headline) font = font.width(Font.Width.condensed) } My Swift package has minimum swift-tools-version of 5.5. and even changing to 5.7 would mean that developers could use Xcode 14 theoretically :frowning: Any suggestions?
1
0
246
Mar ’23
[SSL Pinning] NSPinnedDomains will be honored by which APIs?
Hi, which APIs will honor NSPinnedDomains ? I read the article Identity Pinning: How to configure server certificates for your app and I was able to successfully verify SSL Pinning for URLSession but not for WKWebView. Is this expected? What aboutASwebAuthenticationSession or SFSafariViewController? I used Xcode 12.5, iOS Simulator 14.5, and Charles to pin leaf certificate for domain jsonplaceholder.typicode.com and to emulate man-in-the-middle (MIM) attack     <key>NSAppTransportSecurity</key>     <dict>       <key>NSAllowsArbitraryLoads</key>       <false/>       <key>NSPinnedDomains</key>       <dict>         <key>jsonplaceholder.typicode.com</key>         <dict>           <key>NSIncludesSubdomains</key>           <true/>           <key>NSPinnedLeafIdentities</key>           <array>             <dict>               <key>SPKI-SHA256-BASE64</key>               <string>frajXjTbS+rTizBNs0tFkpyy0eEv/Ar4+7HtsFRL5ow=</string>             </dict>           </array>         </dict>       </dict>     </dict> Once I enabled SSL Proxying in Charles (emulating MIM attack) then the following code will return with an error as expected URLSession.shared.dataTask(with: URL(string: "https://jsonplaceholder.typicode.com/users")!) But information are getting loaded in web view. let webView = WKWebView() webView.load(URLRequest(url: URL(string: "https://jsonplaceholder.typicode.com/users")!)) Thanks and kind regards, Marco
3
1
2.4k
Jun ’21
Issue when trying to set "Do not embed" for dynamic library
Hi,I am a framework developer and want to use a Swift package as a dependency in my framework. When adding a Swift package to a project, choosing package product "Foo" of kind "Dynamic Library" then it is added to the desired target. The dynamic library appears in Target as following:General -&gt; Framework and LibrariesName: FooEmbed: Embed + SignBuild Phases -&gt; Link Binary with LibrariesName: FooStatus: RequiredBuild Phases -&gt; Embed FrameworksName: FooCode Sign on Copy: ✓Issue: When I attempt to switch embed status toDo not Emb, Xcode again will simply delete the dependency.Observed in Xcode versions: 11.3.1 and higherExpected behavior: Xcode shall allow to use Do not Embed in my framework's project file and let the main project embed the libraryWorkaround: Modify the xcodeproj file manually with a text editor and remove the embed phase. This was proposed in https://forums.swift.org/t/is-this-an-xcode-bug-or-somehow-related-to-spm/33987/2I'd like to know if Xcode behavior is a bug. If it is not a bug then it would be great to explain the rationale behind it. Is it that in theory, the main project could embed one version of the library binary while the framework is linked against another resulting in unexpected behavior.Thanks,Marco
2
0
2.5k
May ’20