Post

Replies

Boosts

Views

Activity

Can an app have multiple widget extensions?
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.
4
0
6.9k
Jun ’20
Help With MLRecommender / CreateML Recommendation
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.
1
0
1.1k
Feb ’20
App Store Connect Rejects Binary - Unable to Compile Bitcode
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.
8
0
3.9k
Jun ’19
Trying (failing) to use CreateML to create model for named entity rec w/ Natural Language framework
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
3
0
1.9k
Sep ’18
Shortcuts: "There was a problem with the app"
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.??
11
0
8.6k
Jun ’18
CloudKit.js: Sort by Created Date
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?
6
0
2.8k
Dec ’15
CloudKit.js: Querying for IN of Array of References
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!
3
0
1.5k
Sep ’15
UILabel truncates inside UIStackView?
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?
6
2
21k
Aug ’15