{"action":"created","issue":{"url":"https://api.github.com/repos/snej/MYUtilities/issues/16","repository_url":"https://api.github.com/repos/snej/MYUtilities","labels_url":"https://api.github.com/repos/snej/MYUtilities/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/snej/MYUtilities/issues/16/comments","events_url":"https://api.github.com/repos/snej/MYUtilities/issues/16/events","html_url":"https://github.com/snej/MYUtilities/pull/16","id":258269241,"number":16,"title":"Fix disabling background monitor feature for App Extension","user":{"login":"pasin","id":801454,"avatar_url":"https://avatars1.githubusercontent.com/u/801454?v=4","gravatar_id":"","url":"https://api.github.com/users/pasin","html_url":"https://github.com/pasin","followers_url":"https://api.github.com/users/pasin/followers","following_url":"https://api.github.com/users/pasin/following{/other_user}","gists_url":"https://api.github.com/users/pasin/gists{/gist_id}","starred_url":"https://api.github.com/users/pasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasin/subscriptions","organizations_url":"https://api.github.com/users/pasin/orgs","repos_url":"https://api.github.com/users/pasin/repos","events_url":"https://api.github.com/users/pasin/events{/privacy}","received_events_url":"https://api.github.com/users/pasin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-17T00:52:28Z","updated_at":"2017-09-18T18:19:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/snej/MYUtilities/pulls/16","html_url":"https://github.com/snej/MYUtilities/pull/16","diff_url":"https://github.com/snej/MYUtilities/pull/16.diff","patch_url":"https://github.com/snej/MYUtilities/pull/16.patch"},"body":"* NS_EXTENSION_UNAVAILABLE_IOS is for marking that the method is not available for App Entension, not for branching the code.\r\n\r\n* Instead of using NS_EXTENSION_UNAVAILABLE_IOS, explicitly check if the code is run in the App Extension or not. I have seen the React Native library using this technique for checking if the app extension is running or not.\r\n\r\n* Access shared application by using performSelector so the code can also be used with the App Extension target."},"comment":{"url":"https://api.github.com/repos/snej/MYUtilities/issues/comments/330311846","html_url":"https://github.com/snej/MYUtilities/pull/16#issuecomment-330311846","issue_url":"https://api.github.com/repos/snej/MYUtilities/issues/16","id":330311846,"user":{"login":"pasin","id":801454,"avatar_url":"https://avatars1.githubusercontent.com/u/801454?v=4","gravatar_id":"","url":"https://api.github.com/users/pasin","html_url":"https://github.com/pasin","followers_url":"https://api.github.com/users/pasin/followers","following_url":"https://api.github.com/users/pasin/following{/other_user}","gists_url":"https://api.github.com/users/pasin/gists{/gist_id}","starred_url":"https://api.github.com/users/pasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasin/subscriptions","organizations_url":"https://api.github.com/users/pasin/orgs","repos_url":"https://api.github.com/users/pasin/repos","events_url":"https://api.github.com/users/pasin/events{/privacy}","received_events_url":"https://api.github.com/users/pasin/received_events","type":"User","site_admin":false},"created_at":"2017-09-18T18:19:57Z","updated_at":"2017-09-18T18:19:57Z","author_association":"CONTRIBUTOR","body":"The following trick did return an application object.\r\n\r\n```\r\nClass c = NSClassFromString(@\"UIApplication\"); // or [UIApplication class]\r\nid app = [c sharedApplication];\r\nNSLog(@\"Shared App = %@\", app);\r\n```"}}
{"actor":{"display_login":"pasin"}}