ios8,ios-app-extension,uti,ios8-share-extension , NSItemProvider loadItemForTypeIdentifier:options:completionHandler: for any kind of (binary) file


NSItemProvider loadItemForTypeIdentifier:options:completionHandler: for any kind of (binary) file

Question:

Tag: ios8,ios-app-extension,uti,ios8-share-extension

I am implementing iOS Share Extension for my app, and I want to be able to get any kind of file into my app extension (e.g. a binary file of any type shared from Dropbox).

How can I achieve this behavior? loadItemForTypeIdentifier:options:completionHandler: expects a UTI, I've tried providing an empty string but it didn't work.


Answer:

Solved my own problem. I've tried public.data for the UTI and it seems to work perfectly with any kind of file that I've tried.


Related:


Setting “AppleLanguages” doesn't change app language


ios,swift,ios8
I am trying to implement a function that can change app language. I tried to set it like this: let defaults = NSUserDefaults.standardUserDefaults() defaults.setObject("de", forKey: "AppleLanguages") And after app restart language is still 'system default'. Now I test different languages by setting Scheme > Application Language > language. But is...

create a popup window with just a textview/string and a button SWIFT ios 8


iphone,swift,ios8,popup,xcode6
I am very new to ios 8 and swift but I have not found a way to make a simple popup window whenever a button is pushed. I payed for tutorials and they still don't cover it. All i would like is for when the user pushes a button (the...

UITableview with more than One Custom Cells with Swift


swift,uitableview,ios8,xcode6
As absolute beginner I have to ask those questions: I want to use a UItableview with different custom TableviewCells. One Cell should have an image and a label. Another cell should have two label. A third cell should have a dayPicker. I don't have to create Tage cell in the...

How to disable the Copy/Hide feature in UIImagePickerController when long pressing a image …?


ios,swift,ios8,uiimagepickercontroller,ios8.3
- Actually am using UIImagePickerController for my usecase,and if i long press any picture ,it shows Copy/Hide option (as shown in the sample image) - I dont want the Copy/Hide feature. Guide me with some suggestions if u too have encountered :)... Thanks in advance...iOS Geeks...PLZ refer my code snippet...

iOS 8 Autolayout - Visual Format Language how to add constraint to superview's edge


ios,swift,ios8,autolayout,nslayoutconstraint
Can I pin my view to my superView's edge instead of its layout margin through VFL? Can I be even flexible to toggle "Relative to margin" on myView as well? NO VFL (this is what I want to achieve with Visual Format Language): var constraintLeft = NSLayoutConstraint(item: myView, attribute: NSLayoutAttribute.Left,...

Opening and closing form animation


ios,ios8,core-animation,ios-animations
Is this animation possible in iOS, any third party API's for that? ...

A Plugin to view PDF document in iOS cordova based application


ios,iphone,ios8,phonegap-plugins,cordova-plugins
Can please suggest a working plugin to view PDF in iOS Cordova based application. I have tried many of PDF related plugins: https://github.com/siegfriedbolz/cordova-plugin-file-opener2.git https://github.com/RandyMcMillan/PDFViewer but of no use..My application stopped at loading. Lastly with I have tried with pebois/phonegap-plugin-PDFViewer: I have installed using : "cordova plugin add com.lesfrancschatons.cordova.plugins.pdfreader" In index.html:...

Swift - Issue trying to access to Singleton object


swift,design-patterns,ios8,singleton,apple
This is my first question on StackOverflow, I'll try to be specific. I am trying to implement the Singleton pattern on my app, without success so far. When I try to access to my Singleton, it seems that the program is not accessing the real singleton, but a copy of...

Switch between views using a Tabbar


ios,xcode,swift,ios8
I have an iOS application with a Tab Bar, and two subview. My first view is a Table View. So, I want to switch to the second view when I click on a cell of the first view, and keep the TabBar visible. When I do that using "Show" segue...

UI Local Notification - Background Reschedule


xcode,swift,ios8,uilocalnotification
I'm learning to develop application for ios with swift, and I'm one doubts, already googled and i not found. I'm creating a to-do list app, and was wondering if there is a way to reschedule a notification when it appears to the user For example the user registers a task...

Using the device simulator for iOS 8 with Xcode 7


ios8,xcode7,ios9
I thinking about port my App to Swift 2 and Xcode 7. But the device simulator only targets iOS 9 and I see no way to download iOS 8. I have parallel Xcode 6.3 installed. Is there any way to test and debug my app under iOS 8 with the...

Fatal error when unwrapping CLLocation Location Coordinate


