gcrabtree/react-native-socketio

iOS installation problem

Closed this issue · 3 comments

  • Navigate to /node_modules/react-native-socketio/ios/RNSwiftSocketIO
  • Click 'Add'
  • Click your project in the navigator on the left and go to build settings
  • Search for Objective-C Bridging Header

What is Objective-C Bridging Header? I can't find it here. I am not familiar with Xcode so could you please help me?

Here is some info on Bridging Headers for Swift:
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html

This gives you a step by step. Just follow steps 4 and 5
http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/

Navigate to your project build settings and find the “Swift Compiler – Code Generation” section. You may find it faster to type in “Swift Compiler” into the search box to narrow down the results. Note: If you don’t have a “Swift Compiler – Code Generation” section, this means you probably don’t have any Swift classes added to your project yet. Add a Swift file, then try again. Next to “Objective-C Bridging Header” you will need to add the name/path of your header file. If your file resides in your project’s root folder simply put the name of the header file there. Examples: “ProjectName/ProjectName-Bridging-Header.h” or simply “ProjectName-Bridging-Header.h”.

failed to import bridging header '/Users/x/Desktop/xxFE/react-native/RNsocketIO/node_modules/react-native-socketio/ios/RNSwiftSocketIO/SocketBridge.h'

build failed

The following build commands failed:
CompileSwift normal x86_64 /Users/xxx/Desktop/FE/react-native/RNsocketIO/ios/RNsocketIO.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)

i fixed it by adding a column of ' $(SRCROOT)/../node_modules/react-native-socketio/ios/RNSwiftSocketIO' , instand of change the column...sry