Posts

Post not yet marked as solved
17 Replies
23k Views
I've got an iOS framework that I've had around for ages. It's a mixture of Objective-C and Swift. Since installing Xcode 12, I'm now getting a bunch of warnings of the type: 'Double-quoted include in framework header, expected angle-bracketed instead' If I go to the various source files and say change: #import "Place.h" to #import <VegasKit/Place.h> then I get an error saying it can't find the file. If I try this: #import <Place.h> then I get an error telling me to go back to double-quotes, i.e. undo the change. Any idea what I can do to get this all setup correctly? Thanks.
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
1 Replies
332 Views
Hi, New in iOS 17 and the aligned releases is a modifier "toolbarTitleDisplayMode". What does this do exactly? https://developer.apple.com/documentation/SwiftUI/View/toolbarTitleDisplayMode(_:) I've experimenting with it a bunch and can't ever see it do really anything so I'm sure I'm using it wrong. What is this for?
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
6 Replies
19k Views
So, using UIStackView, I've noticed that some UILabels seem to want to truncate instead of wrap to a new line... Anyone else noticed this? The label's number of lines is set to 0.There's a stack view with two labels in it. The stack view is setup to be horizontally and vertically centered in its superview with at least 10 points from the trailing and leading margins. I'd expect the labels to wrap to a new line, not truncate.Any thoughts?
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
4 Replies
5.9k Views
Is there a problem with an app having more than one widget extension? I previously had two 'Today View' extensions that I'm replacing but after installing the app on device with two widget extensions, I'm only seeing the second one in the widget picker. I see that there's WidgetBundle but my two widgets have very different datasets so the timeline stuff won't mesh.
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
0 Replies
400 Views
I'm using the new multiplatform target option in Xcode 14 to add an iPad target to an existing macOS app. The macOS app uses the Sparkle framework to update itself. Sparkle is a macOS-only framework. I added the iPad target and specified the Sparkle framework should only apply to the macOS build but when trying to build the app, Xcode complains that the Sparkle framework doesn’t exist for iOS (true but should not be relevant). Xcode is trying to build/include Sparkle even though it’s marked to not include for iOS builds. Has anyone had any success with this?
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
6 Replies
2.5k Views
Hi,I've got my CloudKit records with created and modifed setup to be sortable and queryable but I'm having a hard time constructing a CloudKit.js query that will use those values.This: var query = { recordType: "MyRecord", sortBy: [{ fieldName: 'created' }] };This doesn't work, I get this error:Unknown field 'CKFieldName{_name='created'}I also tried 'createdDate', 'modified', 'modificationDate' and all give the same error. What's the magic?
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
0 Replies
526 Views
Hi, With iOS 15 we can now update the nsPredicate and nsSortDescriptors properties on a @FetchRequest which is great. What I'm wondering though is the correct way to apply/re-apply user data stored in @State and/or @SceneStorage for predicates when a view is init'd. Something like @SceneStorage isn't available in the init method but I find that onAppear isn't called in some circumstances. For example, let's say I have a picker that drives the NSPredicate and the user picks a non-default value. If the app goes into the background and then back to the foreground and that same view is visible, it looks like SwiftUI re-runs the init for the view but does not re-run the onAppear modifier, leaving my UI in an inconsistent state. What's the right way to handle this? Feels like I must be fighting the framework / there must be a better way.
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
2 Replies
1.6k Views
Hi, I'm trying to use Table in an app sort of similar to the garden example but imagine if there was a third view in the NavigationView for a third column. And then imagine that if you selected a single plant in the middle table, a sort of detail inspector would appear in the third position with the data from your selection, updating as the selection in the middle table changed. I'm struggling a bit to get this working. I've tried: Wrapping the table column content closure's contents in a NavigationLink. This sort of works but it styles things oddly in the table column and as I scroll around, it seems to trigger on it's own, I'm guessing as cells are re-used or something behind the scenes. This feels wrong. Moving row creation into the rows: parameter with TableRow but the only modifier there is for drag and drop, there's no onTapGesture or similar. Watching for changes to the selected item via the binding and then acting on it then - this fires when I select stuff and I can get the related model object but I can't put a NavigationLink in there as it's outside of the view hierarchy so I'm not sure how to act on it. I'm guessing there's some other way to handle this that I'm simply not thinking of but if anyone has any pointers, much appreciated!
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
1 Replies
879 Views
FB9509674 "Failed to start remote service "com.apple.debugserver" on device" Anyone seeing the above error trying to debug apps on the device? The app does get installed but the debug session does not start and instead this error pops up. I've tried rebooting both the Mac and the device but no luck. Mac is M1 MBP device is iPhone 12 Pro.
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
11 Replies
7.8k Views
I'm playing with Shortcuts.Siri is telling me "There was a problem with the app" whenever I call the completion handler with a success message. My failure states work.I backed out my custom code and literally just returning static strings in my completion and I'm still getting the error. I'm not really sure how to debug this or where it's going wrong... I'm sending a correctly formed intent response.??
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
3 Replies
1.7k Views
I'm trying to use CreateML to build a model I can use with the new Natural Language framework for domain-specific named entity recognition in scanning some text. It's actually very very similar to the example in the WWDC '18 video introducing the Natural Language Framework where they add a bunch of products and recognize them.The problem I'm having is that the results I'm getting when I run text through an NLTagger with this model are very inaccurate.Imagine an app for people visiting Las Vegas, NV. I want to be able to identify names of hotels, restaurants and other activities as such. I have training data that looks like this (there's a lot more but it all follows this pattern).{"tokens":["Bellagio","Buffet at Bellagio","Fix Restaurant and Bar","Harvest","Jasmine","Lago","Le Cirque","Michael Mina","Noodles","Picasso","Prime","Spago","Yellowtail","Spa \u0026 Salon","Fountains of Bellagio","Gallery of Fine Art","Hyde Lounge","Lily Bar and Lounge","O ","Petrossian Bar"],"labels":["Hotel","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Restaurant","Activity","Activity","Activity","Activity","Activity","Activity","Activity"]}Here's a Playground with my test code. With the below, I'd expect 'Bellagio' to come back as 'Hotel' but when I print the tokens and tags, they all come back as... not that. And some times, the same token comes back as two different tags (i.e. 'MGM Grand' below).What am I doing wrong? Bad training data? Bad training data format? Unrealistic expectations? I have no idea what I'm doing?The last one is definitely true.In the WWDC video demo, it seems to work great and it seems very similar to what I'm doing so not sure where I'm off.import CreateML import Foundation import NaturalLanguage let wordFilePath = Bundle.main.path(forResource:"vegas_words", ofType: "json")! let wordFileURL = URL(fileURLWithPath: wordFilePath) let trainingData = try MLDataTable(contentsOf: wordFileURL) let model = try MLWordTagger(trainingData: trainingData, tokenColumn: "tokens", labelColumn: "labels") let compiledModel = try NLModel(mlModel: model.model) let text = "When in Las Vegas I like to stay at the luxury hotel Bellagio or perhaps Wynn Las Vegas but not MGM Grand or the Luxor. Sometimes I like to dine at Delmonico at The Venetian or at one of the places at MGM Grand." let range = text.startIndex..<text.endIndex var vegasTagScheme = NLTagScheme("Vegas") var tagger = NLTagger(tagSchemes: [.nameType, vegasTagScheme]) tagger.string = text tagger.setModels([compiledModel], forTagScheme: vegasTagScheme) tagger.setLanguage(NLLanguage("en"), range: range) tagger.enumerateTags(in: range, unit: .word, scheme: vegasTagScheme, options: [.omitWhitespace, .joinNames, .omitPunctuation]) { (tag, tokenRange) -> Bool in let token = text[tokenRange] if let tag = tag { print("\(token): \(tag.rawValue)") } return true }When: Hotel in: Hotel Las Vegas: Hotel I: Restaurant like: Restaurant to: Restaurant stay: Restaurant at: Restaurant the: Restaurant luxury: Restaurant hotel: Restaurant Bellagio: Restaurant or: Restaurant perhaps: Restaurant Wynn Las Vegas: Restaurant but: Restaurant not: Restaurant MGM Grand: Restaurant or: Restaurant the: Restaurant Luxor: Restaurant Sometimes: Activity I: Activity like: Activity to: Activity dine: Activity at: Activity Delmonico: Activity at: Activity The: Activity Venetian: Activity or: Activity at: Activity one: Activity of: Activity the: Activity places: Activity at: Activity MGM Grand: Activity
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
3 Replies
1.4k Views
Howdy,Let's say I've got an 'Order' record type and a 'Transaction' record type. Transaction has a reference to order.I have an array of recordNames of orders and I want to get transactions that match any of the orders. Can I do this? I've been having trouble. var orderReferences = []; orderIdentifiers.forEach(function(orderIdentifier) { var orderReference = { recordName: orderIdentifier, action: "NONE" }; orderReferences.push(orderReference); }); var query = { recordType: "Transaction", filterBy: [{ fieldName: 'order', comparator: 'IN', fieldValue: { value: orderReferences } }] };(forgive my perhaps terrible JS - it's not a language I use a lot)This doesn't work, I get an error back from the server saying it could not decode my reference (I assume because I'm trying to query with an array of references?)How is this supposed to work?Thanks!
Posted
by Hunter.
Last updated
.
Post marked as solved
8 Replies
3.5k Views
On builds submitted with Xcode 11b2, after successfully uploading a build I'm getting an email a few minutes later with the following message:ITMS-90562: Invalid Bundle - The app submission can not be successfully recompiled from bitcode due to missing symbols during linking. You can try to reproduce and diagnose such issues locally by following the instructions from: https://developer.apple.com/library/archive/technotes/tn2432/_index.htmlAnyone seen this before and know how to resolve? Following the link, I'm able to export an ad-hoc build with bitcode without any errors locally.
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
1 Replies
809 Views
Since running on iOS 14b1, I'm getting this in my log (I have Core Data logging enabled): error: Store opened without NSPersistentHistoryTrackingKey but previously had been opened with NSPersistentHistoryTrackingKey - Forcing into Read Only mode store at 'file:///private/var/mobile/Containers/Shared/AppGroup/415B75A6-92C3-45FE-BE13-7D48D35909AF/StoreFile.sqlite' As far as I can tell, it's impossible to open my store without that key set - it's in the init() of my NSPersistentContainer subclass, before anyone calls it to load stores. Any ideas?
Posted
by Hunter.
Last updated
.
Post not yet marked as solved
1 Replies
956 Views
So, I'm playing around a little bit with CreateML and MLRecommender and I'm having a hard time figuring out how to create and train my model. I've got a very simple data set for experimenation but the tools keep kicking things back. Clearly I'm missing something.Here's my data set, movie reviews in CSV format:user_id,movie_id,rating_id 1,Inception,4 1,Interstellar,5 2,Titanic,4 3,Titanic,1With CreateML, I've got a recommender for that file with 'Users' mapped to 'user_id', 'Items' mapped to 'movie_id', 'Ratings' mapped to 'rating_id'.When I ask it to train, I get a training error:"Number of string item ids specified (3) does not equal the number of items given (2)"Hmmmm, not sure what that means. Can anyone help? I feel like it must be something really obvious tht I'm missing but I've tried a bunch of variations without any luck.Any help appreciated.
Posted
by Hunter.
Last updated
.