Skip to content
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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

ferjm
Copy link
Member

@ferjm ferjm commented Aug 25, 2016

No description provided.

Copy link
Member

@arcturus arcturus left a 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)!
Copy link
Member

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>
Copy link
Member

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";
Copy link
Member

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);
Copy link
Member

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
Copy link
Member

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")!;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool ;)

@arcturus
Copy link
Member

In order to compile this, I had to manually add the folder SwiftSerializer from Pods into the dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants