I'm trying to integrate Urban Airship in my project using Cocoapods. Something that 'should' be simple, but is frustrating me to no end.
Why?
Because Xcode is unable to find the AirshipKit module; giving me the "Module 'AirshipKit` not found" error. Was using Xcode 7.3, which worked with Cocoapods, but after updating to Xcode 8 I'm unable to build my projects.
Let me give a context in which the error happens:
The Podfile I use looks as follows:
################
# Configuration
################
workspace 'MyWorkspace.xcworkspace'
project 'MainProject.xcodeproj'
project 'submodules/SubProject.xcodeproj'
install! 'cocoapods', :deterministic_uuids => false
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['SDKROOT'] = 'iphoneos'
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
################
# Pods
################
abstract_target 'Shared' do
# Pods shared between both the Main and Sub targets
pod 'UrbanAirship-iOS-SDK'
pod 'TBXML', :inhibit_warnings => true
# Pods for the Main Project
target 'MainProject' do
use_frameworks!
project 'MainProject.xcodeproj', 'a_dev_server' => :debug, 'a_release_server' => :release, 'a_appstore_server' => :release
end
# Pods for the Sub Project
target 'SubProject' do
use_frameworks!
project 'submodules/SubProject.xcodeproj', 'a_dev_server' => :debug, 'a_release_server' => :release, 'a_appstore_server' => :release
pod 'Google/Analytics'
end
end
I have a "Main" project which uses my own framework, beautifully dubbed "Sub".
As for the pods; I've updated all pods to their latest versions. Meaning that the UrbanAirship-iOS-SDK
-pod currently is on version 8.0.0
. Urban Airship itself states that the version should be compatible with Xcode 8.
In my file(s) I import the module (using @import AirshipKit;
), but that gives me the not-found error.
The things I've tried:
- Deleting the ModuleCache in my DerivedData folder
- Deleting the DerivedData folder
- Removed the pods and re-install/re-updated them
- Removed them using
pod --deintegrate
- Removed them manually as well by using the methods described in the answer on: How to remove CocoaPods from a project?
- Removed them using
- Building after marking the generated pods-framework as
Optional
and once asRequired
- Building after removing the
@import
statement, then rebuild the project (after getting all them lovely 'file not found' errors) - Manually adding the (Cocoapods generated) AirshipKit framework to the projects
Disclaimer: All above 'Things I've tried' have all been done by repeatedly cleaning the projects and build folders, restarting Xcode and sipping coffee after every error
Jokes aside; I probably tried a bunch of other stuff I can't remember. But Xcode refuses to 'find' the AirshipKit module.