Post

Replies

Boosts

Views

Activity

Reply to Error initialising UnsafeMutablePointer<ObjCBool>
Thanks for the reply. I was mistaking something - there is no need to declare 'stop' outside the closure! That said it doesn't explain the error. The following produces the same error, which I reckon is a compiler bug: import Foundation class Test {     func test() {         let stop:UnsafeMutablePointerObjCBool         stop.initialize(to: false)     } }
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Error initialising UnsafeMutablePointer<ObjCBool>
If you look at the documentation for UnsafeMutablePointer you will see that the memory pointed to has to be initialised, not the pointer itself and that the initialize method does this. This is confirmed by declaring stop as a var as in:     func test() {         var stop:UnsafeMutablePointerObjCBool         stop.initialize(to: false)     } This still fails the same way. I will report it as a compiler bug. I think that enumerateAttribute initialises it to false anyway, which is why this code isn't needed in the first place.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Dynamic type & custom font
Just found that the following code does the trick, it just needs amending to include traits:     class func preferredCustomFont(for fontFamily: String, andTextStyle textStyle: UIFont.TextStyle) - UIFont {         let systemFontDescriptor = UIFontDescriptor.preferredFontDescriptor(withTextStyle: textStyle)         let customFontDescriptor = UIFontDescriptor.init(fontAttributes: [             UIFontDescriptor.AttributeName.family: fontFamily,             UIFontDescriptor.AttributeName.size: systemFontDescriptor.pointSize // use the font size of the default dynamic font         ])         // return font of new family with same size as the preferred system font         return UIFont(descriptor: customFontDescriptor, size: 0)     }
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’21
Reply to IOS document icon not appearing
After much experimenting and googling I came across the answer to this. The answer is as follows: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>public.data</string> </array> <key>UTTypeDescription</key> <string>Writing Shed Data</string> <key>UTTypeIconFiles</key> <array> <string>writingshed.png</string> </array> <key>UTTypeIdentifier</key> <string>www.writing-shed.comuk.Writing-Shed.data</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>wsd</string> </array> </dict> </dict> </array> <key>UTImportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>public.data</string> </array> <key>UTTypeDescription</key> <string>Writing Shed Data</string> <key>UTTypeIconFiles</key> <array> <string>writingshed.png</string> </array> <key>UTTypeIdentifier</key> <string>www.writing-shed.comuk.Writing-Shed.data</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>wsd</string> </array> </dict> </dict> </array>
Topic: Media Technologies SubTopic: General Tags:
Oct ’21
Reply to Provisioning profile failed qualification
I select the archive in the Xcode organiser and click Distribute App. Choose App Store connect click next choose upload chick next choose upload symbols and manage version number 7 click next 8 Choose automatically manage signing 9. click next 10 Fails with Provisioning profile failed qualification/Profile doesn't include the selected signing certificate.
Oct ’22