After installing iOS 10b1 on my developer iPad Pro with no problems, using configuration profile and OTA update, I went to do the same thing on my iPhone 6 Plus. After it downloaded the file, I clicked "Install Now" agreed to the terms, and then it stuck on Verifying Update pop-up until screen went blank. 10 minutes later it was doing the same thing. As it disabled Touch on the screen, I had to do a soft reset on the phone to get back, where I tried again with same results. Anyone have a suggestion? I don't have enough free space to download and unpack the IPSW on my MacBook Air to install via iTunes or Xcode 8 Beta.
Post
Replies
Boosts
Views
Activity
I have 4,982 Photos and 397 Videos in my icloud photo library. When I opened Photos app in Beta 2, it would start uploading the entirety of the library, despite the fact that iCloud.com confirmed they were already all there. In Beta 3, it is still doing the same thing. To make it worse, if the screen locks, or I leave the app, it will start the process over again. While my iPhone and iCloud libraries show in sync, my iPad also running iOS 11 shows a different count. Anyone else having this issue? I have filed a bug report already
My app has a section that displays news from an RSS feed I maintain. This is all done with Obj-C, and I'd prefer not have to rewrite code that is working perfectly fine. However, I know that WidgetKit uses SwiftUI. So, is it possible to simply pass the NSObject that contains the parsed RSS data into the SwiftUI view for the widget, and have it do default refresh on timeline, plus refresh when a push notification comes in?
I have an existing Obj-C based app. One of its features is to show a UITableView of the last 10 entries from an RSS feed associated to the app.
I have created a Widget for this app to show whatever the most recent entry is on that RSS feed. I do this by parsing the RSS, adding that as the Timeline entry, and displaying it.
When you first install the app and add the widget, everything is good. It shows the last entry. However, if a new item is added to the RSS feed, it won't show up on the widget, no matter how long you wait. I can verify the item is there by installing fresh on a different device, and I'll see the new item, but the other device still shows the previous one. Here is how I am handling the timeline:
let textView = UILabel()
@State private var rssItems:[RSSItem]?
let feedParser = FeedParser()
func placeholder(in context: Context) -> SimpleEntry {
SimpleEntry(date: Date(), title:"News", description: "News article here", link: "Http://link", pubDate: "Today")
}
func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) {
let entry = SimpleEntry(date: Date(), title:"News", description: "News Article Here", link: "Http://link", pubDate: "Today")
completion(entry)
}
func getTimeline(in context: Context, completion: @escaping (Timeline<SimpleEntry>) -> ()) {
// WidgetCenter.shared.reloadAllTimelines()
var entries: [SimpleEntry] = []
feedParser.parseFeed(url: "https://fritchcoc.wordpress.com/feed") {(rssItems) in
self.rssItems = rssItems
let currentDate = Date()
let string1 = "Latest News: "
let string2 = rssItems[0].title
let dateString = rssItems[0].pubDate
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "EEE, d MMM yyyy HH:mm:ss zzz"
dateFormatter.locale = Locale.init(identifier: "en_US")
let dateObj = dateFormatter.date(from: dateString)
dateFormatter.dateFormat = "MM-dd-yyyy"
let newDateSTring = (dateFormatter.string(from: dateObj!))
let theURLTHING = URL(string: "game:///octo")!
var appendString1 = string1+string2
let entry = SimpleEntry(date: currentDate, title:appendString1, description: rssItems[0].description, link: rssItems[0].link, pubDate: newDateSTring)
entries.append(entry)
let refreshDate = Calendar.current.date(byAdding: .minute, value: 2, to: Date())!
let timeline = Timeline(entries: [entry], policy: .after(refreshDate))
completion(timeline)
}
}
}
Here is the Swift file I am using to parse. If you notice, I am even including a call to reloadAllWidgets along with calling the completion handler.
import WidgetKit
struct RSSItem {
var title: String
var link: String = ""
var description: String
var pubDate: String
}
class FeedParser: NSObject, XMLParserDelegate
{
var rssItems: [RSSItem] = []
private var currentElement = ""
private var currentTitle: String = "" {
didSet {
currentTitle = currentTitle.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
}
}
private var currentDescription: String = "" {
didSet {
currentDescription = currentDescription.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
}
}
private var currentPubDate: String = "" {
didSet {
currentPubDate = currentPubDate.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
}
}
private var currentLink: String = "" {
didSet {
currentLink = currentLink.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
}
}
private var parserCompletionHandler: (([RSSItem]) -> Void)?
func parseFeed(url: String, completionHandler: (([RSSItem]) -> Void)?)
{
// WidgetCenter.shared.reloadAllTimelines()
self.parserCompletionHandler = completionHandler
let request = URLRequest(url: URL(string: url)!)
let urlSession = URLSession.shared
let task = urlSession.dataTask(with: request) { (data, response, error) in
guard let data = data else {
if let error = error {
print(error.localizedDescription)
}
return
}
/// parse our xml data
let parser = XMLParser(data: data)
parser.delegate = self
parser.parse()
}
task.resume()
}
// MARK: - XML Parser Delegate
func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String] = [:])
{ //WidgetCenter.shared.reloadAllTimelines()
currentElement = elementName
if currentElement == "item" {
currentTitle = ""
currentDescription = ""
currentPubDate = ""
currentLink = ""
}
}
func parser(_ parser: XMLParser, foundCharacters string: String)
{ // WidgetCenter.shared.reloadAllTimelines()
switch currentElement {
case "title": currentTitle += string
case "content:encoded" : currentDescription += string
case "pubDate" : currentPubDate += string
case "link" : currentLink += string
default: break
}
}
func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?)
{
// WidgetCenter.shared.reloadAllTimelines()
if elementName == "item" {
let rssItem = RSSItem(title: currentTitle, link: currentLink, description: currentDescription, pubDate: currentPubDate)
self.rssItems.append(rssItem)
}
}
func parserDidEndDocument(_ parser: XMLParser) {
WidgetCenter.shared.reloadAllTimelines()
parserCompletionHandler?(rssItems)
}
func parser(_ parser: XMLParser, parseErrorOccurred parseError: Error)
{
print(parseError.localizedDescription)
}
}
In my app, I use the old GKImage library for adding pictures and being able to custom crop them easily. This works pretty well, except when it comes to iPad. On iPhone, everything works great. The main issue is this:
When I use an iPad, none of the barButtonItems are clickable.
Here is my code for this view:
(void)_actionCancel{
[self.navigationController popViewControllerAnimated:YES];
}
(void)_actionUse{
NSLog(@"PRESSED");
_croppedImage = [self.imageCropView croppedImage];
[self.delegate imageCropController:self didFinishWithCroppedImage:_croppedImage];
}
(void)_setupNavigationBar{
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(_actionCancel)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Use"
style:UIBarButtonItemStylePlain
target:self
action:@selector(_actionUse)];
}
(void)_setupCropView{
self.imageCropView = [[GKImageCropView alloc] initWithFrame:self.view.bounds];
[self.imageCropView setImageToCrop:sourceImage];
[self.imageCropView setResizableCropArea:self.resizeableCropArea];
[self.imageCropView setCropSize:cropSize];
[self.view addSubview:self.imageCropView];
}
#pragma mark -
#pragma Super Class Methods
(id)init{
self = [super init];
if (self) {
// Custom initialization
}
return self;
}
(void)viewDidLoad{
[super viewDidLoad];
self.title = @"Choose Photo";
[self _setupNavigationBar];
[self _setupCropView];
[self.navigationController setNavigationBarHidden:NO];
}
(void)viewWillLayoutSubviews{
[super viewWillLayoutSubviews];
self.imageCropView.frame = self.view.bounds;
}
The code used to present this controller is:
self.imagePicker = [[GKImagePicker alloc] init];
self.imagePicker.cropSize = CGSizeMake(280, 280);
self.imagePicker.delegate = self;
self.imagePicker.imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:self.imagePicker.imagePickerController animated:YES completion:nil];
Is it an issue with presenting the view controller?
I downloaded the profile for the beta of the AirPods Pro, got the latest Xcode beta, plugged in my phone to the computer while running the beta, and the developer window appeared on my phone settings. I went to the bottom, clicked on pre-release, and it showed my AirPods Pro, but every time I click to turn it on, it crashes the Settings app. Anyone else have this problem?
In my app, there is one small section that displays lyrics to songs (PDFs loaded in a WKWebView). What I want to be able to do, is have a button to mirror that screen to an Apple TV, still control it with the iPhone/iPad, but have it be the full screen, optimized for a TV display. To get going, I have just added a property for a secondWindow UIWindow in AppDelegate, just to test out a few things. The code below is all I have added. It does work well with showing the full contents of the app on the TV, without any black borders, but when I do this, the screen on my iPhone is just completely white. I know the reason for this is because I set the root controller of the 2nd Window to navController which is set up in XIB, and would normally be the root view controller of the iPhone app. I guess what I need to know, is there a way I can simply copy the navController for use with the other UIWindow? Or is there a better way, since all I really need mirrored is on one view that's buried further down inside the hierarchy?
At the end of the day, all I really need is to on ONE view, if it detects AirPlay screen, move the WKWebView to the AirPlay device, at full screen, add 4 buttons to phone screen (to navigate through the PDFs next screen, previous screen, next file, previous file) and then put everything back on the phone screen when swiping back to the table view where the choose the initial PDF
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
window.rootViewController = navController;
[window makeKeyAndVisible];
if ([UIScreen screens].count > 1) {
[self setUpSecondWindowForScreen:[UIScreen screens][1]];
}
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(handleScreenDidConnectNotification:)
name:UIScreenDidConnectNotification object:nil];
[center addObserver:self selector:@selector(handleScreenDidDisconnectNotification:)
name:UIScreenDidDisconnectNotification object:nil];
}
- (void)handleScreenDidConnectNotification:(NSNotification*)notification {
if (!self.secondWindow) {
[self setUpSecondWindowForScreen:[notification object]];
}
}
- (void)handleScreenDidDisconnectNotification:(NSNotification*)notification {
if (self.secondWindow) {
self.secondWindow = nil;
}
}
- (void)setUpSecondWindowForScreen:(UIScreen*)screen {
self.secondWindow = [[UIWindow alloc] init];
self.secondWindow.screen = screen;
self.secondWindow.screen.overscanCompensation = UIScreenOverscanCompensationNone;
UIViewController *viewController = [[UIViewController alloc] init];
viewController.view.backgroundColor = [UIColor redColor];
self.secondWindow.rootViewController = navController;
[self.secondWindow makeKeyAndVisible];
}
I have an UIStackView set up on the title view of the navigation bar in my app. It simply shows the icon of the app to the left of the title. In iOS 15 and earlier, this displayed fine. Right now, however, it shows fine the first time you launch the app, but navigating to a different view, the icon is in the wrong spot of THAT view, and will be in the incorrect spot when returning to the parent view as well. Pictures of this are below the code.
- (void)viewWillAppear:(BOOL)animated
UIImageView *theimageView = [[UIImageView alloc] init];
theimageView.contentMode = UIViewContentModeScaleAspectFit;
theimageView.image = [UIImage imageNamed:nameOfColor];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont fontWithName:@"Roboto-Bold" size:16];
titleLabel.textColor = [UIColor whiteColor];
titleLabel.text = self.title;
UIStackView *hStack = [[UIStackView alloc] init];
[hStack addArrangedSubview:theimageView];
[hStack addArrangedSubview:titleLabel];
hStack.axis = UILayoutConstraintAxisHorizontal;
self.navigationItem.titleView = hStack;
[super viewWillAppear:animated];
In my app, I need to set up an animation that will run on repeat until I perform an action on it. I want both an image to change, and text change along with it. I am trying now the suggested key frame animations, but it is only showing the last change and no repeats. I have done some searches and looking at the documentation, but I'm definitely still missing something.
It was my understanding that the animateKeyframesWithDuration is measured in seconds, while relative start and relative duration are 0 - 1 in value, so I set each to be 0.2, as there are 5, and 0.2 is exactly a fifth. What am I doing wrong? All of the NSLogs fire, but none of the events actually change, other than the final one.
[UIView animateKeyframesWithDuration:70 delay:0 options:UIViewKeyframeAnimationOptionRepeat animations:^{
[UIView addKeyframeWithRelativeStartTime:0 relativeDuration:0.2 animations:^{
NSLog(@"a1");
self.eventsText.text = nil;
theImageView.image = [UIImage imageNamed:@"welcome.png"];
}];
[UIView addKeyframeWithRelativeStartTime:0.2 relativeDuration:0.2 animations:^{
NSLog(@"a12");
theImageView.image = [UIImage imageNamed:@"pleasepray.png"];
self.eventsText.text = @"Test2";
}];
[UIView addKeyframeWithRelativeStartTime:0.4 relativeDuration:0.2 animations:^{
NSLog(@"a13");
theImageView.image = [UIImage imageNamed:@"comingevents.png"];
self.eventsText.text = @"Test3";
}];
[UIView addKeyframeWithRelativeStartTime:0.6 relativeDuration:0.2 animations:^{
NSLog(@"a14");
theImageView.image = [UIImage imageNamed:@"birthdays.png"];
self.eventsText.text = nil;
}];
[UIView addKeyframeWithRelativeStartTime:0.8 relativeDuration:0.2 animations:^{
NSLog(@"a14");
theImageView.image = [UIImage imageNamed:@"ournumbers.png"];
self.eventsText.text = @"Test4";
}];
} completion:nil];
Has anyone noticed a huge increase in space used for System Storage in Beta 1? Mine shows 40 GB, and has caused me to run out of space.
I have a UITableView that lists the files located in the app alphabetically. As there are over 1500 files, I'm trying to implement functionality to navigate by letter of the alphabet when the right button is clicked on the remote. The issue I'm having is that the TableView indeed moves to the right spot, but instead of being highlighted like it normally would, I get a lighter highlighted color, and clicking select does nothing. If I then navigate normally by pressing down, it moves it back up to the 2nd item in the list.
```- (void)viewDidLoad {
[super viewDidLoad];``
// We're setting the stage!
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.definesPresentationContext = YES;
self.currentIndex = 0;
// Time to call the stars for a rehearsal.
[self populateTheView];
// Let's make room for our magical focus director.
self.dapperFocusGuide = [[UIFocusGuide alloc] init];
[self.view addLayoutGuide:self.dapperFocusGuide];
// Red carpet time!
[self.dapperFocusGuide.topAnchor constraintEqualToAnchor:self.tableView.topAnchor].active = YES;
[self.dapperFocusGuide.leftAnchor constraintEqualToAnchor:self.tableView.leftAnchor].active = YES;
[self.dapperFocusGuide.widthAnchor constraintEqualToAnchor:self.tableView.widthAnchor].active = YES;
[self.dapperFocusGuide.heightAnchor constraintEqualToAnchor:self.tableView.heightAnchor].active = YES;
}- (void)populateTheView {
NSBundle *bundle = [NSBundle mainBundle];
self.title = @"Devo Songs";
self.files = [bundle pathsForResourcesOfType:@"pdf" inDirectory:@"WorshipSongs"];
NSString *documentsDirectoryPath = [self.files objectAtIndex:self.currentIndex];
self.filenames = [[documentsDirectoryPath lastPathComponent] stringByDeletingPathExtension];
NSMutableArray *names = [NSMutableArray arrayWithCapacity:[self.files count]];
for (NSString *path in self.files) {
[names addObject:[[path lastPathComponent] stringByDeletingPathExtension]];
}
self.files = [names sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self becomeFirstResponder];
// Initial spotlight position.
self.dapperFocusGuide.preferredFocusEnvironments = @[self.tableView.visibleCells.firstObject];
}
- (BOOL)canBecomeFirstResponder {
return YES;
}
- (void)handleRightButtonPress {
// Get the current name.
NSString *currentName = self.files[self.currentIndex];
// Get the current letter.
NSString *currentLetter = [currentName substringToIndex:1];
// Find the next index starting from the current index.
NSInteger nextIndex = self.currentIndex + 1;
while (nextIndex < self.files.count) {
NSString *nextName = self.files[nextIndex];
NSString *nextLetter = [nextName substringToIndex:1];
if (![nextLetter isEqualToString:currentLetter]) {
break;
}
nextIndex++;
}
// Check if we found a valid next index.
if (nextIndex < self.files.count) {
// Scroll the table view to the row corresponding to the next letter.
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:nextIndex inSection:0]
atScrollPosition:UITableViewScrollPositionTop animated:NO];
// Update the current index to the new index.
self.currentIndex = nextIndex;
// Deselect the current selected row (if any).
NSIndexPath *previousSelectedIndexPath = [self.tableView indexPathForSelectedRow];
if (previousSelectedIndexPath) {
[self.tableView deselectRowAtIndexPath:previousSelectedIndexPath animated:NO];
}
// Select the cell at the specified index.
NSIndexPath *indexPathToSelect = [NSIndexPath indexPathForRow:self.currentIndex inSection:0];
[self.tableView selectRowAtIndexPath:indexPathToSelect animated:NO scrollPosition:UITableViewScrollPositionNone];
UITableViewCell *cellToFocus = [self.tableView cellForRowAtIndexPath:indexPathToSelect];
self.dapperFocusGuide.preferredFocusEnvironments = @[cellToFocus];
} else {
// If we have reached the end of the list, reset the index to the first element.
self.currentIndex = 0;
// Scroll back to the top of the table view.
[self.tableView setContentOffset:CGPointZero animated:NO];
// Deselect the current selected row (if any).
NSIndexPath *previousSelectedIndexPath = [self.tableView indexPathForSelectedRow];
if (previousSelectedIndexPath) {
[self.tableView deselectRowAtIndexPath:previousSelectedIndexPath animated:NO];
}
// Select the cell at the specified index.
NSIndexPath *indexPathToSelect = [NSIndexPath indexPathForRow:self.currentIndex inSection:0];
[self.tableView selectRowAtIndexPath:indexPathToSelect animated:NO scrollPosition:UITableViewScrollPositionNone];
UITableViewCell *cellToFocus = [self.tableView cellForRowAtIndexPath:indexPathToSelect];
self.dapperFocusGuide.preferredFocusEnvironments = @[cellToFocus];
}
}
I have a pretty basic tvOS app. It uses storyboard named 'Main'. Before a week ago, all was fine. It would load no problems at all. I installed 17.2 on my Apple TV, and it crashes as soon as it opens. I tested this out in Xcode and it runs on a 17.0 simulator, but the 17.2 simulator crashes and the only message I get is
Exception NSException * "Could not load NIB in bundle: 'NSBundle </Users/Tyler/Library/Developer/CoreSimulator/Devices/A442BA1A-318B-43EC-850E-EA0CFA7AAB95/data/Containers/Bundle/Application/CC57DE61-B9E4-49EE-A044-8FE00D709CB6/Piedmont Road Apple TV.app> (loaded)' with name 'kQf-Ef-Nxz-view-nK4-c0-71Y'" 0x0000600000c73d50
I have put in breakpoints, but it doesn't seem to help. Anyone have an idea what got changed with tvOS 17.2 to cause this?
I had my phone set up earlier with developer mode already on before 18 Betas came out. In my settings I can see the install pre-release software for AirPods, and it's turned on, but nothing has installed yet.
I don't have Sequoia running on my computer at all...is this something that absolutely HAS to be on in order to get the AirPods beta, or is that step simply only needed to turn on developer mode?