{"action":"created","issue":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/76","repository_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase","labels_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/76/comments","events_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/76/events","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/76","id":165987483,"number":76,"title":"Error in firebase.init: ReferenceError: Can't find variable: FIRApp","user":{"login":"sean-perkins","id":13732623,"avatar_url":"https://avatars.githubusercontent.com/u/13732623?v=3","gravatar_id":"","url":"https://api.github.com/users/sean-perkins","html_url":"https://github.com/sean-perkins","followers_url":"https://api.github.com/users/sean-perkins/followers","following_url":"https://api.github.com/users/sean-perkins/following{/other_user}","gists_url":"https://api.github.com/users/sean-perkins/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-perkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-perkins/subscriptions","organizations_url":"https://api.github.com/users/sean-perkins/orgs","repos_url":"https://api.github.com/users/sean-perkins/repos","events_url":"https://api.github.com/users/sean-perkins/events{/privacy}","received_events_url":"https://api.github.com/users/sean-perkins/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-17T17:53:09Z","updated_at":"2016-08-29T17:17:52Z","closed_at":"2016-07-17T18:24:38Z","body":"I feel like it's an issue with how I have configured the plugin, but after spending 2-3 hours on debugging; I am reaching out for help.\r\n\r\nDependency Version:\r\n`\"nativescript-plugin-firebase\": \"^3.4.3\",`\r\n\r\nError Code:\r\n```\r\nJul 17 13:41:40 [92254]: CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:310:18: Error in firebase.init: ReferenceError: Can't find variable: FIRApp\r\nJul 17 13:41:40 [92254]: CONSOLE LOG file:///app/main.js:17:16: firebase.init error: ReferenceError: Can't find variable: FIRApp\r\n```\r\n\r\nIt is throwing errors on initialization.\r\n\r\nmain.ts\r\n\r\n```\r\nimport firebase = require(\"nativescript-plugin-firebase\");\r\n\r\nfirebase.init({\r\n    // Optionally pass in properties for database, authentication and cloud messaging,\r\n    // see their respective docs.\r\n    storageBucket: 'gs://icebreaker-c8e62.appspot.com',\r\n    persist: true,\r\n    iOSEmulatorFlush: true\r\n}).then(\r\n    (instance) => {\r\n        console.log(\"firebase.init done\");\r\n    },\r\n    (error) => {\r\n        console.log(\"firebase.init error: \" + error);\r\n    }\r\n    );\r\n```\r\n\r\nThe `GoogleService-Info.plist` file is located in `App_Resources/iOS/`\r\n\r\nI have also attempted to drop and re-add the iOS platform:\r\n-  `tns platform remove ios`\r\n-  `tns platform add ios`\r\n\r\nWhich will produce the following log on emulation:\r\n```\r\nSuccessfully prepared plugin nativescript-angular for ios.\r\nSuccessfully prepared plugin nativescript-intl for ios.\r\nThe iOS Deployment Target is now 8.0 in order to support Cocoa Touch Frameworks in CocoaPods.\r\nSuccessfully prepared plugin nativescript-plugin-firebase for ios.\r\nSuccessfully prepared plugin tns-core-modules for ios.\r\nThe iOS Deployment Target is now 8.0 in order to support Cocoa Touch Frameworks.\r\nSuccessfully prepared plugin tns-core-modules-widgets for ios.\r\nInstalling pods...\r\nAnalyzing dependencies\r\nDownloading dependencies\r\nInstalling Firebase (3.3.0)\r\nInstalling FirebaseAnalytics (3.2.1)\r\nInstalling FirebaseAuth (3.0.3)\r\nInstalling FirebaseCrash (1.0.6)\r\nInstalling FirebaseDatabase (3.0.2)\r\nInstalling FirebaseInstanceID (1.0.7)\r\nInstalling GoogleInterchangeUtilities (1.2.1)\r\nInstalling GoogleNetworkingUtilities (1.2.1)\r\nInstalling GoogleParsingUtilities (1.1.1)\r\nInstalling GoogleSymbolUtilities (1.1.1)\r\nInstalling GoogleUtilities (1.3.1)\r\nGenerating Pods project\r\nIntegrating client project\r\n\r\n[!] Please close any current Xcode sessions and use `icebreaker.xcworkspace` for this project from now on.\r\nSending stats\r\nPod installation complete! There are 4 dependencies from the Podfile and 11 total pods installed.\r\n```\r\n\r\n`tns --version` is 2.1.1\r\n\r\nThe `GoogleService-Info.plist` is successfully copied to `platforms/ios/{project_name}/Resources/`.\r\n\r\nI was able to get the sample app working correctly and cannot find out where the differences are between my implementation and the sample.\r\n"},"comment":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/comments/243189948","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/76#issuecomment-243189948","issue_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/76","id":243189948,"user":{"login":"sean-perkins","id":13732623,"avatar_url":"https://avatars.githubusercontent.com/u/13732623?v=3","gravatar_id":"","url":"https://api.github.com/users/sean-perkins","html_url":"https://github.com/sean-perkins","followers_url":"https://api.github.com/users/sean-perkins/followers","following_url":"https://api.github.com/users/sean-perkins/following{/other_user}","gists_url":"https://api.github.com/users/sean-perkins/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-perkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-perkins/subscriptions","organizations_url":"https://api.github.com/users/sean-perkins/orgs","repos_url":"https://api.github.com/users/sean-perkins/repos","events_url":"https://api.github.com/users/sean-perkins/events{/privacy}","received_events_url":"https://api.github.com/users/sean-perkins/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T17:17:52Z","updated_at":"2016-08-29T17:17:52Z","body":"@diestrin Please refer to this page: https://developer.apple.com/library/mac/recipes/xcode_help-project_editor/Articles/BasingBuildConfigurationsonConfigurationFiles.html\r\n\r\nYou will see drop downs in your xcode project, that allow you to change the build targets. When I was experiencing this issue, I changed the build target, built the project and then changed the build target back."}}
{"actor":{"display_login":"sean-perkins"}}