martincik/react-native-hockeyapp

Having trouble integrating openURL in AppDelegate.m

Closed this issue · 3 comments

I'm new to cocoapods so I'm probably just not setting something up correctly. I have cocoapods installed and my Podfile is as follows:

target 'app' do
  pod "HockeySDK"
end

target 'appTests' do

end

I've run pod install and have a workspace with a Pods subproject which does have HockeySDK under the Pods folder.

The issue is in AppDelegate.m where Xcode is complaining "Use of undeclared identifier "BITHockeyManager". Is there an import that I need or should it just work automatically?

I do have RNHockeyApp.h/.m under Libraries/RNHockeyApp

Hi @mangogogos,

you should be doing in your AppDelegate.m:

#import "RNHockeyApp.h"

and here's my Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'

pod 'HockeySDK'

link_with 'helloworld'

Let me know if that helps.

Hey thanks for responding @martincik and sorry for not getting back to you sooner.

I realized one mistake that I was making was that I had copied the RNHockeyApp folder to my libraries itself (rather than the contents of that folder). That, plus adding the import statement gets rid of the pre-compile issues; however, I'm getting a compile-time error now:

Undefined symbols for architecture i386:
"OBJC_CLASS$_BITHockeyManager", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in RNHockeyApp.o
ld: symbol(s) not found for architecture i386

which, in my limited understanding, means that there is something not being linked. Does it have to do with my not using the link_with method? I took a look and that method has been deprecated so I wasn't sure if I should use it

Thanks again!

Found what I was missing! I needed to add the framework from the pod file to the Link Binary With Libraries build phase 👍