AmitaiB / gtm-http-fetcher

Automatically exported from code.google.com/p/gtm-http-fetcher
Other
0 stars 0 forks source link

Unable to use in iOS App Extension due to sharedApplication #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create an iOS app and app extension using Xcode
2. Follow instructions to use Endpoints in iOS client: 
https://cloud.google.com/appengine/docs/python/endpoints/consume_ios
3. Include Google API Obj-C Client in app extension

What is the expected output? What do you see instead?

To be able to use the client / endpoints API inside an App Extension

Instead, I get the following error when trying to build:

GTMHTTPFetcher.m: 'sharedApplication' is unavailable: not available on iOS (App 
Extension) - Use view controller based solutions where appropriate instead.

What version of the product are you using? On what operating system?

Xcode: 6.1.1
iOS: 8
Mac: 10.10.1

Please provide any additional information below.

It works properly in the main app, just not in an app extensions

Original issue reported on code.google.com by benjbea...@gmail.com on 15 Jan 2015 at 11:43

GoogleCodeExporter commented 9 years ago
I have opened a pull request at GitHub: 
https://github.com/google/gtm-http-fetcher/pull/12

If you want to use GTMHTTPFetcher in an iOS App Extension, you need to disable 
background fetching by defining the "GTM_BACKGROUND_FETCHING=0" as a 
preprocessor macro in your App Extension target.

Original comment by tobias.h...@gmail.com on 24 May 2015 at 1:57