iOS9 - Sharing to Instagram (w/ hooks) not working

家住魔仙堡 提交于 2019-12-03 03:03:02

After changing this line of code:

NSURL *igImageHookFile = [[NSURL alloc] initFileURLWithPath:newJpgPath];

to this:

NSURL *igImageHookFile = [NSURL URLWithString:newJpgPath];  

The Instagram-share function for iOS 9 is now working. It seems that the previous line of code, converting the NSString to an NSURL would place "--://file" at the end of the URL path, which doesn't seem to register well with iOS 9. Simply converting the NSString to NSURL without initialising as a file URL seems to work.

embersofadyingfire

You have to add a new key to your Info.plist file; it's an iOS 9 change for URL schemes. Check out the first answer for this question: iOS 9 not opening Instagram app with URL SCHEME. And just FYI, iOS 9 changes the "Open in Instagram" title for the UIDocumentInteractionController to "Copy to Instagram." Not sure why.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!