Reputation: 1437
Im trying to install the google tag manager sdk into my iOS app using swift. I've followed the instructions here
Getting Started Guide for Swift. On Section 3:Add a bridging header for Objective-C libraries. Step 7: Add these import statements to the header file:. I tried importing code into my bridging header file but when I try and build it comes up with an error that reads 'TagManager.h' file not found.
- How do I solve this error and use google tag manager in swift?
Upvotes: 11
Views: 4291
Reputation: 2096
I had checked Googledeveloper site given in your link.Give it a try by just adding your project name inftont of the BridgingHeader.h in Build Settings it may work. Eg: HippiTap/BridgingHeader.h
UPDATE: Tag Manager 5.0.6
This version does't contain necessary file to import in BridgingHeader.h file as shown in https://developers.google.com/tag-manager/ios/v3/swift#add-bridging-header.If we use 5.0.6 pod file in xcode will look like below,
To solve this we have to reduce the version of TagManager.Now replace
pod 'GoogleTagManager’
with
pod 'GoogleTagManager’,’~> 3.15.0’
Now run pod intall in your terminal,
Installing GoogleTagManager 3.15.0 (was 5.0.6)
By changing the version of tag manager we are free to go by google's tutorial here .
Now the pod file will look like below
I think this may help you.give it a try and let me know the result.
Upvotes: 31