-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic iOS widget. r=francisco #224
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to manually run pod install
could you add this step to the npm postinstall? We are already running carthage there.
|
||
class MagnetScanner: NSObject { | ||
var scanner: MagnetScannerIOS.MagnetScanner!; | ||
var callback: ((Dictionary<String, AnyObject>) -> Void)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to save an instance of the callback?
@@ -5,7 +5,7 @@ | |||
<key>CFBundleDevelopmentRegion</key> | |||
<string>en</string> | |||
<key>CFBundleDisplayName</key> | |||
<string>MagnetWidget</string> | |||
<string>Magnet</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change it to 'Project Magnet'
@@ -54,7 +85,54 @@ class MagnetWidgetTableViewController: UITableViewController, NCWidgetProviding | |||
|
|||
toDisplay.append(url); | |||
|
|||
self.table.reloadData(); | |||
// Get url metadata. | |||
let metadataServer: String = "https://tengam.org/api/v1/metadata"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set this as a constant class attribute?
let task = session.dataTaskWithRequest(request, completionHandler: { | ||
(data, response, error) in | ||
guard error == nil else { | ||
print("Error: metadata server error", error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should do debugPrint here too, I know those are proper errors, but just to keep user's console clean.
# Uncomment this line to define a global platform for your project | ||
# platform :ios, '9.0' | ||
|
||
target 'Magnet' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh! Now we need both cocoapods and carthage?
} | ||
|
||
class MagnetMetadataClient: NSObject { | ||
let metadataServerUrl: NSURL = NSURL(string: "https://tengam.org/api/v1/metadata")!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool ;)
In order to compile this, I had to manually add the folder SwiftSerializer from Pods into the dependencies. |
No description provided.