Develop a coded solution for iOS app

$50

$50 Upwork Technology & Programming Overseas
743 days ago

Description

I am trying to copy a photo image to paste to Instagram Stories as the background image, and in parallel, copy a string, to manually paste thereafter via the Instagram Stories Link feature. I have developed a workaround solution that works, but lacks in reliability. I've appended it below. For example, if the Instagram mobile app had already been closed, then my workaround won't work. In addition, there are times when a prompt to "Allow Paste" pops up prior to pasting to Instagram, and in those instances, the delay again causes the workaround to fail. I have seen this is request is possible in examining the "NGL" iOS app, and am wondering how I might able to replicate their share behavior. The deliverable is this coded solution in Swift. My workaround (I had to replace bracket with parentheses in order to paste into job description): func presentToIG(with instagramUrlScheme: URL, _ pngImage: Data) ( let pasteboardItems = [["com.instagram.sharedSticker.backgroundImage": pngImage]] let pasteboardOptions: [UIPasteboard.OptionsKey: Any] = [.expirationDate: Date().addingTimeInterval(60 * 5)] UIPasteboard.general.setItems(pasteboardItems, options: pasteboardOptions) UIApplication.shared.open(urlScheme, options: [:]) ( isDone in if isDone ( DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.8) ( UIPasteboard.general.string = urlLinkString ) ) ) )

关注公众号,不定期副业成功案例分享
Follow WeChat

Success story sharing

Want to stay one step ahead of the latest teleworks?

Subscribe Now

Similar Teleworks

250.0 GBP Technology & Programming peopleperhour Overseas
2 days ago
30.0 USD Technology & Programming peopleperhour Overseas
10 hour ago