objective-c-swift-bridge

Failed to emit precompiled header for bridging header

放肆的年华 提交于 2019-11-27 13:32:20
I downloaded a project from GitHub, then pod the following files, some of which are written by OBJ-C and I used a bridge header. pod ‘SnapKit’ pod ‘MJRefresh’ pod ‘Alamofire’ pod ‘Kingfisher’ pod ‘MBProgressHUD’ pod ‘pop’ pod ‘EVReflection’ pod ‘StreamingKit’ pod ‘iCarousel’ pod ‘ReflectionView’ When I run the project with Xcode 9.0 beta 2, but unfortunately the error log as follows : error: failed to emit precompiled header '/var/folders/kd/4gh0_kxx3jx4thjb_sssmmcw0000gn/T/EvoRadio-Bridging-Header-97bd5f.pch' for bridging header '/Users/ringo/Downloads/EvoRadio-master/EvoRadio/Resources

Cannot access property on Swift type from Objective-C

感情迁移 提交于 2019-11-26 16:33:41
I am trying to access a Swift class's Double? property from Objective-C. class BusinessDetailViewController: UIViewController { var lat : Double? var lon : Double? // Other elements... } In another view controller, I am trying to access lat like following: #import "i5km-Swift.h" @interface ViewController () @property (strong, nonatomic) BusinessDetailViewController *businessDetailViewController; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; self.businessDetailViewController = [[BusinessDetailViewController alloc] initWithNibName:@"BusinessDetailViewController"

Swift Bridging Header import issue

守給你的承諾、 提交于 2019-11-26 15:05:41
Following instructions, I've created a bridging header and added to my project. Unfortunately, the following error occurred: :0: error: could not import Objective-C header '---path--to---header/....h' In build settings I added header search path string to the location of bridging header, but nothing helped. Has anyone experienced this problem? Be careful to add the file to the folder that your error is complaining! I've made the same mistake, if you create the file from Xcode, it will go to the folder: Project->Project->Header.h And Xcode is looking for Project->Header.h That means you need to

Swift Bridging Header import issue

ⅰ亾dé卋堺 提交于 2019-11-26 04:11:00
问题 Following instructions, I\'ve created a bridging header and added to my project. Unfortunately, the following error occurred: :0: error: could not import Objective-C header \'---path--to---header/....h\' In build settings I added header search path string to the location of bridging header, but nothing helped. Has anyone experienced this problem? 回答1: Be careful to add the file to the folder that your error is complaining! I've made the same mistake, if you create the file from Xcode, it will