jpmartha / eggsbenedict Goto Github PK
View Code? Open in Web Editor NEWEggsBenedict is a library for sharing picture on Instagram written in Swift.
License: MIT License
EggsBenedict is a library for sharing picture on Instagram written in Swift.
License: MIT License
Even though the sendImage
method is called, the image hasn't been sent to Instagram app yet.
I think it is not necessary to implement the following:
} catch let sharingFlowError as SharingFlowError {
completion?(sharingFlowResult: .Failure(self.imagePath, sharingFlowError))
return
https://github.com/JPMartha/EggsBenedict/blob/develop/EggsBenedict/SharingFlow.swift#L114-L116
The SharingFlowError
enumeration adopts the ErrorType
protocol.
Even though I sent an image that was different from the sample image, the sample image was displayed on Instagram App.
What's the difference between the presentOpenInMenuFromRect
method and the presentOpenInMenuFromBarButtonItem
method?
I'm not sure if I should implement the latter.
I thought the same on my iPhone.
This library has implemented the UIDocumentInteractionController
Class' presentOpenInMenuFromRect
method.
sendImage
method, and the menu is displayed.removeTemporaryImage
method, and handle the following error.Error Domain=NSCocoaErrorDomain Code=4 "“jpmarthaeggsbenedict.ig”を削除できませんでした。" UserInfo={NSFilePath=/private/var/mobile/Containers/Data/Application/(an omission)/tmp/jpmarthaeggsbenedict.ig, NSUserStringVariant=(
Remove
), NSUnderlyingError=0x1372c62b0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
It takes some time to displaying the menu for the first time.
Define protocol following Instagram's sharing flow.
Swift 3 update coming?
Regards
SharingFlowError
} catch let error as NSError {
completion?(sharingFlowResult: .Failure(self.imagePath, error))
https://github.com/JPMartha/EggsBenedict/blob/develop/EggsBenedict/SharingFlow.swift#L115-L116
And, I think it is not necessary to implement the following:
guard !self.imagePath.isEmpty else {
completion?(sharingFlowResult: .Failure(self.imagePath, SharingFlowError.ImagePathIsEmpty))
return
}
https://github.com/JPMartha/EggsBenedict/blob/develop/EggsBenedict/SharingFlow.swift#L125-L128
On branch develop-protocol, SharingFlowIGOExclusivegram
cannot be constructed because it has no accessible initializers.
The image file in tmp/
directory isn't removed after sending it to Instagram app.
But if the deinitializer remove it, Instagram app doesn't start.
I think that it would be better to make adaptation to CocoaPods of this library.
What is the best practice for error handling?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.