I am developing an iPhone app using Xcode 7 beta 4 in Swift 2.0
I am trying to implement GCM push notifications following the google doc here
I have followed and completed the steps upto
"Add the configuration file to your project".
Now when I am trying to add "#import < Google/CloudMessaging.h >" in the file.
I am getting error.
The error is Consecutive statements on a line must be separated by ';' I think the import statement is not working.
Can some one please tell me how I can do it in the correct way?
The "#import <Google/CloudMessaging.h>" needs to be in your bridging header (which is a .h file), not in your .swift file.
You do have a bridging header file, don't you?
Related
I am using firebase for developing my app with Google Plist. While running I am getting below error, trying to add again and again but it's still getting error. Could anyone help me on this issue?
Error
Thread 1: "[FIRApp configure]; (FirebaseApp.configure() in Swift) could not find a valid GoogleService-Info.plist in your project.
As we discovered in the comment thread above, your plist file was named incorrectly. It needs to be named "GoogleService-Info.plist".
If you have downloaded this file or other Firebase plist files in the past, the names may have something appended to avoid collisions like "GoogleService-Info (1).plist", which needs to be renamed for the Firebase SDK to recognize it.
I'm manually adding some Firebase SDK's in my iOS app and have been following Firebase's provided readme to the letter. As it directs, I've already dragged all the SDKs I need into my project but there's one step I'm not understanding. It reads:
8. Drag the Firebase.h header in this directory into your project. This will
allow you to #import "Firebase.h" and start using any Firebase SDKs that you
have.
I've added the Firebase.h header file into my project but I don't know how/where to add #import "Firebase.h". Since I haven't done that, building my app produces the error: No such module 'Firebase' when I try to import Firebase in my view controllers.
For reference, I had been using cocoapods for Firebase up until the recent iOS 13.3.1 update that broke my ability to test my app on my physical device, so I'm attempting to manually add the static Firebase SDK's in the hopes that I would then be able to continue debugging on my iPhone 6s. I'm 75% of the way through my app's development and have already fully integrated Firebase so this little switch-over from pods to static SDKs is definitely annoying, but it has to be done. I removed all the Firebase pods I was using in my Podfile and am just stuck at the step bolded above... hopefully it's a simple thing and then everything will work again as I already have it completely integrated throughout my app.
If you'd like a deeper background, here's a Stack Overflow question that describes the exact initial problem I was having with debugging on my physical device with the 13.3.1 iOS update.
And here's where I asked for alternative ways to incorporate Firebase that avoids pods (in case that fixes the issue). This is where I learned about Firebase's zip binary distribution. I downloaded the zip file with the Firebase SDKs, chose the ones I need, and have been following the readme to add them to my project.
To add Firebase module support, you also need to do the subsequent instruction in the zip distribution README after dragging Firebase.h:
9. If you're using Swift, or you want to use modules, drag module.modulemap into
your project and update your User Header Search Paths to contain the
directory that contains your module map.
I followed this tutorial Xcode 6 Tutorial: iOS 8.0 Facebook Login in Swift.
But inside my Bridge-Header.h Xcode gives me an error in the import line (#import <FacebookSDK/FacebookSDK.h>): 'FacebookSDK/FacebookSDK.h' file not found
What should I do?
Thank you.
I had the same error when moving my project to another location. If you remove the FacebookSDK.framework from your project and add it again, the "file not found" error should disappear. Keep in mind that you must not check "Copy items ..." when adding the Facebook framework.
My question is a duplicate of this one. But that one (rightly)got closed as non constructive, with zero answer and with absolutely no use to anyone.
I am trying to connect to a external bluetooth accessory from my iPhone 5. The accessory is neither MFI certified nor support Bluetooth Low energy communication.
So my only option is to connect to it using a private Framework, and I am doing that since I am not intending to push my app to App store. The app is for personal use.
I am trying to use private BluetoothManager framework class, uses XCode 4.6 and my app is targeting iOS 6.0.
My current setup
Added a folder named Headers in bluetoothManager framework in sdk
folder
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework
Created 4 header files in that folder, namely
BluetoothAudioJack.h
BluetoothManager.h
BluetoothDevice.h
CTStructures.h
I got these header files from here.
Added BluetoothManager.framework to my project , using normal method
target->Build Phases->Link Binary with Libraries .
In my ViewController.h file, I imported the header file
#import "BluetoothManager.h"
This is it. Simply I am following this tutorial, but added the steps here just in case the tutorial went down.
My problem
I am yet to get into the coding part. When I tried to compile the above given setup, I am getting error
NSObject.h file not found
in the BluetoothManager.h file I added as header to the framework.
Any ideas?
Well I finally solved this problem. I just removed those
#import "NSObject.h"
calls from 3 header files which I mentioned in the question, and Voila!!
After building and archiving my application, I open up ArchiveInfo.plist that's in the folder with the app and it contains some invalid data. The Bundle Identifier is misspelled. I have looked around everywhere in my XCode project for the exact same misspelling, but cannot seem to find it. Any help?
I had first written the app in an old Xcode and for iOS 3 so when trying to submit it for iOS 4 it was having this problem. I just recreated the project.