ios,iphone,swift,ios8,optional
I currently have a test application to teach myself Core Location. It is an app with a button which will either show your location when you press a button, or an alert when location services are off. I get a fatal error (unexpectedly found nil when unwrapping option value) When...

Image inside html in UIWebview not fit properly


iphone,ios8,uiwebview,xcode6
I want to show google updates ,webpages are responsive but image width is not showing properly and go out of the boundary. Here is content of webpage. <div dir="ltr" style="text-align: left;" trbidi="on"><span id="docs-internal-guid-489c1670-b0dc-d32d-645e-eaf6ca555069"><span style="font-family: Verdana; font-size: 13.3333333333333px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;"><img alt="whats_new_doc_header_may2015LL.gif" height="112px;"...

UICollectionView cell height/scrollable content behaving strange/incorrect


ios,ios8,autolayout,uicollectionview,uicollectionviewcell
I'm trying to make UICollectionView work like UITableView (I want the extra flexibility of collection view instead of just going with table view, both for some current and possible future feature extensions); having a fixed width (screen width) and dynamic cell height (just like iOS 8's new table view feature)....

Shuffle NSArray


ios8,nsarray
I got an NSMutableArray with a rather small number of objects that varies from 1 to max 20. When user taps a button I want to select one random object and display it. I've tried shuffling the array: srandom(time(NULL)); for (NSInteger x = 0; x < [array count]; x++) {...

Can an app with deployment target iOS 8.3 run on iOS 8.2?


ios,iphone,xcode,ios8,ios8.3
I am about to release my first app. In Xcode, I set the deployment target as 8.3. When testing my app with third party testing platform, it looks like my app can't been installed on a device running iOS 8.2. So I have the following questions about the iOS compatibility:...

Bluemix authentication ios8 with google and facebook


facebook,authentication,ios8,bluemix,google-authentication
I am trying to implement two types of authentication from an iOS8 device in the bluemix platform. I succeeded in adding one type of authentication: google. I am using a ADVANCED MOBILE ACCESS module, and I am at the User Authentication part. It looks from a dashboard like I can...

Wikitude does not work. Poi do not change the position on phone position change


ios,objective-c,ios8,augmented-reality,wikitude
I am trying to integrate AR poi view with Wikitude in my app. As html I used a file from the example 4_PointOfInterest_4_SelectingPois. It should render a few point around my location. It does it, but all points stay in the same position all the time, although I changed my...

Autolayout works great on iOS 8, crashes on iOS 7


ios,ios7,ios8,autolayout
I have an issue where a screen with autolayout that works great on iOS 8 - but crashes on iOS 7. All subviews are configured in the XIB. The error message is: Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to install constraint on view. Does the constraint reference...

UILabel text isn't updated when modal re-appears


ios,iphone,swift,ios8
I've created a reusable modal UIView as a singleton object, but am having trouble changing the text of a label it contains. When the modal appears a second time, the new text appears over the old text. I'm guessing this is due to the fact that the label is only...

Cannot invoke 'canEvaluatePolicy' with an argument list of type '(LAPolicy)' Swift2.0 Xcode 7


