ios8-today-widget

iOS Today Extension Table View Rows only detects taps on a label

北战南征 提交于 2020-01-10 04:04:46
问题 I am having the weirdest of problems with a today widget on iOS. I have a simple widget with a table view like this: https://grab.edr.io/2e557aa43a34b7460b1eac44cbcaf596.png The thing is, it only responds to touches (the rows only get highlighted) when I tap one of the labels, and not the rest of the row (which is blank). This happens on both device and simulator. I am detecting touches using tableView:didSelectRowAtIndexPath:, so I am not being able to see a problem there. Here is a

iOS Today Extension Table View Rows only detects taps on a label

荒凉一梦 提交于 2020-01-10 04:04:09
问题 I am having the weirdest of problems with a today widget on iOS. I have a simple widget with a table view like this: https://grab.edr.io/2e557aa43a34b7460b1eac44cbcaf596.png The thing is, it only responds to touches (the rows only get highlighted) when I tap one of the labels, and not the rest of the row (which is blank). This happens on both device and simulator. I am detecting touches using tableView:didSelectRowAtIndexPath:, so I am not being able to see a problem there. Here is a

Send message from iOS Today Widget to app

喜你入骨 提交于 2020-01-03 11:00:10
问题 I have an alarm app, recently powered it with a today widget extension. I need to turn on and off alarm from today widget, but the code to "turn on" and "turn off" is within app, not widget. How can I send a message from today widget to main app? 回答1: You should write the setting to a shared group NSUserDefault value. See App Extension Programming Guide. If you need to immediately notify the app from the extension or vice versa, you can also use Darwin notifications, but you can never be

xctool build with today extension

我的梦境 提交于 2020-01-03 10:42:09
问题 we have an app integrated with today extension, we use xctool and Jenkins to do continuous build and in-house distribution. In command line, before we use xctool -workspace our_workspace.xcworkspace -scheme app_schme -xcconfig path_to_xcconfig -configuration Release build archive -archivePath path_to_archive to generate archive and then export to .ipa, it works fine. But right now with today extension, we have to build it with another scheme and xcconfig, we put certificate and provisioning

How to rename an iOS 8 Today Widget?

点点圈 提交于 2020-01-01 01:26:31
问题 I've just started experimenting with adding an iOS 8 Today Widget to my app, it's going ok so far but I followed the original template and got my widget created with TodayWidget as its name. In the context of my app's files in Xcode that target/product name is fine. But sadly this is the name that also displays within notification centre, above my widget. I've tried tracing through various names in my project that match what's being displayed but so far I've yet to find one that lets me

Issue in Widgets in landscape mode

旧时模样 提交于 2019-12-25 04:47:10
问题 I have this irritating issue with widgets that it trims the content of my view in the landscape mode. I have put the content size statically but it doesn't work. Does Apple restrict the widget to have a specific height in landscape? Apple's interface guidelines says it's not recommended but is it doable? Edit: 回答1: There is a height limit for today widgets on iOS. The max height is (screen size) - (notification center UI height). Whatever's left after the notification center draws its UI is

How to include classes of main application in to today widgets in iOS?

不羁的心 提交于 2019-12-24 14:11:53
问题 I have got Class1.h in the main Application. And I have to use Class1.h in the Today Widget in iOS. What is the method to share the classes among the main app and widget in iOS ? 回答1: In Xcode, find Class1.m in the Project Navigator. Select it and, in the File Inspector, check the box next to your Today widget target under Target Membership. Then you should be able to import Class1.h in your Today widget code. 来源: https://stackoverflow.com/questions/34157254/how-to-include-classes-of-main

iOS App Today Extension not uploaded to physical device

荒凉一梦 提交于 2019-12-23 12:43:52
问题 I am creating a today widget for my app http://budgt.ch as some users have requested quick access to key functionality. The (preliminary) extension is working fine on iOS simulators, installed like this: 1) install latest container app 2) install extension with 'today' as container However: i cannot seem to get the extension to show on a physical device (i am currently testing with an iPhone 6). xcode says: Build successfull Extension is not showing up in today view any ideas what could be

EXC_BAD_ACCESS with viewWillTransitionToSize and Xcode 6.3

好久不见. 提交于 2019-12-23 12:43:06
问题 This code used to work in our today extension, but now EXC_BAD_ACCESS with using Xcode 6.3. What is the new problem? override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { coordinator.animateAlongsideTransition({ context in self.tableView.frame = CGRectMake(0, 0, size.width, size.height) }, completion: nil) } 回答1: Someone mentioned to me they think this is an Apple bug. Here's a workaround (or the solution):

Today Extension Crashes before launching on iOS 8.1.2

徘徊边缘 提交于 2019-12-21 03:43:07
问题 I've been making a today extension that downloads articles from a feed and display the latest ones. The whole thing worked fine on iOS 8, still worked on iOS 8.1, then came iOS 8.1.2 and we started having complaints about the today extension not working anymore. I tried debugging on iOS 8.1.2 devices, and before the extension even launch, it crashes with this error : Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key