Open baizhe-grab opened 7 years ago
I'm facing same issue - is there any fix for that? @baizhe-grab @dan-webb
Same issue here on XCode 9.3. Any fix?
Still not. I just ignored this feature in UT =.=
@baizhe-grab How did you remove Nearby in UT and keeping it on main project?
I've got solution regarding it - It was related in my case to cocoapods and using abstract modules. When I moved my nested modules one level up ( removed abstract one ) then everything worked fine.
@Melzar Could you please specify CocoaPods version and provide more details (steps to follow) on how to fix it? Thanks
I had the same problem and after a few debugging hours, here is an example of how I solved that with removing NearbyMessages from test target. (With the help from baizhe-grab comment.)
Let's say we have two targets ProjectDev & ProjectProd.
Let's add a new test target ProjectTests.
We will still use the same abstract_target for multiple targets, but we will have a separate target for Test target but without NearbyMessages.
Podfile example:
platform :ios, '11.0'
use_frameworks!
abstract_target 'defaults' do
pod 'NearbyMessages'
pod 'RealmSwift'
target 'ProjectDev'
target 'ProjectProd'
end
target 'ProjectTests' do
pod 'RealmSwift'
end
How can this still be an issue?
The nearby sdk runs very well both simulator and device, but when I try unit test, the linker got an error below: ld: illegal text-relocation to '_kZipBeaconV3ServiceID' in /Users/baizhe/Library/Developer/Xcode/DerivedData/MyTeksi-fmtwanojygcmibhckitjhwjghnll/Build/Intermediates/CodeCoverage/Products/Testing-iphonesimulator/MyTeksi.app/MyTeksi from 'l032' in /Users/baizhe/Documents/passenger-ios-cherry/Pods/NearbyMessages/Libraries/libGNSMessages.a(PEBeacon.o) for architecture x86_64
Do I need a Position-Dependent library?
Any idea will be appreciate.