ios,swift,ios8
I have a problem with canEvaluatePolicy function. I have declared this function like this : func canEvaluatePolicy(policy: LAPolicy) { do { try authenticationObject.canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics) } catch let error as NSError { print("Error: \(error.domain)") } } But when I want to use it like this: if authenticationObject.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics) { I have an error:...

Blur Effect on TableViewCell when scroll


ios,objective-c,uitableview,ios8,uiimageview
Right now I'm using LBBlurredImage to blur an image, but I want to change to iOS8's UIVisualEffectView to blur instead. I'm having a hard time implementing, any ideas? Implemented with LBBLurredImage: - (void)updateData { // Set up Screen self.screenHeight = [UIScreen mainScreen].bounds.size.height; //UIImage *background = [UIImage imageNamed:@"gray"]; UIImage *background =...

Parse.com Framework Sort Date Next Birthday


ios,swift,parse.com,ios8
Need to sort on iOS by date using Parse.com but I need to order them based on the next birthday for a specific person. I tried to add the day and month with the current or next year and that helped but that will be a manual process, any recommendations...

How to i create new arrays using swift?


ios,arrays,swift,ios8
I'm not exactly sure what I am looking for, so I'm just going to give you an example... Inside App Lets say I am making a shopping list app. In the app, you can create as many shopping lists as you like, and in those shopping lists, you can add...

When creating new tableView entry the constraints don't work


uitableview,ios8,nslayoutconstraint
I have a Master-Detail application that uses CoreData. Everything is hooked up fine and works as expected. There is just one problem with the display when adding a new entry. On the left is the Master's TableView with the entries and on the right is the Detail's View, where the...

How do I set the UISearchController's searchBar to a view that isn't the tableHeaderView or navigationItem.titleview?


ios,swift,ios8,uisearchbar,uisearchcontroller
I'm trying to keep the search bar in view as the table scrolls. At the moment I'm placing it as the header in a tableview, and it works as it should, but of course the search bar scrolls off screen as you go down the table. I thought I could...

Auto Rotation iOS 8 Navigation Controller


objective-c,iphone,ios8,uinavigationcontroller,autorotate
I have certain viewControllers which are managed by a UINavigationController (push and pop). I want to restrict different viewControllers to different orientations like the first one should be only in Portrait, second in portrait, third in landscape and fourth can be portrait and landscape both. I set a ViewController on...

UISearchController: show results even when search bar is empty


ios,iphone,ios8,uisearchcontroller
As I understand, the default behaviour of UISearchController is: On tapping search bar, background is dimmed and 'cancel' button is shown. SearchResultsController is not shown till this point. SearchResultsController is displayed only if search bar is not empty. I want to display SearchResultsController even when search bar is empty but...

Core Location and UITableView performance issues in iOS 8


objective-c,uitableview,google-maps,ios8,core-location
I have a view controller that contains two views: a map view using the Google Maps API and a UITableView. The view controller fetches a list of location objects from Google Maps within a certain radius of a particular location and plots them on the map view as markers and...

Move UIToolbar with keyboard iOS8


xcode,ios8,uitoolbar
I have a UIToolbar at the bottom of my ViewController that is inherited from the self.navigationController. I show it in my ViewController in the viewWillAppear: method using this code: [self.navigationController setToolbarHidden:NO animated:NO]; self.navigationController.toolbar.backgroundColor = [UIColor blackColor]; self.navigationController.toolbar.tintColor = [UIColor blackColor]; self.navigationController.toolbar.barStyle = UIBarStyleBlackOpaque; After that, my ViewController has both programmatically...

Error after update to Swift 1.2


ios,xcode,swift,ios8,xcode6.3.2
I updated shortly to Swift 1.2 which comes with Xcode 6.3.2 and wrote a few lines of code: let originView:UIView! override init() { super.init() } init(sourceView:UIView, menuItems:Array<String>){ super.init() originView = sourceView } This code runs perfect till I updated the new version of Xcode (6.3.2). Now I get the following...

Why is boundingRectWithSize wrong when using UIFont preferredFontForTextStyle?


ios8,nsstring,uilabel,uifont
I have found that a call to boundingRectWithSize is extremely incorrect, missing an entire additional line, when called with NSFontAttributeName : [UIFont preferredFontForTextStyle:UIFontTextStyleBody]. However, using the font [UIFont fontWithName:@"Helvetica Neue" size:17.f], it is just fine. Here is test code showing the bug: - (void)viewDidLoad { [super viewDidLoad]; NSString *measureText =...

Swipe up to show button in UITableView?


ios,swift,uitableview,ios8,uicollectionview
I'd like to place a button at the top of a UITableView or UICollectionView, but only shown when swiped up beyond the first row. Usually you see scroll to refresh or a search bar there, but I'd like to put a button there for another functionality. How can I do...

Getting error in Adjust library, Integrated with Pods


objective-c,ios8,cocoapods
I am getting this error: ld: library not found for -lPods-Adjust clang: error: linker command failed with exit code 1 (use -v to see invocation) I added this to my Podfile: pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.2.5' I have installed pods successfully, but still get the above error....

UITextView inside UICollectionViewCell insists on growing horizontally


ios,ios8,autolayout,uicollectionview,uicollectionviewcell
I have a UITextView inside my UICollectionView cell, and it keeps getting growing horizontally depending on its content. My collection view is set to be vertically scrolling, and the cells calculate their own size. I want my text view to grow vertically depending on its contents, not horizontally. Here is...

Pods project with App Extension started failing to build


ios,xcode,xcode6,cocoapods,ios-app-extension
I was working on my app, haven't changed any setting or pod, and I tried to archive a build after about two weeks, and it failed. Then I tried to debug build (normal Cmd+R) and it failed with the error: ld: library not found for -lPods-AFNetworking I've tried pod install...

poptorootviewcontroller and instruct rootviewcontroller to perform some action


ios,swift,ios8
I have a navigationcontroller, and under that I have controller A as rootviewcontroller and controller B is linked to A through a default push segue. What I want to do is to when some action is pressed in B, I will ask the navigation controller to pop to rootviewcontroller, which...

SpriteKit SKCropNode Masks everything


objective-c,ios8,sprite-kit,mask,skcropnode
I am trying to mask a node with SKCropNode class. I am doing it with my own init method in SKCropNode inherited class: - (id)init { self = [super init]; if (self) { self.maskNode = [[SKSpriteNode alloc] initWithColor:[SKColor blackColor] size:(CGSize){50,50}]; SKSpriteNode *contentNode = [[SKSpriteNode alloc] initWithImageNamed:@"Spaceship"]; [self addChild: contentNode]; self.userInteractionEnabled...

canEvaluatePolicy Extra argument 'error' in call Swift Xcode 7


ios,xcode,ios8,xcode7
I work with Xcode 7 with swift and I would use the Touch Id. Only I have a error when I use canEvaluatePolicy. I understand my error, I call an argument too. Only if I do not call, it makes me a error because I did not manage my error...

How to add directions among two custom locations in Mapview for IOS 7 (objective c)


objective-c,ios7,ios8,mkmapview
I have to add directions among two custom locations in IOS 7. Any one tell me please. Thanks. ...

Restrict app for iPhone devices lower than iPhone 5 with iOS 8 or 7 in AppStore


iphone,ios8,app-store
I planned to develop application with targeted devices iPhone 5/5S, iPhone 6/6+ . I don't want my application to be runnable on iPhone 4S. Can i able to achieve that? I googled some sites , they were mentioned that we can restrict older version mobiles like iPhone 3GS using front...

Cannot subscript a value of type [CLPlacemark] with an index type int


ios,xcode,swift,ios8,xcode7
I would like to retrieve the current location. I work with on swift Xcode 7. I looked PLUSIEUR tutorials, but every time they use the same method. Here is my code and my error: ! Error : Cannot subscript a value of type [CLPlacemark] with an index type int import...

Why does didUpdateLocations: only have one location after locationManagerDidResumeLocationUpdates:


ios8,cllocationmanager
I have location services working in iOS8. It is set for kCLLocationAccuracyBest using startMonitoringSignificantLocationChanges to restart when in the background and startUpdatingLocation for accuracy. When I set pausesLocationUpdatesAutomatically = YES, the location services get paused and resumed as expected. However, the following call to didUpdateLocations: only has one location in...

View set as inputAccessoryView throws exception when added back into normal view


ios,ios8,uikeyboard,inputaccessoryview
I have a text view, some decorations etc. in a view and I want that view to dock on keyboard, just like any other messaging app. When I'm about to display my text view, here is how I attach my view to the keyboard: -(BOOL)textViewShouldBeginEditing:(UITextView *)textView{ UIView *inputView = self.textInputView;...

iOS 8 simulators not visible in XCode 7 beta


ios8,xcode7
I'm using the XCode 7 beta that Apple released during WWDC2015, and it looks like iOS8 simulators are not there in it. I tried downloading them using the Xcode > Preferences > Downloads > Components, but it doesn't list the simulators. I have Xcode 6.3.2 also on the mac, and...

iOS 8 Swift 1.2 and Parse - Attempt to present UIAlertController on ViewController whose view is not in the window hierarchy


ios,objective-c,swift,parse.com,ios8
There are many questions on Stack concerning this issue, but none of them seem to solve the issue I'm having. I am using ParseUI for the login and signup portion of my application. What I would like to have happen is for a UIAlertController to be presented when a user...

Pass data from one view controller to the next WITHOUT a segue in swift


iphone,swift,uiviewcontroller,ios8,segue
So I have an app that where you choose a button in the first screen it will bring you to another screen depending on which one you chose on the first one. Because I have these possible different layouts I can't just use a segue from one button to the...

delay showing UIMapView until map fully loaded in Swift


swift,ios8,mkmapview
On my story board, I have set up a timer (which updates every 0.01 seconds) and a UIMapView which displays the user's location when the view controller is loaded. However, when this screen loads, the timer lags for a bit until the map is fully loaded. I assume this is...

Test-Flight App beta testing time limitations


ios,iphone,ipad,ios8,testflight
I need to submit my binary files over the air without pushing app to app-store. one solution is using enterprise program, Test-Flight App Beta Testing we can send binary files to external users to limit of 1000. My Questions is : will apple take beta review (following apple guidelines) of...

Remove “heightForRowAtIndexPath” for iOS8


ios,ios7,ios8,deprecated,heightforrowatindexpath
I'm trying to solve this problem for two days before finding the solution. Here it is. ====== Hi everyone, I actually manage the height of my tableViewCell in iOS7 with the delegate method heightForRowAtIndexPath: Now, in iOS8 I use the property tableView.rowHeight = UITableViewAutomaticDimension with autolayout and it works great...